It's not a secret anymore!
The moose likes Web Services and the fly likes how to identify the type of incoming object when using wsdl extracted code? - very urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "how to identify the type of incoming object when using wsdl extracted code? - very urgent" Watch "how to identify the type of incoming object when using wsdl extracted code? - very urgent" New topic
Author

how to identify the type of incoming object when using wsdl extracted code? - very urgent

ilias basha
Ranch Hand

Joined: Nov 27, 2008
Posts: 55

Actually i wanted to know whether there is any method to know which type the incoming object is? from a wsdl generated stub code.

i am trying to send a parameter to "SendServiceRequestType.java" and i dont know how the result will come (whether in xml or stream containing text or any other format)

please help me in this regard
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
I don't quite understand why you need to do this yourself if you are using code generated from a WSDL, but anyway:
If you have an XML schema and use JAXB XJC to generate corresponding Java beans, then JAXB will automatically help you to create the appropriate bean and set its data based on the received XML representation.
If you want to do this yourself, then you should use the root element name and namespace of the XML data you received.
Best wishes!
ilias basha
Ranch Hand

Joined: Nov 27, 2008
Posts: 55

can you suggest any url that provides details how to use JAXB XJC
please...
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
Check this link: http://java.sun.com/webservices/docs/2.0/jaxb/xjc.html
Here is another link for XJC plugins for Eclipse and IntelliJ: https://jaxb-workshop.dev.java.net/
Best wishes!
 
I agree. Here's the link: jrebel
 
subject: how to identify the type of incoming object when using wsdl extracted code? - very urgent
 
Similar Threads
Consuming a .NET Typed DataSet from Java
Passing DOM object in webservices
java.io.IOException: Type {http://lang.java}Exception is referenced but not defined.
Question on other WS binding and JAX-RS
need to validate/parse SOAP messages based on WSDL