How to create a service link only with a physical wsdl file

I have been creating and consuming web services for many years and can always use Visual Studio to create a service link from a client. I have a third-party service that I need to work with, and they refuse to open their security, so I can see wsdl and make a link to the service. This is a public service, so I don’t see the need for this level of security, but that’s what it is.

I know this is a n00b question, and I am ashamed to ask about it, but how can I create equivalent service information in my client when everything I have for me is a physical copy of the client’s wsdl sent to me by e-mail? Changes to web.config, object layer on top of SOAP data, etc. Just like using an automated service directory, I just want to open a connection to the service and start using it with certain objects.

The third-party service is not WCF, as far as I can tell, but it is SOAP. I am using VS 2010 btw. Thanks in advance Ken

+98
web-services service-reference
03 Oct
source share
3 answers

This may be the easiest way.

  • Right-click on the project and select "Add Service Link ..."
  • In the Address: field, enter the physical path (C: \ test \ project ....) of the loaded / modified wsdl.
  • Hit go
+151
Oct 04
source share

There are two ways to do this. You can use the IDE to create the WSDL, or you can do it through the command line.

1. To create it using the IDE:

In the Solution Explorer area, right-click the project that you want to add to the Service:

enter image description here

Then you can enter the path to your WSDL service and press go:

enter image description here

2. To create it through the command line:

Open the VS 2010 command prompt (Programs -> Visual Studio 2010 -> Visual Studio Tools)
Then do:

WSDL /verbose C:\path\to\wsdl 

WSDL.exe will output a .cs file for your consumption.

If you have other dependencies that you received with the file, for example xsd, add them to the argument list:

 WSDL /verbose C:\path\to\wsdl C:\path\to\some\xsd C:\path\to\some\xsd 

If you need VB output, use /language:VB in addition to /verbose .

+46
Oct 03
source share

Does anyone know how to create an interface for binding these methods to the server by analyzing the IP, username and password of the server ??

And how to create the necessary headers to perform HTTP POST ??

Thank you very much!

0
Dec 10 '18 at 20:42
source share



All Articles