Comments on: How to call a webservice directly from Java (without webservice library) http://technology.amis.nl/2011/06/29/how-to-call-a-call-a-webservice-directly-from-java-without-webservice-library/ Friends of Oracle and Java Mon, 24 Nov 2014 11:49:17 +0000 hourly 1 http://wordpress.org/?v=4.0.1 By: Amith Salian http://technology.amis.nl/2011/06/29/how-to-call-a-call-a-webservice-directly-from-java-without-webservice-library/#comment-7924 Mon, 13 Oct 2014 21:17:12 +0000 http://technology.amis.nl/blog/?p=12531#comment-7924 AWESOME!!! Just Awesome Post!!
Cheers…

]]>
By: ance33 http://technology.amis.nl/2011/06/29/how-to-call-a-call-a-webservice-directly-from-java-without-webservice-library/#comment-6819 Wed, 01 Feb 2012 11:30:43 +0000 http://technology.amis.nl/blog/?p=12531#comment-6819 Hi!
In your example url address is wsURL = "http://www.deeptraining.com/webservices/weather.asmx ,it's .asmx extension, and your xmlInput =

13
"  <soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://litwinconsulting.com/webservices/\">\n" +

14
"   <soapenv:Header/>\n" +

15
"   <soapenv:Body>\n" +

16
"      <web:GetWeather>\n" +

17
"         <!--Optional:-->\n" +

18
"         <web:City>" + city + "</web:City>\n" +

19
"      </web:GetWeather>\n" +

20
"   </soapenv:Body>\n" +

21
"  </soapenv:Envelope>"

But, if I've url address with .aspx extension,where are my methods,how I to create xmlInput?
BR,Ana


]]>
By: Jason http://technology.amis.nl/2011/06/29/how-to-call-a-call-a-webservice-directly-from-java-without-webservice-library/#comment-6818 Thu, 26 Jan 2012 17:52:54 +0000 http://technology.amis.nl/blog/?p=12531#comment-6818 This is very close to something we are working on would it be possible to use something like this but add input boxs for the SOAP request for user testing?

]]>
By: Frank Houweling http://technology.amis.nl/2011/06/29/how-to-call-a-call-a-webservice-directly-from-java-without-webservice-library/#comment-6817 Fri, 13 Jan 2012 14:05:36 +0000 http://technology.amis.nl/blog/?p=12531#comment-6817 Hi Gulshan, thanks for your reply.
In the code above I didn’t set the HTTP request property:
//httpConn.setRequestProperty(“SOAPAction”, SOAPAction);
But you are right, it was maybe a little confusing… I’ve adjusted it.

]]>
By: gulshan http://technology.amis.nl/2011/06/29/how-to-call-a-call-a-webservice-directly-from-java-without-webservice-library/#comment-6816 Wed, 11 Jan 2012 17:20:21 +0000 http://technology.amis.nl/blog/?p=12531#comment-6816 in the above program You are expecting that the .asmx file is also define by the String wsURL = "http://www.deeptraining.com/webservices/weather.asmx"; and  the Soap Action is also there
String SOAPAction = “http://litwinconsulting.com/webservices/GetWeather“;  

how would u call  the Webserice there is no .asmx file

]]>
By: SeBO http://technology.amis.nl/2011/06/29/how-to-call-a-call-a-webservice-directly-from-java-without-webservice-library/#comment-6815 Fri, 25 Nov 2011 13:25:37 +0000 http://technology.amis.nl/blog/?p=12531#comment-6815 THX. I save a lot of work ;)

]]>
By: Frank Houweling http://technology.amis.nl/2011/06/29/how-to-call-a-call-a-webservice-directly-from-java-without-webservice-library/#comment-6814 Sat, 19 Nov 2011 11:53:07 +0000 http://technology.amis.nl/blog/?p=12531#comment-6814 Hi Ram,
Do you get a SocketTimeoutException?
You could try and catch (and handle) this exception .
Regards, Frank

]]>
By: Ram http://technology.amis.nl/2011/06/29/how-to-call-a-call-a-webservice-directly-from-java-without-webservice-library/#comment-6813 Sat, 12 Nov 2011 08:35:16 +0000 http://technology.amis.nl/blog/?p=12531#comment-6813 Hi Frank ,
Thanks for the Excellent and detailed project shared with the global user community .
I would like to mention a draw backs with the approach  .
The above code hangs in scenarios where the Webservice provider is un responsive. To be more specific httpConn.getInputStream() function would make the thread to hang until the input stream is totally read.
Let me know your thoughts on how this can be handled.
Thanks & Regards
Ram

]]>