This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web Service Doesn't Parse the Response

 
rez sam
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..

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

Thanks for any attention..
 
rez sam
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic