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/#getcastor.
When I register my service using below lines in server-config.wsdd, the service is not deployed properly and I get below exception. I am struck with this error from past 5 days and no matter how do I debug I am making no progress. Can anyone please help me. If this is a AXIS bug then I can file a bug report provided anyone faced similiar issues. I got my Castor (De)Serializer classes from http://cvs.apache.org/viewcvs.cgi/ws-axis/java/src/org/apache/axis/encoding/ser/castor/. I compiled these java files and kept in WEB-INF\classes directory : server-config.wsdd ----------------------------------------------------------- <service name="StockQuoteSOAPPort" provider="java:RPC" style="document" 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.Change" serializer="com.ibm.w3.services.stockquote.CastorSerializerFactory" deserializer="com.ibm.w3.services.stockquote.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="com.ibm.w3.services.stockquote.CastorSerializerFactory" deserializer="com.ibm.w3.services.stockquote.CastorDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> <typeMapping xmlns:ns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote" qname="ns:quote" type="java:com.ibm.w3.services.stockquote.LastTrade" serializer="com.ibm.w3.services.stockquote.CastorSerializerFactory" deserializer="com.ibm.w3.services.stockquote.CastorDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> <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="com.ibm.w3.services.stockquote.CastorSerializerFactory" deserializer="com.ibm.w3.services.stockquote.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="com.ibm.w3.services.stockquote.CastorSerializerFactory" deserializer="com.ibm.w3.services.stockquote.CastorDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </service> ----------------------------------------------------------- exception ----------------------------------------------------------- org.apache.axis.InternalException: org.apache.axis.ConfigurationException: org.apache.axis.deployment.wsdd.WSDDException: javax.xml.rpc.JAXRPCException: Null serializer factory specified. javax.xml.rpc.JAXRPCException: Null serializer factory specified. at org.apache.axis.encoding.TypeMappingImpl.register(TypeMappingImpl.java:220) at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:540) at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:245) at org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:225) at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:208) at org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139) at org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:65) at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:176) at org.apache.axis.AxisEngine.init(AxisEngine.java:162) at org.apache.axis.AxisEngine.<init>(AxisEngine.java:146) at org.apache.axis.server.AxisServer.<init>(AxisServer.java:87) at org.apache.axis.server.DefaultAxisServerFactory.createServer(DefaultAxisServerFactory.java:109) at org.apache.axis.server.DefaultAxisServerFactory.getServer(DefaultAxisServerFactory.java:73) at org.apache.axis.server.AxisServer.getServer(AxisServer.java:72) at org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:183) at org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:370) at org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:110) at org.apache.axis.transport.http.AxisServlet.init(AxisServlet.java:146) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:712) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:187) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688) at java.lang.Thread.run(Unknown Source) ----------------------------------------------------------- Please suggest and all the relevant files are attached to this mail ... Thanks & Regards, Kumar.
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote" xmlns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote" > <xsd:element name="quote"> <xsd:complexType> <xsd:sequence> <xsd:element name="symbol" type="xsd:string"/> <xsd:element name="volume" type="xsd:integer"/> <xsd:element name="lastTrade" type="lastTradeType"/> <xsd:element name="change" type="changeType"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="changeType"> <xsd:sequence> <xsd:element name="dollar" type="xsd:float"/> <xsd:element name="percent" type="xsd:float"/> <xsd:element name="positive" type="xsd:boolean"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="lastTradeType"> <xsd:sequence> <xsd:element name="price" type="xsd:float"/> <xsd:element name="date" type="xsd:long"/> </xsd:sequence> </xsd:complexType> <!-- Methods signatures --> <xsd:element name="getStockQuote"> <xsd:complexType> <xsd:sequence> <xsd:element name="symbol" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="getStockQuoteResponse"> <xsd:complexType> <xsd:sequence> <xsd:element ref="quote" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
<definitions targetNamespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:types="http://w3.ibm.com/schemas/services/2002/11/15/stockquote" > <import namespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote" location="StockQuote.xsd" /> <message name="getStockQuoteReq"> <part name="parameters" element="types:getStockQuote" /> </message> <message name="getStockQuoteResp"> <part name="parameters" element="types:getStockQuoteResponse" /> </message> <portType name="StockQuotePortType"> <operation name="getStockQuote"> <input message="tns:getStockQuoteReq" /> <output message="tns:getStockQuoteResp" /> </operation> </portType> <binding name="StockQuoteSOAPBinding" type="tns:StockQuotePortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <operation name="getStockQuote"> <soap:operation style="document" soapAction="getStockQuote" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> </operation> </binding> <service name="StockQuoteService"> <port name="StockQuoteSOAPPort" binding="tns:StockQuoteSOAPBinding"> <soap:address location="http://localhost:8090/AxisWeb/services/StockQuoteSOAPPort" /> </port> </service> </definitions>
