i'm trying to use a web service via MSSoap y Harbour, and it's almost done with the exception of an important detail: Authentication.
The code is the following one, but it lacks the authentication because i don't know how to write the user and password, I can't find the equivalent code of the VB sentences
- Code: Select all Expand view
TRY
oSoap := CreateObject( "MSSOAP.SoapClient30" )
oSoap:msSoapInit( "http://localhost:8089/open/services/AbsenceFileService?wsdl" )
// oSoap:msSoapInit( "http://user:passw@localhost:8089/open/services/AbsenceFileService?wsdl" )
// putting the user:passwd in the url makes msSoapInit function fail
oSoap:ClientProperty("ServerHTTPRequest")
// the code for stablish the user and psw in VB
// oSoap:ConnectorProperty("AuthUser" ) = 'user'
// oSoap:ConnectorProperty("AuthPassword") = 'passwd'
// this previous lines are the ones i haven't been able to translate into Harbour
// Things i already tryed:
oSoap:ConnectorProperty:AuthUser:= 'user'
// Argument Error
oSoap:ConnectorProperty:AuthUser( 'user' )
// Argument Error
oSoap:ConnectorProperty("AuthUser", 'user' )
// Argument Error
oSoap:ConnectorProperty("AuthUser") := 'user'
// Does not compiles, invalid lValue
oSoap:ConnectorProperty("AuthUser"):Value := 'user'
// No exported variable
oSoap:AuthUser:= 'user'
// No exported variable
MsgInfo( ValType( oSoap:ConnectorProperty("AuthUser") ) ) // -> '' ! blank string, no type, not even 'U'!
oSoap:ConnectorProperty("AuthPassword"):Value := 'passwd'
// Not exported variable
CATCH oError
MsgStop( oError )
Quit
END TRY
The point is: ¿How to write the equivalent sentence of VB "oSoap:ConnectorProperty("AuthUser" ) = 'user'" in Harbour ?
There is another way to access SOAP web services with authentication?
I have searched in the forum but no luck with authentication in SOAP.
Regards,