Best practices

R

ring

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
 
S

Simon Smith

On Fri, 13 Feb 2004 11:26:07 -0800 in article
<[email protected]> in
microsoft.public.dotnet.framework.aspnet.webservices , "ring"
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.
 
D

Dan Rogers

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top