PeopleSoft Integration Broker and Web Services

PeopleSoft Integration Broker and Web Services

Integrating PeopleSoft to external systems using web services is similar, if not simpler, to integrating to third party systems prior to “web services” age. Today, I will try to go through step by step instructions to integrate PeopleSoft with google web services API. If I have some time this weekend, I will try to go through the same with Amazon web services.

Google WSDL is located at this URL Google WSDL.

1. Import the WSDL

PeopleSoft lets you create the messages, queues (called channels before), routings (called transactions before) and service operations and services manually or automatically. Before web services you had to create all these (except services and operations) manually. With WSDL, all these are automatically created for you once WSDL import it done.

 

 

2. Verify all the required service operations are created.

 

 

3. Create request and response code

Based on the WSDL and request message parameter you need to create the SOAP request.

Local SOAPDoc &SOAPDoc;

Local XmlNode &lnodeEnvNode;

&SOAPDoc = CreateSOAPDoc();

&SOAPDoc.AddEnvelope(%SOAP_Custom);

&lnodeEnvNode = &SOAPDoc.EnvelopeNode;

&lnodeEnvNode.AddAttribute(“xmlns”, “urn:GoogleSearch”);

&SOAPDoc.AddBody();

&SOAPDoc.AddMethod(“doGoogleSearch”, 1);

&SOAPDoc.AddParm(“key”, “00000000000000000000000000000″);

&SOAPDoc.AddParm(“q”, “BPEL”);

&SOAPDoc.AddParm(“start”, “0″);

&SOAPDoc.AddParm(“maxResults”, “5″);

&SOAPDoc.AddParm(“filter”, “true”);

&SOAPDoc.AddParm(“restrict”, “”);

&SOAPDoc.AddParm(“safeSearch”, “false”);

&SOAPDoc.AddParm(“lr”, “”);

&SOAPDoc.AddParm(“ie”, “lang_en”);

&SOAPDoc.AddParm(“oe”, “lang_en”);

&lxmlDoc = CreateXmlDoc(&SOAPDoc.GenXmlString());

&lmsgGoRequest = CreateMessage(Operation.DOGOOGLESEARCH);

MY_LDAP_TEST.RAWXML1.Value = &lxmlDoc.GenXmlString();

&lmsgGoRequest.SetXmlDoc(&lxmlDoc);

&lmsgGoResponse = %IntBroker.SyncRequest(&lmsgGoRequest);

MY_LDAP_TEST.RAWXML2.Value = &lmsgGoResponse.GenXMLString();

4. Test the code

I created a simple page which will trigger the code above. Here is the request and response. You might need to get Google API key. I had to change one in the screen shot (sorry)

Request

 

 

 

 

 

 

 

 

 

 

 

 

 

Response

    

About these ads

28 Comments on “PeopleSoft Integration Broker and Web Services”

  1. Balu says:

    This is great!But can you explain how to configure web services manually, that is, not through import wizard.

  2. Maria says:

    Appreciate the fact that you have published this information in the internet. More than the content itself (which in itself is very good), your thougt of sharing with the rest of the world is very well appreciated

  3. Sudhir says:

    Sri, its fantastic. When i tried the same, i got “HttpTargetConnector:External Application Exception”. I used the same key which you have mentioned in the above code. Is that the reason to get this error?

    any response from anybody would be appreciated.

  4. addsrikanth says:

    Sudhir,
    Looks like you did not set up your gateway. You need to setup intergration service gateway in gateway configuration.Also,Key I have proviided above will NOT work, I had to change it.But your repose does not look like is coming from google.If key is not valid you will “key invalid” response from google not application exception error.Google stopped providing API keys but you can try the same with Amazon webservice.
    Let me know if it helps!!
    Thanks
    Sri

  5. Tom Paulauski says:

    Sri,
    I followed your steps to load the WSDL and created the PeopleCode, and got the same error “HttpTargetConnector:External Application Exception 500″ as the posting by Sudhir. Your solution was to setup the intergration service gateway in the gateway configuration. I’m not sure how to do that. Do you have any documentation on this setup that you can post or email to me? Thanks.

    If anyone else has the solution for this error, feel free to email me at Tom.Paulauski@eagletest.com or tpaulauski@hotmail.com

    Any help would be appreciated.

    TOM

  6. Sri says:

    Sudhir ,Tom,

    Try using the following code for the key and it should work.

    eDZYCx9QFHIXI/xojJqrYspYi1Geo74o

    Please make sure you dont distrubute this code,if you can.!!

    Request code should look like this
    Local SOAPDoc &SOAPDoc;
    Local XmlNode &lnodeEnvNode;

    &SOAPDoc = CreateSOAPDoc();

    &SOAPDoc.AddEnvelope(%SOAP_Custom);
    &lnodeEnvNode = &SOAPDoc.EnvelopeNode;
    &lnodeEnvNode.AddAttribute(“xmlns”, “urn:GoogleSearch”);
    &SOAPDoc.AddBody();
    &SOAPDoc.AddMethod(“doGoogleSearch”, 1);
    REM &SOAPDoc.AddParm(“key”, “eDZYCx9QFHIXI/xojJqrYspYi1Geo74o”);
    &SOAPDoc.AddParm(“key”, “000000000000000/xojJqrYspYi1Geo74o”);
    &SOAPDoc.AddParm(“q”, “BPEL”);
    &SOAPDoc.AddParm(“start”, “0″);
    &SOAPDoc.AddParm(“maxResults”, “5″);
    &SOAPDoc.AddParm(“filter”, “true”);
    &SOAPDoc.AddParm(“restrict”, “”);
    &SOAPDoc.AddParm(“safeSearch”, “false”);
    &SOAPDoc.AddParm(“lr”, “”);
    &SOAPDoc.AddParm(“ie”, “lang_en”);
    &SOAPDoc.AddParm(“oe”, “lang_en”);

    &lxmlDoc = CreateXmlDoc(&SOAPDoc.GenXmlString());

    &lmsgGoRequest = CreateMessage(Operation.DOGOOGLESEARCH);
    MY_LDAP_TEST.RAWXML1.Value = &lxmlDoc.GenXmlString();
    &lmsgGoRequest.SetXmlDoc(&lxmlDoc);
    &lmsgGoResponse = %IntBroker.SyncRequest(&lmsgGoRequest);

    MY_LDAP_TEST.RAWXML2.Value = &lmsgGoResponse.GenXMLString();

    • Naidu says:

      Hi sri,

      Followed the steps as shown your blog to invoke an external application through PeopleSoft. I tried the same way in invoking the TIBCO webservice from PeopleSoft (Tools version 8.49). But it got errored out with message “External sytem contact error”. I have done a telnet on my peoplesoft server to check whether the end point URL “http://t2k6z1.allegistest.com:20002/BWProcesses/PresentationServices/EntSecMgmt/EntSecMgmtService.serviceagent/EnterpriseSecurityManagementEndpoint1″ is getting connected or not. Indeed it was getting connected. But not sure why I am getting the external system contact error eventhough I am able to telnet it in peoplesoft.

      Could you please let me know what would be the problem for it?

      Thanks,
      Naidu

  7. chenya says:

    Could you explain where do you put the Request and Response code? Do you have to create an application class to associate with handler? Thank you very much!

  8. addsrikanth says:

    Cheny,
    you have to create a test page and button.You can add code above behind the field change event of the button. Also you need to long text fields on the page to display the request and response.Ofcourse this is only for testing the integration in acutally implementation to display the results you need to process the response and display as per the requirments.

  9. Keshav says:

    Hi Sri,

    Thnx for the above document. I was working on the same and hit the same error as Tom. HttpTargetConnector:ExternalApplicationException Http Status Code returned : -1

    Do you know what could be the issue here? Actually i was trying to demonstrate an OutSync request and am using two of my dev Instances (One as a Client and one as a server and using both gateways). We already have an InSync transaction wherein SOAPTOCI requests are handled when sent by an external J2EE application and responses are sent back. Just trying the leverage the same to act as my Server and create an OutSync request from another Instance.

    PSoft 8.9 and tools 8.47.16

    Appreciate any pointers from your side.

    Regards,
    Keshav

  10. Congratulations for posting such a useful blog. Your weblog is not only informative but also very artistic too. There usually are extremely couple of individuals who can write not so easy articles that creatively. Keep up the good work !!

  11. Kumar says:

    Hi Sri,
    Thank You for providing useful information. I was able to find amazon wsdl and able consume as webservice in peoplesoft. I am new to the technology. I am stuck at Step 3 i.e Creating SOAP request. Can you please help me out in detail where and how to create request and response in detail.

  12. Kumar says:

    Hi Sri,
    Thank You for providing useful information. I was able to find amazon wsdl and able consume as webservice in peoplesoft. I am new to the technology. I am stuck at Step 3 i.e Creating SOAP request. Can you please help me out in detail where and how to create request and response in detail.

    Thank You
    Kumar

  13. Priya says:

    Hi Sri,

    Looking at your blog…. could you please help me finding these info?

    - How PeopleSoft in-built blogging application works?
    - How relationship manager will get notified via their blogging tools(any process/flow)?

    Appreciate your help.

    Thanks,
    Priya
    fnupriya@gmail.com

  14. vasu says:

    Hello Sri,
    I am trying to consume a web service which requires a user id/Password authentication, do you know how to pass it through the wizard. Can it be passed through WSDL URL

    Thanks

  15. Thamizh Selvan says:

    I had similar issue with WSDL URL as decribed above by Vasu. I could not figure that out. So I set all the different components without the wizard. From node I am now able to ping successfully.

    Now trying to use sendmaster utility to test but getting “Error communicating with server: Connection timed out: connect”.

    I setup the Project Type as Input File in SendMaster.
    Server URL is the webservice URL that I am trying to post my SOAP message.
    Headers are as below:
    From: PSOFT Default Local Node
    To: External Node.
    OperationName:Activate
    OperationType:sync
    Content-type: text/xml; charset=UTF8
    Authorization:Basic

    Any inputs as to what I am doing wrong or missing would be helpful.

    Thanks!

  16. Karthik says:

    Hi,

    I have created a soap request by importing wsdl and everything seems to be working fine expect for the fact the special character are being converted into ??? when the users do search on the external website. Not sure hot to correct it but the only difference that I found between the xml request generated from Peoplesoft looks like but it should look like this . Please let me know how to get the xml version in that format.

    Thanks
    karthik

  17. Stephanie says:

    Hi,

    Do you have any experience with a Peoplesoft environment which has an Apache web server outside the firewall connecting to the Web Logic server within the firewall? Can IB still be used in this configuration?

    Thanks.

  18. kjps says:

    Hi

    I an new to PS webservice and looking for help, my requirement is as follows:

    1) Need to consume an API from a third party application into PS HCM
    2) I am on 9.1, 8.50
    3) I need to consume this webservice into PS to send out data from PS to this application.
    4) The data that needs to be sent from PS to this application does not reside in 1 component. The data may be stored in several components.
    5) We need an asynch message.
    6) Since the data resides in several components, maybe I would need to use an AE to to fetch data from various tables and stage into a staging table and then invoke the webservice to send data to the third party application.

    Can you please help and suggest, please help asap.Really urgent

    • Mo says:

      Hi Kjps,

      I have same requirements as what you posted a year ago, I am working on an urgent project that consumes a vendor web service by sending data from PS to a 3rd party system. Please help!!

      casa660@yahoo.com

      Thank you.

  19. ravi shankar says:

    Hi Sri, Great post. I did some work around WebServices and was able to successfully parse XMLs from SOAP Documents where data was coming as Attribute value as we have many methods like getElementNodeByName,getAttributeName, getAttributeValue, but Now I am in situation where WebService is returning SOAP response in this format.

    9999999

    and I am not able to find a way to read value of 9999999 using XMLDoc or SOAPDoc class methods, in fact I am not able to find any appropriate methods to do that.

    I will highly appreciate If you can throw some light on this issue.

    Best Regards,
    Ravi

  20. ravi shankar says:

    Hi Sri, Great post. I did some work around WebServices and was able to successfully parse XMLs from SOAP Documents where data was coming as Attribute value as we have many methods like getElementNodeByName,getAttributeName, getAttributeValue, but Now I am in situation where WebService is returning SOAP response in this format.

    146190527

    and I am not able to find a way to read value of 9999999 using XMLDoc or SOAPDoc class methods, in fact I am not able to find any appropriate methods to do that.

    I will highly appreciate If you can throw some light on this issue.

    Best Regards,
    Ravi

  21. Jeremy says:

    Hi,

    I tried to do the same page as you.
    But I have an error “Only messages that have no records and fields can use this method”.
    Can you help me please ?

    Thanks by advance,

  22. Kameswara Rao says:

    Hi Sri

    I have question regarding invoking web service from third party using end point that ends with API Keys.
    Can you please provide me an example of how can we invoke the web services from Peoplesoft that utlizes API Keys.

    If possible can you provide ur mobile number as I have requirement to do this in Peoplesoft and I would like to talk about this.

  23. Vivek Semwal says:

    Hi,

    When i call the code it gives me error saying “This method can only be used by nonrowset- based method”

  24. Vivek Semwal says:

    Hi,

    When i call the code it gives me error saying “This method can only be used by nonrowset- based method”

  25. Vivek Semwal says:

    Hi,

    The error is nonrowset-based method is gone but now im not able to get result,I have used below wsdl for testing purpose

    http://www.webservicex.net/CurrencyConvertor.asmx?WSDL

    and in my fieldchange event i have put the below code.

    Local SOAPDoc &SOAPDoc;

    Local XmlNode &lnodeEnvNode;

    &SOAPDoc = CreateSOAPDoc();

    &SOAPDoc.AddEnvelope(%SOAP_Custom);

    &lnodeEnvNode = &SOAPDoc.EnvelopeNode;

    &lnodeEnvNode.AddAttribute(“xmlns”, “urn:CURRENCYCONVERTOR”);

    &SOAPDoc.AddBody();

    &SOAPDoc.AddMethod(“ConversionRate”, 1);

    &SOAPDoc.AddParm(“FromCurrency”, “EUR”);

    &SOAPDoc.AddParm(“ToCurrency”, “INR”);

    &lxmlDoc = CreateXmlDoc(&SOAPDoc.GenXmlString());

    &lmsgGoRequest = CreateMessage(Operation.CONVERSIONRATE);

    Z_WRK.RAWXML1.Value = &lxmlDoc.GenXmlString();

    &lmsgGoRequest.SetXmlDoc(&lxmlDoc);

    &lmsgGoResponse = %IntBroker.SyncRequest(&lmsgGoRequest);

    Z_WRK.RAWXML2.Value = &lmsgGoResponse.GenXMLString();

    Can anyone help me what is the issue in this code


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.