You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Xingshan He <xi...@hotmail.com> on 2005/07/12 22:27:37 UTC
axis array mapping helper class name error
I am trying to return an array of my custom objects in one of my operations.
I was able to return a single object of my custom types successfully.
Here is my deployment descriptor for the array:
<beanMapping qname="rs:RadioDisplay" xmlns:rs="urn:RadioSwitch"
languageSpecificType="java:com.interop.object.RadioDisplay"/>
<arrayMapping qname="ns:RadioDisplayArray" xmlns:ns="urn:RadioSwitch"
languageSpecificType="java:com.interop.object.RadioDisplay[]"
innerType="ns2:RadioDisplay" xmlns:ns2="urn:RadioSwitch"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
When I try to return an array, I get this error on the server:
java.lang.ClassNotFoundException: [Lcom/interop/object/RadioDisplay;_Helper
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:178)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at
org.apache.axis.utils.cache.MethodCache.getMethod(MethodCache.java:18
6)
at
org.apache.axis.encoding.ser.BaseFactory.getMethod(BaseFactory.java:4
2)
at
org.apache.axis.encoding.ser.BaseSerializerFactory.getGetSerializer(B
aseSerializerFactory.java:314)
at
org.apache.axis.encoding.ser.BaseSerializerFactory.getSpecialized(Bas
eSerializerFactory.java:162)
at
org.apache.axis.encoding.ser.BaseSerializerFactory.getSerializerAsInt
ernal(BaseSerializerFactory.java:91)
at
org.apache.axis.encoding.ser.BaseSerializerFactory.getSerializerAs(Ba
seSerializerFactory.java:82)
at
org.apache.axis.encoding.SerializationContext.getSerializer(Serializa
tionContext.java:1537)
at
org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
zationContext.java:1390)
at
org.apache.axis.encoding.SerializationContext.serialize(Serialization
Context.java:914)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
at
org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at
org.apache.axis.message.MessageElement.output(MessageElement.java:120
8)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477
)
at
org.apache.axis.message.MessageElement.output(MessageElement.java:120
8)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
at
org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(Attach
mentsImpl.java:519)
at org.apache.axis.Message.getContentType(Message.java:475)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:77
5)
I don't quite understand where the ';' in the class name comes from. Can
anyone help?
I am using Axis 1.2.1 on windows 2000.
Thanks,
XS
RE: axis array mapping helper class name error
Posted by Xingshan He <xi...@hotmail.com>.
I have figured out what went wrong.
On the client side code where I registered the operation's return type, I
mistakenly specified that the return type is of my custom object type,
rather than an array of that type.
XS
_____
From: Xingshan He [mailto:xingshan_he@hotmail.com]
Sent: Tuesday, July 12, 2005 1:28 PM
To: axis-user@ws.apache.org
Subject: axis array mapping helper class name error
I am trying to return an array of my custom objects in one of my operations.
I was able to return a single object of my custom types successfully.
Here is my deployment descriptor for the array:
<beanMapping qname="rs:RadioDisplay" xmlns:rs="urn:RadioSwitch"
languageSpecificType="java:com.interop.object.RadioDisplay"/>
<arrayMapping qname="ns:RadioDisplayArray" xmlns:ns="urn:RadioSwitch"
languageSpecificType="java:com.interop.object.RadioDisplay[]"
innerType="ns2:RadioDisplay" xmlns:ns2="urn:RadioSwitch"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
When I try to return an array, I get this error on the server:
java.lang.ClassNotFoundException: [Lcom/interop/object/RadioDisplay;_Helper
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:178)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at
org.apache.axis.utils.cache.MethodCache.getMethod(MethodCache.java:18
6)
at
org.apache.axis.encoding.ser.BaseFactory.getMethod(BaseFactory.java:4
2)
at
org.apache.axis.encoding.ser.BaseSerializerFactory.getGetSerializer(B
aseSerializerFactory.java:314)
at
org.apache.axis.encoding.ser.BaseSerializerFactory.getSpecialized(Bas
eSerializerFactory.java:162)
at
org.apache.axis.encoding.ser.BaseSerializerFactory.getSerializerAsInt
ernal(BaseSerializerFactory.java:91)
at
org.apache.axis.encoding.ser.BaseSerializerFactory.getSerializerAs(Ba
seSerializerFactory.java:82)
at
org.apache.axis.encoding.SerializationContext.getSerializer(Serializa
tionContext.java:1537)
at
org.apache.axis.encoding.SerializationContext.serializeActual(Seriali
zationContext.java:1390)
at
org.apache.axis.encoding.SerializationContext.serialize(Serialization
Context.java:914)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
at
org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
at
org.apache.axis.message.MessageElement.output(MessageElement.java:120
8)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
at
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477
)
at
org.apache.axis.message.MessageElement.output(MessageElement.java:120
8)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530)
at
org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(Attach
mentsImpl.java:519)
at org.apache.axis.Message.getContentType(Message.java:475)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:77
5)
I don't quite understand where the ';' in the class name comes from. Can
anyone help?
I am using Axis 1.2.1 on windows 2000.
Thanks,
XS