Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

Web service parameters as XML

Thread view: 
vatech1993 - 15 Jun 2005 06:06 GMT
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?
iksrazal@terra.com.br - 15 Jun 2005 12:19 GMT
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
vatech1993 - 15 Jun 2005 13:59 GMT
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.
iksrazal@terra.com.br - 15 Jun 2005 14:14 GMT
"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 users@jax-rpc.dev.java.net about it, as that's
pretty specialized. Maybe a wrapper/adapter, hmm....

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.