Forum Discussion

shiva_kakarla's avatar
shiva_kakarla
Contributor
17 years ago

Change binding and Endpoint (Refactoring)

Hi Ole,

My current project has one base WSDL and imports other module wsdls. Now we are merging all wsdl operations and bindings into one one binding and into one WSDL.

We had soapui test cases in a soapui project based on earlier setup. Now we want to use the same project but updated to the new endpoint and binding. Is there a way to incorporate these changes easily in SOAPUI tool.

Thanks
Shiva
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Shiva,

    hmm.. will the operation names be changing when merged into the new binding? There is no easy way,  but you should be able to

    1) import the new WSDL into an existing project
    2) save and close the project
    3) manually edit the project file and change all references to the "old" WSDLs to the new one.. if only the name of the binding has changed, this is a simple find-and-replace

    would that be an option?

    /Ole
    eviware.com
  • Hi Ole,

    Operations and messages remain same but bindings and endpoints differ. Is there a way to add new WSDL and its bindings into the existing project?


    Thanks
    Shiva
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Shiva,

    in that case you should be fine with just selecting the "Update Definition" action from each of your interfaces popup menu and selecting the new WSDL (which contains the same binding as the old one if I understood you correctly)..

    regards!

    /Ole
    eviware.com
  • Hi Ole,

    Here is what we are doing..

    In the Existing scenario we have,
    Binding1 contains operation-1 and operation-2 from WSDL-1
    Binding2 contains operation-3 and operation-4 from WSDL-2

    We are merging all operations into one WSDL and into one binding
    For ex., Binding contains all operations 1-4 in a new WSDL.

    I have soapui project with test cases based on the first setup with multiple WSDL's.  Now I want use the same set of tests but with updated binding(one WSDL) and also endpoint URL(points to one URL instead of multiple).


    As I mentioned there is no change in the operation names here except that it refers to new WSDL binding. 

    Is there a simple way to re-use the old SOAPUI project and just update the binding, endpoint URL in all of the test steps.

    Thanks
    Shiva
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Shiva,

    ok.. if the only binding has changed, then the "Update Definition" feature should be sufficient, it will also ask you if you want to set the new endpoint for all existing requests (you can also reassign the endpoint manually using the "Assign" button in the corresponding Interface\Service Endpoints tab.)

    Does that make sense?

    regards!

    /Ole
    eviware.com
  • Hi Ole,

    Thank you for the suggestion. I was able to update the endpoint and binding.

    Thanks
    Shiva