Thanks for your answer, I will try to explain my problem more precisely:
In fact, I generated my code from WSDL2java with a wsdl file and a xsd file as
input. In the xsd file I defined the response as being xsd:base64binary.
Here is the service definition in my server-config.wsdd:
<service name="DocContent" provider="java:RPC" style="document" use="literal">
<operation name="getDocument" qname="getDocument"
returnQName="ns1:GMDSRESPCT" returnType="ns1:GMDSRESPCT" soapAction=""
xmlns:ns1="...">
<parameter qname="ns1:GMDSREQCT" type="ns1:GMDSREQCT"/>
<fault class="com.....messages.GMDSERRCT" qname="ns1:GMDSERRCT"
type="ns1:GMDSERRCT"/>
</operation>
<parameter name="allowedMethods" value="getDocument"/>
<parameter name="typeMappingVersion" value="1.2"/>
<parameter name="wsdlPortType" value="DocContent"/>
<parameter name="className"
value="com.....webservice.GetDocumentSoapBindingImpl"/>
<parameter name="wsdlServicePort" value="DocContent"/>
<parameter name="wsdlTargetNamespace" value="...."/>
<parameter name="wsdlServiceElement" value="DocContentService"/>
<parameter name="schemaUnqualified" value="......"/>
<typeMapping
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="" qname="ns2:>GMDSREQCT"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
type="java:com......messages.GMDSREQCT" xmlns:ns2="....."/>
<typeMapping
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="" qname="ns3:>GMDSRESPCT"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
type="java:com.....messages.GMDSRESPCT" xmlns:ns3="....."/>
<typeMapping
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="" qname="ns4:>GMDSERRCT"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
type="java:com....messages.GMDSERRCT" xmlns:ns4="..."/>
</service>
Here is the class corresponding to the response :
public class GMDSRESPCT implements Serializable {
private byte[] CONTENT;
private
public GMDSRESPCT() {
}
public GMDSRESPCT(byte[] CONTENT) {
this.CONTENT = CONTENT;
}
public byte[] getCONTENT() {
return CONTENT;
}
So the web service should return an object GMDSRESPCT. But I get the error and
when I use tcpmon to see the messages exchanged, I notice that the response
include <CONTENT> tag for every single byte instead of having the array of byte
within the tag <CONTENT>.
Hope it's not too messy.
Cheers
Thom
----- Message d'origine ----
De : WJ Krpelan <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Jeudi, 30 Août 2007, 17h18mn 03s
Objet : Re: Tr : Axis problem returning byteArray
Hello
you can't simply send binary data as on the transport
level its converted to xml, which is basically plain
text.
One simple possibility would be to use datatype
base64binary
Cheers,
--- Thomas Beaujard <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm using Axis 1.4.
> I have a document style web service which returns a
> byteArray (actually a pdf file).
> When I invoke the web service, I get the following
> error:
>
> org.apache.axis.encoding.ser.BeanPropertyTarget set
> Could not convert java.lang.Byte to bean field
> 'CONTENT', type [B
>
> Does anyone have encounter similar problem?
>
> Thanks in advance,
>
> Thom
>
>
>
>
>
>
>
> Ne gardez plus qu'une seule adresse mail ! Copiez
> vos mails vers Yahoo! Mail
>
>
>
>
>
>
>
_____________________________________________________________________________
>
> Ne gardez plus qu'une seule adresse mail ! Copiez
> vos mails vers Yahoo! Mail
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail