• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 428
  • Last Modified:

calling web service methods by proxy

Hai experts .Am facing a problem here..

Am having websevice with proxy class..My client doesnt give me the webservice WSDL...

I need to call the webservice methods in my Biztalk orchestration...

So my requirement here is to call the methods inside the proxy class without having 'WSDL URL".

How can I?Please explain me in detail..am  newbie..Needed urgently..Please provide me c# code also...

  • 2
  • 2
1 Solution
Vel EousResearch & Development ManagerCommented:
Assuming you're using Visual Studio 2008/2010, you can use the svcutil.exe program to automatically generate your proxy class.  To do so requires that you have your service running with an exposed endpoint.

To build your proxy class open the Visual Studio command prompt (Start > All Programs > Microsoft Visual Studio 2008/2010 > Visual Studio Tools > Visual Studio Command Prompt) and navigate to your client application solution directory (i.e. C:\visual studio\my projects\my service client).  From the client directoy run the svcutil.exe file (assuring that your service is running), using the following as an example:

scvutil /language:cs /out:generatedProxy.cs /config:app.config http://service/adderss

Assuming the service was running and the svcutil.exe progam could locate it, two files will be automatically generated 1) proxy class named generatedProxy.cs 2) an application configuration file named app.config.  Both of these files need to be added to your solution (Right click soultion name > Add > Existing Item > add both files).

To connect to your service you would use the following example:

MyServiceClient client = new MyServiceClient(); // You should really pass the binding contract here as a parameter although it is not essential

You should then be able to connect to your exposed methods by using the client property:

client.getCurrentDay(); // Or what ever method you might have exposed.

I hope that is what you're looking for, wasn't to sure from your question.  Any issues just get back to us.  <:
sandydv85Author Commented:
hai Tchuki.I need to send the request as the web service,not like calling the instance of the class.
Using proxy how can i generate request to the service methods?
Vel EousResearch & Development ManagerCommented:
The method I explained in my previous post explains how to send a request to a service method, see the following link for clarification:

sandydv85Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now