aspose file tools
The moose likes Web Services and the fly likes Creating WS from WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Creating WS from WSDL" Watch "Creating WS from WSDL" New topic
Author

Creating WS from WSDL

Daniel Martins
Ranch Hand

Joined: Oct 22, 2009
Posts: 45
Hi

I am trying to set up my first web service using NetBeans (Actually I know how to build a SOAP message and make the request)

I have made a WS based on the wsdl:

http://www.webservicex.net/globalweather.asmx?wsdl

This was generated:



My doubt is what kinf of code should go on the //TODO part? Should'nt be enough to just build the SOAP Message and send it to the endpoint? I think I am missing some important concept on this kind of approach...

Thanks

Cheers
somia razzaq
Ranch Hand

Joined: Jan 26, 2010
Posts: 44
Daniel Martins wrote:Hi

I am trying to set up my first web service using NetBeans (Actually I know how to build a SOAP message and make the request)

I have made a WS based on the wsdl:

http://www.webservicex.net/globalweather.asmx?wsdl

This was generated:



My doubt is what kinf of code should go on the //TODO part? Should'nt be enough to just build the SOAP Message and send it to the endpoint? I think I am missing some important concept on this kind of approach...

Thanks

Cheers


Hi
This is not enough to create soap message because you have not given any input/output data here. As your method is getting two parameters "cityname" and "countryname" and returns any string value. write code to set the input and return the output.

Thanks
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
If you are beginning with web services, may it be SOAP or REST, I would recommend walking through a tutorial to become familiar with the different aspects.
There are excellent tutorials available here: http://netbeans.org/kb/trails/web.html
Best wishes!
Daniel Martins
Ranch Hand

Joined: Oct 22, 2009
Posts: 45
Hi

Thanks for the reply.

Regarding the netbeans tutorials, they actually do not help me, as the calculator example does not send an external request, it just adds 2 numbers.

What I want to do is to send an external request...and here I have some doubts:

I was expecting to just provide the input to the web method and then catch the response, and I am not sure how to do this.

Previously I created this webservice just by using SOAPConnectionFactory, SOAPConnection,SOAPMessage and made the connection.

With the net beans approach there thing which are not very clear to me, because apparently the SOAP Message and the connection are made internally, so I don't know what kind of code should go on the body of the getWeather method.

Maybe I am confusing some concepts...but I am very familiar with WS and SOAP request....the problem is to learn how to implement this in NB...

Thanks

Cheers
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Creating WS from WSDL
 
Similar Threads
Creating Web services - Newbie
SOAP Fault for SOAP Action property
Web service to validate US states, city and zipcode
question with object parameter webservice
Getting Bad Response from Web service