aspose file tools*
The moose likes Web Services and the fly likes Passing DOM object in webservices Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Passing DOM object in webservices" Watch "Passing DOM object in webservices" New topic
Author

Passing DOM object in webservices

Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
Hi
How can i define the type/s in the wsdl for passing a XML DOM object as a parameter in a webservice call?...Any wsdl snippets ?


Thnx
Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
Hi
I have got the answer myself...We need to define the dom element as xsd:anyType in the wsdl...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
Are you planning to send a serialized binary representation of a DOM object through SOAP? That would only be accessible by a client written in Java, and thus negate the cross-platform advantage of web services. Could you send the actual XML that corresponds to the DOM object instead?


Ping & DNS - my free Android networking tools app
Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
Hi
So you suggest sending the xml as a String to make it cross platform capable?...I am sending a single org.w3c.dom.Document Object which is made out by parsing the XML...
Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
To give a more clear picture....Check for "third option" in this link.
Web services
..I am using that...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
Check for "third option" in this link.
Web services


That talks about what I advocated - sending the XML as text, not as Document object. If you're already doing that, then my point is moot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing DOM object in webservices