473,385 Members | 1,311 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Web Service Behind A Firewall Problem

I am attempting to use a web service from my work pc
which is behind a firewall. I have used wsdl.exe to
create the web service reference class and added it to my
project. (this seems to work without a hitch).

Before I use this class, I make the necessary calls to
instantiate a WebProxy class and then pass in my
credentials to set the WebProxy.Credentials property so I
can get through the proxy server.

I am now receiving an error message: "Path property must
be set before calling the Send method" within the
WSDL.EXE generated code when invoking a method

Dim results() As Object = Me.Invoke("getQuote", New Object
() {symbol})

I am unsure as to what I may be missing, anyone have any
idea what this error message means?

Thanks - Bill
Nov 22 '05 #1
5 7257
Hello Bill,

Thanks for posting in the group.

Consuming web service when the client is behind a proxy server is a FAQ. We
could refer to MSDN article:
"HOW TO: Configure an XML Web Service Client by Using the .NET Framework to
Work with a Proxy Server"
http://support.microsoft.com/?id=307220

VS.NET uses the Wsdl.exe tool when you add web references. So you can use
Wsdl.exe directly. These are standard solutions to the proxy server issue.

Solution1
--------------
Get the wsdl file locally and add the reference to it.

- In IE on the client machine, type
http://MachineX/Webservice1/Service1.asmx?wsdl
- In IE on the client machine, go to View | Source, copy and save the wsdl
file locally named test.wsdl
- Under the VS.NET command prompt on the client machine, type c:\>wsdl.exe
test.wsdl.
- The Web service proxy source file named service1.cs is generated.
- In VS.NET, right click on the client project, Add, Add Existing Items...
to add service1.cs to the project.
- Code the client to use the web proxy server if it is necessary (see
note2).
- Build the project.

Solution2
--------------
Use the Wsdl.exe tool to specify the proxy and credentials to generate the
proxy code.

- Under the VS.NET command prompt, type: c:\>wsdl.exe
<http://MachineX/Webservice1/Service1.asmx> /proxy:proxyURL
/proxyusername:username /proxypassword:password /proxydomain:domain

- The Web service proxy source file named service1.cs is generated.
- In VS.NET, right click on the client project, Add, Add Existing Items...
to add service1.cs to the project.
- Code the client to use the web proxy server if it is necessary (see
note2).
- Build the project.

Note1:
Run wsdl.exe by itself, you will see a list of usage. Short forms are
'/pu:', '/pp:' and '/pd:'

Note2:
You need code the client to use the web proxy server as follows:

[C#]
MyMath.Math math = new MyMath.Math();
// Set the proxy server to proxyserver, set the port to 80, and specify to
bypass

the proxy server
// for local addresses.
IWebProxy proxyObject = new WebProxy("http://proxyserver:80", true);
math.Proxy = proxyObject;
// Call the Add XML Web service method.
int total = math.Add(8, 5);

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemWebServicesProtocolsHttpWebClientProtoc olClassProxyTopic.asp

I tested the above and it works fine on my side. Could you please check it
and post here with the testing results? Also, please posting sample code
slice may also help community to understand the problem well.

Does that answer your question?

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 22 '05 #2
Yes! This is exactly what I was looking for. To further
test this, I tried another web service and ran it against
wsdl.exe and it worked great!

Once I added the wsdl.exe output file to my VB .NET
project, I was able to use it after creating my proxy
server settings in code like this:

Dim x As New TestWebService.ZipCodesService
Dim proxy As New WebProxy("proxyaddress", port)
proxy.Credentials = New NetworkCredential"user", "passw")
x.Proxy = proxy

Thanks for the info, it was a big help! Hopefully the
folks at Microsoft will recognize that there are a lot of
users who live behind firewalls and provide a wizard or
dialog which will prevent the need for using wsdl.exe.

Bill

-----Original Message-----
Hello Bill,

Thanks for posting in the group.

Consuming web service when the client is behind a proxy server is a FAQ. Wecould refer to MSDN article:
"HOW TO: Configure an XML Web Service Client by Using the .NET Framework toWork with a Proxy Server"
http://support.microsoft.com/?id=307220

VS.NET uses the Wsdl.exe tool when you add web references. So you can useWsdl.exe directly. These are standard solutions to the proxy server issue.
Solution1
--------------
Get the wsdl file locally and add the reference to it.

- In IE on the client machine, type
http://MachineX/Webservice1/Service1.asmx?wsdl
- In IE on the client machine, go to View | Source, copy and save the wsdlfile locally named test.wsdl
- Under the VS.NET command prompt on the client machine, type c:\>wsdl.exetest.wsdl.
- The Web service proxy source file named service1.cs is generated.- In VS.NET, right click on the client project, Add, Add Existing Items...to add service1.cs to the project.
- Code the client to use the web proxy server if it is necessary (seenote2).
- Build the project.

Solution2
--------------
Use the Wsdl.exe tool to specify the proxy and credentials to generate theproxy code.

- Under the VS.NET command prompt, type: c:\>wsdl.exe
<http://MachineX/Webservice1/Service1.asmx> /proxy:proxyU RL/proxyusername:username /proxypassword:password /proxydom ain:domain
- The Web service proxy source file named service1.cs is generated.- In VS.NET, right click on the client project, Add, Add Existing Items...to add service1.cs to the project.
- Code the client to use the web proxy server if it is necessary (seenote2).
- Build the project.

Note1:
Run wsdl.exe by itself, you will see a list of usage. Short forms are'/pu:', '/pp:' and '/pd:'

Note2:
You need code the client to use the web proxy server as follows:
[C#]
MyMath.Math math = new MyMath.Math();
// Set the proxy server to proxyserver, set the port to 80, and specify tobypass

the proxy server
// for local addresses.
IWebProxy proxyObject = new WebProxy ("http://proxyserver:80", true);math.Proxy = proxyObject;
// Call the Add XML Web service method.
int total = math.Add(8, 5);

http://msdn.microsoft.com/library/default.asp? url=/library/en-us/cpref/html/frlrfSystemWebServicesProtocolsHttpWebClientProto colClass ProxyTopic.asp
I tested the above and it works fine on my side. Could you please check itand post here with the testing results? Also, please posting sample codeslice may also help community to understand the problem well.
Does that answer your question?

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
.

Nov 22 '05 #3
Hello Bill,

Thanks for the quick response. I am glad that the probem is resovled now. :)

By the way, I think we could add web reference in IDE directly even when
the client is behind a proxy. That should be what you need.

Note If you are developing a Web application on a machine that is behind
a firewall, and your application will consume Web services found outside of
the firewall, you must include the address and port of your network's proxy
server in the URL. Ask your network administrator to furnish this part of
the URL path. For more information, see The proxy settings on this computer
are not configured correctly for Web discovery..

Thanks again for participating the community.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 22 '05 #4
Yanhong, I have seen the message you posted below in the
Microsoft help file for .NET, but when I posted the
question about including the address and port of your
network's proxy in the URL to our network/firewall group
they could not provide an answer. Are there some examples
I can find for this??

Thanks again for your help!

Bill
server in the URL
-----Original Message-----
Hello Bill,

Thanks for the quick response. I am glad that the probem is resovled now. :)
By the way, I think we could add web reference in IDE directly even whenthe client is behind a proxy. That should be what you need.
Note If you are developing a Web application on a machine that is behinda firewall, and your application will consume Web services found outside ofthe firewall, you must include the address and port of your network's proxyserver in the URL. Ask your network administrator to furnish this part ofthe URL path. For more information, see The proxy settings on this computerare not configured correctly for Web discovery..

Thanks again for participating the community.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
.

Nov 22 '05 #5
Hi Bill,

Thanks for the response.

I think you could refer to this article:
"How to Configure Internet Explorer to Use a Proxy Server"
http://support.microsoft.com/?id=135982

It describes the format of this string. In IE 6.0, it could be set in
Tools->Options.

By the way, I found that you have changed your email alias. I suggest you
go to
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn
to create a no spam email alias.

If there is any question on it, please feel free to post here.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: demonhunter | last post by:
Hi, I am trying to fetch a web content using LWP and HTTP modules behind corp firewall. I set proxy server as shown in my internet explorer connection setup. When i run the script, i got...
1
by: John Dalberg | last post by:
Hello I have a project where I need to update a few tables in a SQL Server 2000 database which resides behind a firewall, ie port 1433 is blocked. I also need to verify the updates were...
0
by: KumarForG | last post by:
hi, i have a webservice and it's client in dotnet. the client is coded to assign the proxy property to the service object, with the proxy url and authentication details. however, there is a...
4
by: Sean | last post by:
Hi, I'm programming an IRC bot. I'm trying to establish a dcc connection with another IRC client. I give the ipaddress and port number to the client in the request. I listen to that port with...
1
by: Coder | last post by:
Is there anyway to access this webservice that is behind a router/firewall? - Thanks.
0
by: ericms | last post by:
I need to consume one of our vendor's web service. So, we need to consume the web service behind a proxy server. I am working with Visual Studio 2005 and .NET 2.0. I did right-click on a...
3
by: fndjoum | last post by:
I have created a web service with Visual Studio 2005 on my machine. But because of firewall , I can't call it remotely from the browser. Any idea how to call a web service through firewall?? ...
0
by: fndjoum | last post by:
I have created a web service with Visual Studio 2005 on my machine. But because of firewall , I can't call it remotely from the browser. Any idea how to call a web service through firewall?? ...
0
by: fndjoum | last post by:
I have created a web service with Visual Studio 2005 on my machine. But because of firewall , I can't call it remotely from the browser. Any idea how to call a web service through firewall?? ...
11
by: TMN | last post by:
Hi I am trying to get fetch rss from news sites from behind our corporate proxy/firewall but no php function has worked - I have tried curl etc but simply get no response. These scripts work...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.