[jdom-interest] can't parse multiRefs in a SOAP request
John_Craver at mapinfo.com
John_Craver at mapinfo.com
Thu Aug 22 07:23:36 PDT 2002
I'm trying to use JDOM beta 8 and Xerces 2.0.1 to parse an RPC-style SOAP
request that includes a complex type - the Body of the request looks like:
<soapenv:Body>
<ns1:renderMap xmlns:ns1
="http://localhost:8080/axis/services/MappingService/axis/services/MappingService">
<mapName xsi:type="xsd:string">mymaps/myworld</mapName>
<center href="#id0"/>
<zoom xsi:type="xsd:double">5000.0</zoom>
</ns1:renderMap>
<multiRef id="id0" SOAP-ENC:root="0" soapenv:encodingStyle
="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:MyPoint"
xmlns:ns2="urn:services.mapinfo.com">
<x xsi:type="xsd:double">0.0</x>
<y xsi:type="xsd:double">0.0</y>
</multiRef>
</soapenv:Body>
So the Body has a <renderMap> child (namespace ns1), which has three
children. The <center> element uses an href attribute which refers to a
<multiRef> element (which has the actual data for the <center> element)
which is "outside" the <renderMap> element. I was expecting that the
following code would allow access to the <x> and <y> child elements of the
<multiRef>:
Element center = renderMapElt.getChild("center");
Element x = center.getChild("x");
Element y = center.getChild("y");
But x and y both turn out to be null.
Just for kicks, I tried moving the <multiRef> "inside" the <renderMap>
element, but still got the same result.
The above SOAP request was generated by an Apache Axis-generated client, so
I assume the use of a <multiRef> here is somewhat "standard".
Any insight would be most appreciated.
Regards,
--John
More information about the jdom-interest
mailing list