Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
My First XML - .Net Project UPS !!!
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00582521
Message ID:
00582564
Views:
26
Below is a ULR page that has a list of web service providers:

http://www.xmethods.net/

Once the page loads you can click on a provider and a page will appear that has the information needed to register the service in VFP. The example I'm using here is the credit card verification web service so you should click on it. When its page appear in your browse print it or capture the WDSL ULR Location info to your clipboard.

Go to VFP and in the main menu:

Tool --> IntelliSence Manager

After clicking on IntelliSence Manager a form appears. Click on [Types] page frame and then on the Web Services Button. Pick any name for the Web Service that will be used in VFP. Then enter the WSDL URL Location from the page printed above or from the clipboard. After some time VFP should indicate that the service has been registered.

Then open a program called test or whatever with the following command:
Modify command test.prg
In the modify program window type:
LOCAL cc_ver AS
End the above command with a space and intellisence will provice a drop down list. Find the service you registered above. It will be under whatever name you gave it. I give it the name of [creditcard] per the example below.

When you click on the service in the list box, FoxPro will provide the code necessary to connect to the service. This code is built when the service is registered. See the example below.
LOCAL cc_ver AS creditcard
LOCAL loWS
loWS = NEWOBJECT("Wsclient",HOME()+"ffc\_webservices.vcx")
loWS.cWSName = "creditcard"
cc_ver = loWS.SetupClient("http://www.iemfamily.com/iemfamily/CreditCard.asmx?WSDL",;
 "CreditCheck", "CreditCheckSoap")

*FoxPro Provides the above code after your type LOCAL cc_ver AS *
*Now check a credit card to see if its valid with the code below *

cc_no=space(18)
DEFINE WINDOW comment FROM 3,3 TO 17,75 ;
   font 'courier',12 STYLE 'N';
NOCLOSE NOFLOAT NOGROW SHADOW NOZOOM DOUBLE color scheme 10
ACTIVATE WINDOW comment
do while .T.
   clear
   @ 1,2 say "Enter the credit card number" get cc_no
   read
   lee=cc_ver.VerifyCreditCard(alltrim(cc_no))
   @ 3,2 say " Credit Card is: "
   modify window comment font 'courier',16 STYLE 'BI'
   @ 2.4,15 say lee
   modify window comment font 'courier',12 STYLE 'N'
   @ 8.5,2 say "Exit Credit Card Verification?"

   DEFINE MENU getans font 'ms sans serif',10 style 'NI' color scheme 13
   DEFINE PAD yes of getans PROMPT ' \<Yes ' AT 8.8,40
   DEFINE PAD no of getans PROMPT ' \<No ' AT 8.8,50
   on SELECTION PAD yes of getans Deactivate MENU getans
   on SELECTION PAD no of getans Deactivate MENU getans
   Activate MENU getans
   Release MENU getans
   IF prompt() = ' Yes '
      exit
   else
      cc_no=space(18)
   endif
enddo   
release window comment
return
I played around with this one Saturday morning and was able to get some services to register but many others would not register.

Leland
Leland F. Jackson, CPA
Software - Master (TM)
smvfp@mail.smvfp.com
Software Master TM
Previous
Reply
Map
View

Click here to load this message in the networking platform