Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Web services and Apache
Message
 
À
02/01/2008 10:08:17
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
01278956
Message ID:
01279113
Vues:
14
Working with Java Web Services is a royal pain in the butt because as others have pointed out for the most part these services end up using complex and nested types that the SOAP Toolkit can't deal with natively - your workaround is to manually create the message XML and feed or parse that from the SOAP Toolkit results. In most cases this is very error prone and difficult to get right.

wwSOAP can help with some of this *if* it can parse the WSDL the Java Service provides it can create message objects in VFP code for you. If that works wwSOAP can parse and send these objects for you.

If you want a reliable solution - I recommend using Interop with .NET. You basically create your Web Service front end in .NET using either a Web Reference or a WCF Service Reference (.NET 3.0 or later) and then create a wrapper around the service with the methods you want to expose. You can then pass the message objects that the .NET service has created back and forth between VFP and the .NET object.

I've been doing a lot of work lately with the latter and it works well, although I have to admit it's a bit of work as you typically end up duplicating the service methods both in .NET and FoxPro. However, you get a lot of flexibility and with .NET the service calls at least almost always work against just about any kind of service. Once you've done it once it's easy to - it's some busy work but not complex.

Most of the concepts are written up here:
http://www.west-wind.com/presentations/foxdotnetwebservices/

Since the article one more twist is that I've created an Interop helper (wwDotNetBridge) that allows you to interop with .NET without requiring COM registration which simplifies registration and allows you to call into .NET types that normally aren't COM exportable and this helps further in simplifying the setup. The library also adds a few helper methods that can help you deal with Arrays and Collections that just don't work right over raw COM interop. wwDotNetBridge is part of West Wind Client Tools and Web Connection. The rest (in the article) you can do on your own <g>...

Hope this helps,

+++ Rick ---

>Here is another question from my friend dealing with Fox, Apache and Webservices.
>
>This is a good one about web services, FoxPro, and Apache/Java.
>
>
>I can connect to the web service to a method with no parameters.
>But, there is a method that I want to connect to but it won't accept the parameters. The problems is that its an Apache/Java server that is looking for signed variable, but I don't know how to create a signed variable parameter in FoxPro.
>
>Here is the error message:
>
>Error: 1429 - OLE IDispatch exception code 0 from /soap/servlet/rpcrouter: No deserializer found to deserialize a ':version' using encoding style http://schemas.xmlsoap.org/soap/encoding/'...
>
>
>Version is is first parameter that I pass into the web service. All the parameters are supposed to be Strings but I don't know how to create it.
>
>I have not had much success hunting for answers on the web. I joined ExpertsExchange just to look at a similar answer and everyone was just guessing for that answer.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform