• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

confused that if web service can be consumed using wsdl URL then why is endpoint needed

 
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am confused regarding what is the significance of web service endpoint to the developer consuming it.

If a developer is given wsdl url. He will create proxy classes , set parameters and consume the web service. Now what is the role of end point here. The developer creating web service client was not now knowing the endpoint still he was able to consume it using wsdl. So what is the role of end point here?

thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The developer does know the endpoint - it's part of the WSDL. Whether it's used by a human being to create client code, or by a tool doing the same thing, is not important.
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The developer does know the endpoint - it's part of the WSDL. Whether it's used by a human being to create client code, or by a tool doing the same thing, is not important.



My exact doubt now is that what is there for which we need to know the endpoint URL. For creating java client do we need to know endpoint url ,the answer is No we just need wsdl. So what is the significance of knowing the endpoint URL.I understood the significance of wsdl url but not the end point URL.

thanks


 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you (or the tools you use to create client-side code) didn't know the endpoint, how could you access the WS?
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ulf Dittmer says

If you (or the tools you use to create client-side code) didn't know the endpoint, how could you access the WS?



I could do it using the below steps:




I added the wsdl URL in eclipse and created proxy classes. Then I created a client and consumed the web service.

Thanks

 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And the WSDL contains the endpoint, without which the tool could not create code to access the WS.
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. I got the point now. When we are accessing it using WSDL it is able to access the web service only because the wsdl has the end point in it.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Almost. You are not *accessing* it using the WSDL. You (or some tool) *creates client code* using the WSDL. After that, the information characterizing the end point is part of the code that is used to access the WS.
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Almost. You are not *accessing* it using the WSDL. You (or some tool) *creates client code* using the WSDL. After that, the information characterizing the end point is part of the code that is used to access the WS.




Thanks. Is 'creating client code' to consume web services not same as 'accessing a web service'?

what i understood to be the definition of web service in my language is : Web services are application components with some functionality which are exposed over the internet which can be ACCESSED by another application or clients which can consume it by exchanging data in form of xml.

Please correct me if I am wrong with my definition of web service in my own words above.

 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is 'creating client code' to consume web services not same as 'accessing a web service'?


No. To create the client code you'd access the WSDL, not the WS.

Web services are application components with some functionality which are exposed over the internet which can be ACCESSED by another application or clients which can consume it by exchanging data in form of xml.


The general definition of WS does not prescribe what the data format is. It is XML for SOAP WS, but can be something else. RESTful WS sometimes use XML, but more often use JSON (and occasionally something else entirely).
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:

Is 'creating client code' to consume web services not same as 'accessing a web service'?


No. To create the client code you'd access the WSDL, not the WS.

Web services are application components with some functionality which are exposed over the internet which can be ACCESSED by another application or clients which can consume it by exchanging data in form of xml.


The general definition of WS does not prescribe what the data format is. It is XML for SOAP WS, but can be something else. RESTful WS sometimes use XML, but more often use JSON (and occasionally something else entirely).



Hi Ul Dittmer,
This is quite an old thread but if you can please help me clear my doubt on end point URLs.
I am newbie hence asking this doubt.

We are having a SSL enabled SOAP web service in production which manages orders.
This web service has a single WSDL.


For each function of the web service it has a different end-point URL, a particular xml request format & response.
ie for fetching details order detail of the user it would have a single end point URL & particular request.
where as for fetching shipment detail it would have a separate end point URL & request xml fromat.

I have already obtained a java code which works perfectly for a http web service.
What it does is its sends a request to a webservice in MIME format and displays the response.

My doubt is that should the request be sent to the wsdl/Web service url or to the particular endpoint URL for each function of the web service.

I am able to perform the request response using SOAP UI. After creating the SOAP UI project with the WSDL, before sending the particular request, the end-point URL is changed accordingly.

Is both wsdl/webservice URL & end point URL is needed to obtain response for the request via java code?
 
james cameron
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me try to be a little more blunt here. I am quite new to webservices.

Currently what I do in SOAP UI is as follows.
assume we the web service URL is https://omswebsvc.mycompany.com/webservices

I add "?wsdl" to it and start a project in SOAP UI.

Now for particular action or function I change the endpoint URL in SOAP UI as to https://wimp.mycompany.com:5000/com/Integration/WS/GetGuestOrderDetails.

now I send a request from SOAP UI in an xml format, after entering the username and password and authentication type to preemptive. The response is got back in an XML format.

Could some one explain what actually is happening here ? Am i actually senting the request response to the web service URL or the end-point URL ?? I am confused about this point.

Also could some one give me the basic steps to do the same in java - ie sending and receiving request and response as told above.( Code is not needed)

Thanks in advance !!!
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Web service is extension of web application. I will try to explain web service with comparison to web application.

In web application, the web application descriptor where your web application is described (think of contract between your web application classes and container, although strictly it is not)is used by container to initiate your web components and enable web application listening on URL at a given path (URL / end point URL). The only user(consumer) for your web application classes is container and it is wrapping your classes and exposing as web application.

A web service application is used by consumers out side container. So for them, the application is described in a file (something like deployment descriptor) called web service description language (WSDL). Like a web application, WSDL file contains the URL path where application is listening is called "End point URL".

Like the classes of web application are used by container, WSDL file is used by the web service client (programs or container). Hence WSDL is used by the software programs which communicate with the service and not human beings ;-).

Is both wsdl/webservice URL & end point URL is needed to obtain response for the request via java code?



So, to develop service client, definitely WSDL (deployment descriptor) is needed and this contains end point URL (servlet path).

For your question in second post :

It is nature of web services that it returns the WSDL file when you enter this URL in this format <web service end point>?wsdl in browser. So, this is how soapUI reads the WSDL file and create sample request...

I think the term web service URL is incorrect instead end point URL is right word.

Follow this for java web service tutorials.

Hope this helps.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is both wsdl/webservice URL & end point URL is needed to obtain response for the request via java code?


No, the WSDL is not needed to access a WS.

to develop service client, definitely WSDL (deployment descriptor) is needed and this contains end point URL (servlet path).


No, it's perfectly possible to develop a WS client without a WSDL. It's just a lot harder, and one would have to obtain the endpoint URL in some other way.

It is nature of web services that it returns the WSDL file when you enter this URL in this format <web service end point>?wsdl in browser.


No, that is just a convention used by some SOAP stacks. Not all work hat way, and it's not standardized.
 
Sujeeth Pakala
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I agree with you.

I am still thinking like beginner
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic