Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing username and password to svcutil.exe?

We have OSB services that are currently secured with a username and a password. I get a 401 unauthorized when attempting to generate a service proxy using svcutil. I know you need to set up a svcutil.exe.config file but I cannot find any examples except for one that passes a certificate.

Dows anyone know how to send a username and password using svcutil?

like image 430
webwires Avatar asked Apr 22 '10 18:04

webwires


People also ask

How do I use Svcutil exe?

To use svcutil.exe you need to provide the URL of the native endpoint for the Dynamics GP service and the namespace of the service reference you added to your Visual Studio project. Typically, this is "DynamicsGPService". Enter the following on a single line and then press Enter. Use the generated files.

How do I bypass WCF username and password?

To configure a service to authenticate its clients using Windows Domain username and passwords use the WSHttpBinding and set its Security. Mode property to Message . In addition you must specify an X509 certificate that will be used to encrypt the username and password as they are sent from the client to the service.

Where can I find Svcutil exe?

The ServiceModel Metadata Utility Tool can be found at the Windows SDK installation location, specifically %ProgramFiles%\Microsoft SDKs\Windows\v6. 0\Bin.


1 Answers

I don't think you can do that.

What you can do in this case is either connect to that address in a browser and just download and save the WSDL file to your local disk and call svcutil.exe on that local copy - or ask the publisher of that webservice to either give you an URL which doesn't require authentication, or to simply send you the relevant WSDL and possibly XSD files so you can create a client side proxy for that service.

like image 107
marc_s Avatar answered Sep 24 '22 20:09

marc_s