Re : Re : Re : Re : Tr : Axis problem returning byteArray
Hello, My problem is solved. Thanks very much for your help. Cheers Thomas - Message d'origine De : WJ Krpelan <[EMAIL PROTECTED]> À : [email protected] Envoyé le : Mercredi, 5 Septembre 2007, 11h05mn 52s Objet : Re: Re : Re : Re : Tr : Axis problem returning byteArray Hello, classical case of "WSDL first". I'd suggest alter the type of CONTENT to "base64Binary", then generate your java-code with WSDL2Java and use the resulting classes Worked with me. Cheers --- Thomas Beaujard <[EMAIL PROTECTED]> wrote: > Hello, > > Here is the wsdl gnerated when I use the ?wsdl. The > return object is GMDSRESPCT, adn the tag containing > the byteArray is CONTENT. You will notice that > CONTENT is defined as xsd:string type. This is weird > because I generated the class using WSDL2java and > when I first created the wsdl file I specified > content as xsd:base64Binary. I really don't > understand. > > The wsdl : > > > > > > > > type="xsd:string" /> > type="xsd:string" /> > > > type="tns1:GMDSREQCT" /> > > > name="CONTENT" type="xsd:string" /> *// xsd:base64Binary// > > > type="tns1:GMDSRESPCT" /> > > > > > > type="xsd:string" /> > > > > > > > /> > > > > name="GMDSREQCT" /> > > > > > > name="GMDSRESPCT" /> > > > parameterOrder="GMDSREQCT"> > message="impl:getDocumentRequest" > name="getDocumentRequest" /> > message="impl:getDocumentResponse" > name="getDocumentResponse" /> > name="GMDSERRCT" /> > > > type="impl:DocContentPortType"> > > name="getDocument"> soapAction="getDocument" /> > > > > > > > > use="literal" /> > > name="DocContentService"> > binding="impl:DocContentSOAPPortSoapBinding" > name="DocContentSOAPPort"> > > > > > > - Message d'origine > De : WJ Krpelan <[EMAIL PROTECTED]> > À : [email protected] > Envoyé le : Mardi, 4 Septembre 2007, 20h05mn 22s > Objet : Re: Re : Re : Tr : Axis problem returning > byteArray > > 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 <[EMAIL PROTECTED]> 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 > > > > > > > > 37 > > 80 > > 68 > > 70 > > 45 > > 49 > .. > > 13 > > > > > > > > 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 <[EMAIL PROTECTED]> > > À : [email protected] > > 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 > > > > > > > > xmlns:soapenv="htt
Re: **JUNK** Re : Re : Re : Tr : Axis problem returning byteArray
If you switch to Axis2 , then you will have what you are expecting, Thanks Deepal > Hello, > > Here is the wsdl gnerated when I use the ?wsdl. The return object is > GMDSRESPCT, adn the tag containing the byteArray is CONTENT. You will > notice that CONTENT is defined as xsd:string type. This is weird > because I generated the class using WSDL2java and when I first created > the wsdl file I specified content as xsd:base64Binary. I really don't > understand. > > The wsdl : > > > > > > > > > > > > > > > type="xsd:string" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > name="getDocumentRequest" /> > name="getDocumentResponse" /> > > > > type="impl:DocContentPortType"> > > soapAction="getDocument" /> > > > > > > > > > > > name="DocContentSOAPPort"> > > > > > > - Message d'origine > De : WJ Krpelan <[EMAIL PROTECTED]> > À : [email protected] > Envoyé le : Mardi, 4 Septembre 2007, 20h05mn 22s > Objet : Re: Re : Re : Tr : Axis problem returning byteArray > > 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 <[EMAIL PROTECTED]> 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 > > > > > > > > 37 > > 80 > > 68 > > 70 > > 45 > > 49 > .. > > 13 > > > > > > > > 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 <[EMAIL PROTECTED]> > > À : [email protected] > > 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 > > > > > > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; > <http://schemas.xmlsoap.org/soap/envelope/%22>;; > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > <http://www.w3.org/2001/XMLSchema%22>;; > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > <http://www.w3.org/2001/XMLSchema-instance%22>;;> > > > > http://tempuri.org/"; <http://tempuri.org/%22>;;> > > ITAMWA== > > FxdiAg== > > > > > > > > > > > > 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 > > > > > > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; > <http://schemas.xmlsoap.org/soap/envelope/%22>;; > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > <http://www.w3.org/2001/XMLSchema%22>;; > > > xmlns:xsi="http://www.w3
Re: Re : Re : Re : Tr : Axis problem returning byteArray
Hello, classical case of "WSDL first". I'd suggest alter the type of CONTENT to "base64Binary", then generate your java-code with WSDL2Java and use the resulting classes Worked with me. Cheers --- Thomas Beaujard <[EMAIL PROTECTED]> wrote: > Hello, > > Here is the wsdl gnerated when I use the ?wsdl. The > return object is GMDSRESPCT, adn the tag containing > the byteArray is CONTENT. You will notice that > CONTENT is defined as xsd:string type. This is weird > because I generated the class using WSDL2java and > when I first created the wsdl file I specified > content as xsd:base64Binary. I really don't > understand. > > The wsdl : > > > > > > > > type="xsd:string" /> > type="xsd:string" /> > > > type="tns1:GMDSREQCT" /> > > > name="CONTENT" type="xsd:string" /> *// xsd:base64Binary// > > > type="tns1:GMDSRESPCT" /> > > > > > > type="xsd:string" /> > > > > > > > /> > > > > name="GMDSREQCT" /> > > > > > > name="GMDSRESPCT" /> > > > parameterOrder="GMDSREQCT"> > message="impl:getDocumentRequest" > name="getDocumentRequest" /> > message="impl:getDocumentResponse" > name="getDocumentResponse" /> > name="GMDSERRCT" /> > > > type="impl:DocContentPortType"> > > name="getDocument"> soapAction="getDocument" /> > > > > > > > > use="literal" /> > > name="DocContentService"> > binding="impl:DocContentSOAPPortSoapBinding" > name="DocContentSOAPPort"> > > > > > > - Message d'origine > De : WJ Krpelan <[EMAIL PROTECTED]> > À : [email protected] > Envoyé le : Mardi, 4 Septembre 2007, 20h05mn 22s > Objet : Re: Re : Re : Tr : Axis problem returning > byteArray > > 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 <[EMAIL PROTECTED]> 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 > > > > > > > > 37 > > 80 > > 68 > > 70 > > 45 > > 49 > .. > > 13 > > > > > > > > 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 <[EMAIL PROTECTED]> > > À : [email protected] > > 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 > > > > > > > > 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"> > > > > http://tempuri.org/"> > > ITAMWA== > > FxdiAg== > > > > > > > > > > > > HTTP/1.1 200 OK > > Server: Apache-Coyote/1.1 > > Set-Cookie: > > JSESSIONID=887A1E5E02B52B88387CAD9B3FEA7F6C; > > Path=/axis > > Content-Type: text/xml;charset=utf-8 > === message truncated === Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re : Re : Re : Tr : Axis problem returning byteArray
Hello, Here is the wsdl gnerated when I use the ?wsdl. The return object is GMDSRESPCT, adn the tag containing the byteArray is CONTENT. You will notice that CONTENT is defined as xsd:string type. This is weird because I generated the class using WSDL2java and when I first created the wsdl file I specified content as xsd:base64Binary. I really don't understand. The wsdl : - Message d'origine De : WJ Krpelan <[EMAIL PROTECTED]> À : [email protected] Envoyé le : Mardi, 4 Septembre 2007, 20h05mn 22s Objet : Re: Re : Re : Tr : Axis problem returning byteArray 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 <[EMAIL PROTECTED]> 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 > > > > 37 > 80 > 68 > 70 > 45 > 49 .. > 13 > > > > 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 <[EMAIL PROTECTED]> > À : [email protected] > 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 > > > 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"> > > http://tempuri.org/"> > ITAMWA== > FxdiAg== > > > > > > 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 > > > 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:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:ns1="http://tempuri.org/"> > xsi:type="xsd:base64Binary">OEduWg== > > > > > > --- Thomas Beaujard <[EMAIL PROTECTED]> 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: > > > style="document" use="literal"> > >qname="getDocument" > > returnQName="ns1:GMDSRESPCT" > > returnType="ns1:GMDSRESPCT" soapAction="" > > xmlns:ns1="..."> > > > type="ns1:GMDSREQCT"/> > > > qname="ns1:GMDSERRCT" type="ns1:GMDSERRCT"/> > > > >> value="getDocument"/> > >value="1.2"/> > >> value="DocContent"/> > >> > value="com.webservice.GetDocumentSoapBindingImpl"/> > >> value="DocContent"/> > >> value=""/> >
Re: Re : Re : Tr : Axis problem returning byteArray
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 <[EMAIL PROTECTED]> 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 > > > > 37 > 80 > 68 > 70 > 45 > 49 .. > 13 > > > > 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 <[EMAIL PROTECTED]> > À : [email protected] > 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 > > > 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";;> > > http://tempuri.org/";;> > ITAMWA== > FxdiAg== > > > > > > 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 > > > 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:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";; > xmlns:ns1="http://tempuri.org/";;> > xsi:type="xsd:base64Binary">OEduWg== > > > > > > --- Thomas Beaujard <[EMAIL PROTECTED]> 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: > > > style="document" use="literal"> > >qname="getDocument" > > returnQName="ns1:GMDSRESPCT" > > returnType="ns1:GMDSRESPCT" soapAction="" > > xmlns:ns1="..."> > > > type="ns1:GMDSREQCT"/> > > > qname="ns1:GMDSERRCT" type="ns1:GMDSERRCT"/> > > > >> value="getDocument"/> > >value="1.2"/> > >> value="DocContent"/> > >> > value="com.webservice.GetDocumentSoapBindingImpl"/> > >> value="DocContent"/> > >> value=""/> > >> value="DocContentService"/> > >> value=".."/> > >> > 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="."/> > >> > 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="."/> > >> > deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" > > encodingStyle="" qname="ns4:>GMDSERRCT" > > > serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" > > type="java:commessages.GMDSERRCT" > > xmlns:ns4="..."/> > > > > > > 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 tag for every > single > > byte instead of having the array of byte within > the > > tag . > > > > 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 > > > > > === message truncated ===
