cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XML in web services

Former Member
0 Likes
256

Hi all,

I've asked this question in the Java Programming forum too but have got no reply. I guess this may be the more appropriate place for it.

How can I accept and return XML documents as input and output of a Web Service. Is there any way I can serialize a DOM object and deserialize it at the other end? Please advise.

Regards,

Nirav

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

See this example I put together using javascript and HTML:

/people/prakash.darji/blog/2006/09/04/work-with-xmla-web-service-for-bi-data-in-external-applications

I use XSL to convert the XML to HTML.

Former Member
0 Likes

Hi,

I thought passing XMLs was supported using SOAP. In this case, the XML data in the SOAP body is type "string" and the namespace of the XML inside separates it from the rest of the SOAP package. Can I do the same with...say... Web Dynpro where the WSDL is used to generate proxy classes. How do I add a namespace in the SOAP header so that I can add the XML in the body?

I propose that life would be much easier if a datatype called XML, or some option before the WSDL is imported to create proxy classes is available which creates a wrapper for adding XML data. Far fetched...but can be done. Whats you opinion?

Regards,

Nirav Mehta

Former Member
0 Likes

In generally, I pass XML as a type string. When I receive the string, I'll run some generic function to serialize the string as an xml, for example loadXML(string). For examples of this, see http://www.w3schools.com

gregorw
SAP Mentor
SAP Mentor
0 Likes

Hello Nirav,

perhaps you try the approach I've used and desribed in my Blog: <a href="/people/gregor.wolf3/blog/2006/09/01/excel-to-csv-conversion-with-a-php-web-service">Excel to CSV conversion with a PHP Web Service</a>. I've encoded the Excel File with Base64 and decoded it on the other end.

Regards

Gregor