* Program....: TEST_WS001_CLIENT.PRG * Version....: 1.0 * Author.....: Dipl. Kfm. Frank Dietrich * Date.......: 22.May 2004 * Notice.....: Copyright (c) 2004 * Frank Dietrich Datentechnik * Leo-Baeck-Str. 22 * 14165 Berlin * PHONE : +49-30-845 777-0 * FAX : +49-30-845 777-19 * CIS : 100322,333 * e-mail: frank.dietrich@dd-tech.de, All Rights Reserved. * Compiler...: Visual FoxPro 08.00.0000.3117 for Windows * Abstract...: Einfacher Test des Servers * Changes....: *-- DD changed on 18.01.05 *-- Test auf einen Abruf eines .NET WebServices llLocal = .F. acti Screen clear if llLocal lcServer = "localhost" lcVDir = "ASV_WebService01" else lcServer = "www.XXXXX.de" lcVDir = "ASV01" endif lcURL = "http://"+ lcServer +"/"+ lcVDir +"/"+ "ASVPicco.asmx?WSDL" ? lcURL loClient = CreateObject("mssoap.soapclient30") TRY loClient.mssoapInit(lcURL) CATCH to loError ? "Fehler beim SoapInit" ? loError.Message ENDTRY TRY *-- Hello World returns a string ? loClient.HelloWorld() *-- Bei einem Objekt gibt es ein XML-Objekt loX = loClient.ServerInfo() ShowXMLResult(loX, "ServerInfo") loX = loClient.GetAccountByID("5466") ShowXMLResult(loX, "GetAccountByID") CATCH to loError ? loError.Message ENDTRY *? loClient.WS_Test001("") PROCEDURE ShowXMLResult(toNodes as Object, tcInfo as String) local loX, lnNodes loX = toNodes ? ?"===============================================" ? tcInfo lnNodes = loX.Length ?"Anzahl Nodes: ", lnNodes for lnI = 0 to lnNodes-1 ? loX.Item(lnI).BaseName ?? ": " ?? loX.Item(lnI).NodeTypedValue endfor &&* lnI = lnNodes-1You surely can't run this. But I think You'll see what's going on