• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

returning XML using XML-RPC

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
String works fine and is about the simplest approach.
Bill
 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Very interesting Balaji.
Thanks for the input, I'll keep that in mind.
 
We can walk to school together. And we can both read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic