Solved

Create Proxy Class for Windows Service

Posted on 2013-06-20
6
354 Views
Last Modified: 2013-07-11
I have created a windows service that converts files on my server.  I would like to create a proxy class so this can be called from my client machines.  

I am a little confused as to what to do when the svcutil.exe asks a base address, as my service sits on the c:\drive

Thanks
0
Comment
Question by:gdinunzio
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 39263999
http://www.codeproject.com/Articles/863/Your-first-C-Web-Service

http://forums.asp.net/t/1263452.aspx  - You have to deploy in IIS and provide the asmx path for svcutil
0
 

Author Comment

by:gdinunzio
ID: 39264148
I have a windows service...the web service uses a DLL that calls a windows service.
0
 
LVL 35

Expert Comment

by:Miguel Oz
ID: 39267210
Q1: What kind of windows service is this? A WCF windows service?
If it is then you just need to instance a client and call the appropiate contract methods.

Q2: What do you mean by "the web service uses a DLL that calls a windows service"? Is there a DLL doing the job of the proxy you need?
If that is the case you just need to go to your web service and refactor the code that interacts to the dll in a new class and use it in your target code.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:gdinunzio
ID: 39274634
I tried generating WSDL & XSDs first for the service-contract interfaces using svcutil.exe:
I ran the following:

Svcutil.exe "http://localhost:8731/Myservice" /target:metadata

It produced 4 files:
Myservice.xsd
schemas.microsoft.com.2003.10.serialization.xsd
tempuri.org.wsdl
tempura.org.xsd

I then tried to generate the proxy class based on WSDL & XSDs using the following command:

svcutil "http://localhost:8731/Myservice/" /Language=vb /t:Code /out:MyServiceProxy.vb /config:MyServiceProxy.config

It seems to time out.

Am I doing anything wrong?











Generate actual proxy class/es based on WSDL & XSDs generated using svcutil tool
0
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 39276544
You do not need svc utils, check "Creating a Client to Consume Service" section at:
http://www.codeproject.com/Articles/42643/Creating-and-Consuming-Your-First-WCF-Service
The sample is using an asp.net web site, but  you can use for any project as the key idea is to add a service reference. (Step 3 ) and the sample code (step 4) can go in a button event handler of a win form app.

If steps above fail, then your server is not setup correctly look at the sample server code to have similar configuration entries. If further help required, please post your WCF service code/project specifying which VS version is using.
0
 

Author Closing Comment

by:gdinunzio
ID: 39318093
worked
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now