Skip navigation.

Angelo Santagata

Syndicate content
Architect & Technology Evangelist - If its middleware I'm interested
Updated: 5 hours 4 min ago

Deploying JAXWS to JCS?? Getting "java.lang.ClassNotFoundException: org.apache.xalan.processor.TransformerFactoryImpl" error

Thu, 2014-04-17 06:21

Hey all,

  • Problem
  • The issue
    • Its a bug on Java Cloud Server (bug#18241690), basically JCS is picking up the wrong XSL transformer
  •  Solution
    • In your code simply put the following piece of java code to execute when your application starts up


 And all should be fine :-)

How to restrict data coming back from a SOAP Call

Thu, 2014-04-10 09:51

In sales cloud a big positive of the SOAP interface is that lots of related data is returned by issuing a single query, including master-detail data (ie multiple email addresses in contacts) however these payloads can be very very large, e.g. In my system querying single person you get 305 Lines(!), whereas I only want the firstName,LastName and partyId which is 3 lines per record..


For each findCriteria element you can add multiple <findAttribute> element indicating what elements you want to return. By default if you provide <findAttribute> entries then only those attributes are returned, and this functionality can be reversed by setting the <excludeAttributes> to true.

Example 1 :  only retrieving PersonLastName,PersonFirstName,PartyId

<soapenv:Envelope xmlns:soapenv="" xmlns:typ="" xmlns:typ1="">




         <typ:findCriteria xsi:type="typ1:FindCriteria" xmlns:xsi="">












findAttributes work on the level1 attributes of that findCriteria, the value can be a attribute or an element

If you want to restrict SubElements you can use childFindCriterias for that subelement and then add findAttributes within that

Example 2 :  Only Retrieving PartyId, and within Email element only EmailAddress     

<soapenv:Envelope xmlns:soapenv="" xmlns:typ="" xmlns:typ1="">







         <typ:findCriteria xsi:type="typ1:FindCriteria" xmlns:xsi="">


















For a childFindCriteria to work you must query it in the parent, which is why “Email” is referenced in a findAttribute on line 14

Passing data between apps using URL Query parameters???

Thu, 2014-03-27 05:12

If so then you need to be careful about private data.. It can be secure but remember security is only as good as the weakest link.. This article is a nice summary of what's possible , whats secure and what isnt....

Developing apps in the cloud? Then you need docs

Mon, 2014-03-03 15:19

Over the last couple of months I've been busy working with our documentation people helping them build a set of documentation aimed at partners, specifically around the topic of technical integration with Oracle Sales Cloud. The aim here is to convey our knowledge, and experience of working with partners and come up with some documentation detailing the various use-cases and specifically how it can be implemented.. technically...

All of these documents are now available on and specifically the doc I contributed to is the Sales Cloud Use Cases Implementation.

However note that in true Cloud style, this is only the first set of docs in a much larger collection of documents which we [Oracle] are planning to release.

Stay tuned and if you have any suggestions for future doc topics let me know!

SOA Community Event

Fri, 2014-02-21 02:34

Im at the Fusion Middleware Community Event today in Malta, about 3pm I'll be presenting "Mobile Design Patterns for Apps Integration". 

I'll be posting the powerpoint here later, but if your around, say hello, if your not around Id be curious to hear your own design patterns. 

Inserting a interaction into Sales Cloud using Java

Mon, 2014-02-10 12:47

Hey all,

Quick snippet of code showing how to create an interaction for an opportunity using Java.

This is only a snippet, I assume/note :

  • You've already created a Web-service proxy for the Interaction Service  (ie http://host/appCmmnCompInteractions/InteractionService) and added it to the project dependencie
  • You've tested a simple getInteraction() works fine
  • If you run standalone Java client, then make sure you import the Sales Cloud certificates into your keystore
  • If you run this as within Weblogic Server then the step of importing the Sales Cloud certificates isn't require
  • Tested and works on Sales Cloud R7
  • XML Payload is shown at the end
  • This is sample code



package oracle.fusion.pts.samples.clients;


import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Map;

import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;

import oracle.pts.fusion.samples.interaction.InteractionService;
import oracle.pts.fusion.samples.interaction.InteractionService_Service;
import oracle.pts.fusion.samples.interaction.ServiceException;

import weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature;

public class createInteraction {

    //Define the security policy
    private static final SecurityPolicyFeature[] securityFeature =
        new SecurityPolicyFeature[] { new SecurityPolicyFeature("oracle/wss_username_token_over_ssl_client_policy") };

    private static final AddressingVersion WS_ADDR_VER = AddressingVersion.W3C;

    public static void main(String[] args) {
        // Default Values
        String username = "matt.hooper";
        String password = "somepassword";
        String url="https://yourhost:443/appCmmnCompInteractions/InteractionService";
        // Sample data, in a real system these would be either parameters to the function or queried as part of the code
        Long participantPartyId = new Long("100000000099058");
        String opportunityId="300000000667205";
        Long customerId= new Long("300000000592745");
        // Setup the webservice interface
        InteractionService_Service interactionService_Service = new InteractionService_Service();
        InteractionService interactionService = interactionService_Service.getInteractionServiceSoapHttpPort(securityFeature);
        // Get the request context to set the outgoing addressing properties
        WSBindingProvider wsbp = (WSBindingProvider)interactionService;
        Map<String, Object> requestContext = wsbp.getRequestContext();
        requestContext.put(WSBindingProvider.USERNAME_PROPERTY, username);
        requestContext.put(WSBindingProvider.PASSWORD_PROPERTY, password);
        requestContext.put(WSBindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);

        System.out.println("Example of creating an interaction on a opportunity");
        // Create Payload        
        ObjectFactory factory = new ObjectFactory();
        Interaction newInteraction=factory.createInteraction();
        // Create XMLGregorianCalendar Object with todays date/time
        DatatypeFactory dtf=null;
        Date today= new Date();
        try {
            dtf = DatatypeFactory.newInstance();
        } catch (DatatypeConfigurationException e) {
            e.printStackTrace(); // Duh error
        GregorianCalendar gc=new GregorianCalendar();
        // Set Date
        newInteraction.setCustomerId(customerId);   // CustomerId can be obtained from TargetPartyId from the opportunity
        newInteraction.setInteractionDescription(factory.createInteractionInteractionDescription("Angelos Test Interaction "+today.toString()));        
        newInteraction.setOutcomeCode(factory.createInteractionOutcomeCode("SUCCESSFUL"));  // Configured in Setup/maintenance
        newInteraction.setInteractionTypeCode("EMAIL");         // Custom types can be configured
        newInteraction.setDirectionCode("INBOUND");             // INBOUND or OUTBOUND
        newInteraction.setMediaItemId(0L);                      // Default =0 
        newInteraction.setMediaTypeCode(factory.createInteractionMediaTypeCode(""));// Leave Empty
        // Create & Add Participant, can be RESOURCE and/or CONTACT        
        InteractionParticipant participant= factory.createInteractionParticipant();
        // Create  & Add Association, this links it back to Opportunity
        InteractionAssociation association = factory.createInteractionAssociation();
        // Do the insert
        Interaction result=null;
        try {
            result = interactionService.createInteraction(newInteraction);
        } catch (ServiceException e) {
        System.out.println("end - interaction "+result.getInteractionId()+" created");



 <soapenv:Envelope xmlns:soapenv="" xmlns:typ="" xmlns:int="">
            <int:InteractionEndDate xsi:nil="true" xmlns:xsi=""/>
<!-- CustomerID= SalesParty Customer, also known as TargetPartyId in Opportunity -->
            <int:InteractionDescription>CTI Detected customer callback </int:InteractionDescription>
<!-- InteractionTypeCode is part of the standard Lookup types -->
            <int:MediaTypeCode xsi:nil="true" xmlns:xsi=""/>
<!-- ParticipantId is partyID for contact -->
<!-- AssociatedObjectUid is OPPORTUNITY you want to assocaite this with -->


More complete RESTful Services for Oracle Sales Cloud Sample/Demo Application

Mon, 2014-01-13 12:49

This sample code builds on the previous code examples in my blog showing how you can create a RESTful Facade for Oracle Sales Cloud. Specifically this example concentrates on the six main objects people tend to work with :

  • Opportunities
  • Leads
  • Locations
  • SalesParty
  • Person
  • Interactions

This application is an extension of a previous blog article, it is recommended that this article, and tutorial, are followed first. 

Please note this code is SAMPLEWARE and delivered with no guarantees, warranties or  support Functionality / Features
  • Supports Oracle Sales Cloud Release 7 and JDeveloper
  • Ability to query data in a RESTFul way (using GET/PUT verbs)
  • Data can be queried using JSON or XML data formats
  • URIs can contain parameters which reduce the amount of data which is returned , e.g. only bring back Opportunity IDs and Names
  • URI can contain SIMPLE queries, e.g. where OptyID=12323232
  • Complex queries can be passed in as a POST query when the URI ends in /xmlquery
  • User Credentials, CRM Server, FetchSize and FetchStart can be provided in httpHeaders, thus can be encrypted by SSL
  • Default Server can be setup so that credentials are not needed
  • Project can be extended to cover other objects

  • Read only is implemented, if you want to issue writes (PUTS) or updates then I recommend custom methods for each operation you require.
  • In the future Oracle Sales Cloud will likely have support REST support natively; This software will work fine against future versions of Oracle Sales Cloud but you are probably better off using the native Oracle Sales Cloud REST support when it 


New Book on Fusion Apps Development & Extensibility

Mon, 2014-01-06 10:46

If your doing anything with Oracle Fusion Apps, you really ought to read this newly released book. Its a great start, but just beware that some of the content isn't applicable to the "Cloud" variants of Fusion Apps, BUT it really helps to know how it works under the covers.. 

Its available on OReily Safari,  or you can also purchase the book on sites like Amazon

Using EL Expressions in Fusion Applications

Mon, 2014-01-06 10:11

Hey all,

Happy New Year!

If your using FusionApps, and are wondering what can you modify on the screen, its worth checking out this video. It demonstrates the usage of EL to hide/show fields based on values on the screen.