Description
Gets the cookies associated with a .NET Web service that you invoke from a proxy object.
Syntax
proxyObj.PBGetCookies ( URI )
Argument |
Description |
---|---|
proxyObj |
The proxy object that you deploy from a Web Service Proxy project |
URI |
The URI of the Web service that you invoke with the proxy object |
Return value
SoapPBCookie[ ]
. An array of an instance of the SoapPBCookie class.
Usage
The SoapPBCookie class is defined in the pbwsclient190.pbx extension that you can import into your application library. You must first connect to the Web service with an instance of the SoapConnection class that is also defined in this extension.
For more information about connecting to a Web service, see Building a Web Services Client (Obsolete) in Application Techniques. For cookie properties you can set or return with the SoapPBCookie class, see the section called “SoapPBCookie” in PowerBuilder Extension Reference.
Examples
The following example enters the names and values of the cookies associated with a Web service in a MultiLineEdit control:
wsproxy_service proxy soapPBCookie retu_cookies[] //create instance of a SoapConnection object //create instance of the Web service proxy endpoint = "https://www.appeon.com/webservice/Svc.asmx" retu_cookies = proxy.pbgetcookies(endpoint) mle_1.text = string(upperbound(retu_cookies))& +" total cookies" + "~r~n" for i= 1 to upperbound(retu_cookies) mle_1.text += "Cookie"+ string(i)& +"~r~n=====================~r~n" mle_1.text +="getName = " & + retu_cookies[i].getname() +"~r~n" mle_1.text +="getValue = " & + retu_cookies[i].getvalue()+"~r~n" next
See also