cancel
Showing results for 
Search instead for 
Did you mean: 

Endpoint last part

SOLVED
ZJH
Occasional Contributor

Endpoint last part

Hi,

When I add a WSDL file to SOAP UI, the default Endpoint is same with the WSDL.

For example:

End Point/axis/services/WSAmandaSecurityService

WSDL 1.1/axis/services/WSAmandaSecurityService?wsdl

 

But I noticed in the web config, the old End Point address is like:

endpoint address="https://server/axis/services/WSAmandaService.WSAmandaServiceHttpsA7Endpoint/

 

I am wondering how to create the last part of the endpoint? Why we need ot create the last part? Is it necessary?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Endpoint last part

Hey @ZJH 

 

Ok - SOAP service requests are not like REST APIs because you don't have query or template parameters in the URI - so you can quite easily edit the path of a SOAP request (within the SoapUI tab) unlike REST requests where you have to alter the source request in the Projects section to alter the URI of a request.

 

Check out the following screenshot:

Capture.PNG

 

As per the screenshot - specify the servername and full path you need to try!

 

Cheers,

 

rich

 

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
8 REPLIES 8
Community Hero

Re: Endpoint last part

Hi @ZJH 

 

I'm a bit lost as to some of your description - e.g. "When I add a WSDL file to SOAP UI, the default Endpoint is same with the WSDL." - i dont know what you actually mean by this - if youre saying that when you add the .wsdl in - the endpoint defined is what's defined in yoru .wsdl - that totally makes sense! - .wsdl stands for 'web service description language' and essentially defines the essential (and optional... depending on your .wsdl content) attributes that defines your web service.

 

Your .wsdl specifies an endpoint - that's the endpoint you're using.

Essentially a .wsdl file is actually created by running a process against your webservice - so whatever endpoint is specified in your .wsdl should be the correct endpoint.

 

You mention the 'old' endpoint in your web config file is different - I can't comment on this - all I can say is that the .wsdl is generated from your webservice - so you should be using the endpoint defined in that.

 

you state that you noticed in the old web config file an extended URL is defined - but seeing as the .wsdl defines your webservice and is fact generated from it - I wouldn't alter your endpoint at all unless your developers say otherwise - and even then - if the endpoint (the URI, not the server part) is actually different to what's defined in yoru wsdl - its unlikely to work anyway - because as I say - your wsdl is generated FROM your webservice itself.

 

hope I've been clear,

 

cheers.

 

rich

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
ZJH
Occasional Contributor

Re: Endpoint last part

Hi Rich,

Thank you for your reply. I'd like to clearify my question more clearly:

There is a applicaiton using the third party web service. Now the third party server is changed. I'd like to point to the new server.

So I am editing the web.config file of this application.

 

The third party provided WSDL file as below. Current and New have the same End Point although I believe the content of the WSDL file has a little difference.

WSAmandaService
End Point /axis/services/WSAmandaService
WSDL 1.1 /axis/services/WSAmandaService?wsdl

 

The current web.config one has the line like this:

   <endpoint address="https://amanda-as-test/axis/services/WSAmandaService.WSAmandaServiceHttpsSoap11Endpoint/" binding="basicHttpBinding" bindingConfiguration="WSAmandaServiceSoap11Binding" contract="svcAmanda.WSAmandaServicePortType" name="WSAmandaServiceHttpsSoap11Endpoint" />

 

I'd like to chnage the new one to:

 <endpoint address="https://amanda-as-dev72:8080/axis/services/WSAmandaService/" binding="basicHttpBinding" bindingConfiguration="WSAmandaServiceSoap11Binding" contract="svcAmanda.WSAmandaServicePortType" name="WSAmandaServiceHttpsSoap11Endpoint" />

 

You can see besides the server name difference, the current one has extra part after the URL of the endpoint address (I highlighted with red).

 

My qusetion is: If I only change the server name, should I also remove the extra part of the current end point (.WSAmandaServiceHttpsSoap11Endpoint) ?

I didn't see the extra part in the thrid party provided Endpoint and that's why I am wondering what the last part come from. 

 

Thank you

 

ZJH

 

 

 

 

 

 


 

Community Hero

Re: Endpoint last part

Hi @ZJH 

 

I've been thinking about this - I don't know enough about your setup (your web.config or your .wsdl) to give you much advice.

 

Firstly - the trouble with you editing the web.config or a .wsdl is that there can be intradependencies (within the files) and interdependencies (between the files) depending on the content of your files that unless you are completely aware of them all - you can cause more problems and become unstuck - I've seen one instance where the person messed things up in the config to the point that he ended up rebuilding the whole webservice to reset everything.

 

Next - considering all the interdependencies that can occur in a .wsdl - if I were you - you need to compare the old .wsdl with the old web.config.  Determine which attributes are equivalent to them, then update them properly - what I mean by this is that 'bindingConfiguration' in your web.config appears to equate to the 'binding' attribute in a .wsdl, etc.

 

Worst case - just to verify if you have the endpoint (server and URI) correct - rather than edit anything for now - why not create a new endpoint on your SOAP request in a test (in the SoapUI tab) and try both options?

e.g.

 

new endpoint --> https://amanda-as-dev72:8080/axis/services/WSAmandaService/

new endpoint --> https://amanda-as-dev72:8080/axis/services/WSAmandaService.WSAmandaServiceHttpsSoap11Endpoint/

 

At least you'll be able to see which endpoint is valid?

 

If the old web.config included '/axis/services/WSAmandaService.WSAmandaServiceHttpsSoap11Endpoint/' as the URI to your endpoint and the endpoint in your .wsdl is '/axis/services/WSAmandaService' then I'd consider maintaining this for now - but as I say - personally - I'd look at the existing web.config and the existing .wsdl  and map each of the equivalent attributes so I'm positive I know what I'm changing is correct.  ONLY at this point would I then look at the new .wsdl to consider changing the URI in the web.config.

 

Sorry - I can't give you the 'right' answer cos I don't know your setup - but the above is the approach I would use.

 

ta

 

rich

 

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
ZJH
Occasional Contributor

Re: Endpoint last part

Hi Rich,

Thank you very much for your recommandation. I will check the existing one first then go to change web.config file.

 

One more dumb question:

IF I have to use the endpoint 2 with the format below since I am not able to edit the code which called this web service, how can I create this new endpoint 2 address in the new server "amanda-as-dev72:8080"?

 

new endpoint 1 --> https://amanda-as-dev72:8080/axis/services/WSAmandaService/

new endpoint 2 --> https://amanda-as-dev72:8080/axis/services/WSAmandaService.WSAmandaServiceHttpsSoap11Endpoint/

 

Thanks

 

ZJH

 

Community Hero

Re: Endpoint last part

Hi @ZJH,

There's never a dumb question fella, and if there is, i've already asked it.

I'm not sitting in front of my laptop at the moment, but it's easy to override the settings in your .wsdl

I will post a response later with screenshots when i have my laptop

Nice one,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
ZJH
Occasional Contributor

Re: Endpoint last part

Thank you @richie 

Highlighted
Community Hero

Re: Endpoint last part

Hey @ZJH 

 

Ok - SOAP service requests are not like REST APIs because you don't have query or template parameters in the URI - so you can quite easily edit the path of a SOAP request (within the SoapUI tab) unlike REST requests where you have to alter the source request in the Projects section to alter the URI of a request.

 

Check out the following screenshot:

Capture.PNG

 

As per the screenshot - specify the servername and full path you need to try!

 

Cheers,

 

rich

 

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
ZJH
Occasional Contributor

Re: Endpoint last part

Thank you Rich. It helps a lot!

I will modify the endpoint in the SoapUI.

Thanks

New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors