Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing data between systems using XML web services
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Passing data between systems using XML web services
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00988657
Message ID:
00988657
Views:
60
I am trying to create an application that will pass data back and forth between a server and a client using XML web services. I have created a series of functions that work fine when calling locally as a com object, but when I try to call as a web service I get an error indicating that no response is received.

The example I am currently working with:

Client Code
********************************************************
* SidesHdImport - Import SIDE_HD items
* Parameters: xmlSidesHd - XML data for sides header
********************************************************
  FUNCTION SidesHdImport (xmlSidesHd as String)

    SELECT 0
    XMLTOCURSOR(xmlSidesHd, "xmlimport")
    
    SELECT xmlimport
    
    GO top
    SCAN
      SELECT sides_hd
      LOCATE FOR list_name = xmlimport.list_name
      IF FOUND()
        replace disp_name WITH xmlimport.disp_name
      ENDIF
    ENDSCAN

  ENDFUNC
Client Code (mostly from the XML test code):
LOCAL lorestserv AS "XML Web Service"
* LOCAL lorestserv AS "MSSOAP.SoapClient30"
* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
*__VFPWSDef__: lorestserv = http://little-p/wsrest/restserv.wsdl , restserv , restservSoapPort
LOCAL loException, lcErrorMsg, loWSHandler
TRY
  loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
  lorestserv = loWSHandler.SetupClient("http://little-p/wsrest/restserv.wsdl", "restserv", "restservSoapPort")
  * Call your XML Web service here.  ex: leResult = lorestserv.SomeMethod()
  
  SELECT sides_hd
  CURSORTOXML("sides_hd","xmlSidesHd")
  loRestServ.SidesHdImport(xmlSidesHd)

  
CATCH TO loException
  lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message
  DO CASE
  CASE VARTYPE(lorestserv)#"O"
    * Handle SOAP error connecting to web service
  CASE !EMPTY(lorestserv.FaultCode)
    * Handle SOAP error calling method
    lcErrorMsg=lcErrorMsg+CHR(13)+lorestserv.Detail
  OTHERWISE
    * Handle other error
  ENDCASE
  * Use for debugging purposes
  MESSAGEBOX(lcErrorMsg)
FINALLY
ENDTRY
Other methods of the same COM object are working, however I have only tried simple functions with simple return types. I suspect I need to do something different with my XML creation and parsing, but I am new to XML and am not sure what to do.

The error text this call returns is:

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

Interestingly enough, my function has a very basic error method that just logs erros. When I try this function, the error log goes crazy and generates the following line about 100 times a second.
02/19/05 22:21:11: Error in sideshdimport, Line 907: Error #13

I didn't realize this was happening until my log file was about 1.5 GB! Line 907 is:
SELECT sides_hd

This all works when called as a straight COM object.

Any suggestions are appreaciated.
Paul R. Moon
Business Software Solutions
paul@businessoftware.com
Next
Reply
Map
View

Click here to load this message in the networking platform