axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject ΠΡ: Cannot send an image/jpeg
Date Thu, 17 May 2007 20:52:51 GMT

	I am trying to send an image/jpeg attachment using AXIS2 on the client side.
My wsdl looks like this for the data type picture
<xs:complexType name="picture">
		<xs:element minOccurs="0" name="imageData" ns3:expectedContentTypes="image/jpeg" type="xs:base64Binary"/>

When I compile the wsdl using wsdl2java I get back a class (Picture) which holds the imageData
in a DataHandler.
On the client side my code is:

String endpoint = "";
AttachmentHandlerServiceStub stub = new AttachmentHandlerServiceStub(endpoint);
Picture pic = new Picture();
File file = new File("e:\\test.jpeg");        
BufferedImage image =;        
DataHandler imgDH = new DataHandler(image, "image/jpeg");
GetLicencingInfo5 licencingInfo5 = new GetLicencingInfo5();

When I call the remote method, tcpmon shows that 
<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="">
         <ns1:getLicencingInfo5 xmlns:ns1="">

The DataHandler at the client side holds the data (using ImageIO.write() on the DataHandler
content gives me the image back). For some reason AXIS2 does not send it out.

Thanks in advance for your help

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message