Friday, March 8, 2013

Generate Webservice / deploy / redeploy buttons not visible in Oracle E Business Suite (EBS)

Oracle E-Business Suite Integrated SOA Gateway (ISG) provides robust communication and Infrastructure for Integration with E-Business Suite (EBS) Applications. Oracle E-Business Suite Integrated SOA Gateway is build on top of Oracle Fusion Middleware & Service Oriented Architecture (SOA) technology.

As a Integration Architect / Designer you will require to route your integration requests through Integrated SOA gateway to EBS for more standardize Integratiion approch. Oracle provide all Integration Interfaces detail at common location that is Integration Repository. You can create web service for supported Interface types using Integration repository. However to generate web services for respective Interface type you have to have appropriate roles and responsibilities assigned to your user.

Integrated SOA Gateway implements Role Based Access Control security for secure access to Interfaces.There are 3 different roles to provide different access to Integrated SOA Gateway.

  • Integration Repository Administrator
  • System Integration Developer
  • System Integration Analyst
Below table show each role and access to the features for respective roles. This roles have to be manually assigned to each user when required except for SYSADMIN.



This is most common issue while performing EBS Integration. You have to follow below steps for assigning appropriate role to the user and then user should be able see Generate WSDL button or SOA provider section is web services are already generated.

Option 1 :

user SYSADMIN user which is by default having appropriate roles assigned and you should be able to see Generate WSDL buttion.

Option 2:
Get the appropriate role assigned by requesting your system administrator. Below are the steps system Administrator need to follow to assign correct role for the user. So that user can have access to Generate WSDL / deploy / redeploy access.

1. Log into Oracle Applications using sysadmin/.
2. Select the User Management responsibility in the Navigator.
3. Click the Users link from the navigation menu to open the User Maintenance window.
4. Locate the user trying to use.
5. Assign the role and select the "Irep Administrator" role.
6. Bounce the middle tier because after assigning roles they don't take affect unless the cache is cleared and bounce middle tier.
7. Now log in as the user and access the " Integrated SOA Gateway" responsibility ->Integration Repository and should see the Generate WSDL button

Tuesday, May 22, 2012

How to write & Configuring JSON web service for Apache Axis2


Recently I was working on one of the project where there was requirement of implementing the Axis2 Web service with JSON support. Here I have used Apache Tomcat 7.0 Web Server for configuration. During initial phase I have gone through the documentation provided on Apache site for JSON Support and thought it would be easy to implement as we can write any POJO service first and that SOAP Service can be exposed as JSON Web Service.However it was not so simple as there were issues in the library used ie. Jettison. This library requires patch to support functionality.

JSON stands for Java Script Object Notation. And it is data exchange format similar to XML. JSON is very light weight and becoming popular these days.It defines data in key value pair as we are doing in case of Properties file however here we maintain parent child relationship as well. You can find more information on this on JSON website.

As this article is written on how to configure JSON with Apache Axis2 on Tomcat 7.0. Below details cover only technical information on how to configure JSON and writing JSON Web Service.

For this article I am using Tomcat version 7.0.26 and it has been installed Red hat 5.6.Axis2 is installed and configure as explain in Apache's Axis2 Website. 

Tomcat Installation directory is : /usr/share/apache-tomcat-7.0.26/
Axis2 Installation directory : /usr/share/apache-tomcat-7.0.26/webapps


JSON Configuration changes on Tomcat 7.0

  1. Download Dynamic Response Handler and copy it to  /usr/share/apache-tomcat-7.0.26/webapps/axis2/WEB-INF/modules    
  2. \Go to /usr/share/apache-tomcat-7.0.26/webapps/axis2/WEB-INF/lib and rename jettison-1.0-RC2.jar Using below command         mv jettison-1.0-RC2.jar jettison-1.0-RC2.jar.bak  
  3.  Provide update jettison jar file. Copy patched jettison-1.2-patched.jar to /usr/share/apache-tomcat-7.0.26/webapps/axis2/WEB-INF/lib location & restart tomcat
  4. Modify axi2.xml at location /usr/share/apache-tomcat-7.0.26/webapps/axis2/WEB-INF/conf Add following Message Formatters and Message Builders.



    <messageFormatter contentType="application/json" 
    
                              class="org.apache.axis2.json.JSONMessageFormatter"/>
    
             <messageFormatter contentType="application/json/badgerfish"
    
                              class="org.apache.axis2.json.JSONBadgerfishMessageFormatter"/>
    
            <!--<messageFormatter contentType="text/javascript" 
    
                             class="org.apache.axis2.json.JSONMessageFormatter"/> -->
    <messageBuilder contentType="application/json"
                                     class="org.apache.axis2.json.JSONOMBuilder"/>
      <messageBuilder contentType="application/json/badgerfish"
                                     class="org.apache.axis2.json.JSONBadgerfishOMBuilder"/>
      <!--<messageBuilder contentType="text/javascript"    
            class="org.apache.axis2.json.JSONOMBuilder"/>-->
    
    

    5. When we are performing conversion from XML to JSON and viceversa. There are two convention that we follow. which are mentioned above.
    - Mapped Convention
    - Badgerfish Convention

    Below is the example on how xml can be converted to JSON string for both the conventions which taken from Apache website

    XML If we use the namespace mapping as http://foo.com -> foo
    <xsl:root xmlns:xsl="http://foo.com"><data>my json string</data></xsl:root>


    Equivalent JSON (Mapped Convention)
    {"foo.root":{"data":"my json string"}}

    Equivalent JSON (Badgerfish Convention)
    {"xsl:root":{"@xmlns":{"xsl":"http://foo.com"},"data":{"$":"my json string"}}}


    Now you can simple develop your any web service application and can communicate with that service using JSON.

    6. You can simply create Hello World application to echo request message. and call that HelloWorld service as below get the response in JSON format.

    Mapped Convention : Http://localhost:8080/axis2/services/HelloWorldService/echoMethod/response=application/json

    Badgerfish Convention: Http://localhost:8080/axis2/services/HelloWorldService/echoMethod/response=application/json/
    7. And while sending a request to JSON service content-type should be set to application/json.

    I have not included the steps here to create POJO Service, this is very well documented on Apache website.

    Reference sites :
    http://jettison.codehaus.org/
    http://axis.apache.org/axis2/java/core/docs/json_support.html
    http://www.marcusschiesser.de/2009/01/building-a-json-web-service-with-java-and-axis2/