You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Pete Hendry <pe...@capeclear.com> on 2003/10/02 11:12:27 UTC

encodingStyle not defined on faults but href used

While testing fault interop I came across this problem with axis. The 
message below is the result of throwing an exception (Exception1) which 
is defined as a complexType. Notice that in the fault detail the 
ns1:Exception1 element uses "href". This is not valid here because this 
element is not in the scope of an encodingStyle definition. The only 
place encodingStyle is defined is on the mref element. To use href the 
element must be in the scope of soapenc encodingStyle.

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode>soapenv:Server.generalException</faultcode>
   <faultstring></faultstring>
   <detail>
    <!-- ** this element is not in scope of soap-enc encodingStyle so 
can't use href ** -->
    <ns1:Exception1 href="#id0" 
xmlns:ns1="http://tempuri.org/exceptions/xsd"/>
    <ns2:exceptionName
        
xmlns:ns2="http://xml.apache.org/axis/">org.tempuri.exceptions.xsd.Exception1Type</ns2:exceptionName>
   </detail>
  </soapenv:Fault>
  <multiRef id="id0" soapenc:root="0"
            
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            xsi:type="ns3:Exception1Type"
            xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
            xmlns:ns3="http://tempuri.org/exceptions/xsd">
   <name xsi:type="xsd:string">name1</name>
   <value xsi:type="xsd:string">value1</value>
  </multiRef>
 </soapenv:Body>
</soapenv:Envelope>

Pete