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 Rich Adili <Ri...@xata.com> on 2007/05/23 16:16:45 UTC

Wrapping an element

Hi,
 
I tried to simplify this to keep it brief. Hope I didn't strip too much.
 
I'm sending a message using the SOAP fragment below. The ADB bean
generated by Axis2 (1.1.1) generates an ObjXmlDocument_type2 object to
wrap my <s:any> data. I'm not clear on the exact procedure for creating
this bit. I would like to have my user pass in an arbitrary OMElement
which I will then insert into my ObjXmlDocument_type2 wrapper. The code
below fails when I invoke the stub. Do I need something equivalent to
DOM's importNode() method?
 
ConduitServiceStub.ModifyData dataObject = new
ConduitServiceStub.ModifyData();
ConduitServiceStub.ObjXmlDocument_type2 doc = new
ConduitServiceStub.ObjXmlDocument_type2();
doc.setExtraElement(data);     // 'data' is an OMElement created
elsewhere.
dataObject.setObjXmlDocument(doc);
stub.myWebMethod(dataObject);
 
<s:element name="ModifyData">
  <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="strEntityID"
type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="objXmlDocument">
    <s:complexType mixed="true">
      <s:sequence>
        <s:any/>
      </s:sequence>
    </s:complexType>
  </s:element>
 
at
org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:294
)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:56)
at
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:59)
at org.apache.axis2.engine.Phase.invoke(Phase.java:382)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:237)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:202)
at
net.xatanet.axisstubs.ConduitServiceStub.ModifyData(ConduitServiceStub.j
ava:255)
at
net.xatanet.services.ConduitService.modifyData(ConduitService.java:86)
 
Rich Adili