Re: .Net Dataset java Serializer

Jim Murphy <[email protected]> Sun, 16 Feb 2003 17:57:53 -0500
Newsgroups gmane.comp.windows.devel.soap.general
Message-ID <[email protected]>
Just because you can doesn't mean you should.  Web Services in .NET need to
be written to use the XML Type system not the .NET type system.  You may get
away with not thinking about that provided your serialization layer does the
right thing and maps to a generic XML type.  Unfortunately with .NET
DataSets and Collections this isn't the case and you are putting the onus on
the client to consume your broken web service.

If you tweak the HelloWorld WebMethod to return a DataSet here is the
relevant generated WSDL bits - which are not a heck of a lot of help for a
Java/Perl/C++ programmer...

Response Message definition...

<message name="HelloWorldSoapOut">
  <part name="parameters" element="s0:HelloWorldResponse" />
</message>


Type...

<s:element name="HelloWorldResponse">
  <s:complexType>
    <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult">
        <s:complexType>
          <s:sequence>
            <s:element ref="s:schema" />
            <s:any />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:sequence>
  </s:complexType>
</s:element>


Hmmm...So your WSDL has you pass an big ol' void* with hopes that the .NET
runtime will figure out this stuff at runtime and perform the
around-the-back marshalling required to actually get this to work.  Soaking
up this stuff in the toolkits is an interop nightmare so finding some java
code that can somehow divine the wire format for a DataSet is postponing the
inevitable - the day the wire format changes and your java code breaks.
There is a reason people are explicit about their types - especially in
contractual interfaces like WSDL is for a web service!

Kind Regards,

Jim Murphy
Mindreef, Inc.
http://www.mindreef.com


> -----Original Message-----
> From: Discussion of implementing SOAP applications today
> [mailto:[email protected]]On Behalf Of Jarrod Marshall
> Sent: Sunday, February 16, 2003 5:03 PM
> To: [email protected]
> Subject: Re: [SOAP] .Net Dataset java Serializer
>
>
> You can return basically anything from a web service as long as it
> complies with SOAP specifications.
>
> Jarrod Marshall
>
>
> -----Original Message-----
> From: Discussion of implementing SOAP applications today
> [mailto:[email protected]] On Behalf Of Jim Murphy
> Sent: Sunday, February 16, 2003 4:01 PM
> To: [email protected]
> Subject: Re: [SOAP] .Net Dataset java Serializer
>
> Dare I ask why the web service was build to return a .NET
> DataSet int he
> first place?  Do you have any influence over the service
> design?  If so
> you may want to replace the DataSet with a more generic XML oriented
> return type.
>
> Jim Murphy
> Mindreef, Inc.
> http://www.mindreef.com
>
> You can read messages from the SOAP archive, unsubscribe from SOAP, or
> subscribe to other
> DevelopMentor lists at http://discuss.develop.com.
>
> You can read messages from the SOAP archive, unsubscribe from
> SOAP, or subscribe to other
> DevelopMentor lists at http://discuss.develop.com.
>
>

You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other
DevelopMentor lists at http://discuss.develop.com.