I was encountering an "Invalid element" error when I attempted to receive a 
response message with my Axis client (Siebel service).  I found this error 
mentioned many times in the axis-user mailing list archives, but was unable to 
find anyone listing an explanation or a solution.

I debugged through the Axis code and noticed that the error was occurring 
because when BeanDeserializer.onStartChild is called, the "propertyMap" has 
"listOfUsbCustomerElement" as the child description, while the element is 
actually named "ListOfUsbCustomerElement".  When I traced this back, I found 
that the lower-case name is coming from a call in the BeanDeserializerFactory 
that ends up retrieving the bean properties through introspection; hence, 
lower-case first letter in property names.

As the archived email I reference below explains, one way around it is to 
customize the BeanInfo interface... I imagine Axis must somewhere normally 
provide a mapping to get from the Java name to the XML name... can anyone point 
me in the right direction?  I suspect something is missing in my set up.

In the meantime, I'll continue exploring... if I figure it out, I'll post the 
solution back here for anyone else who runs into this...

Meghan Pietila
Granite Consulting

Archived mail referencing this problem:
http://marc.theaimsgroup.com/?l=axis-user&m=103705794612785&w=2

Partial stacktrace illustrating the resulting error (Axis 1.2.1):
04-08-2005 15:16:36,688 [ERROR] org.apache.axis.client.Call: Exception:
org.xml.sax.SAXException: Invalid element in 
com.blank.www.ListOfUsbCustomerOfferTopElmt 

- ListOfUsbCustomerOffer
        at 

org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
        at 

org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1

035)
        at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
        at 

org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
        at org.apache.axis.client.Call.invoke(Call.java:2448)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)

Reply via email to