Solved

How to pass username/password to svcutil.exe?

Posted on 2011-03-23
8
4,190 Views
Last Modified: 2013-11-19
Hello Experts,

I have several  WCF services which use custom Basic HTTP authentication.
These are third party services and the only thing I know about them is the address of the contracts and the binding (mostly httpsBasic).

How can I pass username/password to svcutil.exe tool so it can be run against this service to generate a client?

I can't see any /username and /password command line switches like wsdl.exe has.
Probably it can be done using configuration file and /svcutilConfig switch, but I can't figure out what config section should I use to specify username/password.

Can anybody help me with this?
Thank you.
0
Comment
Question by:develc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
8 Comments
 
LVL 18

Assisted Solution

by:DarrenD
DarrenD earned 200 total points
ID: 35205391
Hi,

Can't you just save the WSDL file and create it from that?

Cheers,

Darren
0
 
LVL 1

Author Comment

by:develc
ID: 35205598
Hello Darren,

I need not only the wsdl but the xsd files too and I don't know how many of them will be.

Example:
http://localhost:6857/Service1.svc?wsdl
http://localhost:6857/Service1.svc?xsd=xsd0
http://localhost:6857/Service1.svc?xsd=xsd1
http://localhost:6857/Service1.svc?xsd=xsd2
... etc.
0
 
LVL 1

Author Comment

by:develc
ID: 35239312
I didn't find any solution yet.
Could I save the wsdl and the related xsd files somehow, so I could use them with svcutil.exe locally?
I can save the wsdl with the help of HttpWebRequest, but how can i attach the xsd files too?
0
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 
LVL 18

Expert Comment

by:DarrenD
ID: 35239381
Hi again,

If you save the WSDL the locations of the XSD files will be in the WSDL file. From there you can see what XSD files you need and download them by copying the URL in the WCDL file into a browser and saving them locally.

Hope this helps,

Darren
0
 
LVL 1

Author Comment

by:develc
ID: 35239595
This has to be done programatically. I can't use a browser.
0
 
LVL 1

Accepted Solution

by:
develc earned 0 total points
ID: 35276521
I found a solution to the problem. I can save the wsdl and the xsd-s locally with DiscoveryClientProtocol and after that I can use svcutil on them.
Here is the link, where the solution for this problem is:
http://mikehadlow.blogspot.com/2007/04/resolving-mutipart-wsdl-documents-with.html
0
 
LVL 1

Author Comment

by:develc
ID: 35312816
This link helped a lot too:
Dynamic Programming with WCF
0
 
LVL 1

Author Closing Comment

by:develc
ID: 35321649
Found the solution
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question