You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Makesh Rao <ma...@yahoo.com> on 2004/06/16 20:55:27 UTC

ksoap client with Axis server

Hi 

I have a doc-lit webservice using a RPC provider
implemented using Axis 1.1 and running on Tomcat. I
used a wsdl to generate the server bindings and also
generated the client stubs. I have an applet as a
client and I'm using ksoap to connect. 

I see a difference in the SOAP messages that the two
put out. 

Using Axis Client: 

SOAPEnvelope = 
<v:Envelope
xmlns:i="http://www.w3.org/1999/XMLSchema-instance" 
xmlns:d="http://www.w3.org/1999/XMLSchema" 
xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"> 
<v:Header/> 
<v:Body> 
<prepareConfigSet
i:type="d:string">&lt;TestMessage&gt; 
Hello World 
&lt;/TestMessage&gt; 
</prepareConfigSet> 
</v:Body> 
</v:Envelope> 

Using ksoap: 

<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<prepareConfigSet xmlns="http://ws-dev/ict/types"
id="o0" SOAP-ENC:root="1"> 
<request xmlns=""
xsi:type="xsd:string">&lt;TestMessage&gt; 
Hello World 
&lt;/TestMessage&gt; 
</request> 
</prepareConfigSet> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

Notice the extra element <request > that ksoap writes
out in the BODY. The server chokes on this with a SAX
Exception, saying something like it found a child when
none was expected. 

The same ksoap message works if I have a .jws
implementation on the server. 

I then commented out the code in ksoap that writes out
the extra element. This worked with the wsdd
implementation, but the the .jws now fails. 

Is this something that I can configure ? Or is there
something that I'm missing in the wsdd files that will
let axis only pick the correct portions from the SOAP
message ? 

Any help is appreciated.. 

Thanks 
Makesh 
 



		
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

RE: ksoap client with Axis server

Posted by Makesh Rao <ma...@yahoo.com>.
Hi Anne

Thanks for the response. Here's the wsdl...

---------------START
WSDL------------------------------
  <?xml version="1.0" encoding="UTF-8" ?> 
<wsdl:definitions
targetNamespace="http://ws-dev/ict/types"
xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:apachesoap="http://xml.apache.org/xml-soap" 
xmlns:impl="http://ws-dev/ict/types" 
xmlns:intf="http://ws-dev/ict/types" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <wsdl:types>
 <schema targetNamespace="http://ws-dev/ict/types"
xmlns="http://www.w3.org/2001/XMLSchema">
  <element name="prepareConfigSetReq"
type="xsd:string" /> 
  <element name="prepareConfigSetResp"
type="xsd:string" /> 
  <element name="manageConfigSetReq" type="xsd:string"
/> 
  <element name="manageConfigSetResp"
type="xsd:string" /> 
  </schema>
  </wsdl:types>
 <wsdl:message name="manageConfigSetResponse">
  <wsdl:part element="impl:manageConfigSetResp"
name="manageConfigSetResp" /> 
  </wsdl:message>
 <wsdl:message name="prepareConfigSetResponse">
  <wsdl:part element="impl:prepareConfigSetResp"
name="prepareConfigSetResp" /> 
  </wsdl:message>
 <wsdl:message name="manageConfigSetRequest">
  <wsdl:part element="impl:manageConfigSetReq"
name="manageConfigSetReq" /> 
  </wsdl:message>
 <wsdl:message name="prepareConfigSetRequest">
  <wsdl:part element="impl:prepareConfigSetReq"
name="prepareConfigSetReq" /> 
  </wsdl:message>
 <wsdl:portType name="ICTWSPortType">
 <wsdl:operation name="prepareConfigSet"
parameterOrder="prepareConfigSetReq">
  <wsdl:input message="impl:prepareConfigSetRequest"
name="prepareConfigSetRequest" /> 
  <wsdl:output message="impl:prepareConfigSetResponse"
name="prepareConfigSetResponse" /> 
  </wsdl:operation>
 <wsdl:operation name="manageConfigSet"
parameterOrder="manageConfigSetReq">
  <wsdl:input message="impl:manageConfigSetRequest"
name="manageConfigSetRequest" /> 
  <wsdl:output message="impl:manageConfigSetResponse"
name="manageConfigSetResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
 <wsdl:binding name="ICTWSSoapBinding"
type="impl:ICTWSPortType">
  <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" /> 
 <wsdl:operation name="prepareConfigSet">
  <wsdlsoap:operation soapAction="" /> 
 <wsdl:input name="prepareConfigSetRequest">
  <wsdlsoap:body namespace="http://ws-dev/ict/types"
use="literal" /> 
  </wsdl:input>
 <wsdl:output name="prepareConfigSetResponse">
  <wsdlsoap:body namespace="http://ws-dev/ict/types"
use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
 <wsdl:operation name="manageConfigSet">
  <wsdlsoap:operation soapAction="" /> 
 <wsdl:input name="manageConfigSetRequest">
  <wsdlsoap:body namespace="http://ws-dev/ict/types"
use="literal" /> 
  </wsdl:input>
 <wsdl:output name="manageConfigSetResponse">
  <wsdlsoap:body namespace="http://ws-dev/ict/types"
use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
 <wsdl:service name="ICTWS">
 <wsdl:port binding="impl:ICTWSSoapBinding"
name="ICTWS">
  <wsdlsoap:address
location="http://ws-dev/GCT/sparx/services/ICTWS" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>
--------------------END
WSDL---------------------------

~Makesh


--- Anne Thomas Manes <an...@manes.net> wrote:
> Ksoap is generating an RPC/encoded message. 
> Can you supply the WSDL?
> It's possible that ksoap doesn't support
> doc/literal.
> 
> -----Original Message-----
> From: Makesh Rao [mailto:makesh@yahoo.com] 
> Sent: Wednesday, June 16, 2004 2:55 PM
> To: axis-user@ws.apache.org
> Subject: ksoap client with Axis server 
> 
> Hi 
> 
> I have a doc-lit webservice using a RPC provider
> implemented using Axis 1.1 and running on Tomcat. I
> used a wsdl to generate the server bindings and also
> generated the client stubs. I have an applet as a
> client and I'm using ksoap to connect. 
> 
> I see a difference in the SOAP messages that the two
> put out. 
> 
> Using Axis Client: 
> 
> SOAPEnvelope = 
> <v:Envelope
> xmlns:i="http://www.w3.org/1999/XMLSchema-instance" 
> xmlns:d="http://www.w3.org/1999/XMLSchema" 
> xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
> xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
> 
> <v:Header/> 
> <v:Body> 
> <prepareConfigSet
> i:type="d:string">&lt;TestMessage&gt; 
> Hello World 
> &lt;/TestMessage&gt; 
> </prepareConfigSet> 
> </v:Body> 
> </v:Envelope> 
> 
> Using ksoap: 
> 
> <SOAP-ENV:Envelope
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
>
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> 
>
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> 
> <SOAP-ENV:Body
>
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> 
> <prepareConfigSet xmlns="http://ws-dev/ict/types"
> id="o0" SOAP-ENC:root="1"> 
> <request xmlns=""
> xsi:type="xsd:string">&lt;TestMessage&gt; 
> Hello World 
> &lt;/TestMessage&gt; 
> </request> 
> </prepareConfigSet> 
> </SOAP-ENV:Body> 
> </SOAP-ENV:Envelope> 
> 
> Notice the extra element <request > that ksoap
> writes
> out in the BODY. The server chokes on this with a
> SAX
> Exception, saying something like it found a child
> when
> none was expected. 
> 
> The same ksoap message works if I have a .jws
> implementation on the server. 
> 
> I then commented out the code in ksoap that writes
> out
> the extra element. This worked with the wsdd
> implementation, but the the .jws now fails. 
> 
> Is this something that I can configure ? Or is there
> something that I'm missing in the wsdd files that
> will
> let axis only pick the correct portions from the
> SOAP
> message ? 
> 
> Any help is appreciated.. 
> 
> Thanks 
> Makesh 
>  
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail 
> 
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

RE: ksoap client with Axis server

Posted by Anne Thomas Manes <an...@manes.net>.
Ksoap is generating an RPC/encoded message. 
Can you supply the WSDL?
It's possible that ksoap doesn't support doc/literal.

-----Original Message-----
From: Makesh Rao [mailto:makesh@yahoo.com] 
Sent: Wednesday, June 16, 2004 2:55 PM
To: axis-user@ws.apache.org
Subject: ksoap client with Axis server 

Hi 

I have a doc-lit webservice using a RPC provider
implemented using Axis 1.1 and running on Tomcat. I
used a wsdl to generate the server bindings and also
generated the client stubs. I have an applet as a
client and I'm using ksoap to connect. 

I see a difference in the SOAP messages that the two
put out. 

Using Axis Client: 

SOAPEnvelope = 
<v:Envelope
xmlns:i="http://www.w3.org/1999/XMLSchema-instance" 
xmlns:d="http://www.w3.org/1999/XMLSchema" 
xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"> 
<v:Header/> 
<v:Body> 
<prepareConfigSet
i:type="d:string">&lt;TestMessage&gt; 
Hello World 
&lt;/TestMessage&gt; 
</prepareConfigSet> 
</v:Body> 
</v:Envelope> 

Using ksoap: 

<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<prepareConfigSet xmlns="http://ws-dev/ict/types"
id="o0" SOAP-ENC:root="1"> 
<request xmlns=""
xsi:type="xsd:string">&lt;TestMessage&gt; 
Hello World 
&lt;/TestMessage&gt; 
</request> 
</prepareConfigSet> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

Notice the extra element <request > that ksoap writes
out in the BODY. The server chokes on this with a SAX
Exception, saying something like it found a child when
none was expected. 

The same ksoap message works if I have a .jws
implementation on the server. 

I then commented out the code in ksoap that writes out
the extra element. This worked with the wsdd
implementation, but the the .jws now fails. 

Is this something that I can configure ? Or is there
something that I'm missing in the wsdd files that will
let axis only pick the correct portions from the SOAP
message ? 

Any help is appreciated.. 

Thanks 
Makesh 
 



		
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail