X

It's All About the Platform.

  • March 31, 2014

Integrating With Fusion Application Using Services (SoapUi)

Fusion Applications provides Web services that allow external systems to integrate with Fusion Applications. There are two types of services: ADF services and composite services. ADF services are created for a logical business object and provide functionality to access and manipulate these objects. The composite services are mostly process oriented and provide an orchestration of multiple steps.

Information about the web services provided by Fusion Applications is hosted in Oracle Enterprise Repository (OER). The information provided by OER can be used to understand the functionality provided by the service and how the service can be called.

This series of articles describes how one can invoke SOAP web services provided by Fusion Applications using various technologies. In this article we will cover how to invoke a Fusion Application web service using SoapUI.

Prerequisites

SoapUi

The reader is expected to have SoapUI installed.

Fusion Applications Web Service Policy

This example covers a call to a web service that support user name tokens and does not require message protection. The example was tested with a service using "wss_saml_or_username_token_service_policy". The policy supported by the service can be checked from the WSDL file for the service:

Future article will cover an example for a service that uses message protection.

Implementing Web Service Call

SoapUI is useful tool for Web Service development, in this article we will use the tool to invoke a call to a Fusion Applications Web Service. First we create a SaopUi project by navigating "File -> New Soap Project":




The project name can be anything, it does not impact the Web Service call. For the "Initial WSDL" field enter the location of the WSDL for the service to be called, in this example we will use the "WorkerService" for HCM. The "Create Requests" checkbox is checked to generate a example SOAP Envelope. Click OK and once the tool is done with the generation navigate to the operation to be invoked, in this case we will invoke the "findWorker"operation:



Double click the "Request1" and you will be presented with the UI to submit requests:


The content of the request is generated by the tool to provide an example of the SOAP envelope to be used. Our task is to populate the SOAP envelope with appropriate data for our call. In this example we want to "query" details of an employee based on an employee number. To authenticate we first need to construct the header that will be used to pass the user name and credentials. The header will be something like (replace the username and password with valid values):

    <wsse:Security soapenv:mustUnderstand="1" 
      xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <wsse:Username>username</wsse:Username>
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
        <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">jwCzGGijT90Wml6eZe4cxg==</wsse:Nonce>
        <wsu:Created>2012-07-04T06:49:48.981Z</wsu:Created>
      </wsse:UsernameToken>
    </wsse:Security> 
So the complete envelope for "querying" employee with employee number "37851" would be:
<soapenv:Envelope 
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"   
  xmlns:typ="http://xmlns.oracle.com/apps/hcm/employment/core/workerService/types/"
  xmlns:typ1="http://xmlns.oracle.com/adf/svc/types/">
  <soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1"
      xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <wsse:Username>username</wsse:Username>
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
        <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">jwCzGGijT90Wml6eZe4cxg==</wsse:Nonce>
        <wsu:Created>2012-07-04T06:49:48.981Z</wsu:Created>
      </wsse:UsernameToken>
    </wsse:Security> 
  </soapenv:Header>
   <soapenv:Body>
      <typ:findWorker>
         <typ:findCriteria>
            <typ1:fetchStart>0</typ1:fetchStart>
            <typ1:fetchSize>1</typ1:fetchSize>
            <typ1:filter>
               <typ1:conjunction>And</typ1:conjunction>
               <typ1:group>
                  <typ1:conjunction>And</typ1:conjunction>
                  <typ1:upperCaseCompare>false</typ1:upperCaseCompare>
                  <typ1:item>
                     <typ1:conjunction>And</typ1:conjunction>
                     <typ1:upperCaseCompare>false</typ1:upperCaseCompare>
                     <typ1:attribute>PersonNumber</typ1:attribute>
                     <typ1:operator>=</typ1:operator>
                     <typ1:value>37851</typ1:value>
                  </typ1:item>
               </typ1:group>
            </typ1:filter>
         </typ:findCriteria>
      </typ:findWorker>
   </soapenv:Body>
</soapenv:Envelope>

Copy the SOAP envelope to the request and execute the call by clicking the green triangle and the response from the service would be:


Summary

In this article we covered an example using SoapUI to integrate with Fusion Applications using web services. In future articles other technologies for invoking Fusion Applications web services will be covered.

References

Join the discussion

Comments ( 12 )
  • sarath Saturday, May 3, 2014

    I tried above from soapui, but i got

    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

    <env:Header/>

    <env:Body>

    <env:Fault xmlns:ns0="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

    <faultcode>ns0:FailedCheck</faultcode>

    <faultstring>FailedCheck : failure in security check</faultstring>

    <faultactor/>

    </env:Fault>

    </env:Body>

    </env:Envelope>

    I check server logs to find, that

    we need to have ssl setup for accessing webservice with username.

    instead of username, i tried adding encryption,signature based on keystore details, but observed below issue.

    Caused by: oracle.wsm.security.SecurityException: WSM-00346 : There is no matching assertion found in the service side policy which can process the incoming message. Ensure that there is a compatible policy attached at the client side. Tokens found in the security header are:- [(wsse:BinarySecurityToken), (xenc:EncryptedKey), (wsse:BinarySecurityToken), (ds:Signature), (wsu:Timestamp), ]. Authentication mechanism found in the HTTP header:- null. The assertions found in the service side policy are:- Http over SSL Security ,WSSecurity Saml Token With Confirmation method Bearer Over SSL ,Http JWT Security ,WSSecurity UserName Token Over SSL ,WS-Security 1.1 Saml with certificates ,WS-Security 1.1 username with certificates .

    So we need to send the policy "wss11_saml_or_username_token_with_message_protection_service_policy" as part of header, i am stuck at this point,

    If you found the solution, please share.


  • Jani Rautiainen Monday, May 5, 2014

    The same question was posted on this forum thread:

    https://community.oracle.com/thread/2602439

    lets track this issue there.


  • indhumathi Tuesday, June 24, 2014

    Hi Is there any update to this issue?


  • Jani Rautiainen Tuesday, June 24, 2014

    See the forum link above for details on the issue and the resolution


  • guest Wednesday, December 17, 2014

    Hi,

    Where are the valid conjunctions, operators and attributes for FIND web services documented?

    Thanks


  • Jani Rautiainen Thursday, December 18, 2014

    If I understood correctly you are asking details on how to use the "findCriteria" element, assuming so please refer to this document:

    http://docs.oracle.com/cloud/farel8/salescs_gs/OCGWS/pebo-services.htm#CHDEBFFD


  • david baxter Thursday, December 18, 2014

    Excellent, thanks for the quick reply.


  • Jani Rautiainen Thursday, December 18, 2014

    No problem. Btw we have a "Customizations, Extensions and Integrations" forum available at:

    https://community.oracle.com/community/oracle-applications/fusion_applications/customizations__extensions_and_integrations/content

    which may be better suited for generic questions as the audience is wider and answers will likely be faster. The comments on this blog post are only monitored by me so for example last week I was traveling and there would have been a delay..


  • guest Tuesday, June 16, 2015

    when I am trying to access the Fusion WSDL using SOAP UI it gives me an error saying

    Error loading [https://XX.XX.XX.oraclecloud.com/egpItems/ItemServiceV2?WSDL]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: does not close tag

    Can you advise?


  • Jani Rautiainen Tuesday, June 16, 2015

    I just tried in our instance it I cannot reproduce your issue, rather I can create the project and make a call successfully, tried with the ItemServiceV2.findItem. Are you accessing the WSDL through a proxy ? Whats the version of SOAP UI (mine is 4.6.3) ?

    Also it might be easier to triage the issue on the forum:

    https://community.oracle.com/community/oracle-applications/fusion_applications/customizations__extensions_and_integrations/content

    where there is no approval process for comments and likely wider audience.

    --

    Jani Rautiainen

    Fusion Applications Developer Relations

    https://blogs.oracle.com/fadevrel/


  • guest Wednesday, October 28, 2015

    Hi

    Do you have an article with an example for wss11_saml_or_username_token_with_message_protection_service_policy

    Thank you.

    Sai


  • Jani Rautiainen Wednesday, October 28, 2015
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.