PBAddCookie PowerScript function
Description
Adds a cookie
to the Web service proxy object that will be sent to the server each
time you call a Web service method.
Syntax
1 |
<span>proxyObj</span>.<span>PBAddCookie</span> ( <span>acookie</span> ) |
Argument |
Description |
---|---|
proxyObj |
The proxy object that you deploy from |
acookie |
An any containing |
Return Values
None.
Usage
If there is already a cookie with the same name and URI that
you set in the acookie argument, you will replace
the existing cookie when you invoke a Web service method. For the
types of information you can include in the acookie argument,
see the methods of the SoapPBCookie class in the PowerBuilder Extension
Reference.
The SoapPBCookie class is defined in the pbwsclient126.pbx extension
that you can import into your application library. It is valid for
.NET Web services engine only.
Examples
The following example adds a cookie named myCookie that
is sent to the server after you connect to a Web service from an objProxy proxy
client:
1 |
SoapPBCookie acookie |
1 |
acookie=create SoapPBCookie |
1 |
1 |
acookie.SetUri("http://myServer/webservice/Svc1.wsdl") |
1 |
acookie.SetName("myCookie") |
1 |
acookie.SetValue("My Value") |
1 |
objProxy.<span>PBAddCookie</span>(acookie) |