axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Quinn" <Patrick.Qu...@evolving.com>
Subject RE: deserializing error
Date Tue, 28 Jun 2005 09:38:23 GMT
Hi Ferruh
 
All the code is autogenerated by WSDL2Java from the WSDL. So I can't explain the presence
of the serializers methods I'm afraid.
 
The style and use are determined by the customer's WSDL, so I can't change those.
 
Yes, the class only uses base types (Strings) - it is pretty straightforward.
 
It seems that there is something I am missing in my comprehension of serializers. I understand
serialization in Java, but not the concept in Axis, ie whether a developer needs to do something
extra programatically to make the passing of a bean over RPC work correctly.
 
Thanks for the help thus far.
 
Pat
 

	-----Original Message-----
	From: Ferruh Zamangoer [mailto:ferruh.zamangoer@gmx.de] 
	Sent: 28 June 2005 10:25
	To: axis-user@ws.apache.org
	Subject: AW: deserializing error
	
	

	Hi Patrick,

	 

	Apologies for the ugly naming conventions - these aren't of my doing!

	:=) no comment. 

	 

	The deploy.wsdd file seems to be okay. I use the style="rpc" use="encoded",  because I' am
know only writing a prototype. If you want that your service supports MS .NET then it's okay.
 I don't know for what you need the get/set de-/serializer methods? If your are using a JavaBean
conform classes and had registered the Mappings AXIS internally map the objects and uses the
serializers. Are you using in your class only base java types (only Strings)?

	 

	Regards

	Ferruh

	 

	 

	 

	 

	
  _____  


	Von: Patrick Quinn [mailto:Patrick.Quinn@evolving.com] 
	Gesendet: Dienstag, 28. Juni 2005 11:05
	An: axis-user@ws.apache.org
	Betreff: RE: deserializing error

	 

	Hi Ferruh

	 

	here is the deploy.wsdd file, and the useful parts of the ProvidentResponse class:

	 

	Apologies for the ugly naming conventions - these aren't of my doing!

	 

	- - - - -

	
	<deployment
	    xmlns="http://xml.apache.org/axis/wsdd/ <http://xml.apache.org/axis/wsdd/> "
	    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java <http://xml.apache.org/axis/wsdd/providers/java>
">

	 

	  <!-- Services from ProvidentConnector_ProvidentReceiver_ProvidentWSPort WSDL service
-->

	 

	  <service name="ProvidentConnector_ProvidentReceiver_ProvidentWSPortSoap" provider="java:
	RPC" style="wrapped" use="literal">
	      <parameter name="wsdlTargetNamespace" value="http://namespace.accenture.com/"/ <http://namespace.accenture.com/>
>
	      <parameter name="wsdlServiceElement" value="ProvidentConnector_ProvidentReceiver_ProvidentWSPort"/>
	      <parameter name="schemaQualified" value=" <http://ProvidentConnector.ProvidentResponse>
http://ProvidentConnector.ProvidentResponse <http://ProvidentConnector.ProvidentResponseToOrch,http:/namespace.accenture.com/>
ToOrch,http://namespace.accenture.com/"/>
	      <parameter name="wsdlServicePort" value="ProvidentConnector_ProvidentReceiver_ProvidentWSPortSoap"/>
	      <parameter name="className" value="com.accenture.namespace.ProvidentConnector_ProvidentReceiver_ProvidentWSPortSoapSkeleton"/>
	      <parameter name="wsdlPortType" value="ProvidentConnector_ProvidentReceiver_ProvidentWSPortSoap"/>
	      <parameter name="typeMappingVersion" value="1.2"/>
	      <parameter name="allowedMethods" value="*"/>

	 

	    <typeMapping
	      xmlns:ns="http://ProvidentConnector.ProvidentResponseToOrch <http://ProvidentConnector.ProvidentResponseToOrch>
"
	      qname="ns:ProvidentResponse"
	      type="java:ProvidentResponseToOrch.ProvidentConnector.ProvidentResponse"
	      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
	      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
	      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/>
"
	      />
	  </service>
	</deployment>

	- - - - -

	 

	 

	The ProvidentResponse code is as follows:

	 

	- - - - -

	
	package ProvidentResponseToOrch.ProvidentConnector;

	 

	public class ProvidentResponse  implements java.io.Serializable {
	    private java.lang.String REQUESTID;
	    private java.lang.String SO_RESULT_CODE;
	    private java.lang.String SO_PROV_DATE;
	    private java.lang.String SO_ERR_DESC;
	    private java.lang.String XML_SORESULT;

	 

	    public ProvidentResponse() {
	    }

	 

	    public ProvidentResponse(
	           java.lang.String REQUESTID,
	           java.lang.String SO_RESULT_CODE,
	           java.lang.String SO_PROV_DATE,
	           java.lang.String SO_ERR_DESC,
	           java.lang.String XML_SORESULT) {
	           this.REQUESTID = REQUESTID;
	           this.SO_RESULT_CODE = SO_RESULT_CODE;
	           this.SO_PROV_DATE = SO_PROV_DATE;
	           this.SO_ERR_DESC = SO_ERR_DESC;
	           this.XML_SORESULT = XML_SORESULT;
	    }

	 

	...

	
	    /**
	     * Get Custom Serializer
	     */
	    public static org.apache.axis.encoding.Serializer getSerializer(
	           java.lang.String mechType,
	           java.lang.Class _javaType,
	           javax.xml.namespace.QName _xmlType) {
	        return
	          new  org.apache.axis.encoding.ser.BeanSerializer(
	            _javaType, _xmlType, typeDesc);
	    }

	 

	    /**
	     * Get Custom Deserializer
	     */
	    public static org.apache.axis.encoding.Deserializer getDeserializer(
	           java.lang.String mechType,
	           java.lang.Class _javaType,
	           javax.xml.namespace.QName _xmlType) {
	        return
	          new  org.apache.axis.encoding.ser.BeanDeserializer(
	            _javaType, _xmlType, typeDesc);
	    }

	
	 

	- - - - -

	 

	Regards

	 

	Pat

		-----Original Message-----
		From: Ferruh Zamangoer [mailto:ferruh.zamangoer@gmx.de] 
		Sent: 28 June 2005 07:02
		To: axis-user@ws.apache.org
		Subject: AW: deserializing error

		Can you attach your ProvidentResponse class and your deploy.wsdd. 

		 

		 

		 

		
  _____  


		Von: Patrick Quinn [mailto:Patrick.Quinn@evolving.com] 
		Gesendet: Montag, 27. Juni 2005 23:47
		An: axis-user@ws.apache.org
		Betreff: RE: deserializing error

		 

		Hi

		 

		I added the lines suggested below to the deploy.wsdd file (actually, I only needed to add
the encoding style URL, the rest was already there).

		 

		The error remains the same:

		 

		Exception in thread "main" AxisFault
		 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
		 faultSubcode:
		 faultString: org.xml.sax.SAXException: Deserializing parameter 'ProvidentResponse':  could
not find deserializer for type {http://ProvidentConnector.ProvidentResponseToOrch}ProvidentResponse
		 faultActor:
		 faultNode:
		 faultDetail:

		 

		 

		Clearly I'm lacking a deserializer!

		 

		Does this remain a deployment issue, or is there more than meets the eye going on here -
should I be programatically providing a deserializer?

		 

		Thanks in advance for any opinions proffered.

		 

		Pat

		 

			-----Original Message----- 
			From: Ferruh Zamangoer [mailto:ferruh.zamangoer@gmx.de] 
			Sent: Mon 27/06/2005 11:13 
			To: axis-user@ws.apache.org 
			Cc: 
			Subject: AW: deserializing error

			Yes you have to edit manually your deploy.wsdd with the following lines:

			 

			<typeMapping

			        xmlns:ns="http://ProvidentConnector.ProvidentResponseToOrch <http://ProvidentConnector.ProvidentResponseToOrch>
"

			        qname="ns: ProvidentResponse"

			        type="java:[packagename of your class]. ProvidentResponse"

			        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"

			        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"

			        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

			      />

			 

			Then you must redeploy you service.

			 

			Hope it works.

			 

			Regards

			Ferruh 

			 

			
  _____  


			Von: Patrick Quinn [mailto:Patrick.Quinn@evolving.com] 
			Gesendet: Sonntag, 26. Juni 2005 19:55
			An: axis-user@ws.apache.org
			Betreff: RE: deserializing error

			 

			Just bouncing this one, as the question was fairly generic:

			 

			> The server-config.wsdd file I notice does not have the bean mapping described by Mark.

			> Should I add this manually myself?

			 

			Is it common for the wsdl-generated wsdd deployment files to be lacking?

			 

			I would have expected AXIS to cover everything off, or if not, at least provide some kind
of tutorial/guide on how to modify the deployment files where they are lacking.

			 

			Thanks

			
			Pat

			 

				-----Original Message----- 
				From: Patrick Quinn 
				Sent: Sat 25/06/2005 16:25 
				To: axis-user@ws.apache.org; axis-user@ws.apache.org 
				Cc: 
				Subject: RE: deserializing error

				Hi Guys
				
				Thanks for your responses, really appreciated.
				
				Yes, the code segment exists as follows:
				
				            qName = new javax.xml.namespace.QName("http://ProvidentConnector.ProvidentResponseToOrch",
"ProvidentResponse");
				            cachedSerQNames.add(qName);
				            cls = ProvidentResponseToOrch.ProvidentConnector.ProvidentResponse.class;
				            cachedSerClasses.add(cls);
				            cachedSerFactories.add(beansf);
				            cachedDeserFactories.add(beandf);
				    }
				
				I think this looks correct.
				
				The server-config.wsdd file I notice does not have the bean mapping described by Mark.
Should I add this manually myself?
				
				I'm new to Axis - I presume the server-config.wsdd is updated when a service is deployed
(using the AdminService command). So my guess is that the deploy.wsdd generated by WSDL2Java
is not generating the type mapping. Should it be doing so, or is it understood that the user
should add this information separately?
				
				Thanks again for all the help, it is very useful and enlightening.
				
				Patrick
				
				
				
				        -----Original Message-----
				        From: "Ferruh Zamangör" [mailto:ferruh.zamangoer@gmx.de]
				        Sent: Fri 24/06/2005 18:04
				        To: axis-user@ws.apache.org
				        Cc:
				        Subject: RE: deserializing error
				       
				       
				
				        Hi Patrick,
				       
				        you have a generated stub class. look at your stub class if this code
				        segement exists
				       
				        qName = new javax.xml.namespace.QName("urn:[yourpacckagename]"
				        "ProvidentResponse");
				        cachedSerQNames.add(qname);
				        cls = yourpackagename.ProvidentResponse.class;
				        cachedSerClasses.add(cls);
				        cachedSerFactories.add(beansf);
				        cachedDeserFactories.add(beandf);
				       
				        This is the code which must be in your stub class. Also you must be sure
				        that you have deployed the service with the right typeMapping how it's
				        described by Mark.
				       
				        Regards
				        Ferruh
				       
				       
				       
				        > --- Urspr√ľngliche Nachricht ---
				        > Von: "Patrick Quinn" <Patrick.Quinn@evolving.com>
				        > An: <axis-user@ws.apache.org>
				        > Betreff: RE: deserializing error
				        > Datum: Fri, 24 Jun 2005 17:00:32 +0100
				        >
				        > Thanks for the tip.
				        >
				        > The registerTypeMapping call is already made in the stub, as part of
				        > createCall():
				        >
				        >
				        >             synchronized (this) {
				        >                 if (firstCall()) {
				        >                     // must set encoding style before registering
				        > serializers
				        >                     _call.setEncodingStyle(null);
				        >                     for (int i = 0; i < cachedSerFactories.size(); ++i)
				        > {
				        >                         java.lang.Class cls = (java.lang.Class)
				        > cachedSerClasses.get(i);
				        >                         javax.xml.namespace.QName qName =
				        >                                 (javax.xml.namespace.QName)
				        > cachedSerQNames.get(i);
				        >                         java.lang.Class sf = (java.lang.Class)
				        >                                  cachedSerFactories.get(i);
				        >                         java.lang.Class df = (java.lang.Class)
				        >                                  cachedDeserFactories.get(i);
				        >                         _call.registerTypeMapping(cls, qName, sf, df,
				        > false);
				        >                     }
				        >                 }
				        >             }
				        >             return _call;
				        >
				        > Should I add your code segments to my client implementation despite
				        > this?
				        >
				        > Thanks
				        >
				        > Pat
				        >
				        > -----Original Message-----
				        > From: mmalinos@aessuccess.org [mailto:mmalinos@aessuccess.org]
				        > Sent: 24 June 2005 16:43
				        > To: axis-user@ws.apache.org
				        > Subject: Re: deserializing error
				        >
				        >
				        > Try this...
				        >
				        > QName qn = new QName("somenamespace","somequalifiedname");
				        > call.registerTypeMapping(yourbean.class,
				        >                               qn,
				        >                               new BeanSerializerFactory(yourbean.class,
				        > qn),
				        >                               new
				        > BeanDeserializerFactory(yourbean.class,
				        > qn));
				        >
				        > If you control the service, you'll need to tell the service how to
				        > deserialize.  That is done in the server-config.wsdd block for the
				        > service...
				        >
				        > <beanMapping languageSpecificType="java:com.yournamesapce.yourbean"
				        > qname=" ns1:somequalifiedname" xmlns:ns1="somenamespace"/>
				        >
				        > The namespace and qualified name need to match on both ends...
				        >
				        > Hope this helps,
				        > Mark Malinoski
				        > Consultant
				        > AES/PHEAA
				        >
				        >
				        >
				        >
				        >              "Patrick Quinn"
				        >
				        >              <Patrick.Quinn@ev
				        >
				        >              olving.com>
				        > To
				        >                                        <axis-user@ws.apache.org>
				        >
				        >              06/24/2005 10:08
				        > cc
				        >              AM
				        >
				        >
				        > Subject
				        >                                        deserializing error
				        >
				        >              Please respond to
				        >
				        >              axis-user@ws.apac
				        >
				        >                   he.org
				        >
				        >
				        >
				        >
				        >
				        >
				        >
				        >
				        >
				        >
				        >
				        > Hi
				        >
				        > Has anyone seen an error like this before, or know what needs to be done
				        > to cure it?
				        >
				        > org.xml.sax.SAXException: Deserializing parameter 'ProvidentResponse':
				        > could not find deserializer for type
				        > {http://ProvidentConnector.ProvidentResponseToOrch}ProvidentResponse
				        >
				        > The error occurs when I make the following call to the service:
				        >
				        >             String result =
				        >                 pt.SOPResponse(prvResp);
				        >
				        > where prvResp is a bean comprised of four String fields.
				        >
				        > My WSDL would appear to be fine, so I don't think that's the problem.
				        >
				        > Am I missing code for the deserializer, or am I missing something from
				        > the CLASSPATH (although I would expect a different error were this the
				        > case)?
				        >
				        > Thanks in advance
				        >
				        > Pat
				        >
				        > ______________________________________________________________________
				        > This email has been scanned by the MessageLabs Email Security System.
				        > For more information please visit http://www.messagelabs.com/email
				        > ______________________________________________________________________
				        >
				        >
				        > ______________________________________________________________________
				        > This email has been scanned by the MessageLabs Email Security System.
				        > For more information please visit http://www.messagelabs.com/email
				        > ______________________________________________________________________
				        >
				       
				        --
				        Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
				        Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
				       
				
				
				______________________________________________________________________
				This email has been scanned by the MessageLabs Email Security System.
				For more information please visit http://www.messagelabs.com/email
				______________________________________________________________________

	
	______________________________________________________________________
	This email has been scanned by the MessageLabs Email Security System.
	For more information please visit http://www.messagelabs.com/email 
	______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Mime
View raw message