Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unable to Connect to Web Service
Message
De
11/02/2005 11:37:49
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Titre:
Unable to Connect to Web Service
Divers
Thread ID:
00986007
Message ID:
00986007
Vues:
332
I've raised a couple of threads recently concerning trying to connect to an external web service created in Java using Axix 1.1. I had other problems earlier but these have been resolved but am still unable to connect.

I have used VFP7 and VFP8 and have got different results. I have traced the code through and got quite a lot of detail. I just hope someone can see where the problem is so here goes.

VFP7
The webservice will not register at all but I tried to connect anyway to see if I got a more meaningful error message.

When I try to register I get the foxpro error 'Error generating intelliscripts. Check for a valid WSDL URL location or invalid WSDL content. The WSDL file may have also been in use – try regenerating the webservice files again'

This is what happened when I tried to execute these lines of code to connect to the webservice regardless of being able to register it:

loWS = NEWOBJECT("Wsclient",HOME()+"ffc\_webservices.vcx")
This works and loWS is created ok and has a method 'SetUpClient'

loRegisterCustomer = loWS.SetupClient("http://172.26.248.101:8081/3connect/services/RegisterCustomerV1?wsdl", "RegistrationCustomerService", "RegisterCustomer")
This doesn’t work.

I have traced this through the Foxpro routines and it goes into 'wsClient.SetupClient' and executes the following
loSoapClient = CREATEOBJECT(SOAPCLIENT_CLASS)
This works and loSoapClient is created with a method of MSSoapInit but when the following line executes
loSoapClient.MSSoapInit(lcURI, lcService, lcPort)
It errors with
OLE IDispatch exception code 0 from Client: WSDLReader:Analyzing the WSDL file failed HRESULT=0x80004005 - WSDLReader:Initialization of service failed HRESULT=0x80004005 - WSDLService:Initialization of the port for service RegistrationCustomerService fail

VFP8

The webservice registers ok and I can see all the correct methods via the task pane manager but it doesn’t work when I try to connect.

The 3 lines on code I would expect to work are

loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")

loRegisterCustomer = loWSHandler.SetupClient("http://172.26.248.101:8081/3connect/services/RegisterCustomerV1?wsdl", "RegistrationCustomerService", "RegisterCustomer")

lcResult = loRegisterCustomer.createSale("Sale1")

but when these execute, I get the error

Error: 1429 - OLE IDispatch exception code 0 from Connector: Connector:Connection time out. HRESULT=0x800A1527 - Client:An unanticipated error occurred during the processing of this request. HRESULT=0x800A1527 - Client:Sending the Soap message failed or no recognizable response was received HRESULT=0x800A1527 - Client:Unspecified client error. HRESULT=0x800A1527.

If I remove the last line of code (ie don't try to access any of the methods in the returned object), there is no error.

I traced the code through the various Foxpro routines and found the first line is working fine and loWSHandler is created with a method of SetUpClient.
It is the next line of code that is causing the problem even though it does not create an error. I traced it through the standard Foxpro routines and it gets into wshandler.connectws and these 4 lines of code are in a try/catch statement
THIS.wsObject = CREATEOBJECT(SOAPCLIENT_CLASS)
THIS.SetClientProperties()
THIS.wsObject.SOAPCLIENT_INIT(THIS.WSDL, THIS.Service, THIS.Port, THIS.WSML)
THIS.SetConnectorProperties()

This.wsObject is created as an object but it doesn’t have a method of SOAPCLIENT so the 3rd line obviously is not working but it doesn’t create an error. The methods in this.wsObject must be some sort of default ones (ie ClientProperty, ConnectorProperty, Detail, FaultActor, FaultCode, FaultCodeNameSpace, FaultString, HeaderHandler, MSSoapInit, MSSoapInit2).

When I put the last line of code back in and traced again, after the last line had executed, this.wsObject.detail contained the error message.

Don't know if all this points to anything but I can only hope.

TIA

Regards

Sue
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform