West Wind Internet and Client Tools
wwsoap no longer works on client's new server
Gravatar is a globally recognized avatar based on your email address. wwsoap no longer works on client's new server
  Kevin Scott
  All
  Apr 17, 2018 @ 02:51pm

Hi there!

We have been using wwsoap successfully for a long time and one of our vendors changed to a new server and now it’s returning garbage when attempting to pull the XML using wwhttp.httpgetex.

lnRetval=InternetReadFile(hHTTPResult,;
         @lcReadBuffer,;
         lnSize,;
         @lnBytesRead)

On their new server:

lcReadBuffer = bunch of garbage characters.

On their old server.

lcReadBuffer = Formatted XML
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
     xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" 
     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" >

I have no clue why this would work on one server and fail on the other. Any suggestions? Thank you so much !!

Gravatar is a globally recognized avatar based on your email address. re: wwsoap no longer works on client's new server
  Rick Strahl
  Kevin Scott
  Apr 17, 2018 @ 03:04pm

Most likely they added GZip encoding to their content...

InternetReadFile just reads the raw data it doesn't do decoding of the data. Try using the wwHttp class to retrieve the data - it'll automatically decode GZip encoding if you set the lAllowGzip flag to .T..

DO wwhttp
loHttp = CREATEOBJECT("wwhttp")
loHttp.lAllowGZip = .T.
? loHttp.Send("https://weblog.west-wind.com/posts/2018/Apr/12/Getting-the-NET-Core-Runtime-Version-in-a-Running-Application")

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwsoap no longer works on client's new server
  Kevin Scott
  Rick Strahl
  Apr 18, 2018 @ 06:56am

Thanks for the quick reply!

I tried to implement your suggestion but it's giving me an error that property lAllowGZIP is not found. I believe I have the latest wwhttp.prg downloaded. I looked to see if there was a different property name but I didn't see one.

Sorry, if it's something obvious I'm missing.

Also if I try to run your sample code, it gives me the same error.

Thanks again for your help!

Gravatar is a globally recognized avatar based on your email address. re: wwsoap no longer works on client's new server
  Rick Strahl
  Kevin Scott
  Apr 18, 2018 @ 02:43pm

Yes that means your version is too old and it doesn't support that feature...

It's been in there for a looong time so your version must be v4 most likely?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwsoap no longer works on client's new server
  Kevin Scott
  Rick Strahl
  Apr 18, 2018 @ 02:59pm

Hmm. Ok, is there a new version I can download? Is there a cost associated with just getting the wwhttp.prg or do I need something else? Thanks!

Gravatar is a globally recognized avatar based on your email address. re: wwsoap no longer works on client's new server
  Kevin Scott
  Kevin Scott
  Apr 18, 2018 @ 03:01pm

One other thing I thought was interesting is the the "cextraheaders" property says "accepts gzip" (See my screen shot above). Didn't know if that meant it was on by default or something.

Gravatar is a globally recognized avatar based on your email address. re: wwsoap no longer works on client's new server
  Rick Strahl
  Kevin Scott
  Apr 18, 2018 @ 03:13pm

Yes there is a newer version available and if you are on 4.x it's a paid upgrade:

https://store.west-wind.com/product/WWCLIENT60_UP

You can download the shareware version first to see if this will fix your issue.

FWIW, wwSoap has been deprecated some time ago as it became to complex to support the myriad of Web Service standards that were proliferating many years ago. We still ship it as part of the tools but it's no longer directly referenced or documented. Now in your case where you have working code that otherwise works it's probably the right thing to keep it going that way.

The recommended way forward with SOAP Web Services is to use interop with .NET to call the Web Services. There's more info here:

and if you want something easier there's a tool that automates the process and removes the need to directly mess with .NET code.

If at all possible not using SOAP is also a good idea - REST services using JSON are generally much easier to work with but obviously that's up to the vendor to provide the service interface.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwsoap no longer works on client's new server
  Kevin S.
  Rick Strahl
  May 2, 2018 @ 06:26am

Thanks Rick! That worked perfectly!

The other thing I am going to be working with is the VFP to MongoDb bridge you wrote. I know it's a few years old but now that I have the new .Net Bridge, I'm hoping it will still be functional.

Thanks again! You are awesome!

© 1996-2024