Best practices

Discussion in 'ASP .Net Web Services' started by ring, Feb 13, 2004.

  1. ring

    ring Guest

    Hello All,

    I am working on an application involving the interoperability between J2EE and .NET. One of my requirements is to send an XML document from .NET web service to J2EE web service which would be hosted on Axis 1.1

    My question is did anyone work on interoperability between .NET and J2EE involving the need to pass an XML document between the web services. If yes, what is the portable object ( purported Java representation) of XML document ? To be more specific, what is the interoperable version to .NET's "XMLDocument" in Java?

    Which one is recommended .... sending the XML document or sending the document as SOAP attachment??

    Any pointers or tutorials describing the transfer of XML documents would be highly appreciated!!!

    TIA
     
    ring, Feb 13, 2004
    #1
    1. Advertising

  2. ring

    Simon Smith Guest

    On Fri, 13 Feb 2004 11:26:07 -0800 in article
    <> in
    microsoft.public.dotnet.framework.aspnet.webservices , "ring"
    <> wrote:

    >Hello All,
    >
    >I am working on an application involving the interoperability between J2EE and .NET. One of my requirements is to send an XML document from .NET web service to J2EE web service which would be hosted on Axis 1.1
    >
    >My question is did anyone work on interoperability between .NET and J2EE involving the need to pass an XML document between the web services. If yes, what is the portable object ( purported Java representation) of XML document ? To be more specific, what is the interoperable version to .NET's "XMLDocument" in Java?
    >
    >Which one is recommended .... sending the XML document or sending the document as SOAP attachment??
    >
    >Any pointers or tutorials describing the transfer of XML documents would be highly appreciated!!!
    >
    >TIA


    Pass it the document's OuterXml.


    --
    Simon
    simon dot s at ghytred dot com
    "Insomnia is a small price to pay for the stuff you read on UseNet"
     
    Simon Smith, Feb 14, 2004
    #2
    1. Advertising

  3. ring

    Dan Rogers Guest

    Hi Ring

    I'm not sure you want to pass the XML as an XMLDocument. Instead, you might just want to invoke the web method using a strong type that is managed by a class

    For example, suppose you have an AddressBook web service. You would want to call "AddNewAddress" passing an Address class, not an XML document. The reason for wanting to do this is to use a strongly typed payload that is relevant to your service

    Going to the base data type XML document as the method signature signifies that your service is capable of processing any possible XML document - which is clearly not the case. This kind of loose coupling is not a best practice

    Suggest you look at some simple service examples that pass strong types between caller and service provider. Alternately, simply create a simple method that returns a strong type when passed a strong type, and look at what ASP.net does on the wire

    For background reading, look at SoapDocumentServiceAttribute

    SoapDocumentServiceAttribute(System.Web.Services.Description.SoapBindingUse.Default, SoapParameterStyle.Wrapped

    Also, since you are combining Axis and .NET, you might want to read up on best practices for interop by looking at the WS-I.org basic profile 1.0

    Regard

    Da
     
    Dan Rogers, Feb 17, 2004
    #3
    1. Advertising

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. Izvra
    Replies:
    0
    Views:
    556
    Izvra
    Dec 23, 2003
  2. news.microsoft.com
    Replies:
    0
    Views:
    570
    news.microsoft.com
    May 3, 2004
  3. karim
    Replies:
    0
    Views:
    485
    karim
    Jul 13, 2003
  4. John Dalberg
    Replies:
    3
    Views:
    601
    samuelhon
    Nov 16, 2006
  5. Chicken McNuggets

    Best book on C gotchas and best practices?

    Chicken McNuggets, Jul 31, 2013, in forum: C Programming
    Replies:
    9
    Views:
    282
    Fred J. Tydeman
    Aug 5, 2013
Loading...

Share This Page