[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

Passing XML Strings to Webservices - a bad practice?

arno.huetter

8/22/2003 11:33:00 AM

Hi there,

when I design webservices, I usually pass simple data container types
to the webservice (one or several objects containing primitive type
members) - this simplifies client- and server-side code, and still
ensures interoperability, e.g. between Java callees and .NET callers,
vice versa, as those data types exist in both worlds.

But what I have noticed is that most of the time I have to integrate
third party webservices (those that have more complex parameter
structures than just an Integer or two), do so by simply defining a
string as the one and only werbservice parameter. which is then
expected to contain XML data in a certain format.

Reluctantly (having no choice) I ususally implement the calling side
that way (assembling the XML string required), but I consider that a
big contradiction to the original design goals of webservices resp.
SOAP. Not only that type-safety is lost, the werbservice
implementation must ensure XML validity and run some XML parsing on
each call - something that I would prefer SOAP to take care of.

I would like to know whether this is considered bad pratice, or not.

Thank you!

Kind regards,
Arno Huetter
2 Answers

Christian Weyer

8/23/2003 4:04:00 PM

0

In my eyes, this is not a good practice, no. But it is a viable option, though ... there is a lot to talk about this issue.
Additionally, I would recommend to watch Doug's MSDNTV show on how to design loosely coupled and extensible Web services - very good stuff.
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20030722WEBSVCSDP/ma...

Cheers,
--
Christian Weyer
Microsoft .NET & Service Oriented Architectures

[Microsoft Regional Director, Germany]
http://www.regionaldir...

* XML Web Services: http://www.xmlwebse...
* Weblog: http://weblogs.asp.n...



> Hi there,
>
> when I design webservices, I usually pass simple data container types
> to the webservice (one or several objects containing primitive type
> members) - this simplifies client- and server-side code, and still
> ensures interoperability, e.g. between Java callees and .NET callers,
> vice versa, as those data types exist in both worlds.
>
> But what I have noticed is that most of the time I have to integrate
> third party webservices (those that have more complex parameter
> structures than just an Integer or two), do so by simply defining a
> string as the one and only werbservice parameter. which is then
> expected to contain XML data in a certain format.
>
> Reluctantly (having no choice) I ususally implement the calling side
> that way (assembling the XML string required), but I consider that a
> big contradiction to the original design goals of webservices resp.
> SOAP. Not only that type-safety is lost, the werbservice
> implementation must ensure XML validity and run some XML parsing on
> each call - something that I would prefer SOAP to take care of.
>
> I would like to know whether this is considered bad pratice, or not.
>
> Thank you!
>
> Kind regards,
> Arno Huetter

Frank Drebin

8/24/2003 5:03:00 AM

0

I've never even heard of MSDN TV - those are some really great videos!!!!!
Really good stuff - thanks!


"Christian Weyer [MSDN RD]" <cw@eyesoft.de> wrote in message
news:ezfPABZaDHA.3768@tk2msftngp13.phx.gbl...
> In my eyes, this is not a good practice, no. But it is a viable option,
though ... there is a lot to talk about this issue.
> Additionally, I would recommend to watch Doug's MSDNTV show on how to
design loosely coupled and extensible Web services - very good stuff.
>
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20030722WEBSVCSDP/ma...
>
> Cheers,
> --
> Christian Weyer
> Microsoft .NET & Service Oriented Architectures
>
> [Microsoft Regional Director, Germany]
> http://www.regionaldir...
>
> * XML Web Services: http://www.xmlwebse...
> * Weblog: http://weblogs.asp.n...
>
>
>
> > Hi there,
> >
> > when I design webservices, I usually pass simple data container types
> > to the webservice (one or several objects containing primitive type
> > members) - this simplifies client- and server-side code, and still
> > ensures interoperability, e.g. between Java callees and .NET callers,
> > vice versa, as those data types exist in both worlds.
> >
> > But what I have noticed is that most of the time I have to integrate
> > third party webservices (those that have more complex parameter
> > structures than just an Integer or two), do so by simply defining a
> > string as the one and only werbservice parameter. which is then
> > expected to contain XML data in a certain format.
> >
> > Reluctantly (having no choice) I ususally implement the calling side
> > that way (assembling the XML string required), but I consider that a
> > big contradiction to the original design goals of webservices resp.
> > SOAP. Not only that type-safety is lost, the werbservice
> > implementation must ensure XML validity and run some XML parsing on
> > each call - something that I would prefer SOAP to take care of.
> >
> > I would like to know whether this is considered bad pratice, or not.
> >
> > Thank you!
> >
> > Kind regards,
> > Arno Huetter