Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the Web Service URL
Message
De
18/08/2010 13:16:53
 
 
À
18/08/2010 13:08:13
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01477089
Message ID:
01477097
Vues:
37
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform