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 Ai-Hoa Sanh <as...@ll.mit.edu> on 2007/03/21 22:02:31 UTC

MessageElement getObjectValue()

I was provided a WSDL, which using WSDL2Java, generates classes
including A and B, which extends A.

Class A includes a field of MessageElement[] type.

I am attempting to use this field to transport an object of class C.

C objectC = new C();
objectC.setField1(value1);
objectC.setFieldN(valueN);

MessageElement m = new MessageElement(new QName("namespace", "element
name in xsd"), objectC);
MessageElement[] ext = {m};
objectA.setExtension(ext);

I was able to, in the operation which would deserialize objectA, get
objectC using MessageElement.getObjectValue() and type objectC as class C.

However, when I attempt to do similarly with objectB of class B, I am
getting null when I attempt to do a MessageElement.getObjectValue().

When I use MessageElement.toString(), both with objectA and objectB, I
get strings that look the same to me.

I am using Axis 1.4, JDK 1.5 and Tomcat 5.5.

I would appreciate any insights as to what I am doing incorrectly to 
warrant this inconsistent behavior.

Thank you,
Ai-Hoa Sanh


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org