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 bu...@apache.org on 2002/03/20 09:46:02 UTC

DO NOT REPLY [Bug 7268] New: - Responses no not declare correct EncodingStyles

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7268>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7268

Responses no not declare correct EncodingStyles

           Summary: Responses no not declare correct EncodingStyles
           Product: Axis
           Version: beta-1
          Platform: PC
               URL: http://www.silbergrau.com
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Basic Architecture
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: pri@silbergrau.com
                CC: pri@silbergrau.com


SOAP Specification on Encoding Styles (4.1.1): 
"[...] This attribute MAY appear on any element, and is scoped
 to that element's contents and all child elements not themselves
 containing such an attribute, much as an XML namespace declaration
 is scoped. There is no default encoding defined for a SOAP message. [...]"

When AXIS sends back a response it does not provide correct encoding styles
for referenced elements. The example below shows a testcase for such a call. 
Actually you could guess the encoding style from the reference, however, there
may be more references to this element that are within different encoding 
styles!
More important is that you CAN NOT determine wether the <multiRef> element has
id "id0" if you do not know the encoding style of this element, since this is 
defined in the encoding style (encoding styles different from the soap encoding
style may define identifier attributes different to "id")!

TYPES: 
------
public class TypeA {
  private TypeA reference;
}

Remote method = TypeA passThroughTypeA(TypeA a)

REQUEST ENVELOPE: 
-----------------
<soap-env:Envelope xmlns:soap-enc11="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap-
env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-
enc12="http://www.w3.org/2001/06/soap-encoding" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:silbergrauSoapExtensions="http://www.silbergrau.com/soap/extensions">
  <soap-env:Body>
    <ns2:passThroughTypeA xmlns:ns2="TestService">
      <param soap-env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xsi:type="ns3:TypeA" id="1" 
xmlns:ns3="http://www.silbergrau.com/schemas/encodedTypes">
        <reference xsi:type="ns3:TypeA" xsi:null="1" xsi:nil="true"></reference>
      </param>
    </ns2:passThroughTypeA>
  </soap-env:Body>
</soap-env:Envelope>

RESPONSE ENVELOPE
-----------------
<SOAP-ENV:Envelope 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:passThroughTypeAResponse SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:ns1="TestService">
      <passThroughTypeAResult href="#id0"/>
    </ns1:passThroughTypeAResponse>
    <!--
      THIS ELEMENT MUST DECLARE AN ENCODING STYLE
    -->
    <multiRef id="id0" SOAP-ENC:root="0" xsi:type="ns2:TypeA" xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:ns2="http://www.silbergrau.com/schemas/encodedTypes">
      <reference xsi:nil="true"/>
    </multiRef>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>