Catch 22 Webservice with binary response.

2
I am calling a webservice which gives me as response a binary file. The response is primitive so I can not use xml to domain mapping. I can store the response in a variable. So I now end up with a binary variable. But now what to do with this binary variable? I can not create a filesystem object and change the binary to the received binary. And I can not create a java action to pass the binary so I can receive a filesystem back (no option to pass a binary). Why can I create a binary attribute in an entity but am I unable to change this attribute or do anything with the binary variable? This is a catch 22.
asked
2 answers
1

Hmm not sure if this is going to work but it might be worth a try.

Download the wsdl and change it by adding an extra field to the response. Make it minOccurs=0. If you import this wsdl it should change your response to a complex response making you able to map your response and in a mapping you are able to set a binary field to the content field of a filedocument.

answered
0

Just modifying the wsdl with the bogus line was the answer:

 <s:element name="GetAttachmentResponse">
    <s:complexType>
      <s:sequence>
        <s:element minOccurs="0" maxOccurs="1" name="GetAttachmentResult" type="s:base64Binary" />
            <s:element minOccurs="0" maxOccurs="1" name="Bogus" type="s:string" />
      </s:sequence>
    </s:complexType>
answered