>1 - You don't specify the Bean's Serializer and Deserializer in the Call object
I am not using dynamic client (Apache Call object). I am creating stub (client side proxies) from the tool WSDL2Java. It does the job of registering serializer and dese.. for the bean.
 
>2 - You don't deploy correctly the services
The service is correctly deployed and working with a dynamic client. It also works if I manually change the namespace (QName) of the bean to the same specified in wsdd.
 
 
Once again , the stub created by this tool takes in the namespace (QName) of the bean from WSDL file. But the WSDL file contains an autogenerated QName (namespace) rather than the one I specify in wsdd. I need to provide this 'bean' namespace as parameter to Java2WSDL, and I do not know how to do it.
-----Original Message-----
From: � Happy � [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 12:45 PM
To: [EMAIL PROTECTED]
Subject: Re: Specifying Bean namespace in WSDL

I had the same problem and after trying more solution i get the goal...
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 -----
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);
    
        
 

Reply via email to