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

10055RE: [soapbuilders] .NET, SOAP encoded types and arrays

Expand Messages
  • Christopher B Ferris
    Dec 17, 2004
    • 0 Attachment
      Tom,

      Right, WS-I says not to use rpc/encoded for a reason. SOAP encoding is the
      bane of interoperability in
      Web services. Note also that neither SOAP1.1, nor SOAP1.2, require support
      for SOAP encoding:

      http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383512

      "Use of the data model and encoding style described in this section is
      encouraged but
      not required; other data models and encodings can be used in conjunction
      with
      SOAP (see section 4.1.1). "

      Thus, .NET may freely choose not to support its use.

      Regardless of the fact that Axis produces rpc-encoded as the default (and
      that should be
      changed IMO), if interoperability is a key requirement, then you need to
      be using rpc-literal
      or (preferably) doc-literal WSDL to describe the service, and that WSDL
      should be
      WS-I BP 1.x conformant to boot.

      Note that IIRC, VisualStudio doesn't eat rpc-literal either, you'd have to
      code the C# by hand.
      If you want interop with .NET, then doc-literal or doc-literal wrappered
      is the way to go unless
      you are a glutton for punishment.

      WS-I Profiles have been hammered out with the intent that they set the bar
      for
      interoperability of Web services. Most toolkits support the WS-I BP at
      this point.
      While the WS-I BP does not constrain a vendor (or open source project)
      from supporting
      features disallowed by the Profile, developers who have interoperability
      as a
      non-functional requirement for their service should not be using those
      features (e.g.
      SOAP encoding). If you color outside the lines defined by the WS-I
      Profiles,
      then YMMV as to whether you can achieve interoperability with another
      platform/tooling.

      Cheers,

      Christopher Ferris
      STSM, Emerging e-business Industry Architecture
      email: chrisfer@...
      blog: http://webpages.charter.net/chrisfer/blog.html
      phone: +1 508 377 9295

      Tom Jordahl <tomj@...> wrote on 12/17/2004 02:12:41 PM:

      >
      > Well, that is cool for document/literal web services, but there are
      still
      > *many* toolkits (like say, Axis) that default to rpc/encoded.
      >
      > WS-I says nothing about encoding behaviors (other than not to use them).
      So
      > it doesn't apply here. This is a .NET failure to consume what I think
      is a
      > legitimate rpc/encoded web service.
      >
      > But thanks for playing Chris! :-)
      >
      > --
      > Tom Jordahl
      > Macromedia Server Development
      >
      > > -----Original Message-----
      > > From: Christopher B Ferris [mailto:chrisfer@...]
      > > Sent: Friday, December 17, 2004 1:50 PM
      > > To: soapbuilders@yahoogroups.com
      > > Subject: Re: [soapbuilders] .NET, SOAP encoded types and arrays
      > >
      > >
      > > Could be because WS-I BP1.x disallows use of SOAP encoding. It has
      always
      > > been my understanding
      > > that .NET would not support SOAP encoding.
      > >
      > > Bottom line, you want interop, color inside the lines drawn by the
      WS-I
      > > Profiles:-)
      > >
      > > Cheers,
      > >
      > > Christopher Ferris
      > > STSM, Emerging e-business Industry Architecture
      > > email: chrisfer@...
      > > blog: http://webpages.charter.net/chrisfer/blog.html
      > > phone: +1 508 377 9295
      > >
      > > Tom Jordahl <tomj@...> wrote on 12/17/2004 12:20:40 PM:
      > >
      > > > Hello,
      > > >
      > > > Axis recently fixed up its type mapping system and our users have
      > > reported
      > > > some interop problems. Specifically, .NET client does not seem to
      > > > understand the soapenc types that Axis is sending it in SOAP encoded
      > > arrays.
      > > >
      > > > Our WSDL is this:
      > > >
      > > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      > > >
      > > > <complexType name="ArrayOf_soapenc_string">
      > > > <complexContent>
      > > > <restriction base="soapenc:Array">
      > > > <attribute ref="soapenc:arrayType"
      > > wsdl:arrayType="soapenc:string[]"/>
      > > > </restriction>
      > > > </complexContent>
      > > > </complexType>
      > > >
      > > > For an operation that is simply:
      > > > String[] echo(String[] in)
      > > >
      > > > .NET client sends this (note that it doesn't use the soap encoded
      > > types):
      > > >
      > > > <soap:Body
      > > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      > > > <q1:echo xmlns:q1="http://DefaultNamespace">
      > > > <in href="#id1" />
      > > > </q1:echo>
      > > > <soapenc:Array id="id1" soapenc:arrayType="xsd:string[3]">
      > > > <Item>one</Item>
      > > > <Item>two</Item>
      > > > <Item>three</Item>
      > > > </soapenc:Array>
      > > > </soap:Body>
      > > >
      > > >
      > > > Axis 1.2 returns:
      > > >
      > > > <soapenv:Body>
      > > > <ns1:echoResponse
      > > > soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
      > > > xmlns:ns1="http://DefaultNamespace">
      > > > <echoReturn soapenc:arrayType="soapenc:string[3]"
      > > > xsi:type="soapenc:Array"
      > > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      > > > <item>one</item>
      > > > <item>two</item>
      > > > <item>three</item>
      > > > </echoReturn>
      > > > </ns1:echoResponse>
      > > > </soapenv:Body>
      > > >
      > > >
      > > > .NET reports an error:
      > > > Unhandled Exception: System.InvalidOperationException: There is an
      error
      > > in
      > > > XML document (1, 308). ---> System.InvalidOperationException: The
      > > specified
      > > > type was not recognized: name='string',
      > > > namespace='http://schemas.xmlsoap.org/soap/encoding/', at
      <whoamiReturn
      > > > xmlns=''>.
      > > >
      > > > Actually, C# only says "There is an error in XML document (1, 311)."
      -
      > > this
      > > > error is from our user who is using VB.
      > > >
      > > > It appears that only by accident did our previous releases not use
      the
      > > SOAP
      > > > encoded types due to bugs in our code. Now that we fixed them, this
      > > shows
      > > > up. :-}
      > > >
      > > > Why is .NET not using the soapenc types? Why is it unable to
      recognize
      > > > these types in a rpc/encoded service? What are other implementation
      > > doing
      > > > (particularly JAX-RPC implementation) about the SOAP encoded types?
      > > >
      > > > Thanks for any help/info.
      > > >
      > > > --
      > > > Tom Jordahl
      > > > Wearing his Apache Axis committer hat
      > > >
      > > >
      > > >
      > > >
      > > > -----------------------------------------------------------------
      > > > This group is a forum for builders of SOAP implementations to
      discuss
      > > implementation and
      > > > interoperability issues. Please stay on-topic.
      > > >
      > >
      > > >
      > > > Yahoo! Groups Sponsor
      > > >
      > > > ADVERTISEMENT
      > > > [image removed]
      > > >
      > > > [image removed]
      > > >
      > > >
      > > > Yahoo! Groups Links
      > > > To visit your group on the web, go to:
      > > > http://groups.yahoo.com/group/soapbuilders/
      > > >
      > > > To unsubscribe from this group, send an email to:
      > > > soapbuilders-unsubscribe@yahoogroups.com
      > > >
      > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      > >
      > >
      > >
      > > -----------------------------------------------------------------
      > > This group is a forum for builders of SOAP implementations to discuss
      > > implementation and interoperability issues. Please stay on-topic.
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      >
      >
      >
      > -----------------------------------------------------------------
      > This group is a forum for builders of SOAP implementations to discuss
      implementation and
      > interoperability issues. Please stay on-topic.
      >

      >
      > Yahoo! Groups Sponsor
      >
      > ADVERTISEMENT
      > [image removed]
      >
      > [image removed]
      >
      >
      > Yahoo! Groups Links
      > To visit your group on the web, go to:
      > http://groups.yahoo.com/group/soapbuilders/
      >
      > To unsubscribe from this group, send an email to:
      > soapbuilders-unsubscribe@yahoogroups.com
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    • Show all 17 messages in this topic