- Ahmed Abdalla
- PowerBuilder
- Tuesday, 6 February 2018 05:31 AM UTC
Dear Sir,
I am trying to consume a webservice using powerbuilder 2017R2. I have the code in C# which consume the same webservice and trying now to do consume it in Powerbuilder. I have created a WCF proxy to access the web service and was able to connect. However, in order to call any method in the webservice, I need to add soap header for the API key. similar to the code in c#:
//add a soap header for API Key
MessageHeader ApiMessageHeader = MessageHeader.CreateHeader("API_KEY", "http://tempuri.org", API_KEY);
System.ServiceModel.OperationContext.Current.OutgoingMessageHeaders.Add(ApiMessageHeader);
string userName = "username";
string passWord = "xxxxxx.";
string Provider = "dsadsa";
//calls the authenticate user, if the authentication is successful it will assign the token variable the appropriate value
client.AUEAuthenticateUser(userName, passWord, Provider, ref token);
--------------
so far I have write the following in Powerbuilder:
My question is: How to add soap message header in powerbuilder before calling the method AUEAuthenticateUser.
Regards
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.