Urgent: Dynamic webreference ???

K

Khanh

Hi all,

Many people say that we can change URL of a webservice at run-time
but it seems it's not as easy as that. My pocket PC app allows to set
up Webserver's IP address dynamically, so I have to change URL at
runtime but I've got exception :

An unhandled exception of type
'System.Web.Services.Protocols.SoapException' occurred in
System.Web.Services.dll

Additional information: Server did not recognize the value of HTTP
Header SOAPAction: http://MobileServer/WebService1/HelloWorld.

Here is my simple pseudo-code:

Dim ws as WebService1.Service1 = new WebService1.Service1()
ws.URL = "http://thoantm/MyTestWebService/Service1.asmx"
ws.GetServerDate() --> throw exception


I've read a lot of reference material on net but it's really out of my
control, so any help would be very appreciated,
Khanh
 
C

casey chesnut

an unrecognized SOAPAction would be on the server side.
meaning the server could not find the namespace & webMethod that map to the
SOAPAction that was sent,
so the web service cannot be executed and the server returns a SoapFault.
Thanks,
casey
http://www.brains-N-brawn.com
 
C

Carlos Carvalho

Hello there.
try change the property UrlBehaivor of you instance of webservice to true...

[]´s
Carlos Carvalho
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top