Web Service Proxy Generator
Viewing XML for a SOAP call
Gravatar is a globally recognized avatar based on your email address. Viewing XML for a SOAP call
  Stein Goering
  All
  Jan 6, 2021 @ 11:56pm

Ran into another issue when attempting to make a web service call using the DLL generated by the proxy tool. This code has been working fine for years but is now throwing a SOAP exception error. In trying to work with the vendor to figure out what the problem is - they have asked see the XML that is being sent over.

The tpgsecurelinkproxy.dll library accessed in the code below was created using the WW Proxy Generator. Is there a quick way to grab the XML being sent by the loProxy object?

loBridge = GetwwDotNetBridge()
loBridge.Loadassembly([tpgsecurelinkproxy.dll]))
loProxy = CREATEOBJECT("tpgsecurelinkproxy")
loProxy.cServiceURL = lcURL 	
loBridge.SetProperty(loProxy.oService,"Url",lcURL)
loProxy.oService.httplogin(lcLogin,lcPwd,.T.)
loAARequest = loBridge.Createinstance("TPGSecureLink.AuthorizeAccountRequest")
loAARequest.SESSION = lcTNSession
loResult = loProxy.authorizeAccount(loAARequest)

Gravatar is a globally recognized avatar based on your email address. re: Viewing XML for a SOAP call
  Rick Strahl
  Stein Goering
  Jan 7, 2021 @ 12:48pm

Best to use Fiddler to externally monitor HTTP calls. You can grab the XML that goes over the wire from there...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Viewing XML for a SOAP call
  Stein Goering
  Rick Strahl
  Jan 7, 2021 @ 10:36pm

Thanks. I'll see about getting Fiddler installed on the box in question.

--sg

Gravatar is a globally recognized avatar based on your email address. re: Viewing XML for a SOAP call
  Stein Goering
  Rick Strahl
  Jan 8, 2021 @ 04:04pm

I installed Fiddler and had it running on my server. I brought up the page in my application that invokes the SOAP calls, while at the same time viewing the Fiddler window.

I can see the http requests that are invoked through the browser showing up the Fiddler session pane. (App method calls, JSON requests from my page scripts, etc) What I'm not seeing is any sign of the SOAP calls which I know are being invoked from the server-side by the proxy object.

Clearly I'm missing something in how I configured Fiddler and/or my app environment. Any idea of what I should do to get it to pick up the SOAP requests?

Thanks

--sg

Gravatar is a globally recognized avatar based on your email address. re: Viewing XML for a SOAP call
  Rick Strahl
  Stein Goering
  Jan 9, 2021 @ 07:01pm

Make sure you set Fiddler to look at all Processes:

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Viewing XML for a SOAP call
  Stein Goering
  Rick Strahl
  Jan 12, 2021 @ 02:36pm

I did have it set for All Processes.

Spent some time checking Fiddler docs and Stackoverflow posts - finally gave up and added a kludge so I can redirect the SOAP call directly to the Fiddler host. It of course kills the actual web service call but at least I can see the XML that would have been sent:

     IF FILE([Fiddler2.INI])
        lcURL = [http://127.0.0.1:8888]
      ELSE  
        lcURL = <actual web service url>
      ENDIF
      loProxy.cServiceURL = lcURL
Gravatar is a globally recognized avatar based on your email address. re: Viewing XML for a SOAP call
  Rick Strahl
  Stein Goering
  Jan 12, 2021 @ 08:53pm

Did you see requests at all? That should just work with anything you do with wwHttp (which is what wwSoap uses) as it goes through the stock Windows proxy. But for HTTPS requests you need to enable the local passthrough certificate - otherwise the requests won't get decrypted. Also some providers will not work with this certificate - CC providers for example often refuse the certificate in the middle.

+++ Rick ---

© 1996-2024