views:

200

answers:

0

Hello everyone,

I am working on a python app which needs to expose some services. For that task I was testing ZSI. Everything was fine until I tried to send binaries through the web service.

The tested escenario looks like this:

  • A WSDL for the WS (to execute wsdl2py / wsdl2dispatch)
  • A response including a Base64 encoded binary
  • The python program dumps a png image file as response.

I've tried this service from the WebService Explorer in Eclipse 3.5, worked fine and returned an Base64 Encoded String. Decoded that String with base64_decode(encodedString) with a small php script, and got the image.

Ok. That worked fine.

But the issue came when I tried to autogenerate a client from the WSDL in Java (Apache Axis). Image files are not correctly transfered, but the same procedure
with text files just works fine. I guess this is because a 8-bit / 7-bit problem, but I'm not sure.

Anybody can give me some advice about this?

Doing some search around the web, I read about people having issues with base64 encoding. Also I've read about the Soap with Attachments (SwA) specification which uses mime multipart, but didn't find an example with ZSI.

I have 2 questions about this:

  • Which is the proper way of doing this (SwA / just base6 encoding)?
  • Any advice about SwA? (need to transfer no more than 15 MB per attachment).

Sincerely,

Pablo Fonseca