Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating WS from WSDL

 
Daniel Martins
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic