web service for oracle fusion

19
Managing Policy Object & Custom Login Using WS @Dictu, 11-08-2014

Upload: auddrey

Post on 11-Oct-2015

54 views

Category:

Documents


0 download

DESCRIPTION

Web Service for Oracle Fusion

TRANSCRIPT

  • Managing Policy Object & Custom Login Using WS

    @Dictu, 11-08-2014

  • Agenda

    Webservice (REST) Access Manager Policy Model Creating Policy Object Managing Policy WS Custom Login Implementation using WS RESTful Development

  • Web Service (SOAP)A Web service consumer (such as, a desktop application or a Java Platform, Enterprise Edition client such as a portlet) invokes a Web service by submitting a request in the form of an XML document to a Web service provider. The Web service provider processes the request and returns the result to the Web service consumer in an XML document as shown in the example below.

  • Soap Request

    REST Request

  • RestFull webservice Representational State Transfer (REST) Web services, or "RESTful" Web services.

    Transmits data over a standardized interface (such as HTTP) without an additional messaging layer, such as SOAP.

    Provides a set of design rules for creating stateless services that are viewed as resources, or sources of specific information, and can be identified by their unique URIs.

    A client accesses the resource using the URI, a standardized fixed set of methods, and a representation of the resource is returned. The client is said to transfer state with each new resource representation.

    The five key principles are: Give every thing an ID Link things together Use standard methods Resources with multiple representations Communicate statelessly

  • http://example.com/customers/1234

    http://example.com/orders/20

    http://example.com/products?color=green

    http://example.com/products/4554

    http://example.com/processes/salary-increase-234

    The supported media types are: application/xml application/json text/xml

  • Web Services in Oracle Fusion Middleware 11g

    Interaction between WS Different WS

  • Components of Oracle WSM Architecture

    Understanding WSM Framework

  • Access Manager Policy Model

  • Policy Object

  • /oam/services/rest/11.1.2.0.0/ssa/policyadmin/appdomain/{appdomainID}

    /oam/services/rest/11.1.2.0.0/ssa/policyadmin/tokenissuancepolicy/{ID}

    /oam/services/rest/11.1.2.0.0/ssa/policyadmin/resource

    /oam/services/rest/11.1.2.0.0/ssa/policyadmin/authzpolicy

    /oam/services/rest/11.1.2.0.0/ssa/policyadmin/hostidentifier

    /oam/services/rest/11.1.2.0.0/ssa/policyadmin/resourcetype

    /oam/services/rest/11.1.2.0.0/ssa/policyadmin/authnscheme/{ID}

    /oam/services/rest/11.1.2.0.0/ssa/policyadmin/application.wadl

  • Example of Using Policy Object

    http://docs.oracle.com/cd/E27559_01/dev.1112/e27134/plcyadmn_rest.htm#autoId11

  • Managing Web Service Policieshttp://docs.oracle.com/cd/E23943_01/web.1111/b32511/creating_policies.htm

  • Custom Login (Access Token)curl -i-H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8"--request POST http://host.us.example.com:14100/ms_oauth/oauth2/endpoints/oauthservice/tokens -d 'client_id=54321id &grant_type=client_credentials &client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Asaml2-bearer &client_assertion= &scope=scope1%20scope2'

    Using SAML client AssertionRequest_id

  • Tools

    Soap_UI []

    cURL

  • Develop WS to invoke Policy Object1. Create a Restful Webservice [http://docs.oracle.com/cd/E23943_01/web.1111/e13734/rest.htm#WSADV193]

    2. Generate the Endpoint in either XML or Json

    3. Invoking the rest WS using XML or Json [http://support.sas.com/documentation/cdl/en/wbsvcdg/62759/HTML/default/viewer.htm#n1wblekhip1yrln1fv2s5b6a2d9f.htm]

  • Developing REST with JAX-RS (Server)

    1. Create an Entity Class2. Create JAXB service class for that Entity class3. Create a service class to perform GET, POST, PUT, DELETE operation4. Create Application Config class to register a URL pattern in Jersey to intercept HTTP calls to the service5. Generate Endpoint wsdl and xml file

  • Developing REST with JAX-RS (Client)

    1. Develop Backing Bean class for the Entity2. Create JAX-RS Client class to call GET,PUT, POST, DELETE Method3. Create Controller class to implement the business logic for standered method calling4. Call the client from Soap-UI or cURL5. Use the Endpoint (XML, WSDL, JSON)

  • XSD for RESTfulTwo XML schemas represing RESTful service resources are available for generating client side POJOs:

    For the policyadmin service, oam-policyadmin-11.1.2.0.0.xsd. For the token service, oam-token-11.1.2.0.0.xsd.

  • ReferenceDeveloping Web service for Oracle Fusion MiddlewareProgramming RESTful APIManaging Policy ObjectManaging Web Service PoliciesUsing oAuth Service for Custom Login

    WS Invocation

  • N.B : This was an overview. If any of the section need further explanation, Please let me know I can continue to another Presentation