Hi, All,
I am using the wrapper style and I encountered a runtime exception with
a new operation I just created with a enum request parameter. My
operation "getAll" is a query to get all records for a given record type
which is defined as a enum type. The related schema is as follows.
<simpleType name="GetAllRecordType">
<restriction base="xsd:string">
<enumeration value="customerCategory"/>
<enumeration value="contactCategory"/>
</restriction>
</simpleType>
<complexType name="GetAllRequest">
<sequence>
<element name="recordType" type="GetAllRecordType"
minOccurs="1"/>
</sequence>
</complexType>
<element name="getAll" type="GetAllRequest"/>
All the code was generated fine with Axis. But when I ran the operation
"getAll" I was hit by an IntrospectionException which was looking for a
method "fromString" from the enum object: GetAllRecordType.
I looked at the class and there is no "fromString" method. So we can not
have a enum in the request?
Thanks,
Scott
P.S. the stacktrace:
<faultstring>java.beans.IntrospectionException:
java.lang.NoSuchMethodException:
com.netledger.dto.core.types.GetAllRecordType.fromString(java.lang.Strin
g)</faultstring>
<detail>
<ns1:stackTrace
xmlns:ns1="http://xml.apache.org/axis/">java.beans.IntrospectionExceptio
n: java.lang.NoSuchMethodException:
com.netledger.dto.core.types.GetAllRecordType.fromString(java.lang.Strin
g) at
org.apache.axis.encoding.ser.EnumDeserializer.makeValue(EnumDeserializer
.java:86) at
org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeser
ializer.java:218) at
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.ja
va:534) at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseriali
zationContextImpl.java:1015) at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
204) at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
ava:722) at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.ja
va:184) at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333
) at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j
ava:339) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at