Posts

Showing posts with the label ActiveMatrix

Parsing a JSON String and Converting it to XML in TIBCO

Image
If you have the REST & JSON Plug-in for TIBCO BusinessWorks, parsing and rendering a JSON string into XML is a straightforward task. We are often using XML in TIBCO, because XML is the most common format that is used to transform data using XSLT and XPath language. There are two ways we can parse and render JSON text: using an XML Schema, and using Java classes. Of course, XML Schema is already very handy, as we can always easily create one in TIBCO Designer. But, before we go to why we need to use Java classes, we need to examine first the nature of an XML Schema. An XSD describes the XML document in a strictly structured manner, which means that the sequence and nesting of the elements are important. However, for JSON, we cannot rely on the order of the elements, and we cannot force JSON to be that way. It’s just its character, and it maintains itself as an unordered collection of zero or more name/value pairs. That said, we cannot expect a JSON message to conform to the sp...

Specifying Custom Engine Properties in Designer

Image
Specifying custom engine properties in TIBCO Designer can either be done by modifying the designer.tra, or by creating a properties.cfg file. The advantage of the latter is that you don't have to restart TIBCO Designer every time you need to change the value of the property. Also the properties.cfg overrides the value of the engine properties you have specified in designer.tra . You can comment out the property by prepending a hashtag (#) to the property. Before loading and running the process in Designer tester, you need to specify the full file path to your properties.cfg file. Here are some of the common engine properties: #Enabling web service authentication via LDAP java.property.com.tibco.bw.security.login.jaas=true java.property.java.security.auth.login.config=jaas.conf java.property.TIBCO_SECURITY_VENDOR=true java.property.com.entrust.toolkit.security.crypto.random.DRBGusingSHA512=true #Salesforce Connection Forward Proxy Configuration java.property.co...

How to Fix the SSLProtocolException: handshake alert

You might have probably encountered the following error when invoking a web service over HTTPs transport using SoapRequestReply activity. "javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name" This could be a weird error especially if you know that the client certificates are valid, and you have installed the complete certificate chain in your keystore. In order to resolve this, you need to add the following property in the application .TRA file. java.property.jsse.enableSNIExtension=false I don't have an exact explanation for the root cause of this error, but I believe this is brought about by one of the the security enhancements in Java SE 7. "Server Name Indication (SNI) for JSSE client: The Java SE 7 release supports the Server Name Indication (SNI) extension in the JSSE client. SNI is described in RFC4366. This enables TLS clients to connect to virtual servers."

Dynamically Mapping Fields from Salesforce Query Activity Output

Image
While I was working on Salesforce.com integration, the TIBCO BusinessWorks plug-in provides a "Query All" and "Retrieve All" activities to query Salesforce objects. The "Query All" lets you use a SOQL statement freely, while "Retrieve All" only allows you to specify the list of fields and optionally the object IDs. The only filter you can use for the latter are the object IDs, which doesn't seem to be the case most of the time. Both activities have a generic output and are not specific to a particular Salesforce object. It has an "any element" field which you can coerce based on a specified schema and you would need a WSDL file generated from Salesforce to do this. However, the problem starts when Salesforce keeps on updating the WSDL at the same time, so you will need to map the newly added field all the time! The solution I have come up with for this dilemma was not actually quite that simple but it offers more flexibility in th...

Service Oriented Architecture and Service Orchestration

Image
Service-oriented architecture (SOA) is a software design principle which allows an application to be exposed as an independent service that can be accessed and reused by one or more applications. Two applications interact through an interface which defines the message exchange pattern and the service contract in order to establish communication successfully between them. It is a great concept that separates implementation logic from the data definitions and allows modularity of programs that can be treated as “silos”--which means they can be developed separately at the same time without any dependencies. More of it on http://en.wikipedia.org/wiki/Service-oriented_architecture . Service orchestration is a concept closely related to SOA which allows services to be arranged and organized into workflows. It enables independent services to interact and talk to each other to achieve an automated end-to-end process. It is often compared to an orchestra in which different musical instrum...