Robert,<br><div class="gmail_quote"><div>I am able to wire the attachment, but the contents does not seem to be correct, I am wiring the binary to an axis engine in java. Basically my service call, needs a csv file with contents as below (first row being a string "NAME" and the second row being "machine1" etc)<br>
<br>NAME<br>machine1<br></div><div><br>Here is the method :<br><br>def zip_string():<br>#" Given a string, use gzip and StringIO to create a zip'd string "<br>    uncompressed_string_header  ="NAME\n"<br>
    uncompressed_string_contents ="machine1"<br>    zbuf = StringIO.StringIO()<br>    zfile = gzip.GzipFile(mode='wb', fileobj=zbuf)<br>    zfile.write( uncompressed_string_header )<br>    zfile.write( uncompressed_string_contents )<br>
    zfile.close()<br>    return zbuf.getvalue()<br><br>//service call<br>client.service.executeCommand('some string',  base64.b64encode( zip_string()))<br> <br><br>Any ideas?<br><br>Thanks<br>AJ<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><hr>


<ul><li><i>From</i>: "Robert Marsanyi" <rnm whidbey com></li><li><i>To</i>: <fedora-suds-list redhat com></li><li><i>Subject</i>: Re: [Fedora-suds-list] attachment support</li><li><i>Date</i>: Thu, 3 Dec 2009 09:14:53 -0800</li>

</ul>


<hr>


<pre>I just used it Tuesday to send a gzip'd binary as an element in the request. <br>The WSDL for that particular element was<br><br><s:complexType name="OrderData"><br><s:sequence><br><s:element minOccurs="1" maxOccurs="1" name="DataType" type="s:string"/><br>

<s:element minOccurs="0" maxOccurs="1" name="DataValue" type="s:string"/><br><s:element minOccurs="0" maxOccurs="1" name="DataBinaryValue" <br>

type="s:base64Binary"/><br></s:sequence><br></s:complexType><br><br>and the Python to set the element was<br><br>def zip_string( uncompressed_string ):<br>    " Given a string, use gzip and StringIO to create a zip'd string "<br>

    zbuf = StringIO.StringIO()<br>    zfile = gzip.GzipFile(mode='wb', fileobj=zbuf)<br>    zfile.write( uncompressed_string )<br>    zfile.close()<br>    return zbuf.getvalue()<br><br>...<br>            .OrderData.DataBinaryValue = base64.b64encode( zip_string( <br>

line_xml ) )<br>...<br><br>which seemed to work well.<br><br>--rbt<br><br><br>----- Original Message ----- <br>From: Ajai Joy<br>To: fedora-suds-list redhat com<br>Sent: Thursday, December 03, 2009 5:51 AM<br>Subject: [Fedora-suds-list] attachment support<br>

<br><br>Does suds, have attachment support - either MTOM or base64 encoded <br>attachments ? If so, could anyone share some samples?<br><br>Thanks<br>AJ<br><br></pre><br clear="all"><br>-- <br>Best Regards,<br><font color="#888888">Ajai Joy<br>


</font></blockquote></div><br><br clear="all"><br>-- <br>Best Regards,<br>Ajai Joy<br>