• Post Reply Bookmark Topic Watch Topic
  • New Topic

Apache Axis Webservice: Error while using a user defined class as return type of a method  RSS feed

 
Akanksha Pratihar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

(Eclipse luna, Java 1.7, Tomcat v8.)

We have used a class say Class XX as return type for a method MM of Class YY.

While Creating Webservice and webservice client error is coming as:

**"org.apache.axis.deployment.wsdd.WSDDService deployTypeMapping
SEVERE: Unable to deploy typemapping: {http://DefaultNamespace} XX
java.lang.ClassNotFoundException: DefaultNamespace.XX"**

Even with this error the Webservice is getting created.
And if we ignore this error and proceed to test the webservice, error is coming as given below:

***"SEVERE: java.io.IOException:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.IOException: No serializer found for class XX in registry org.apache.axis.encoding.TypeMappingDelegate@31e4c806
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class XXin registry org.apache.axis.encoding.TypeMappingDelegate@31e4c806
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:734)
at org.apache.axis.encoding.ser.ArraySerializer.serialize(ArraySerializer.java:414)
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1504)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:801)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.Message.writeTo(Message.java:539)
at org.apache.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java:902)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:777)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1556)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1513)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
{http://xml.apache.org/axis/}hostname-441004127"***

the type mapping is as follows:

<typeMapping
xmlns:ns="http://DefaultNamespace"
qname="ns:XX"
type="javaefaultNamespace.XX"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
Please help in resolving this error asap.

Thanks.
 
g tsuji
Ranch Hand
Posts: 697
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder what is the reasoning behind for letting encodingStyle attribute take on an empty string? If you just want the default value, can you not simply take out the encodingStyle attribute? The default would be either soap 1.1 or 1.2 encoding style.
 
Akanksha Pratihar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
g tsuji wrote:I wonder what is the reasoning behind for letting encodingStyle attribute take on an empty string? If you just want the default value, can you not simply take out the encodingStyle attribute? The default would be either soap 1.1 or 1.2 encoding style.


Hi Tsuji

I tried by removing encoding parameter as well giving the encoding type also.but the error remained the same. Is there any other way to fix the issue?

 
g tsuji
Ranch Hand
Posts: 697
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.ClassNotFoundException: DefaultNamespace.XX"**

There is a smiley that covers your type attribute. The package name should it not be mapped to defaultNamespace with the d in lower-case. If your type is having the d in upper-case? That poses some doubt in my mind. Change it back to lower-case.

Other than that, I would suppose you've your java and default namespace for wsdd declared in its parent deployment tag as a matter of course.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!