Passing XML Strings to Webservices - a bad practice?

Discussion in 'ASP .Net Web Services' started by Arno Huetter, Aug 22, 2003.

  1. Arno Huetter

    Arno Huetter Guest

    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
     
    Arno Huetter, Aug 22, 2003
    #1
    1. Advertisements

  2. Arno Huetter

    Frank Drebin Guest

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


    "Christian Weyer [MSDN RD]" <> wrote in message
    news:...
    > 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/manifest.xml
    >
    > Cheers,
    > --
    > Christian Weyer
    > Microsoft .NET & Service Oriented Architectures
    >
    > [Microsoft Regional Director, Germany]
    > http://www.regionaldirectors.de/
    >
    > * XML Web Services: http://www.xmlwebservices.cc/
    > * Weblog: http://weblogs.asp.net/cweyer/
    >
    >
    >
    > > 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, Aug 24, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. xyZed
    Replies:
    2
    Views:
    467
    David Dorward
    Jan 24, 2006
  2. fabio

    bad programming practice?

    fabio, Apr 18, 2006, in forum: C Programming
    Replies:
    16
    Views:
    672
    Al Balmer
    Apr 19, 2006
  3. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    1,072
    Malcolm
    Jun 24, 2006
  4. jon wayne
    Replies:
    1
    Views:
    500
    benben
    Sep 19, 2005
  5. Peter D.
    Replies:
    25
    Views:
    912
    Arved Sandstrom
    Nov 30, 2008
  6. James Harris

    Identifying a class type - bad practice?

    James Harris, Aug 18, 2009, in forum: Python
    Replies:
    6
    Views:
    357
  7. Steve Chow
    Replies:
    66
    Views:
    1,903
    Nick Keighley
    Apr 13, 2010
  8. rantingrick
    Replies:
    44
    Views:
    1,836
    Peter Pearson
    Jul 13, 2010
Loading...