Web service parameters as XML

Discussion in 'Java' started by vatech1993, Jun 15, 2005.

  1. vatech1993

    vatech1993 Guest

    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
    vatech1993, Jun 15, 2005
    1. Advertisements

  2. Guest

    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?

    , Jun 15, 2005
    1. Advertisements

  3. vatech1993

    vatech1993 Guest

    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.
    vatech1993, Jun 15, 2005
  4. Guest

    "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 about it, as that's
    pretty specialized. Maybe a wrapper/adapter, hmm....

    , Jun 15, 2005
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hocho888
  2. Michael Averstegge
    Michael Averstegge
    Jan 10, 2006
  3. Not Me
    Not Me
    Jun 5, 2007
  4. Ringo

    VB6 to Web Service using XML parameters

    Ringo, Feb 2, 2004, in forum: ASP .Net Web Services
    Joe H
    Feb 7, 2004
  5. Leo Violette
    Leo Violette
    Apr 17, 2009

Share This Page