zeteixeira
Programmer
Hello,
I am trying to use a webservice using SOAP header with the authentication.
The code I'm using is the following:
LOCAL o as MSSOAP.SoapClient30
o = CREATEOBJECT("MSSOAP.SoapClient30")
loException = null
llError=.f.
lcUrl = "
TRY
o.MSSoapInit(lcUrl)
o.ConnectorProperty("AuthUser") = 'aaa'
o.ConnectorProperty("AuthPassword") = "XXXXXXXX"
o.ConnectorProperty("ConnectTimeout")=5000
o.ConnectorProperty("Timeout")=10000
o.teste('aaaa','bbbb')
CATCH TO loException
llError = .t.
ENDTRY
IF llError
MESSAGEBOX("Unable to load WSDL file from " + lcUrl)
return
ENDIF
The sample XML I have is the following:
<soapenv:Envelope xmlns:con="xmlns:soapenv=" <soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse=" <wsse:UsernameToken wsu:Id="UsernameToken-6"
xmlns:wsu=" <wsse:Username>NAME</wsse:Username>
<wsse
assword
Type=" <wsse:Nonce
EncodingType="<wsu:Created>2011-02-03T15:46:23.035Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<con:Consulta_Input>
<con:Numero>0000000000</con:Numero>
<con:Codigo>1234567890ABC</con:Codigo>
</con:Consulta_Input>
</soapenv:Body>
</soapenv:Envelope>
Unfortunately I am not able to pass the authentication.
Someone can take a hint?
Thanks in Advanced.
Thanks,
Zé
I am trying to use a webservice using SOAP header with the authentication.
The code I'm using is the following:
LOCAL o as MSSOAP.SoapClient30
o = CREATEOBJECT("MSSOAP.SoapClient30")
loException = null
llError=.f.
lcUrl = "
TRY
o.MSSoapInit(lcUrl)
o.ConnectorProperty("AuthUser") = 'aaa'
o.ConnectorProperty("AuthPassword") = "XXXXXXXX"
o.ConnectorProperty("ConnectTimeout")=5000
o.ConnectorProperty("Timeout")=10000
o.teste('aaaa','bbbb')
CATCH TO loException
llError = .t.
ENDTRY
IF llError
MESSAGEBOX("Unable to load WSDL file from " + lcUrl)
return
ENDIF
The sample XML I have is the following:
<soapenv:Envelope xmlns:con="xmlns:soapenv=" <soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse=" <wsse:UsernameToken wsu:Id="UsernameToken-6"
xmlns:wsu=" <wsse:Username>NAME</wsse:Username>
<wsse
Type=" <wsse:Nonce
EncodingType="<wsu:Created>2011-02-03T15:46:23.035Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<con:Consulta_Input>
<con:Numero>0000000000</con:Numero>
<con:Codigo>1234567890ABC</con:Codigo>
</con:Consulta_Input>
</soapenv:Body>
</soapenv:Envelope>
Unfortunately I am not able to pass the authentication.
Someone can take a hint?
Thanks in Advanced.
Thanks,
Zé