GeeCON Prague 2014*
The moose likes Web Services and the fly likes Non-SOAP HTTP Client for FedEx WebService Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Non-SOAP HTTP Client for FedEx WebService" Watch "Non-SOAP HTTP Client for FedEx WebService" New topic
Author

Non-SOAP HTTP Client for FedEx WebService

Senthil B Kumar
Ranch Hand

Joined: Feb 09, 2004
Posts: 140
Hi everybody,
I'm developing a Java client for one of the FedEx Shipping web-services. I'm trying to post the XML input via HTTP post requests and receive the xml response to parse it for output. Below is part of my client program for which i'm receiving "Invalid Transaction Type." error as XML output.

I took the XML content exactly from FedEx's developer WSDL downloads and have my input embedded in it.

Has anyone tried doing this ? or is aware of this error.



Work like you don't need the money. Love like you've never been hated. Dance like nobody's watching. Sing like nobody's listening. Live like it's Heaven on Earth.
Currently I Reside Here WEBlog
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
That looks really painful. Why don't you generate client artifacts from the WSDL and use those instead?
Best wishes!
Senthil B Kumar
Ranch Hand

Joined: Feb 09, 2004
Posts: 140
I was able to do it with the help of the Java Stub files provided by FedEx and the Axis library from Apache. But this is a technical requirement in the project that wants the web-services to be consumed this way :-( not sure why
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
I would use SOAPui or tcpmon to capture the exact message text sent by the client that works so you can compare it with the text your client is trying to send. Surely there must be some difference.

Bill
Senthil B Kumar
Ranch Hand

Joined: Feb 09, 2004
Posts: 140
thanks for that suggestion, i was wondering whether will i be able to capture the exact message text sent by the client that works.

Let me check about the SOAPui or tcpmon you've mentioned, if you can give me more pointers about it, it'l be very helpful.

I'm now trying to use the Apache's httpclient utility to create and send that POST request since i thought the error might be because the way i'm sending the message but not with the message itself.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Non-SOAP HTTP Client for FedEx WebService