M
M
MadMonkeyProg2021-07-27 09:13:36
SOAP
MadMonkeyProg, 2021-07-27 09:13:36

How to change port name in wsdl generated by asmx service?

Hello. While developing an integration service between two systems, I ran into the problem of service port naming.
In short: the service interface is generated from the provided wsdl using the wsdl.exe utility, and then implemented using the asmx web service, inheriting the generated interface. After that, some wsdl xml construct is generated, in which there is a service description section:

<wsdl:service name="MyService">
    <wsdl:port name="MyServiceSoapBinding" binding="tns:MyServiceSoapBinding">
        <soap:address location="localhost"/>
    </wsdl:port>
</wsdl:service>

The problem is that on another system, the wsdl:port name is required to be MyServicePort , and the rest is unchanged.

I've searched a lot of sites, but I haven't found a solution anywhere. Tell me which way to dig? Is there a service attribute or other solution to this problem?

PS I admit that I could not look for a solution to the problem with the correct message to the search engine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-07-27
@sarapinit

var service = new MyService();
service.Url = YOUR_URL;

How about such a solution?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question