Even though there is no response to my posting I'll post where I've got to so far.
 
First of all, copy-paste error was found in the WSDD file: in Priority class type mapping the namespace is wrong - must be xmlns:ns="http://enterprise.ent"
 
Secondly, to get further I decided to copy axis.jar from inside Axis web app to Tomcat's shared/lib dir.
After that I got bigger stacktrace:
 
Caused by: java.lang.NoClassDefFoundError: javax/xml/rpc/encoding/Deserializer
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 at ent.enterprise.EntDocument.<init>(EntDocument.java:44)
 at ent.enterprise.EmailEntDocument.<init>(EmailEntDocument.java:27)
 at ent.enterprise.EntAPI.list(EntAPI.java:81)
 ... 30 more
My JAR file was in Tomcat's shared/lib directory and after I moved it into axis/WEB-INF/lib directory everything started working.
I guess I could also move all the Axis JARs into shared classpath with the same effect.
 
My question is why it was working with my JAR on global classpath and all the Axis stuff inside the web app before?
Why different classpath is required after I added enumeration?
 
Thanks,
Eugene
----- Original Message -----
Sent: Friday, February 18, 2005 4:26p
Subject: Enumeration problem

Hi All,
 
I'm trying an enumeration type and having tough time to get it working.
 
Here is what I have:
 
- Priority is an enumeration
   <simpleType name="Priority">
     <restriction base="xsd:string">
       <enumeration value="Default"/>
       <enumeration value="Low"/>
       <enumeration value="Normal"/>
       <enumeration value="High"/>
     </restriction>
   </simpleType>
- a bean class has a Priority member
   <complexType name="EntDocument">
    <sequence>
     <element name="URI" nillable="true" type="xsd:string"/>
     <element name="created" nillable="true" type="xsd:dateTime"/>
     <element name="name" nillable="true" type="xsd:string"/>
     <element name="size" type="xsd:long"/>
     <element name="priority" type="tns1:Priority"/>
    </sequence>
   </complexType>
- I've added typeMapping to the WSDD file, but it didn't change anything
  <typemapping
   languageSpecificType="java:ent.enterprise.Priority"
   qname="ns:Priority"
   deserializer="org.apache.axis.encoding.ser.EnumDeserializerFactory"
   serializer="org.apache.axis.encoding.ser.EnumSerializerFactory"
   encodingStyle=""
   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
  />
I've added this enumeration type to the WSDL first and ran wsdl2java to get the generated java class.
In EntDocument's constructor I have
_priority = Priority.Normal;
 
When I call a method that returns EntDocument, I see an exception in Axis log:
 
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.reflect.InvocationTargetException
 faultActor:
 faultNode:
 faultDetail:
 {http://xml.apache.org/axis/}stackTrace:java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384)
 at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:281)
 at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
 at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
 at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
 at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
 at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
 at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
 at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:697)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:731)
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoClassDefFoundError: org/apache/axis/encoding/Deserializer
 at ent.enterprise.EntDocument.&lt;init&gt;(EntDocument.java:36)
 at ent.enterprise.EntAPI.load(EntAPI.java:117)
 ... 30 more
If I remove (wsdl, code, everything) this Priority type there is no problem.
 
I understand that it's something simple but I don't see what it is.
Any help will be appreciated.
 
Thanks,
Eugene

Reply via email to