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 &quot;NAME&quot; and the second row being &quot;machine1&quot; etc)<br>
<br>NAME<br>machine1<br></div><div><br>Here is the method :<br><br>def zip_string():<br>#&quot; Given a string, use gzip and StringIO to create a zip&#39;d string &quot;<br>    uncompressed_string_header  =&quot;NAME\n&quot;<br>
    uncompressed_string_contents =&quot;machine1&quot;<br>    zbuf = StringIO.StringIO()<br>    zfile = gzip.GzipFile(mode=&#39;wb&#39;, 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(&#39;some string&#39;,  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>: &quot;Robert Marsanyi&quot; &lt;rnm whidbey com&gt;</li><li><i>To</i>: &lt;fedora-suds-list redhat com&gt;</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&#39;d binary as an element in the request. <br>The WSDL for that particular element was<br><br>&lt;s:complexType name=&quot;OrderData&quot;&gt;<br>&lt;s:sequence&gt;<br>&lt;s:element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;DataType&quot; type=&quot;s:string&quot;/&gt;<br>

&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;DataValue&quot; type=&quot;s:string&quot;/&gt;<br>&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;DataBinaryValue&quot; <br>

type=&quot;s:base64Binary&quot;/&gt;<br>&lt;/s:sequence&gt;<br>&lt;/s:complexType&gt;<br><br>and the Python to set the element was<br><br>def zip_string( uncompressed_string ):<br>    &quot; Given a string, use gzip and StringIO to create a zip&#39;d string &quot;<br>

    zbuf = StringIO.StringIO()<br>    zfile = gzip.GzipFile(mode=&#39;wb&#39;, 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>