Writing a Web Service that an Oracle Sales Cloud Application Can Access

A service that enforces message protection and SAML-based authentication for inbound web service requests on Java Cloud Service - SaaS Extension will publish a Web Service Descriptor Language (WSDL) document that an Oracle Sales Cloud application can consume.

To write a Web Service that an Oracle Sales Cloud application can access, you need to:
  1. Create a client .java application; for example, helloWorld.java.
  2. Use the @SecurityPolicy annotation to attach the security policy you want to invoke; for example, the following snippet uses the SAML security policy oracle/wss11_saml_or_username_token_with_message_protection_service_policy, supported by Oracle Sales Cloud that enforces message protection (integrity and confidentiality) and SAML-based authentication for inbound web service requests in accordance with the WS-Security 1.1 standard:
    package oracle.jcs.ws.sample.saml;
    
    import javax.jws.WebService;
    
    import weblogic.wsee.jws.jaxws.owsm.SecurityPolicy;
    
        @WebService
        @SecurityPolicy(uri = "oracle/wss11_saml_or_username_token_with_message_protection_service_policy")
        public class HelloWorld {
            public HelloWorld() {
                super();
            }
    
            public String hello(String name) {
                return ("Hello " + name + ". The saml authentication worked!");
            }
        }
    .

    For additional information on security policies, see Securing JAX-WS Web Services.

  3. Package your application into a WAR file and deploy it to Java Cloud Service - SaaS Extension:
    1. In the Oracle Java Cloud Service - SaaS Extension Control page, click Deploy. The Deploy Application page appears.
    2. Enter a name for the application you are deploying, and then click Browse to search your local file steam for the application archive to be deployed. After locating the archive, click Deploy Application.