West Wind Internet and Client Tools
wwSoap Help
Gravatar is a globally recognized avatar based on your email address. wwSoap Help
  Scott R
  Jun 11, 2019 @ 10:04am


I realize that on your help doc (https://webconnection.west-wind.com/docs/_06f04lmkh.htm) it says that the wwSOAP class is deprecated. However, I was hoping you could at least tell me what properties I need to set to achieve my desired result?

I've got an xml sample from the company we are trying to hit and I'm having problems getting the wwSOAP XML to match.

I need it to match:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="http://services.discretewireless.com/v2009_1/">

I'm using the following code:


oSoap = CREATEOBJECT('wwSoap')
oWSDL = oSoap.parseServiceWSDL('http://services.discretewireless.com/v2009_1/AuthenticationManagerV1.wsdl')
*oSoap.cMethodNameSpace = 'http://services.discretewireless.com/v2009_1/'
*oSoap.cMethodNameSpaceURI = 'http://services.discretewireless.com/v2009_1/'

oSoap.cExtraEnvelopeAttributes = 'xmlns:v20="http://services.discretewireless.com/v2009_1/"'
oSoap.cMethodNameSpaceURI = 'v20'
oSoap.cMethodNameSpace = 'v20'

oSoap.addParameter('username', otsologin.tsologin, 'v20:') && I was testing to see if the 'v20:' would show up anywhere
oSoap.addParameter('password', otsologin.tsopwd)

m.req = oSoap.createSoapRequestXML('getAuthenticationTokenRequest')
*m.resp = oSoap.callWSDLMethod('getAuthenticationToken') &&, oWSDL)

and I'm am currently ending up with:

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
 soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"  xmlns:v20="http://services.discretewireless.com/v2009_1/">
<v20:getAuthenticationTokenRequest xmlns:v20="v20" >

This is close but not right. Is there a property I'm missing or is this not even possible using the wwSOAP class?



Gravatar is a globally recognized avatar based on your email address. re: wwSoap Help
  Rick Strahl
  Scott R
  Jun 11, 2019 @ 12:50pm

You need to specify the Uri properly. Use the namespace URL not V20.

oSoap.cExtraEnvelopeAttributes = 'xmlns:v20="http://services.discretewireless.com/v2009_1/"'
oSoap.cMethodNameSpaceURI = "http://services.discretewireless.com/v2009_1/"
oSoap.cMethodNameSpace = "v20"

The better choice probably is the West Wind Web Service Proxy Generator which can create service wrappers for you:

West Wind Web Service Proxy Generator

+++ Rick ---

© 1996-2019