aspose file tools*
The moose likes Web Services and the fly likes General Document Style Validation Questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "General Document Style Validation Questions" Watch "General Document Style Validation Questions" New topic
Author

General Document Style Validation Questions

Brit
Greenhorn

Joined: Mar 12, 2004
Posts: 1
I have some general questions about document style web services. If you can answer my questions or direct me to an article or book I would appreciate it.
I have an XML document that I want to pass into a web service, and a different XML document is returned. If I am designing my interface to be suitable for Axis or WebLogic and I will also have .NET clients, would I pass the XML as a String, org.w3c.org.Document, org.w3c.org.Element, or a java object that contains the data?
I have seen reference to using all these methods. Does it matter if I also want to validate against a custom schema?
Does it matter if I am using Castor or XMLBeans? With XMLBeans I assume I would pass/return the Document object but with Castor I have seen passing a Java object and changing the Axis serializers(IBM article integrating Castor and Axis).
Is there a standard place/way to validate against a custom schema? If I am validating just the XML in the parameter do I need to setup a handler (does this work with wrapped)? Is there a way to have the SOAP processor validate the XML against my custom schema or does it only validate the whole soap message?
As you can see I am looking for some guidance, and any help is appreciated? A response for one of these questions would be helpful.
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by Brit Pair:
If I am designing my interface to be suitable for Axis or WebLogic and I will also have .NET clients, would I pass the XML as a String, org.w3c.org.Document, org.w3c.org.Element, or a java object that contains the data?

Axis is not very successful with document style webservices, (maybe the latest CVS will support), but still then its not really stable, many times .NET is not porting with Axis document style WS. In that case it is better to use Axis RPC style webservices. At this moment i'm sending the XML document as a byte[] or sometime as a string, this way its portable with .net and by default with weblogic and websphere.
Axis samples package has example on sending the xml document as w3c.org.Element, i'm sure it will work with weblocig and websphere.
[ March 12, 2004: Message edited by: Balaji Loganathan ]

Spritle Software Blogs
 
 
subject: General Document Style Validation Questions