Pages

Custom Search

SoapDoc for peoplecode

Sample XML:

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inf="http://www.ABC.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <inf:Method>
       <inf:Request>
           <Element1>123456</Element1>
           <Element2>test2</Element2>
       </inf:Request>
    </inf:Method/>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

PeopleCode using application package:

import PS_PT:Integration:IRequestHandler;

class TEST_IB implements PS_PT:Integration:IRequestHandler
   method TEST_IB ();
   method OnRequest(&_MSG As Message) Returns Message;
   method OnError(&_MSG As Message) Returns string;
end-class;

/* constructor */
method TEST_IB
   %Super = create PS_PT:Integration:IRequestHandler();
end-method;

method OnRequest
   /+ &_MSG as Message +/
   /+ Returns Message +/
   /+ Extends/implements PS_PT:Integration:IRequestHandler.OnRequest +/
 
   Local SOAPDoc &SOAPDoc;
   Local XmlDoc &lxmlDoc, &responseXMLDoc;
   Local XmlNode &EnvNode, &xmln, &Element1, &Element2;
   Local Message &lmsgGoRequest, &lmsgGoResponse, &Response;
   Local string &string;
 
   Local string &DefNameSpace = "http://www.ABC.com/";
 
   /*Create Soap Document*/
   &SOAPDoc = CreateSOAPDoc(); /* required */
 
   &SOAPDoc.AddEnvelope(%SOAP_Schema); /* Pick Scheme from the WSDL*/

   /*Add attributes to Schema*/
   &EnvNode = &SOAPDoc.EnvelopeNode;
   &EnvNode.AddAttribute("xmlns:soapenv", "http://schemas.xmlsoap.org/soap/envelope/");
   &EnvNode.AddAttribute("xmlns:inf", "http://www.ABC.com/");
 
   /*Add Soap Header*/
   &SOAPDoc.AddHeader();

   /*Add Soap Body*/
   &SOAPDoc.AddBody(); /* optional */

   /*Add first method inf:Method*/
   /*1 is for Request, 0 is for Response.*/
   &SOAPDoc.AddMethod("inf:Method", 1); /* required */

   /*Add Child Nodes*/
   &xmln = &SOAPDoc.MethodNode.AddElement("inf:Request");
   /*Add Elements - Element1, Element2*/
   &Element1= &xmln.AddElement("Element1");
   &Element1.NodeValue = "123456"; /*Hardcoded will use setup page to retreive data*/

   &Element2= &xmln.AddElement("Element2");
   &Element2.NodeValue = "test2"; /*Hardcoded will use setup page to retreive data*/

   rem &SOAPDoc.AddMethod("inf:Request", 1); /* required */
   rem &SOAPDoc.AddParm("Element1", "123456");
   rem &SOAPDoc.AddParm("Element2", "test2");
 
   &lxmlDoc = CreateXmlDoc(&SOAPDoc.GenXmlString());
 
   /* Validate the message */
   rem &OK = &SOAPDoc.ValidateSOAPDoc();
 
   /*Create message and Generate XML*/
   &lmsgGoRequest = CreateMessage(Operation.TEST_IB);
   &lmsgGoRequest.SetXmlDoc(&lxmlDoc);
 
   /* Send the Request */
   &Response = %IntBroker.SyncRequest(&lmsgGoRequest);
 
   &responseXMLDoc = &Response.GetXmlDoc();
 
   Return &Response;
 
end-method;

method OnError
   /+ &_MSG as Message +/
   /+ Returns String +/
   /+ Extends/implements PS_PT:Integration:IRequestHandler.OnError +/
 
   Return &_MSG.IBException.DefaultText;
end-method;



Checking Check Box does not trigger peoplecode?

If you have a checkbox that does not trigger a peoplecode., say for example:

If P_DERIVED_IMPT.P_IMPT_CHECK_BOX1.Value = ""Y"" Then
WinMessage(""CHECKED"");
Hide(P_IMPT_TBL.P_IMPT_VERIFIED);
Else
UnHide(P_IMPT_TBL.P_IMPT_VERIFIED);
End-If;

Check on the component properties, if the mode is differed instead of interactive.

Make it "interactive" mode and then it should work.

Fluid page not showing on small factor but only on large factor

Open the component of the fluid page.

Click on properties and go to fluid tab.

Check "Display on Small Form Factor Homepage"




Overriding Image for a Navigation Collection - Makes link disappear

We have a navigation collection and we are trying to add a link. Link works fine and shows up on the left panel, but when you're trying to override image, the link disappears.

This is the issue I encountered while working on two different navigation collections and the solutions were also two very different.

Image result for navigation collection image override

Solution: Click on the "Edit Link" of your navigation collection:



Go to the bottom the page and click on find source:

Solution 1: Uncheck "Hide from Portal navigation":


Solution 2: Uncheck Author access in security tab:






Fluid Grid doesn't show up on small form factor/mobile

If your fluid grid works fine on the classic page, but doesn't show up on the small form factor/mobile - this may be the reason:

Click on the grid and under grid properties - go to "Fluid" Tab.


Un-check "Suppress on Form Factor".



Now the fluid will start showing up on the mobile/small form factor.

How to retrieve all images from Peoplesoft Database

Create a new project IMAGES_PS.

Step 1:

Create a derived/work record WEBLIB_IMAGES and add field ISCRIPT1. Add this record to the project.

Step 2:

Under WEBLIB_IMAGES.ISCRIPT1.FieldFormula write code and insert it into project IMAGES_PS.

Function IScript_Images()
   Local SQL &SQLGetImages;
   Local string &ImageHTML, &ImageName;
   Local string &sHTML;
   
   &SQLGetImages = CreateSQL("SELECT CONTNAME FROM PSCONTDEFN C WHERE C.ALTCONTNUM = (SELECT MAX(C1.ALTCONTNUM) FROM PSCONTDEFN C1 WHERE C1.CONTNAME = C.CONTNAME AND C1.CONTFMT <> '') AND C.CONTFMT = ( SELECT MAX(C1.CONTFMT) FROM PSCONTDEFN C1 WHERE C1.CONTNAME = C.CONTNAME AND C1.ALTCONTNUM = C.ALTCONTNUM AND C1.CONTFMT <> '')");
   While &SQLGetImages.Fetch(&ImageName)
      &sHTML = GetHTMLText(HTML.N_HTML_IMAGE, &ImageName);
      %Response.Write(&sHTML);
      
   End-While;
   &SQLGetImages.Close();
   
End-Function;


Step 3: Add HTML to the project and save it as HTML_IMAGE

And add code:

<img src=%IMAGE(%BIND(:1)) height="50" width="50" alt="Image"/>

Step 4: Give permission to web library WEBLIB_IMAGES.ISCRIPT1.FieldFormula to the permission list.

Step 5: Go to your link:

https://pdev.demo.com/psp/DEVDB/EMPLOYEE/HRMS/s/WEBLIB_IMAGES.ISCRIPT1.FieldFormula.IScript_Images


You will need to change the part highlighted in red to your peoplesoft URL.

Integration Broker errors




  •  User XXXX not authorized to invoke Service Operation XXXXX. (158,536)



Solution: User account is locked. Go to Peopletools>security>user profiles> enter username and unlock the account.


  •  IBMessage:setContent(). Message content is not a MimeMesage





Solution: This is because namespace is missing. The text highlighted in red is an example of namespace.


Note: HttpListeningconnector works fine if there is no namespace, however, PeoplesoftServiceListeningconnector will not work.

  •  Component Interface saving error when going through the interface


There was an exceptions processing the message\nGetCompIntfc failed (0,0) MSGEXAMPLE.MSGEXAMPLE.OnExecute  Name:UpdateStudent  PCPC:23584  Statement:380

Called MSGEXAMPLE.MSGEXAMPLE.OnExecute  Name:OnRequest  Statement:20


Solution: This happens when the primary permission list is not assigned to the user profile. 

Go to Main Menu > PeopleTools > Security > User Profiles

For the user profile, under "General" Tab look for Permission lists and enter Primary and Row security.

  • Unable to Decrypt Password


Solution: This occurs when a wrong listening connector is used.



  • External Operation Name not found


Solution: This Occurs when HTTPS is missed and listening connector used has HTTP