Forum Discussion

ZJH's avatar
ZJH
Occasional Contributor
6 years ago

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

  • 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:

     

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

     

    Cheers,

     

    rich

     

     

  • richie's avatar
    richie
    Community Hero

    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

     

    • ZJH's avatar
      ZJH
      Occasional Contributor

      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

       

       

       

       

       

       


       

      • richie's avatar
        richie
        Community Hero

        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