Web service parameters as XML

V

vatech1993

I currently have a web service that passes complex data types as
parameters. The web server (weblogic) populates the java classes that
represent the complex data types with the xml passed by the client
application. Is there a way to retrieve this xml that is passed by the
client?
 
I

iksrazal

Something's not making sense to me. Your client passes XML to a web
service that transforms that to complex objects, right? But then you
want to get that same xml back? Try to clarify your question a bit and
maybe I can help. Any which way though, why can't you just return
String for the xml, etc?

iksrazal
 
V

vatech1993

It does seem backwards doesn't it! :) Basically the web service is
wrapping a legacy component (vb component) that expects a string that
contains xml. Our development is phased in that Phase One is putting a
web service front end to this legacy code. Phase Two will rewrite the
legacy component in a java. We don't want to change the web service
interface once its published initially and we want a richer interface
than just asking for a string. So for the initial phase we want to
have the interface utilize java classes for the data coming in. At
first we'll turn around and extract the data into an string of xml and
pass it on to the legacy component. In the later phase we'll pass the
java objects. I hope this make sense? In a perfect world this
wouldn't occur, but... So my issue is finding out what is the easiest
way to get an xml representation of the data (preferably in the format
it was sent) once inside the logic of the webservice. I'm working with
both weblogic and axis to prototype this out and both handle the
population of the incoming xml into the java classes. I'm hoping to
find a way to do the reverse of this, if such an animal exists. I'm
also investigating options such as Castor to take the java classes and
serialize them to xml, although this option appears to require a
mapping step to get the data in the format that the legacy component
requires. Any help/suggestions would be appreciated.
 
I

iksrazal

"I'm working with
both weblogic and axis to prototype this out and both handle the
population of the incoming xml into the java classes. "

OK, seemingly you just want to transform your xml String into objects,
and then pass those objects back to clients, other languages etc, is
that it?

One option is JAXB. That is well documented and has lots of users - I
use it alot. You do need an XML schema though. Once you are past that,
the trick would be to map those JAXB generated classes to WSDL. Now
that would be an interesting project. If that's the idea, you might
want to post to the (e-mail address removed) about it, as that's
pretty specialized. Maybe a wrapper/adapter, hmm....

HTH,
iksrazal
http://www.braziloutsource.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top