Re: ADBException and Running Web Services

2008-02-19 Thread Amila Suriarachchi
This should be a problem with the request message.
to give a correct answer we need to have the whole wsdl file. Here it seems
to be a problem with the namespaces.
Generate a java client and try to invoke the service. then compare the two
requests.

thanks,
Amila.

On Feb 19, 2008 9:34 AM, Twinkle Thakkar [EMAIL PROTECTED] wrote:

 Hi,

 We are facing an issue with our web services developed using axis2-1.3. We
 have used Eclipse plugin to generate java code

 from wsdl.

 The web services are working fine when called using Eclipse Web Services
 Explorer or Java Client. But we are not able to

 communicate with all our parameterized web methods using SOAP Client
 availabe @ http://www.ditchnet.org/soapclient/.

 Following is the error description of one of the parameterized methods:

 We recieve an ADBException - org.apache.axis2.databinding.ADBException:
 Unexpected subelement directoryListing.

 Here, directoryListing is the parameter we pass to the web method.
 Following is the wsdl description for the method:

 ...
 xsd:element name=ListDirectory
  xsd:complexType
   xsd:sequence
xsd:element name=directoryListing type=xsd:string
/xsd:element
xsd:element name=alsoListFiles type=xsd:boolean
/xsd:element
   /xsd:sequence
  /xsd:complexType
 /xsd:element
 xsd:element name=ListDirectoryResponse
  xsd:complexType
   xsd:sequence
xsd:element name=directoryListing type=xsd:string
/xsd:element
   /xsd:sequence
  /xsd:complexType
 /xsd:element
 ...

 ...
 wsdl:operation name=ListDirectory
  wsdl:input message=impl:ListDirectoryRequest
  /wsdl:input
  wsdl:output message=impl:ListDirectoryResponse
  /wsdl:output
 /wsdl:operation
 ...

 ...
 wsdl:operation name=ListDirectory
  wsdlsoap:operation
   soapAction=http://www.123.com/ListDirectory; /
  wsdl:input
   wsdlsoap:body use=literal /
  /wsdl:input
  wsdl:output
   wsdlsoap:body use=literal /
  /wsdl:output
 /wsdl:operation
 ...

 When we try to access our web method using Eclipse, we find following soap
 request:

 ?xml version=1.0 encoding=UTF-8 ?
 soapenv:Envelope

  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

 xmlns:q0=http://123.com;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;

 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

  soapenv:Body
   q0:ListDirectory
 directoryListing//directoryListing
   alsoListFilestrue/alsoListFiles
   /q0:ListDirectory
  /soapenv:Body

 /soapenv:Envelope

 And following soap request we find while we try to access our web method
 using soap client:

 ?xml version=1.0 encoding=UTF-8?
 SOAP-ENV:Envelope

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

 SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
 xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;

   SOAP-ENV:Body
  ListDirectory xmlns=http://123.com;
directoryListing xsi:type=xsd:string\/directoryListing
  alsoListFiles xsi:type=xsd:booleantrue/alsoListFiles
  /ListDirectory
   /SOAP-ENV:Body

 /SOAP-ENV:Envelope

 Please suggest us a solution to this issue.

 Thanks.
 Twinkle.




-- 
Amila Suriarachchi,
WSO2 Inc.


Fwd: ADBException and Running Web Services

2008-02-18 Thread Twinkle Thakkar
Hi,

We are facing an issue with our web services developed using axis2-1.3. We
have used Eclipse plugin to generate java code

from wsdl.

The web services are working fine when called using Eclipse Web Services
Explorer or Java Client. But we are not able to

communicate with all our parameterized web methods using SOAP Client
availabe @ http://www.ditchnet.org/soapclient/.

Following is the error description of one of the parameterized methods:

We recieve an ADBException - org.apache.axis2.databinding.ADBException:
Unexpected subelement directoryListing.

Here, directoryListing is the parameter we pass to the web method. Following
is the wsdl description for the method:

...
xsd:element name=ListDirectory
 xsd:complexType
  xsd:sequence
   xsd:element name=directoryListing type=xsd:string
   /xsd:element
   xsd:element name=alsoListFiles type=xsd:boolean
   /xsd:element
  /xsd:sequence
 /xsd:complexType
/xsd:element
xsd:element name=ListDirectoryResponse
 xsd:complexType
  xsd:sequence
   xsd:element name=directoryListing type=xsd:string
   /xsd:element
  /xsd:sequence
 /xsd:complexType
/xsd:element
...

...
wsdl:operation name=ListDirectory
 wsdl:input message=impl:ListDirectoryRequest
 /wsdl:input
 wsdl:output message=impl:ListDirectoryResponse
 /wsdl:output
/wsdl:operation
...

...
wsdl:operation name=ListDirectory
 wsdlsoap:operation
  soapAction=http://www.123.com/ListDirectory; /
 wsdl:input
  wsdlsoap:body use=literal /
 /wsdl:input
 wsdl:output
  wsdlsoap:body use=literal /
 /wsdl:output
/wsdl:operation
...

When we try to access our web method using Eclipse, we find following soap
request:

?xml version=1.0 encoding=UTF-8 ?
soapenv:Envelope

 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

xmlns:q0=http://123.com;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

 soapenv:Body
  q0:ListDirectory
directoryListing//directoryListing
  alsoListFilestrue/alsoListFiles
  /q0:ListDirectory
 /soapenv:Body

/soapenv:Envelope

And following soap request we find while we try to access our web method
using soap client:

?xml version=1.0 encoding=UTF-8?
SOAP-ENV:Envelope

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

SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;

  SOAP-ENV:Body
 ListDirectory xmlns=http://123.com;
   directoryListing xsi:type=xsd:string\/directoryListing
 alsoListFiles xsi:type=xsd:booleantrue/alsoListFiles
 /ListDirectory
  /SOAP-ENV:Body

/SOAP-ENV:Envelope

Please suggest us a solution to this issue.

Thanks.
Twinkle.