Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: wwSoap or Proxy Generator

$
0
0
Re: wwSoap or Proxy Generator
West Wind Client Tools
Re: wwSoap or Proxy Generator
Dec. 28, 2012
04:11 pm
3OF0YPAJXShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:Andrew MacNeill
Andrew,

Unfortunately you're dealing with a WS-* service and custom authentication via WS-Security it sounds like, which is problematic with either wwSoap or the Proxy generator. Neither directly support WS-* services. The proxy generator really has no way to handle this generically because there's no easy override to inject XML into the request without custom coding in .NET. For WS-* services you really need WCF if you use .NET.

With wwSoap it might be possible as you can inject HTML into the request message, but you have to know exactly what needs to go in there and it's tricky to get this right. Best thing to do is to capture a working client of some sort with Fiddler or SoapUI and then try to recreate that with wwSoap.

+++ Rick ---



This may be in the wrong forum but I thought I would post it here. An old application I have uses wwSoap for communications and it works well except this time, I'm connecting to an https service and it's returning back invalid XML.

The code is effectively:

lo = NEWOBJECT("wwsoap","wwsoap.prg")
lo.addparameter("request","<StartDriverId>ADAEA</StartDriverId><DepotId>0</DepotId>","XML")
lo.csoapheader = getsoapheader()
lo.cextraenvelopexml=getheader()
lvResp= lo.callwsdlmethod("ExportDriverClockByDepotId","https://qhos.qualcommapps.com/QHOSWSNA/Driver.asmx?wsdl")
? lo.cresponsexml

The cSoapHeader and ExtraEnvelope allow us to add the additional security required.

However, the call to httpget returns what looks like an encrypted string (or possibly binary)

I tried using the Proxy Generator.

My code for the proxy looks something like this:
loProxy = CREATEOBJECT("DriverProxy","V2")
loReq = CREATEOBJECT("Driver.ExportDriverClockByDepotIdRequest")
loReq.DepotId=0
loReq.StartDriverId="ADAEA"
lvResult = loProxy.Exportdriverclockbydepotid(loReq)

The error comes back as Unknown COM Status Code. I'm thinking this may be related to the security required to log into the service.

The web service I'm accessing uses Microsoft.Web.Services3.SoapContext for credentials. Does that mean I can just add it with httpauthentication or do I need to use a custom header?

While I appreciate the ease of use with the Proxy Generator, I found I could debug the wwSoap errors better - but I don't know how to deal with this binary object.

Any ideas?

Thanks



Rick Strahl
West Wind Technologies


from Maui, Hawaii

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles