axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ¤ Happy ¤ <>
Subject Re: Specifying Bean namespace in WSDL
Date Mon, 25 Aug 2003 07:14:30 GMT
I had the same problem and after trying more solution i get the goal...
Try to see this example
The problems could be 2:

1 - You don't specify the Bean's Serializer and Deserializer in the Call object
2 - You don't deploy correctly the services ( try to connect to http://tomcatURL:8080/axis/servlet/AxisServlet
and see if you service is correctly deployed; if you see a blank page probably your WSDD file
is wrong, so undeploy the service and redeploy again the correct one )

I'm using axis from 2 weeks and this is the first serious problem i get, there's no useful
doc on the net about this problem...

  ----- Original Message ----- 
  From: Yuvraj Waswani 
  To: (E-mail) ; (E-mail) 
  Sent: Friday, August 22, 2003 11:51 AM
  Subject: Specifying Bean namespace in WSDL 


  Is there a way to tell Java2WSDL tool , namespace for a Bean object being passed as parameter
to my webservice; so that the same namespace is registered against the bean inside the generated
client stub (using WSDL2Java) ?

  I use Java2WSDL to generate WSDL for a webservice which takes in my value object as a parameter.
Although I have provided a "QName" for my value object in wsdd (server-config.wsdd), the output
WSDL file which is generated has an auto-generated namespace for my value object. Therefore,
when this WSDL file is given to WSDL2Java for generating client stub, the stub contains the
auto-generated namespace against my value object, instead of the namespace (qname) i specified
in wsdd. This apparently causes the webservice to fail, as the Axis server is not able to
find deserializer for that auto generated namespace.

  The exception I get :
   faultCode: {}Server.userException
   faultString: org.xml.sax.SAXException: Deserializing parameter 'in0':  could not find deserializer
for type {http://hello.bus}HelloDetail
   faultActor: null
   stackTrace: org.xml.sax.SAXException: Deserializing parameter 'in0':  could not find deserializer
for type {http://hello.bus}HelloDetail

  Here is the snippet from wsdd :
   <service name="HelloWebService" provider="java:RPC">
    <parameter name="allowedMethods" value="*"/>
    <parameter name="className" value="testaxis.detailws.service.HelloWS"/>
    <beanMapping languageSpecificType="java:bus.hello.HelloDetail" qname="ns1:MyDetailObject"

  Here is the WSDL excerpt which is generated for this web service :
    <?xml version="1.0" encoding="UTF-8" ?> 
  - <wsdl:definitions targetNamespace="detailWebServiceNameSpace" xmlns=""
xmlns:apachesoap="" xmlns:impl="abcdefgh" xmlns:intf="detailWebServiceNameSpace"
xmlns:soapenc="" xmlns:tns1="http://hello.bus" xmlns:wsdl=""
xmlns:wsdlsoap="" xmlns:xsd="">
  - <wsdl:types>
  - <schema targetNamespace="http://hello.bus" xmlns="">
    <import namespace="" /> 
  - <complexType name="HelloDetail">
  - <sequence>
    <element name="accessKey" type="xsd:int" /> 
    <element name="helloMessage" nillable="true" type="xsd:string" /> 
    <element name="HelloDetail" nillable="true" type="tns1:HelloDetail" /> 
  - <wsdl:message name="sayHelloMessageRequest">
    <wsdl:part name="in0" type="tns1:HelloDetail" /> 

  The stub generated using this WSDL contains the following code :
      qName = new javax.xml.namespace.QName("http://hello.bus", "HelloDetail");
           cls = bus.hello.HelloDetail.class;
         _call.registerTypeMapping(cls, qName, sf, df, false);
View raw message