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 Mr yage yage <yy...@yahoo.co.uk> on 2004/12/06 21:09:15 UTC

help request with wsdl.

I have a method that takes a complex type.  When I
construct the Call object myself and set the
typeMapping everything is fine:

Call     call    = (Call) service.createCall();
QName    qn1      = new QName(
"urn:DigitalObjectServices", "ListObjectsSOAPRequest"
);
QName    qn2      = new QName(
"urn:DigitalObjectServices",
"FilterCriteriaSOAPRequest" );
 
call.registerTypeMapping(ListObjectsSOAPRequest.class,
qn1, new
org.apache.axis.encoding.ser.BeanSerializerFactory(ListObjectsSOAPRequest.class,
qn1), new
org.apache.axis.encoding.ser.BeanDeserializerFactory(ListObjectsSOAPRequest.class,
qn1));

call.registerTypeMapping(FilterCriteriaSOAPRequest.class,
qn2, new
org.apache.axis.encoding.ser.BeanSerializerFactory(FilterCriteriaSOAPRequest.class,
qn2), new
org.apache.axis.encoding.ser.BeanDeserializerFactory(FilterCriteriaSOAPRequest.class,
qn2));

However when I try to use the stub created from my
WSDL it complains of:
org.xml.sax.SAXException: Deserializing parameter
'listObjectsSOAPRequest':  could not find deserializer
for type {http://soap.miscy}ListObjectsSOAPRequest

I'm assuming this must be a problem with my WSDD not
providing information about the type mapping correctly
  My WSDD looks like:

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
           
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
           
targetNamespace="http://server.domain.com/services/DigitalObjectServices?wsdl">
 <service name="DigitalObjectServices"
provider="java:RPC">
  <parameter name="className"
value="misc.soap.DigitalObjectServices"/>
  <parameter name="allowedMethods" value="*"/>
  <beanMapping qname="myNS:ListObjectsSOAPRequest"
xmlns:myNS="urn:DigitalObjectServices"
languageSpecificType="java:misc.soap.ListObjectsSOAPRequest"/>
  <beanMapping qname="myNS:FilterCriteriaSOAPRequest"
xmlns:myNS="urn:DigitalObjectServices"
languageSpecificType="java:misc.soap.FilterCriteriaSOAPRequest"/>
</service>
</deployment>

Any advice please?



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

Re: help request with wsdl. - fixed?

Posted by Mr yage yage <yy...@yahoo.co.uk>.
Fixed.  It wasn�t my wsdd, it appears to be the
java2wsdl and wsdl2java commands were missing the
required namespace->package and vice-versa mapping.

Java org.apache.axis.wsdl.Java2WSDL -o
DigitalObjectServices.wsdl
-lhttp://server.domain.com/services/DigitalObjectServices
-p"misc.soap"="urn:DigitalObjectServices"
misc.soap.DigitalObjectServices

Java org.apache.axis.wsdl.WSDL2Java
-N�urn:DigitalObjectServices�=�misc.soap�
DigitalObjectServices.wsdl

And now it works, presumably by putting the resulting
java files in the correct package.


--- Mr yage yage <yy...@yahoo.co.uk> wrote:

> I have a method that takes a complex type.  When I
> construct the Call object myself and set the
> typeMapping everything is fine:
> 
> Call     call    = (Call) service.createCall();
> QName    qn1      = new QName(
> "urn:DigitalObjectServices",
> "ListObjectsSOAPRequest"
> );
> QName    qn2      = new QName(
> "urn:DigitalObjectServices",
> "FilterCriteriaSOAPRequest" );
>  
>
call.registerTypeMapping(ListObjectsSOAPRequest.class,
> qn1, new
>
org.apache.axis.encoding.ser.BeanSerializerFactory(ListObjectsSOAPRequest.class,
> qn1), new
>
org.apache.axis.encoding.ser.BeanDeserializerFactory(ListObjectsSOAPRequest.class,
> qn1));
> 
>
call.registerTypeMapping(FilterCriteriaSOAPRequest.class,
> qn2, new
>
org.apache.axis.encoding.ser.BeanSerializerFactory(FilterCriteriaSOAPRequest.class,
> qn2), new
>
org.apache.axis.encoding.ser.BeanDeserializerFactory(FilterCriteriaSOAPRequest.class,
> qn2));
> 
> However when I try to use the stub created from my
> WSDL it complains of:
> org.xml.sax.SAXException: Deserializing parameter
> 'listObjectsSOAPRequest':  could not find
> deserializer
> for type {http://soap.miscy}ListObjectsSOAPRequest
> 
> I'm assuming this must be a problem with my WSDD not
> providing information about the type mapping
> correctly
>   My WSDD looks like:
> 
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
>            
>
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
>            
>
targetNamespace="http://server.domain.com/services/DigitalObjectServices?wsdl">
>  <service name="DigitalObjectServices"
> provider="java:RPC">
>   <parameter name="className"
> value="misc.soap.DigitalObjectServices"/>
>   <parameter name="allowedMethods" value="*"/>
>   <beanMapping qname="myNS:ListObjectsSOAPRequest"
> xmlns:myNS="urn:DigitalObjectServices"
>
languageSpecificType="java:misc.soap.ListObjectsSOAPRequest"/>
>   <beanMapping
> qname="myNS:FilterCriteriaSOAPRequest"
> xmlns:myNS="urn:DigitalObjectServices"
>
languageSpecificType="java:misc.soap.FilterCriteriaSOAPRequest"/>
> </service>
> </deployment>
> 
> Any advice please?
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Read only the mail you want - Yahoo! Mail SpamGuard.
> 
> http://promotions.yahoo.com/new_mail 
>



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com