Hello all,


I am having a problem getting Axis to use the Serializer I have provided. I am using the EJB provider within Tomcat to invoke a bean in JBoss running somewhere else. I can successfully deploy the service. The test client is able to send the request, which Axis forwards to the bean in JBoss. The problem arises when the array of objects returned (they are called Weeks) needs to be serialized. The request itself sends no arguments. Tomcat's localhost_log records this Exception:

2003-09-04 11:08:57 StandardWrapperValve[AxisServlet]: Servlet.service() for servlet AxisServlet threw exception
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode: faultString: java.io.IOException: No serializer found for class com.marviq.apps.util.Week in registry [EMAIL PROTECTED]
faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace: java.io.IOException: No serializer found for class com.marviq.apps.util.Week in registry [EMAIL PROTECTED]
at org.apache.axis.encoding.SerializationContextImpl.serializeActual(SerializationContextImpl.java:1281)
at org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java:795)
at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(SerializationContextImpl.java:866)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:179)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:509)
at org.apache.axis.message.MessageElement.output(MessageElement.java:783)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:270)
at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:483)
at org.apache.axis.SOAPPart.getAsBytes(SOAPPart.java:375)
at org.apache.axis.Message.getContentType(Message.java:399)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:887)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
etc.


The service is deployed with a TypeMapping, which I show below:

<deployment xmlns="http://xml.apache.org/axis/wsdd/";
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
            xmlns:xsd="http://www.w3.org/2001/XMLSchema";
            xmlns:ns="http://marviq.com/mytime";
            targetNamespace="http://marviq.com/mytime";>
 <service name="UserWeek" provider="java:EJB">
 <!--
   <namespace>http://marviq.com/mytime</namespace>
-->

   <parameter name="jndiURL"
              value="jnp://localhost:1099" />

   <parameter name="jndiContextClass"
              value="org.jnp.interfaces.NamingContextFactory" />

   <parameter name="beanJndiName"
              value="ejb/UserWeek" />

   <parameter name="homeInterfaceName"
              value="com.marviq.apps.mytime.ejb.UserWeekRemoteHome" />

   <parameter name="remoteInterfaceName"
              value="com.marviq.apps.mytime.ejb.UserWeekRemote" />

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

</service>

<typeMapping qname="ns:SortedSet" type="java:java.util.SortedSet"
serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding"; />


<typeMapping qname="ns:Week"
type="java:com.marviq.apps.util.Week"
serializer="com.marviq.apps.mytime.soap.axis.ser.WeekSerializerFactory"
deserializer="com.marviq.apps.mytime.soap.axis.ser.WeekDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding"; />


</deployment>

Interestingly enough, I see in the axis.log that the WeekSerializerFactory is being instantiated. However, the getSerializerAs() is never called. My suspicion is that I'm missing something terribly important about namespaces.

I hope this question doesn't sound completely ignorant.

Anybody have any ideas? I'd very much appreciate it!

Adam


-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Reply via email to