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 Jim Dibble <jd...@amberpoint.com> on 2002/05/25 01:25:25 UTC
Known problem with encodingStyle missing namespace?
When I generate an XML document from either an axis client or the axis
servlet, if the document includes an object reference, the encodingStyle
attribute is missing the SOAP-ENV namespace
(http://schemas.xmlsoap.org/soap/envelope/"). This is causing problems
when I use the XML document in tools that are expecting the namespace.
Is this a known problem?
For example, this is the request document generated by the axis SOAP
client. Note that the SOAP-ENV:Envelope element has an encodingStyle
attribute that is namespace-qualified, but the multiref elements have
encodingStyle attributes that do not include a namespace prefix.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:processOrder xmlns:ns1="processOrder">
<newOrder href="#id0"/>
</ns1:processOrder>
<multiRef SOAP-ENC:root="0"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" id="id0"
xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/:encodingStyle"
xmlns:ns3="http://amberpoint.com/tutorial/orders"
xsi:type="ns3:PurchaseOrder">
<customerName xsi:type="xsd:string">Oakland Home and
Garden</customerName>
<city xsi:type="xsd:string">Oakland</city>
<state xsi:type="xsd:string">CA</state>
<items SOAP-ENC:arrayType="ns3:OrderItem[4]"
xsi:type="SOAP-ENC:Array">
<item href="#id1"/>
<item href="#id2"/>
<item href="#id3"/>
<item href="#id4"/>
</items>
<id xsi:nil="true"/>
<address xsi:nil="true"/>
</multiRef>
<multiRef SOAP-ENC:root="0"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" id="id3"
xmlns:ns4="http://amberpoint.com/tutorial/orders"
xsi:type="ns4:OrderItem">
<itemId xsi:type="xsd:string">ASF17843</itemId>
<quantity xsi:type="xsd:int">3</quantity>
<price xsi:type="xsd:double">3600.0</price>
<description xsi:type="xsd:string">Hot tub</description>
</multiRef>
<multiRef SOAP-ENC:root="0"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" id="id4"
xmlns:ns5="http://amberpoint.com/tutorial/orders"
xsi:type="ns5:OrderItem">
<itemId xsi:type="xsd:string">QFA17589</itemId>
<quantity xsi:type="xsd:int">20</quantity>
<price xsi:type="xsd:double">2.99</price>
<description xsi:type="xsd:string">Bucket of ladybugs</description>
</multiRef>
<multiRef SOAP-ENC:root="0"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" id="id1"
xmlns:ns6="http://amberpoint.com/tutorial/orders"
xsi:type="ns6:OrderItem">
<itemId xsi:type="xsd:string">TSR14523</itemId>
<quantity xsi:type="xsd:int">200</quantity>
<price xsi:type="xsd:double">89.95</price>
<description xsi:type="xsd:string">Jigsaw</description>
</multiRef>
<multiRef SOAP-ENC:root="0"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" id="id2"
xmlns:ns7="http://amberpoint.com/tutorial/orders"
xsi:type="ns7:OrderItem">
<itemId xsi:type="xsd:string">UAF13429</itemId>
<quantity xsi:type="xsd:int">30</quantity>
<price xsi:type="xsd:double">18.23</price>
<description xsi:type="xsd:string">Mop</description>
</multiRef>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>