Trouble calling xmethods.com WebServices 
Author Message
 Trouble calling xmethods.com WebServices

Hi,

Today I tried to invoke some .NET (asmx) WebServices from
xmethods.com.

I build a quick WebForms app, add the desired WebService using
Project|Add Web Reference and use the following .NET code. The weird
thing is, the only thing that worked was the piece of code for getting
the CNN news, that returns an HTML string but does not need
parameters...

The other two, Exchange Rate and Babelfish, only give 0 or an empty
string as a result, resp. Why? What am I doing wrong? Help!

Protected Sub btnNews_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
    Dim objNews As New com.securewebs.aspx.BreakingNews()
    txtNews.Text = objNews.GetCNNNews
End Sub

Protected Sub btnExchange_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
    Dim objExchange As New net.xmethods.services31.CurrencyExchange()
    lblExchangeRate.Text = CStr(objExchange.GetRate( _
                                                   lstFrom.Text, _
                                                   lstTo.Text))
End Sub

Protected Sub btnTranslate_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
    Dim objTrans As New net.xmethods.services3.Babelfish()
    lblMessage.Text = "Please wait..."
    txtTo.Text = objTrans.Translate("en_de", txtFrom.Text)
    lblMessage.Text = "Ready"
End Sub

Greetings,

Jeroen Hartsuiker
The Netherlands



Sat, 06 Dec 2003 05:31:21 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. System.InvalidCastException when moving Com based WebService to distributed platform

2. VB6-SOAP-WEBSERVICE Question: Receiving an object of a class defined in the webservice

3. Calling a WebService asynchronously

4. Call a WebService from vbscript

5. Using PocketSOAP in eVB to call .Net webservice?

6. Calling COM EXE from VB.NET Service leaves COM EXE in Memory

7. one COM call another COM situation

8. COM DLL calling external non-COM DLL problem.

9. Call to Java COM inside VB COM

10. com object will not read registry when com object called from asp (vb works fine)

11. Call VB DLL or COM object from within VB COM object or EXE

12. Calling a COM call back object's method fails if it is in Windows 98

 

 
Powered by phpBB® Forum Software