File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

returning XML using XML-RPC

 
Mike(work) Warren
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I'm thinking of writing a webservice to return an XML document using XML-RPC.
I've done a bit of experimenting and it seems to work ok, using a XML-RPC's string type to return the XML.
However as I'm new to XML and webservices I'm not sure if this is a reasonable thing to be doing - I'd be interested to hear any opinions.
Thanks - Mike
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13047
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String works fine and is about the simplest approach.
Bill
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree with Bill but....

Exchanging String objects, you're gonna use RPC/Encoded. This communication model is strongly discouraged by WS-I.
So if you want to be WS-I compliant, I guess you'll have to use a LITERAL Encoding.
According to Sun, if you want to exchange XML, you must use a javax.xml.transform.Source Object.

But String is simpler, and it does work.
 
Mike(work) Warren
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK - Thanks for the replies.
I think I'll stick with using XML-RPC and returning a String for now, and research other options later when I've got a better understanding of the issues involved
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jean-Louis Marechaux:
Agree with Bill but....
Exchanging String objects, you're gonna use RPC/Encoded. This communication model is strongly discouraged by WS-I.
So if you want to be WS-I compliant, I guess you'll have to use a LITERAL Encoding.

I'm using Aapche Axis 1.1, its NOT fully suitable for document/literal service.
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Balaji Loganathan:

I'm using Aapche Axis 1.1, its NOT fully suitable for document/literal service.

I'm using Apache SOAP and it is not fully suitable for DOC/LIT either. But I can fake doc/lit using RPC/LIT and exchanging XML documents through org.w3c.dom.Element .
As for Axis 1.1, I'm a bit surprised about your statement. Can you explain further ?? Axis is supposed to be JAX-RPC compliant. What are the problems you are facing with DOC/LIT
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Jean
Yes!.. I'm sure!.. I'm using axis 1.1(final version).
Axis1.1 is not fully capable for doc/lit service even for methods which returns string as output.
Four problems
1. See the bug with my comments inline http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18714
2. and here http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21687
3. I had a chance to use microsoft infopath which has the utility to consume doc/lit based web services,but when i try to use them to consume axis services, i'm getting the error at soap response.The same works fine with .NET as server
4. I also tried to consume this service using .NET web service studio tool 2.0 and with JSP/servlet. The SOAP response returned values were read as null.
So!.. doc/lit is not so stable.
[ July 25, 2003: Message edited by: Balaji Loganathan ]
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very interesting Balaji.
Thanks for the input, I'll keep that in mind.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic