I recently had a very similar problem.  My problem was different because
I was trying to do a document/literal-wrapped (dlw) method but was still
declaring rpc (I did not really understand the difference at the time
but the axis wiki-faq points out a good article to explain the
differences).  What I found (using eclipse debugger and axis 1.1 source
files) that the xml that is passed to the deserializers was confusing
them as it was not in the form expected.  This has to do with the way
that RPC grabs the elements in the soap body and passes them down to the
deserializer.  The RPC method does not really deal with Schemas so using
something like Castor can be a bit tricky while trying to retain the rpc
encoding.  So I read up on the two methods (rpc/dlw) and switched over
to dlw as it was more appropriate for me.  The last hurdle was to remove
the following attribute from the typeMapping element:
encodingStyle="http://schemas.xmlsoap.org/soap/encoding"; 
and replace it with:
encodingStyle=""
>From there everything worked as expected.

Not sure if this helps but your problem sounds very similar to mine.
Chers,

Mike Cassisa

-----Original Message-----
From: babloosony [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 21, 2005 6:55 AM
To: [email protected]; [email protected]
Subject: Castor (De)Serializers not recognized !

Castor (De)Serializers not recognized !

Hi All,

I was trying to use Castor as AXIS 1.2 RC2 (De)Serializers and was
following the tutorials
http://www-106.ibm.com/developerworks/webservices/library/ws-castor/#get
castor.
However when I register my service using below lines in
server-config.wsdd, the service is not deployed properly and I  see no
errors in my log files.


server-config.wsdd
-----------------------------------------------------------
<service name="StockQuoteSOAPPort" provider="java:RPC" style="wrapped"
use="literal">
<parameter name="wsdlTargetNamespace"
value="http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl"/>
<parameter name="wsdlServiceElement" value="StockQuoteService"/>
<parameter name="wsdlServicePort" value="StockQuoteSOAPPort"/>
<parameter name="wsdlPortType" value="StockQuotePortType"/>
<parameter name="className"
value="com.ibm.w3.services.stockquote.StockQuoteSOAPBindingImpl"/>


<operation name="getStockQuote" qname="operNS:getStockQuote" 
xmlns:operNS="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; 
returnQName="retNS:quote" 
xmlns:retNS="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; 
returnType="rtns:quote" 
xmlns:rtns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; 
soapAction="getStockQuote">

<parameter qname="symbol" type="tns:string"
xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
</operation>

<parameter name="allowedMethods" value="getStockQuote"/>

<typeMapping
xmlns:ns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote";
qname="ns:quote" 
type="java:com.ibm.w3.services.stockquote.Quote" 
serializer="org.apache.axis.encoding.ser.CastorSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.CastorDeserializerFactory" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<typeMapping
xmlns:ns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; 
qname="ns:lastTradeType" 
type="java:com.ibm.w3.services.stockquote.LastTradeType" 
serializer="org.apache.axis.encoding.ser.CastorSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.CastorDeserializerFactory" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<typeMapping
xmlns:ns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; 
qname="ns:changeType" 
type="java:com.ibm.w3.services.stockquote.ChangeType" 
serializer="org.apache.axis.encoding.ser.CastorSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.CastorDeserializerFactory" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</service>      
-----------------------------------------------------------



I found that the actual lines that are giving problem is below :

<typeMapping
xmlns:ns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote";
qname="ns:quote" 
type="java:com.ibm.w3.services.stockquote.Quote" 
serializer="org.apache.axis.encoding.ser.CastorSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.CastorDeserializerFactory" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<typeMapping
xmlns:ns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; 
qname="ns:lastTradeType" 
type="java:com.ibm.w3.services.stockquote.LastTradeType" 
serializer="org.apache.axis.encoding.ser.CastorSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.CastorDeserializerFactory" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<typeMapping
xmlns:ns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"; 
qname="ns:changeType" 
type="java:com.ibm.w3.services.stockquote.ChangeType" 
serializer="org.apache.axis.encoding.ser.CastorSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.CastorDeserializerFactory" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        
        
and when I comment above lines, my service is deployed properly and I
can view my service when I type
http://localhost:8090/axis/servlet/AxisServlet
 in my browser. Why is this happenning. I have the castor classes in
{AXIS-WEBAPP}\WEB-INF\classes directory compiled
 from the source
http://cvs.apache.org/viewcvs.cgi/ws-axis/java/src/org/apache/axis/encod
ing/ser/castor/
 
 
 Please suggest friends ... 
 
 
 
 
 Thanks & Regards,
 Kumar.


Reply via email to