Loading ...
Sorry, an error occurred while loading the content.

9309Re: Round 4 - Illegal Fault Soap Messages for Encoded case

Expand Messages
  • Adi Sakala
    Jul 1, 2003
    • 0 Attachment
      Hi,
      I understand how the soap faults will look on the wire in the case
      where wsdl message part is referring to an element and the use is
      literal.

      I was specifically interested in the case where the wsdl fault
      message part refers to an abstract type and the use is literal
      for eg:
      <message name="StringFault">
      <part name="part2" type="xsd:string" />
      </message>

      <fault name="SimpleFault">
      <soap:fault name="SimpleFault" use="literal"/>
      </fault>

      The reason why i was asking the wire format for the above case was,
      because according to WSDL spec, when the message part referes to an
      abstract type in schema and the use is literal (with document style)
      then <soap:body/> or <detail/> elements will be representing the
      abstract type defined by the part on the wire.

      If this is true, then the wire format for above case should look like,
      <detail>My Fault Detail</detail>

      I dont see any testcases in interop for this kind of message and
      binding definition combinations.

      If what i said above is agreeable, then if we write a binding for the
      same message with encoded use,
      i.e
      <fault name="SimpleFault">
      <soap:fault name="SimpleFault"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      use="encoded" namespace="http://soapinterop.org/wsdl" />
      </fault>

      then according to soap encoding rules the part is referring to a
      simple type(xsd:string). In which case,
      we should be able to create a make detail as the element that
      represents the fault part as,
      <detail xsi:type="xsd:string">My Fault Detail String</detail>

      Instead of,
      <detail>
      <test:part2 xmlns:test="http://example.org/whatever">Hello
      World</test:part2>
      <detail>

      Thanks for the detailed responses.

      thanks,
      Adi



      --- In soapbuilders@yahoogroups.com, "Bob Cunnings" <cunnings@l...>
      wrote:
      > Hi,
      >
      > Well, it will help to look at the example available in the Round 4
      > doc/literal fault tests [1]
      > where a literal fault detail like:
      >
      > <fault name="SimpleFault">
      > <soap:fault use="literal"/>
      > </fault>
      >
      > from the "SimpleDocLitBinding" binding maps ultimately to a message
      like:
      >
      > <message name="StringFault">
      > <part name="part2" element="ns3:StringPart"/>
      > </message>
      >
      > Now in this case the part makes reference to an element, since use
      is
      > "literal". This element is defined in the schema as:
      >
      > <element name="StringPart" type="xsd:string"/>
      >
      > whose targetNamespace is http://soapinterop.org/types/part. The
      actual
      > instance on the wire might look like:
      >
      > <detail>
      > <test:StringPart
      xmlns:test="http://soapinterop.org/types/part">Hello
      > World</test:StringPart>
      > </detail>
      >
      > It's not a matter of having a "wrapper"... an element is an
      element, and by
      > definition has its content enclosed in tags.
      >
      > Again, the SOAP 1.1 spec requires that detail entries be namespace
      qualified
      > independent elements, and this requirement is met whether the entry
      is
      > defined in WSDL as literal, in which case the element is defined in
      a schema
      > and "literally" transmitted, or it is defined as encoded, in which
      case the
      > SOAP encoding rules cause a value (an instance of the abstract type
      > referenced in the message part) to be transmitted as element
      content [2]. In
      > this case what is seen on the wire might look like:
      >
      > <detail>
      > <test:part1 xmlns:test="http://example.org/whatever">Hello
      > World</test:part1>
      > </detail>
      >
      > where the localname "part1" was the name of the message part, and
      > http://example.org/whatever is the namespace referenced in the
      soap:fault
      > binding extension element by the "namespace" element. This in
      accordance
      > with WSDL 1.1 sec. 3.5.
      >
      > RC
      >
      > [1] http://soapinterop.java.sun.com/soapbuilders/r4/simple-doc-
      literal.wsdl
      > [2] http://www.w3.org/TR/SOAP/#_Toc478383513
      > [3] http://www.w3.org/TR/2001/NOTE-wsdl-20010315#_soap:body
      >
      > > Hi,
      > >
      > > I am not sure i agree with this. May be i need little more
      > > information before i agree.
      > >
      > > I understand what soap spec says regarding detail. But it doesnt
      > > say that the <detail> should ONLY have elements, right?
      > >
      > > Since Fault Messages are going to have only one part, i disagree
      > > with the wrapping of the fault messages. If detail element can
      > > provide what you are achieving with the wrapped part element, why
      do
      > > we need another level of indirection.
      > >
      > > Can somebody tell me how the soap messages (for faults) would be
      > > created when i add a binding with Literal Use for faults to the
      Round
      > > 4 WSDL (simple-rpc-encoded.wsdl for SimpleRpcEncPortType)
      > > http://soapinterop.java.sun.com/soapbuilders/r4/simple-rpc-
      > > encoded.wsdl
      > >
      > > Here is the question i would ask, Say i have a fault message
      > > described as below in WSDL,
      > >
      > > <message name="StringFault">
      > > <part name="part2" type="xsd:string" />
      > > </message>
      > >
      > > Say i have two bindings,
      > >
      > > 1. RPC - Encoded
      > >
      > > <fault name="SimpleFault">
      > > <soap:fault name="SimpleFault"
      > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > > use="encoded" namespace="http://soapinterop.org/wsdl" />
      > > </fault>
      > >
      > > Soap Fault Detail that is being produced looks like,
      > > <detail><ns1:part2 xsi:type="xsd:string">White Mesa
      > > Test</ns1:part2></detail>
      > >
      > >
      > > 2. Document - Literal
      > >
      > > <fault name="SimpleFault">
      > > <soap:fault name="SimpleFault" use="literal"/>
      > > </fault>
      > >
      > > I would assume soap fault detail for this binding will look
      like,
      > > <detail>White Mesa Test</detail>
      > > (According to WSDL 1.1 Section 3.5)
      > > If I am wrong, I would really appreciate if somebody could show
      me
      > > how the detail will look like for this binding.
      > >
      > > May be answer to this helps me clarify alittle bit on why we
      adding
      > > additional elements inside detail when it is not required.
      > >
      > > Appreciate all the Help,
      > > thanks,
      > > Adi
      > >
      > >
    • Show all 6 messages in this topic