axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Adili" <Rich.Ad...@xata.com>
Subject Wrapping an <xs:any> element
Date Wed, 23 May 2007 14:16:45 GMT
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

Mime
View raw message