Java Web Service Client - How to get the SOAP/XML message?

E

elridge.dmello

Hi,

I am using apache axis within Eclipse (with Web Tools Platform [WTP]
installed) to develop a Web Service and a client. I used the top down
approach to develop the web service and corresponding client (i.e. I
created a WSDL file, then used the WTP's Web Service wizard). The java
code that was generated works fine. I am able to send requests and
receive responses just fine. However, so far the only way I can get at
the response data from the service is through the Java objects that
were created by running the WTP wizard (I thnk the wizard basically
just runs a WSDL2Java conversion method that is part of apache.axis
package). I would like to be able to get at the xml response that is
received from the web service, or at least the XML version of the Java
objects that are being returned when I make a call to the Web Services
via the generated proxy object.

The WSDL2Java conversion process has generated various objects that
each have the method shown below.

getDeserializer( java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType)

I think that this using this method might enable me to get at the XML
directly instead of just the Java objects. However, I don't know what
arguments I need to supply here, and when I do get the
'org.apache.axis.encoding.Deserializer' object by calling this method,
how would I use it to get the XML version of the Java object.

I haven't been able to find a very good explanation of the process to
get the xml from the Java objects, so any suggestions would be greatly
appreciated!

Thanks very much,

Elridge
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top