Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to pass username/password to svcutil.exe?

Posted on 2011-03-23
8
Medium Priority
?
4,416 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
  • 6
  • 2
8 Comments
 
LVL 18

Assisted Solution

by:DarrenD
DarrenD earned 800 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

773 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