Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Errors when invoking .NET web services
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01162745
Message ID:
01163054
Views:
12
Hi all

This code worked:
oWebService = CREATEOBJECT('mssoap.soapclient')
oWebService.mssoapinit('http://xxx.mycompany.com/WS/DailyDilbert/DilbertService.asmx?wsdl')
?oWebService.GetDailyDilbertUrl()
It produced http://www.dilbert.com/comics/dilbert/archive/images/dilbert2002443261018.gif

Still, what is the problem with the problem with the _ws3client.vcx?
What prevents Visual FoxPro own method for invoking web services to get the results? Is this a known issue with .NET web services?

TIA

Max

>Hi all
>
>*** I posted this in the WEB SERVICES topic but didn't receive any answer***
>*** I know, I know, but I need some input, I apologize in advance ****
>
>I'm working heavily with Windows SharePoint and I want to take advantage of its APIs and Web services. I think Visual FoxPro will help me greatly for backend tasks where some heavy text processing is needed in order to create CAML files for updating lists there.
>
>For testing purposes (an for fun too) I created a simple web service using C# (vstudio 2003) from an article I read some time ago, it simple goes to Scott Adam's web page, scrapes the name of the Dilbert image on it and returns its full http location, for today that's
>http://www.dilbert.com/comics/dilbert/archive/images/dilbert2036648061017.gif
>
>... It works very well.
>
>When using Visual FoxPro, after successfully registering the web service, using the code below, it returns an "Error: 1429 - OLE Dispatch exception code 0 from Attachment: Attachment Maximum retry on the conexion exceeded. HRESULT = 0x80004005: Unspecified error...."
>
>
>LOCAL loDilbertService AS "XML Web Service"
>* LOCAL loDilbertService AS "MSSOAP.SoapClient30"
>* Do not remove or alter following line.
>* It is used to support IntelliSense for your XML Web service.
>*__VFPWSDef__: loDilbertService =
>* http://xxx.mycompany.com/WS/DailyDilbert/DilbertService.asmx?wsdl ,
>* DilbertService , DilbertServiceSoap
>
>LOCAL loException, lcErrorMsg, loWSHandler
>TRY
>	loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
>	loDilbertService = loWSHandler.SetupClient ;
>("http://xxx.mycompany.com/WS/DailyDilbert/DilbertService.asmx?wsdl", "DilbertService", "DilbertServiceSoap")
>	* Call your XML Web service here.  ex: leResult = loDilbertService.SomeMethod()
>	?loDilbertService.GetDailyDilbertUrl()
>CATCH TO loException
>	lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message
>	DO CASE
>	CASE VARTYPE(loDilbertService)#"O"
>		* Handle SOAP error connecting to web service
>	CASE !EMPTY(loDilbertService.FaultCode)
>		* Handle SOAP error calling method
>		lcErrorMsg=lcErrorMsg+CHR(13)+loDilbertService.Detail
>	OTHERWISE
>		* Handle other error
>	ENDCASE
>	* Use for debugging purposes
>	MESSAGEBOX(lcErrorMsg)
>FINALLY
>ENDTRY
>
>
>Again, the web service works very well and Visual FoxPro was able to register it and to "generate intellisense scripts" when finishing it, the code is from the Toolbox utility.
>
>This is the wsdl when from my machine I see it (just replaced the real url):
>
>
><?xml version="1.0" encoding="utf-8" ?>
>- <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>xmlns:s="http://www.w3.org/2001/XMLSchema"
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:tns="http://xxx.mycompany.com/ws/dailydilbert"
>xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
>xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>targetNamespace="http://xxx.mycompany.com/ws/dailydilbert"
>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>- <wsdl:types>
>- <s:schema elementFormDefault="qualified" targetNamespace="http://xxx.mycompany.com/ws/dailydilbert">
>- <s:element name="GetDailyDilbertUrl">
>  <s:complexType />
>  </s:element>
>- <s:element name="GetDailyDilbertUrlResponse">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="0" maxOccurs="1" name="GetDailyDilbertUrlResult" type="s:string" />
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>- <s:element name="GetDailyDilbertImage">
>  <s:complexType />
>  </s:element>
>- <s:element name="GetDailyDilbertImageResponse">
>- <s:complexType>
>- <s:sequence>
>  <s:element minOccurs="0" maxOccurs="1" name="GetDailyDilbertImageResult" type="s:base64Binary" />
>  </s:sequence>
>  </s:complexType>
>  </s:element>
>  </s:schema>
>  </wsdl:types>
>- <wsdl:message name="GetDailyDilbertUrlSoapIn">
>  <wsdl:part name="parameters" element="tns:GetDailyDilbertUrl" />
>  </wsdl:message>
>- <wsdl:message name="GetDailyDilbertUrlSoapOut">
>  <wsdl:part name="parameters" element="tns:GetDailyDilbertUrlResponse" />
>  </wsdl:message>
>- <wsdl:message name="GetDailyDilbertImageSoapIn">
>  <wsdl:part name="parameters" element="tns:GetDailyDilbertImage" />
>  </wsdl:message>
>- <wsdl:message name="GetDailyDilbertImageSoapOut">
>  <wsdl:part name="parameters" element="tns:GetDailyDilbertImageResponse" />
>  </wsdl:message>
>- <wsdl:portType name="DilbertServiceSoap">
>- <wsdl:operation name="GetDailyDilbertUrl">
>  <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Retrieve the URL for the daily Dilbert image</documentation>
>  <wsdl:input message="tns:GetDailyDilbertUrlSoapIn" />
>  <wsdl:output message="tns:GetDailyDilbertUrlSoapOut" />
>  </wsdl:operation>
>- <wsdl:operation name="GetDailyDilbertImage">
>  <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Retrieve a byte array containing the daily Dilbert image</documentation>
>  <wsdl:input message="tns:GetDailyDilbertImageSoapIn" />
>  <wsdl:output message="tns:GetDailyDilbertImageSoapOut" />
>  </wsdl:operation>
>  </wsdl:portType>
>- <wsdl:binding name="DilbertServiceSoap" type="tns:DilbertServiceSoap">
>  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
>- <wsdl:operation name="GetDailyDilbertUrl">
>  <soap:operation soapAction="http://xxx.mycompany.com/ws/dailydilbert/GetDailyDilbertUrl" style="document" />
>- <wsdl:input>
>  <soap:body use="literal" />
>  </wsdl:input>
>- <wsdl:output>
>  <soap:body use="literal" />
>  </wsdl:output>
>  </wsdl:operation>
>- <wsdl:operation name="GetDailyDilbertImage">
>  <soap:operation soapAction="http://xxx.mycompany.com/ws/dailydilbert/GetDailyDilbertImage" style="document" />
>- <wsdl:input>
>  <soap:body use="literal" />
>  </wsdl:input>
>- <wsdl:output>
>  <soap:body use="literal" />
>  </wsdl:output>
>  </wsdl:operation>
>  </wsdl:binding>
>- <wsdl:service name="DilbertService">
>  <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Provides methods to access the daily Dilbert image</documentation>
>- <wsdl:port name="DilbertServiceSoap" binding="tns:DilbertServiceSoap">
>  <soap:address location="http://xxx.mycompany.com/WS/DailyDilbert/DilbertService.asmx" />
>  </wsdl:port>
>  </wsdl:service>
>  </wsdl:definitions>
>
>
>What prevents Visual FoxPro to get the results? is this a known issue with .NET web services?
>My plans are to use SharePoint's web services for getting lists contents, and then update them using CAML, but if I can't invoke this simple Web service, those plans are not longer possible.
>
>Thanks in advance for your help and suggestions.

...Y soy feliz, bien feliz, asi lo grito;
Mira, que el mundo sepa, que se sepa:
Soy feliz....                       

...And I'm happy, quite happy, so do I yell it;
Look, so the world knows it, so be known:
I'm happy...
 

Ismael Rivera "Oye cosita linda"
Previous
Reply
Map
View

Click here to load this message in the networking platform