axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ¤ Happy ¤ <flaggellod...@tiscali.it>
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 http://javaboutique.internet.com/tutorials/Axis2/testing.html.
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...

Bye 
Ivan
  ----- Original Message ----- 
  From: Yuvraj Waswani 
  To: axis-user@ws.apache.org (E-mail) ; axis-user@xml.apache.org (E-mail) 
  Sent: Friday, August 22, 2003 11:51 AM
  Subject: Specifying Bean namespace in WSDL 


  Hi,

  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 :
  AxisFault
   faultCode: {http://xml.apache.org/axis/}Server.userException
   faultString: org.xml.sax.SAXException: Deserializing parameter 'in0':  could not find deserializer
for type {http://hello.bus}HelloDetail
   faultActor: null
   faultDetail: 
   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"
xmlns:ns1="recentNamespace"/>
   </service>


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


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