wood burning stoves 2.0*
The moose likes Web Services and the fly likes Web Service Doesn't Parse the Response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Service Doesn Watch "Web Service Doesn New topic
Author

Web Service Doesn't Parse the Response

rez sam
Greenhorn

Joined: Jan 24, 2007
Posts: 9
Hi,
I have developed a simple web service using CXF from Apache. I'm able to recieve the xml response from the server but the service proxy on the client side doesn't parse the respond and always returns null without any exception.

Thanks,
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you examined the data going into the web service client?
This can be done using a packet sniffer or TCP monitoring tool.
If you then find that the packets seem correct, you can test the unmarshalling of the responses by using the following process:
- Capture a message using the packet sniffer or TCP monitoring tool.
- Write a test case that tries to unmarshall the response using the mechanism used by the service proxy.
For instance, if it is JAXB, then you write a test that takes the response message as a string and turn it into an object tree using JAXB.
Best wishes!
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Sorry Ivan, i'm interested with what you said about a packet sniffer or TCP monitoring tool..
could you tell me what software that you use?..
i want to try use it also..

Thanks in advance..


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Hi..

I've known where how to get TCP Monitor software...
it's apache's product..

Thanks for any attention..
rez sam
Greenhorn

Joined: Jan 24, 2007
Posts: 9
Ivan,
Thanks for reply. I used wireshark. I was able to see the response was coming back. I also used a SOAPHandler to capture the response. It looks fine. But still the client doesn't unmarshalize th response. I'm using https protocole.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Regarding TCP monitoring tool: There is one in Eclipse and in NetBeans (not 100% sure about the latter).
Of course there is also Wireshark and a bunch of similar tools.
There is also this standalone WS monitoring tool: https://wsmonitor.dev.java.net/
Best wishes!
rez sam
Greenhorn

Joined: Jan 24, 2007
Posts: 9
I'm running out of ideas here. I was able to parse and build java objects using JaxB from response. But the client doesn't unmarshal the response and doesn't throw any exception or error!!!
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
This may actually be a bug you have found. Have you spoken to any people on the CXF mailing list(s) and/or checked their issue tracking system?
If you can share some code, I wouldn't mind taking a look. Not that I think I can solve the problem.
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Service Doesn't Parse the Response
 
Similar Threads
Web Service response not getting.
How to get MetaData from web service
Java for log in authentication? (looking for tutorial that applies to situation)
Urgent: Web Service call Exception
Web service Response to DOM