on 04-04-2006 7:28 AM
Hi All,
I have requirement like this....
First read the value objects(out put) of webservice,create class using the above(specified) value object fields and finally create the xml file using the above class.
can any body give suggestion to done the above task
regards,
LSR
Hi,
I don't exactly understand what your problem is. If I'm right the flow you want to establish is:
1. Consume webservice
2. Create your own new class from the answer of the webservice-call
3. Create an XML-File that corresponds to the new class created in the last step.
Is this right?
Okay, my remarks about this flow are:
ad 1) Generate a webservice-proxy. This proxy gives you a Java-Interface to the Webservice and you will get the answer of the webservice call as an Java-Object
ad 2) This is your business logic, you must know how to convert the external business objects into your own ones
ad 3) There are libraries that can convert from Java-classes to xml and back: jax-p, xmlbeans etc. Don't know, wwether SAP got its own library to do this.
Hope this helps, Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Thanks for u r reply
ya u r right,my requirement is same as urs thinking.
from u r 3 steps.
3.create an xml-file that corresponds to the new class created,
can u help me, how to do the step3.(xml file creation using java class)
by using help given by sap i done the step1.
Is there any help for xml-file generation ?
regards,
LSR
Because you want to create an XML file, DOM would be the best option.
check
http://java.sun.com/developer/codesamples/xml.html#dom
for samples related to this.
Hi,
don't go the basic way with SAX or DOM!! Don't to this at home, kids!!
Please, use some binding-tool to do the work for you. The main advantage is that you get the right xml and don't have to code any conversion and formatting manually.
Take a look at this article <a href="http://www-128.ibm.com/developerworks/xml/library/x-databdopt/">Data binding, Part 1: Code generation approaches -- JAXB and more</a> by Dennis Sosnoski.
Thomas
Hi,
There are XML parsers like DOM and SAX, available to create or process XML files.
Refer this link to get into Java APIs for XML creation.
http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/TOC.html
Regards,
Uma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.