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.<init>(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
|