Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cant access local webservice
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01149586
Message ID:
01149601
Vues:
9
i think i managed to find a solution
the software we installed provides 2 web services
1) onlineMessageService
(path looks like "http://localhost:5099/onlineMessageService?wsdl"
2) OnlineMessageServiceRPC ("http://localhost:5099/OnlineMessageServiceRPC?wsdl")

when i used 2nd one it connects ok.
btw i used "Visual FoxPro XML Web Services Registration " under task pane to register this service which went thru fine and it even displayed that there is one method(i.e Invoke) are supported by this XML web service:

but when i tried to access this method in code am getting "member not found"!!

my sample code
LOCAL loOnlineMessageServiceRPC AS "XML Web Service"
* LOCAL loOnlineMessageServiceRPC AS "MSSOAP.SoapClient30"
* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
*__VFPWSDef__: loOnlineMessageServiceRPC = http://localhost:5099/OnlineMessageServiceRPC?wsdl , OnlineMessageServiceService , OnlineMessageServiceRPC
LOCAL loException, lcErrorMsg, loWSHandler
SET STEP ON 
TRY
	loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
	loOnlineMessageServiceRPC = loWSHandler.SetupClient("http://localhost:5099/OnlineMessageServiceRPC?wsdl", "OnlineMessageServiceService", "OnlineMessageServiceRPC")
	* Call your XML Web service here.  ex: leResult = loOnlineMessageServiceRPC.SomeMethod()
	
CATCH TO loException
	lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message
	DO CASE
	CASE VARTYPE(loOnlineMessageServiceRPC)#"O"
		* Handle SOAP error connecting to web service
	CASE !EMPTY(loOnlineMessageServiceRPC.FaultCode)
		* Handle SOAP error calling method
		lcErrorMsg=lcErrorMsg+CHR(13)+loOnlineMessageServiceRPC.Detail
	OTHERWISE
		* Handle other error
	ENDCASE
	* Use for debugging purposes
	MESSAGEBOX(lcErrorMsg)
FINALLY
ENDTRY
y = loOnlineMessageServiceRPC.invoke("asd","test","testrpc") && this line gives error
any ideas on this one ?
Thanks for ur help
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform