Hello,
i have a web service that i want to return an attachment.
i use jaxb2 and spring-ws- rc1.
i try with 2 schemas:
first:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.qindel.com/padron"
xmlns="http://www.qindel.com/padron"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="RespuestaVolante" type="tipo_RespuestaVolante"/>
...
<xs:complexType name="tipo_RespuestaVolante">
<xs:sequence>
<xs:element name="attfake" type="xs:base64Binary"/>
</xs:sequence>
</xs:complexType>
this generate a byte [] attfake.
the second
Code:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.qindel.com/padron"
xmlns="http://www.qindel.com/padron"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
<xs:element name="RespuestaVolante" type="tipo_RespuestaVolante"/>
...
<xs:complexType name="tipo_RespuestaVolante">
<xs:sequence>
<xs:element name="attfake" type="xs:base64Binary" xmime:expectedContentTypes="application/octet-stream"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
this generate a DataHandler attfake.
In the two cases the web service works and returns the same:
Code:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns2:RespuestaVolante xmlns:ns2="http://www.qindel.com/padron"><ns2:attfake>Sk9ERVIhISE=</ns2:attfake></ns2:RespuestaVolante></SOAP-ENV:Body></SOAP-ENV:Envelope>
but not in an attachment!
how configure it for returns the byte in an attachment?
thanks in advance,
César.