FoxPro Programming
Passing SSL Certificates over a SOAP call on code generated via West Wind Web Service Proxy Generator
Gravatar is a globally recognized avatar based on your email address. Passing SSL Certificates over a SOAP call on code generated via West Wind Web Service Proxy Generator
  Marco Ferreira
  All
  Nov 6, 2017 @ 05:30am

Hi Everyone,

I am new to SOAP and Web Services and are considering using the West Wind Web Service Proxy Generator to help me with a small project I have, I have looked at all the specs and think the tool can be of great help just need some clarity on how to deal with SSL certificates over SOAP, can someone assist with a code example to incorporate a certificate into a SOAP call via the generated proxy code from the West Wind Proxy Generator.

Thank you in advance

Marco

Gravatar is a globally recognized avatar based on your email address. re: Passing SSL Certificates over a SOAP call on code generated via West Wind Web Service Proxy Generator
  Rick Strahl
  Marco Ferreira
  Nov 6, 2017 @ 10:46am

If you need to pass SSL certificates as part of the actual SOAP payload then you're likely using WS* in which case the proxy generator will not work. You'll need to use WCF in .NET to access the service.

If you're using the SSL certificate as part of the connection you're making that may be doable but I'd have to look into that - it'll be part of the connection configuration of the client. If it's standard HTTPS connection with a client certificate your best bet is to install the certificate into the certificates for the machine and that should then just work.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Passing SSL Certificates over a SOAP call on code generated via West Wind Web Service Proxy Generator
  Marco Ferreira
  Rick Strahl
  Nov 6, 2017 @ 11:10pm

Thank you Rick, much appreciated, will try to install the certificates as suggested and see how that goes.

One last query, can you give me a sample code on how to pass/build a custom header for the SOAP messages that I am be going sending across?

Kind Regards

Marco

Gravatar is a globally recognized avatar based on your email address. re: Passing SSL Certificates over a SOAP call on code generated via West Wind Web Service Proxy Generator
  Marco Ferreira
  Rick Strahl
  Nov 7, 2017 @ 02:42am

Once again, thank you Rick, will give it a try and keep you posted.

Reading one of your papers, "Visual FoxPro Web Services Revisited" by Code Magazine, great stuff.

Marco

Gravatar is a globally recognized avatar based on your email address. re: Passing SSL Certificates over a SOAP call on code generated via West Wind Web Service Proxy Generator
  Marco Ferreira
  Rick Strahl
  Nov 16, 2017 @ 01:30pm

Hi Rick,

I am battling to get the code going, have generated the proxy all fine, but getting errors when calling a function, method not found when I try to call any of the proxy methods...

I also need to attach a certificate to the SOAP message as well as a custom SOAP header to every message going out as per below:

<env:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-
secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuritysecext-
1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" env:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-
wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-
secext-1.0.xsd">
<wsse:Username>wstest</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-
token-profile-1.0#PasswordText">wstest</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>

If I send you the generated proxy code will you be able to assist me, guide me in the right direction?

Thanks

Marco

Gravatar is a globally recognized avatar based on your email address. re: Passing SSL Certificates over a SOAP call on code generated via West Wind Web Service Proxy Generator
  Rick Strahl
  Marco Ferreira
  Nov 16, 2017 @ 08:24pm

The proxy generator doesn't support WS* services. The service you're using uses WS-Security and can't be called using the tooling used by the proxy generator which only supports SOAP 1.x.

In order to call services that require WS-* you need to manually build a client using the WCF client in .NET which is a bit more work, but essentially uses a similar process manually to configure the client for the certificate attachment.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Passing SSL Certificates over a SOAP call on code generated via West Wind Web Service Proxy Generator
  Marco Ferreira
  Rick Strahl
  Nov 17, 2017 @ 01:00pm

Evening Rick,

Once again thank you for your promptly response, much appreciated.

Have managed to create a small C# app to query and consume the service, managed to get the custom header to work, read one of your papers, and have the certificate also sorted... my problem now is to consume the service, it return 3 services with complex data type that I cannot figure out how to use them... would you be able to assist me? if I send you a sample of the code can you help me? can send you the c# solution

Sorry to be a nag but new to all of this and there is no book that can really tell you how to...

Kind Regards,

Marco

Gravatar is a globally recognized avatar based on your email address. re: Passing SSL Certificates over a SOAP call on code generated via West Wind Web Service Proxy Generator
  Rick Strahl
  Marco Ferreira
  Nov 17, 2017 @ 01:51pm

Yeah unfortunately this is all pretty tricky especially if you're using WPF which is a PITA to configure and set up (and which is why I don't have tooling to automate this the way we automate SOAP 1.x services).

I can take a look - you can contact me through the contact/consulting page:

https://west-wind.com/contact/#PaidSupport

+++ Rick ---

© 1996-2024