Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the Web Service URL
Message
From
18/08/2010 13:16:53
 
 
To
18/08/2010 13:08:13
General information
Forum:
ASP.NET
Category:
Web Services
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01477089
Message ID:
01477097
Views:
36
>>as per the doc you can pass a Uri to the constructor
>>
>>Does this not work ?
>>
>>dim .... new SoapClient (new Uri(URL) ) 
>>
>>
>>Where do you use your test server url ? - is it hard coded ?
>
>If I do this, it doesn't work:
>
>
>        Dim lcUrl As String = ""
>
>        ' Get the Web Service URL
>        lcUrl = "http://www.mywebsite.com"
>
>        ' Instantiate the Web Service
>        oMyClass = New MyNamespace.MyClass.MyClassSoapClient(lcUrl)
>
>
>Because, as you said, it requires a Uri. However, the design doesn't complain.
>
>If I do this, the designer complain that "Value of type 'System.Uri' cannot be converted to 'String'.".
>
>
>        Dim lcUrl As String = ""
>
>        ' Get the Web Service URL
>        lcUrl = "http://www.mywebsite.com"
>
>        ' Instantiate the Web Service
>        oMyClass = New MyNamespace.MyClass.MyClassSoapClient(New Uri(lcUrl))
>


Can you post the class code of MyClassSoapClient - definition + constructors - no need for the rest of the code
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform