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 Gautham Mulakala <sm...@kmobjects.com> on 2004/06/21 18:00:42 UTC

Re: Important?! org.xml.sax.SAXException: Deserializing parameter

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
>