Web Service Proxy Generator
WSDL translation
Gravatar is a globally recognized avatar based on your email address. WSDL translation
  David Phillips
  All
  Jul 10, 2017 @ 05:57pm

Dear Rick, it is great to see all you are doing, may the Fox live forever. I am working on a large project that has hundreds of WSDL files and solutions in java, SOAP and DOTNET and Visual Studio. It is a bit of a jumble to me so far. I like the idea of the .NET Web Service Proxy Generator and doing it all in FOX.

I have the WSDL files on my computer, should I put the local address in the "Web Service WSDL URL:" eg E:\F\MyHealthRecord\HIPS v6.1\Core\AssistedRegistrationService\AssistedRegistrationServiceAssistedRegistrationService1.wsdl . Is this correct?

When I run Generate I get a number of errors.
WDSL Parsing error, Web Ref does not conform to WS-I Basic Profile v1.1, SOAP Binding was not found ... does not conform to SOAP 1.1 (I thought SOAP was at Ver 3 now) , WSDL 1.1, UDDI 2.0, XML 1.0 and XML Schema.

Also error "Cannot find definition for http://schemas.HIPS/Services/2012/01:IAssistedRegistrationService . Service Description with namespace http://schemas.HIPS/Services/2012/01 is missing . Parameter name: name

Have I done the "Web Service WSDL URL:" wrongly or is there some other problem with reading the WSDL? Is it possible to fix this or get around it?

I can send a copy of the WSDL if that helps.

Kind Regards, David

Gravatar is a globally recognized avatar based on your email address. re: WSDL translation
  Rick Strahl
  David Phillips
  Jul 10, 2017 @ 11:26pm

Yes you should be able to type in a fully qualified file name to get to the URL.

The WSDL generator supports SOAP 1.x (1.0,1.1,1.2), but it doesn't work with WS* services. So if your service is one of those there's no generic way to generate the proxy - you need to use WCF with .NET and Interop.

It could also be that there are external files that are not reachable via file shares. If that's the case the best solution usually is to host the WSDL files through a local Web Server like IIS Express or full IIS so that the dependencies (imports) can work properly.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: WSDL translation
  David Phillips
  Rick Strahl
  Jul 11, 2017 @ 08:53pm

Dear Rick, thank you for your prompt reply. I am still trying to come to grips with this project and find the right tools to do the job. Does "WCF with .NET and Interop" refer to "West Wind Web Connection for Visual FoxPro" ?

There are encrypt/decrypt certificates involved in this project, desperately looking for the right tools

Kind Regards, David

Gravatar is a globally recognized avatar based on your email address. re: WSDL translation
  Rick Strahl
  David Phillips
  Jul 11, 2017 @ 10:12pm

All the up to date tooling for accessing Web Services from Windows is in .NET these days. So one way or another you need to use .NET to access a Web Service. While there are old tools like the SOAP Toolkit - that is long discontinued and deprecated. It's also very limited. With .NET you basically create a proxy that you can call from FoxPro and interact with.

The West Wind WSDL Proxy Generator automates this process where you don't have to write .NET code. It creates the proxy and a FoxPro front end class and uses wwDotnetBridge to access the generated .NET code without requiring any sort of registration as well as providing access to features that regular COM interop doesn't support. But the WSDL Generator only works with SOAP 1.x services. WS* services are too complex with too many variations and complex configuration settings that makes it too difficult to create an automatic package. WS* services have to be custom configured even if you're using native .NET Code using Windows Communication Foundation (WCF).

If the service you're accessing is SOAP 1.x then the WSDL Generator makes access very easy and it's a great solution. If the service is WS* then you have to create the service in WCF manually in .NET and then create a Foxpro wrapper. You can actually use the WSDL Generator on this service and FoxPro will create the proxy so all the methods are available, but you need to explicitly bind the proxy to the WCF .NET class you created. Using WCF is a pain in the ass - especially if you have to deal with certificates or document signatures.

I have a number of articles on these subjects you can read through:

The first article will help you understand how the .NET Proxy works and how you can call it from FoxPro, including (optionally) using the WSDL generator. The latter article is much older and it talks about both using WCF and the ASMX based .NET client. There's no detailed article for WCF unfortunately - never got around to writing one of those. It's a complex topic...

+++ Rick ---

© 1996-2017