axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WJ Krpelan <krpelan...@yahoo.com>
Subject Re: Re : Re : Tr : Axis problem returning byteArray
Date Tue, 04 Sep 2007 18:05:22 GMT
Hello,
As it works with me, I'd suspect there is something
wrong with your xsd-File or your WSDL-File
Can I have a look at the WSDL?
Cheers

--- Thomas Beaujard <thomasbeaujard@yahoo.fr> wrote:

> Hi
> 
> Here is the SOAP-trace:
> 
> HTTP/1.1 200 OK Content-Type: text/xml;charset=utf-8
> Date: Tue, 04 Sep 2007 11:10:43 GMT Server:
> Apache-Coyote/1.1 Connection: close  
> 
> <soapenv:Body>
> <GMDSRESPCT xmlns="hhhhhhhhhhhhhhhh">
> <CONTENT xsi:type="xsd:byte" xmlns="">37</CONTENT>
> <CONTENT xsi:type="xsd:byte" xmlns="">80</CONTENT>
> <CONTENT xsi:type="xsd:byte" xmlns="">68</CONTENT>
> <CONTENT xsi:type="xsd:byte" xmlns="">70</CONTENT>
> <CONTENT xsi:type="xsd:byte" xmlns="">45</CONTENT>
> <CONTENT xsi:type="xsd:byte" xmlns="">49</CONTENT
> ..........
> <CONTENT xsi:type="xsd:byte" xmlns="">13</CONTENT>
> </GMDSRESPCT></soapenv:Body></soapenv:Envelope>
> 
> 
> As you can see the tag CONTENT appears many times
> with a type byte, whereas it should only appear once
> with the type base64binary.
> I cannot use the xs:string workaround... do you have
> any other idea?
> 
> Thanks for your help
> 
> Thom
> 
> ----- Message d'origine ----
> De : WJ Krpelan <krpelan_wj@yahoo.com>
> À : axis-dev@ws.apache.org
> Envoyé le : Vendredi, 31 Août 2007, 12h24mn 28s
> Objet : Re: Re : Tr : Axis problem returning
> byteArray
> 
> Hi
> Could you provice a SOAP-Trace (TCPMon)? Would it
> look
> similar to the one below?
> A less than satisfactory workaround, if you control
> both sides of the wire, would be to change type to
> xs:string and do the conversion within java.
> Cheers
> 
> POST /axis/CalcArr.jws HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime,
> multipart/related, text/*
> User-Agent: Axis/1.4
> Host: 127.0.0.1:8088
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: ""
> Content-Length: 334
> 
> <?xml version="1.0" encoding="UTF-8"?>
>    <soapenv:Envelope
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>       <soapenv:Body>
>          <Add xmlns="http://tempuri.org/";>
>             <i1>ITAMWA==</i1>
>             <i2>FxdiAg==</i2>
>          </Add>
>       </soapenv:Body>
>    </soapenv:Envelope>
> 
> 
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Set-Cookie:
> JSESSIONID=887A1E5E02B52B88387CAD9B3FEA7F6C;
> Path=/axis
> Content-Type: text/xml;charset=utf-8
> Date: Fri, 31 Aug 2007 10:16:54 GMT
> Connection: close
> 
> <?xml version="1.0" encoding="utf-8"?>
>    <soapenv:Envelope
>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>       <soapenv:Body>
>          <ns1:AddResponse
>
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:ns1="http://tempuri.org/";>
>             <AddReturn
> xsi:type="xsd:base64Binary">OEduWg==</AddReturn>
>          </ns1:AddResponse>
>       </soapenv:Body>
>    </soapenv:Envelope>
> 
> 
> --- Thomas Beaujard <thomasbeaujard@yahoo.fr> wrote:
> 
> > 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:&gt;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:&gt;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:&gt;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 <krpelan_wj@yahoo.com>
> > À : axis-dev@ws.apache.org
> > Envoyé le : Jeudi, 30 Août 2007, 17h18mn 03s
> > Objet : Re: Tr : Axis problem returning byteArray
> > 
> > 
> 
=== message truncated ===



      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on
us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message