Solved

Create Proxy Class for Windows Service

Posted on 2013-06-20
6
357 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

790 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