Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to pass username/password to svcutil.exe?

Posted on 2011-03-23
8
Medium Priority
?
4,306 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 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Industry Leaders: 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

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

705 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