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

Comments:

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.

Posted by sarath on May 03, 2014 at 04:42 AM PDT #

The same question was posted on this forum thread:
https://community.oracle.com/thread/2602439
lets track this issue there.

Posted by Jani Rautiainen on May 05, 2014 at 02:13 AM PDT #

Hi Is there any update to this issue?

Posted by indhumathi on June 23, 2014 at 10:16 PM PDT #

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

Posted by Jani Rautiainen on June 23, 2014 at 10:50 PM PDT #

Hi,

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

Thanks

Posted by guest on December 17, 2014 at 06:55 AM PST #

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

Posted by Jani Rautiainen on December 18, 2014 at 12:17 AM PST #

Excellent, thanks for the quick reply.

Posted by david baxter on December 18, 2014 at 12:50 AM PST #

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..

Posted by Jani Rautiainen on December 18, 2014 at 01:03 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow us on twitter Fusion Applications Extensibility, Customizations and Integration forum Fusion Applications Dev Relations YouTube Channel
This blog offers news, tips and information for developers building extensions, customizations and integrations for Oracle Fusion Applications.

Search

Categories
Archives
« March 2015
SunMonTueWedThuFriSat
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
    
       
Today