renaming porttype & binding name in wsdl is not leads to exception, is server considering as different version?

Gopi2105 21 Reputation points
2021-08-04T13:38:21.397+00:00

Hi,

I have a WSDL downloaded from the from the server, I made following changes to the WSDL without changing the soapAction. but still I am able to consume the service without any issues. is this because of the server is considering changed WSDL as new version and allowing backward compatibility. Anyone please clarify why its working even through WSDL has changed.

  1. renamed PortType
  2. renamed Binding Name and Binding Type WSDL 1:-
    <s2:portType name="sampleApplication">
    <s2:binding name="sampleApplicationBiniding" type="s3:sampleApplication">
    <s2:operation name:"GetNamelist">
    s4:operation soapAction="http://www.example.com/sampleApplication/GetNamelist"
    WSDL 2:- <s2:portType name="sampleApplication1">
    <s2:binding name="sampleApplicationBiniding1" type="s3:sampleApplication1">
    s4:operation soapAction="http://www.example.com/sampleApplication/GetNamelist"
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,647 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 51,346 Reputation points
    2021-08-04T15:04:29.557+00:00

    Not really sure what you mean by "changing the WSDL" as a WSDL is just a metadata description of a service. Assuming you are using WCF service client then when you connected to the WSDL it would have auto-generated a .NET type from the WSDL. From that point on the WSDL is irrelevant and isn't used. The only time it would be used again is if you opted to update the auto-generated code.

    As for the names they are mostly irrelevant for the actual WSDL. They are just identifiers and can be called whatever you want without actually impacting the generated code or how you communicate with the service. They do play a role in hooking things up so, for example, if you were to change the name of a binding configuration without also updating any references (within the WSDL) to that name then it would fail when it validated the WSDL but, again, this doesn't have any impact at runtime since it only impacts code gen.

    The other impact name has for most code gen situations is the name of the generated code types. So if you rename a resource it might impact the generated name as well but, again, no impact at runtime, just code generation. For the most part the only thing that matters at runtime is the namespaces, actions, endpoints and data structure that is defined in the WSDL.

    Are you having a specific problem or are you just surprised it didn't break anything? Did you regenerate the code after changing the WSDL? If not then I wouldn't expect anything to change as the WSDL isn't needed at runtime.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful