Tracing SOAP and HTTP exchanges in TIBCO BW

In this first ‘real’ post we are about to discuss the way we can apply a trace to any soap and http request we have in our TIBCO BW processes. This is a very important feature you must learn because is one of the main actions of an integration tool, because the SOAP and HTTP request is the main transport for WebService invocation.

You have many option to know the input and output of a HTTP and SOAP request activity, but the impact of every of the options differs so you must know before you choose which method you should use:

  • Using an Inspector Activity: In the General Activties tab you have an Inspector Activity which allows you to dump the output of any activity inside your process. The main disadvantage is you have to modify your process to include this new activity inside your process. The main advatage is you can dump the only activties you want:

Inspector

  • Using “custom approch”: You can simulate and customize the working of the Inspector Activity using the Write file activity, and generate the body using the built-in function tib:render-xml to generate the XML from an output activity.

Both of the approaches we have discussed for now need to modify the process so you can introduce new activities, this is a problem in so many cases. First of all because if you need to modify the process for debug, you are not ‘debugging’ the same process you want to, because when you modified the process is not the same. Also, this is a problem if you are doing some kind of test in a production or semi-production environment so you don’t have access to a designer tool.

Because of this, we are about to introduce the best way you can get the HTTP and SOAP exchange without modifying the process. This is using the properties configuration variables you can pass to the bwengine or if you are testing in the Designer tool using the properties menu:

properties

Another day we are to look deeper at all the configuration you can supply here to modify the working of the bw engine and the process executed by it. For now, we are only discuss about this property:

For enabled the soap debugging you have this options:

java.property.com.tibco.plugin.soap.trace.inbound=true
java.property.com.tibco.plugin.soap.trace.outbound=true
java.property.com.tibco.plugin.soap.trace.filename=C:/soap.txt
java.property.com.tibco.plugin.soap.trace.pretty=true
java.property.com.tibco.plugin.soap.trace.stdout=true

You can add theese properties directly to the TRA file, (bwengine.tra or designer.tra), but remember to delete it when you don’t need it, because this kind of options have an inpact to the performance of your process.

If you want to do the same to your HTTP exchanges you have the problem there is no custom properties for HTTP similar to SOAP so you must enable, the debugging features of the bwengine. You must add these properties to your configuration file:

Trace.Startup=true
Trace.JC.*=true
Trace.Engine=true
Trace.Debug.*=true
bw.plugin.http.server.debug=true

And with these properties file, you can see the contains of the HTTP request as you can see here:

OUTPUT

I hope you can use these information in your new developments! See you in the next post!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s