cancel
Showing results for 
Search instead for 
Did you mean: 

Powerbuilder - Capture XML response from web service

Former Member
0 Kudos

We are using PB 12.6. We use SOAP to call a web service and the response is an nvo (generated via Proxy Wizard from WSDL). Is there a way within PB to see the XML or convert the nvo to XML format? I use Fiddler to see the raw XML request/response but need to be able to capture it in the code.

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I just doublechecked and see the proxy is set up as .NET so I assume that is why the log is not actually being created. Besides using a 3rd party tool such as Fiddler to capture the traffic, which I am not allowed to use on our production system, is there any similar logging or way to capture the XML response besides parsing the NVO out myself?

Thanks again for any guidance.

Former Member
0 Kudos

I just doublechecked and see the proxy is set up as .NET so I assume that is why the log is not actually being created. Besides using a 3rd party tool such as Fiddler to capture the traffic, which I am not allowed to use on our production system, is there any similar logging or way to capture the XML response besides parsing the NVO out myself?

Thanks again for any guidance.

Former Member
0 Kudos

That would be a great solution. I quickly tried to use both SetOptions and SetSoapLogFile but both end up just creating empty files. Do I need to do anything else to populate that log? I did some searching for info about these options but did not find much.

Here is the code:

c_soapconnection = CREATE SoapConnection
c_soapconnection.SetOptions("SoapLog=~"c:\\soaplog.txt~"")

TRY
li_ReturnCode = c_soapconnection.CreateInstance(px_BridgerService, "p_cst_bridger_basichttpbinding_isearch", ls_BridgerEndPoint)

catch (soapexception e)
messagebox("soapexception:",e.getmessage())
catch (runTimeError e1)
messagebox("RuntimeError:",e1.getmessage())
end try

p_SearchResponse = px_BridgerService.Search(px_BridgerHeader, p_PredefinedSearch,p_SearchRequest)
Former Member
0 Kudos

Try ..

SetOptions ( ' SoapLog="c:/soaplog.txt" ' )

- or better yet -

SetOptions ( ' SoapLog="c:/soap/soaplog.txt" ' ) // where folder has proper permissions.

Former Member
0 Kudos

Hi Laura;

AFAIK that capability is not there in PB <= 12.6 versions.

Suggestion: How about turning on "Soap logging" and have the PB App read its own SOAP log for that info?

FYI: See the SetOptions (string options) method ... option: SoapLog

HTH

Regards ... Chris