axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gautham Mulakala <smulak...@kmobjects.com>
Subject Re: Important?! org.xml.sax.SAXException: Deserializing parameter
Date Mon, 21 Jun 2004 20:05:33 GMT
Please see below


On Mon, 2004-06-21 at 15:12, NYY96@aol.com wrote:
> Thanks for your help. I am running my webservice on the localhost.
> What file did you make this changes in? 
>  

This one goes in the client program which is accessing the server not on
the server. 


> There is already typemapping in the deploy.wsdd. If I were to add code
> like the one below, which file would it be? As i am a novice, please
> be as specific as possible (i.e. SampleImpl.class rather than saying
> "The Implementation Class")

Yes, apart from the deploy.wsdd. You have to register the class with the
appropriate bean serialiser like the one i specified. 

For example.

DocumentRequest is a bean so i declared a QName for that along with the
namespace and registered a Bean Serializer for that. 
Similarly you have to use enmeration type if you specify the type as
enumeration in WSDL.


> Yes I used WSDL2Java to create this service. I'm almost there!
>  
> James
>  
> In a message dated 6/21/2004 12:01:11 PM Eastern Standard Time,
> smulakala@kmobjects.com writes:
>         Hi,
>         
>         I got the same problem and what i did is use some thing like
>         to specify
>         the deserializer for my object in the client program.
>         
>         
>         Call     call    = (Call) service.createCall();
>                             
>                QName      qn      = new QName(
>         "uber.dataserver.com","DocumentRequest" );
>                            
>         call.registerTypeMapping(DocumentRequest.class, qn,
>                                    new
>         org.apache.axis.encoding.ser.BeanSerializerFactory(DocumentRequest.class, qn),
>                                    new
>         org.apache.axis.encoding.ser.BeanDeserializerFactory(DocumentRequest.class, qn));
>                             
>                             QName qnameres = new
>         QName("uber.dataserver.com","DocumentResponse");
>                            
>         call.registerTypeMapping(DocumentResponse.class,qnameres,
>                                     new
>         org.apache.axis.encoding.ser.BeanSerializerFactory(DocumentResponse.class, qnameres),
>                                     new
>         org.apache.axis.encoding.ser.BeanDeserializerFactory(DocumentResponse.class,
qnameres));
>                             
>                             QName qnameDate = new
>         QName("uber.dataserver.kmobjects.com","DataBases");
>                            
>         call.registerTypeMapping(DataBases.class,qnameDate,
>                                     new
>         org.apache.axis.encoding.ser.BeanSerializerFactory(DataBases.class,
>         qnameDate),
>                                     new
>         org.apache.axis.encoding.ser.BeanDeserializerFactory(DataBases.class,
>         qnameDate));   
>                    
>         
>         This solved my problem.
>         
>         Or you can use stub to get to the service. I presume you used
>         WSDL2Java
>         for generating the classses.
>         
>         Hope this will help you.
>         
>         --Gautham      
>         
>         On Mon, 2004-06-21 at 11:51, NYY96@aol.com wrote:
>         > Hello,
>         >  
>         > I am fairly new to Axis. I have been developing a web
>         service for
>         > three weeks and have been running into many many problems. I
>         currently
>         > generate the following errors when I run the client for my
>         deployed
>         > service (Assume all other previous steps done correctly):
>         >  
>         > -----------------------------------------
>         > AxisFault
>         >  faultCode:
>         >
>         {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>         > faultString: org.xml.sax.SAXException: Deserializing
>         parameter
>         > &apos;report&apo
>         > s;:  could not find deserializer for type
>         > {http://localhost:8080/axis/services/R
>         > eportHandlerServicePort}&gt;report
>         >  faultDetail:
>         >         {http://xml.apache.org/axis/}stackTrace: AxisFault
>         >  faultCode:
>         >
>         {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>         >  faultString: org.xml.sax.SAXException: Deserializing
>         parameter
>         > &amp;apos;report
>         > &amp;apos;:  could not find deserializer for type
>         > {http://localhost:8080/axis/se
>         > rvices/ReportHandlerServicePort}&amp;gt;report
>         > 
>         > org.xml.sax.SAXException: Deserializing parameter 'report': 
>         could not
>         > find dese
>         > rializer for type
>         >
>         {http://localhost:8080/axis/services/ReportHandlerServicePort}
>         > 
>         >
>         --------------------------------------------------------------------------
>         >  
>         > Since research on the net has sent me in the direction of
>         > investigating my type mapping, here is the contents of my
>         Deployment
>         > Descriptor.
>         >  
>         >
>         ----------------------------------------------------------------------------
>         > <deployment
>         >     xmlns="http://xml.apache.org/axis/wsdd/"
>         >    
>         xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
>         >  
>         >   <!-- Services from ReportHandlerService WSDL service -->
>         >  
>         >   <service name="ReportHandlerServicePort"
>         provider="java:RPC"
>         > style="document" use="literal">
>         >       <parameter name="wsdlTargetNamespace"
>         >
>         value="http://localhost:8080/axis/services/ReportHandlerServicePort"/>
>         >       <parameter name="wsdlServiceElement"
>         > value="ReportHandlerService"/>
>         >       <parameter name="wsdlServicePort"
>         > value="ReportHandlerServicePort"/>
>         >       <parameter name="className"
>         >
>         value="localhost.axis.services.ReportHandlerServicePort.SampleDirectBindingSkeleton"/>
>         >       <parameter name="wsdlPortType" value="ReportHandler"/>
>         >       <parameter name="allowedMethods" value="*"/>
>         >  
>         >       <typeMapping
>         >        
>         >
>         xmlns:ns="http://localhost:8080/axis/services/ReportHandlerServicePort"
>         >         qname="ns:reports"
>         >        
>         >
>         type="java:localhost.axis.services.ReportHandlerServicePort._reports"
>         >        
>         >
>         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>         >        
>         >
>         deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>         >         encodingStyle=""
>         >       />
>         >       <typeMapping
>         >        
>         >
>         xmlns:ns="http://localhost:8080/axis/services/ReportHandlerServicePort"
>         >         qname="ns:response"
>         >        
>         >
>         type="java:localhost.axis.services.ReportHandlerServicePort._response"
>         >        
>         >
>         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>         >        
>         >
>         deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>         >         encodingStyle=""
>         >       />
>         >       <typeMapping
>         >        
>         >
>         xmlns:ns="http://localhost:8080/axis/services/ReportHandlerServicePort"
>         >         qname="ns:report"
>         >        
>         >
>         type="java:localhost.axis.services.ReportHandlerServicePort._report"
>         >        
>         >
>         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
>         >        
>         >
>         deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
>         >         encodingStyle=""
>         >       />
>         >   </service>
>         > </deployment>
>         >
>         -------------------------------------------------------------------
>         > The net's full of people with the same problem but not so
>         full of
>         > answers. Could anybody help me out here? the "report" which
>         it cannot
>         > find is a javabean which was defined in an XML Document of
>         simple data
>         > types and referenced in my WSDL's successfully.
>         >  
>         > James Crosson
>         > 
>         
> 
>  


Mime
View raw message