PBDOM_OBJECT – PB Docs 2017
PBDOM_OBJECT The PBDOM_OBJECT class represents any node in an XML node tree and serves as the base class for specialized PBDOM classes that represent specific node types. The DOM class that corresponds to PBDOM_OBJECT is the Node object. PBDOM_OBJECT contains all the basic features required by derived classes. A node can be an element node,…
Exception handling – PB Docs 2017
Exception handling Errors that occur in the execution of a method of an EJB component are mapped to exception proxies and thrown to the calling script. The methods of all the classes in pbejbclient170.pbx can also throw exceptions when, for example, connection to the server fails or the component cannot be located or created. Building EJB…
About PBDOM – PB Docs 2017
About PBDOM PBDOM is the PowerBuilder implementation of the Document Object Model (DOM), a programming interface defining the means by which XML documents can be accessed and manipulated. Although PBDOM is not an implementation of the World Wide Web Consortium (W3C) DOM API, it is very similar. The PBDOM PowerBuilder API can be used for…
Deploying 64-Bit Windows Applications – PB Docs 2017
Deploying 64-Bit Windows Applications Create 64-bit native applications in PowerBuilder. Usage There is no special target for 64-bit native applications. To build a 64-bit application, select the platform in the Project painter General tab. If you need to deliver both 32-bit and 64-bit versions of your application, you should use separate projects and separate folders…
Manipulating Graphs – PB Docs 2017
Manipulating Graphs Contents Using graphs Populating a graph with data Modifying graph properties Accessing data properties Using point and click About this chapter This chapter describes how to write code that allows you to access and change a graph in your application at runtime. Document get from Powerbuilder help Thank you for watching.
PowerBuilder extensions – PB Docs 2017
PowerBuilder extensions Several PowerBuilder extension files are provided with PowerBuilder 2017 R3. If your application uses one of these extensions, you must deploy the files listed in the following table. Extension Files PowerBuilder Document Object Model pbdom170.pbx, PBXerces170.dll, xerces-c_2_8.dll, xerces-depdom_2_8.dll EJB client pbejbclient170.pbx, pbejbclient170.jar SOAP client for Web services ExPat170.dll, libeay32.dll, ssleay32.dll, xerces-c_2_8.dll, xerces-depdom_2_8.dll, EasySoap170.dll,…
Accessing data properties – PB Docs 2017
Accessing data properties Contents Getting information about the data Saving graph data Modifying colors, fill patterns, and other data To access properties related to a graph’s data during execution, you use PowerScript graph functions. The graph functions related to data fall into several categories: Functions that provide information about a graph’s data Functions that save data…
Adding controls – PB Docs 2017
Adding controls All windows serving as the basis for a form style have at least one DataWindow control. In addition, you can add any other controls that you can add to standard PowerBuilder windows, such as command buttons, user objects, text, edit boxes, pictures, and drawing objects. Users of the form can move the controls…
Changing the object in the control – PB Docs 2017
Changing the object in the control In the painter, you can change or remove the object in the control. To delete the object in the control: Select Delete from the control’s pop-up menu. The control is now empty and cannot be activated. Do not select Clear — it deletes the control from the window. To…
Example (using OAuthClient) – PB Docs 2017
Example (using OAuthClient)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
OAuthClient loac_Client TokenRequest ltr_Request TokenResponse ltr_Response OAuthRequest loar_Request ResourceResponse lrr_Response CoderObject lco_Code String ls_AccessToken, ls_refresh_token, ls_ClientID, ls_Sercet, ls_Auth String ls_Body, ls_type, ls_description, ls_uri, ls_state Long ll_return Blob lblb_data loac_Client = Create OAuthClient lco_Code = Create CoderObject <span><strong>//Step 1: Get the RESTful server access token.</strong></span> //Authorization ls_ClientID = "367c4163ddc1427d96655cd220c6714b" ls_Sercet = "4079f8749939446cbc81fd0c27709187" lblb_data = Blob ( ls_ClientID + ":" + ls_Sercet, EncodingUTF8! ) ls_Auth = lco_Code.Base64Encode( lblb_data ) ltr_Request.SetHeader( "Authorization", "Basic " + ls_Auth ) ltr_Request.SetHeader( "Content-Type", "application/x-www-form-urlencoded" ) ltr_Request.tokenlocation = "https://authserver.appeon.com/oauth2/token" ltr_Request.Method = "POST" ltr_Request.secureprotocol = 0 ltr_Request.scope = "testcode upcode profile offline_access" ltr_Request.granttype = "refresh_token" ls_refresh_token = "8a9767b5f7e59245339cb965ce4bfdf589e155535c042a8b2a90d89093eefb7e" ltr_Request.AppendParam("refresh_token",ls_refresh_token ) ll_Return = loac_Client.AccessToken( ltr_Request, ltr_Response ) If ll_Return = 1 and ltr_Response.GetStatusCode () = 200 Then ll_Return = ltr_Response.GetBody(ls_Body) If ll_Return = 1 Then ls_AccessToken = ltr_Response.GetAccessToken() <span><strong>//Step 2: Get the RESTful server resource. </strong></span> loar_Request.Method = "GET" loar_Request.Url = "https://authserver.appeon.com/order/getall" loar_Request.SetAccessToken( ls_AccessToken ) ll_Return = loac_Client.RequestResource( loar_Request, lrr_Response ) If ll_Return = 1 Then ll_Return = lrr_Response.GetBody(ls_Body) If ll_Return = 1 Then MessageBox ( "Resource", ls_Body ) End If Else MessageBox( "Requestresource Falied", "Return :" + String ( ll_return ) + "~r~n" + lrr_Response.GetStatusText() ) End If End If Else ll_Return = ltr_Response.GetTokenError(ls_type, ls_description, ls_uri, ls_state) MessageBox( "AccessToken Falied", "Return :" + String ( ll_return ) + "~r~n" + ls_description ) End If If IsValid ( loac_Client ) Then DesTroy ( loac_Client ) If IsValid ( lco_Code ) Then DesTroy ( lco_Code ) |
Document get from Powerbuilder help Thank you for watching.