Printing all the HTTP request in TIBCO BW 6

Usually when you are working with Process that are invoked using HTTP (you can use SOAP or REST services ) it is needed to see the actual request you are getting. Specially to do some troubleshooting and to verify if the request was defined as expected.

As you probably know, in this new release the logging technology used has changed to the newer logback library (Logback it is the new library from the creator of the Log4J library) and we already talked about it.

If you want to do it on your own computer when you are doing testing that’s so easy because as I explained in the previous post you have your logback.xml to do it, but what about when the service is already deployed? Ok. step by step.

First of all, you have to access to the log configuration file related to the AppNode where the services is deployed and the location should be something like this:

<TIBCO_HOME>/domains/<DOMAIN_NAME>/appnodes/<APPSPACE_NAME>/<APPNODE_NAME>

/opt/tibco/bw/bw/6.3/domains/NewDomain/appnodes/NewAppSpace/NewAppNode

And now you have to modify your logback.xml file to add the following logger configuration:

<!-- SOAP Binding logger -->
 <logger name="com.tibco.bw.binding.soap">
 <level value="DEBUG"/>
 </logger>
<!-- REST Binding logger -->
 <logger name="com.tibco.bw.binding.rest">
 <level value="DEBUG"/>
 </logger>

And then, you have to wait about 30 seconds to see the new configuration in your system. This wait time is configured on the system. You can change it using this property: scanPeriod inside the logback.xml on the configuration root tag:

<configuration scan="true" scanPeriod="10 seconds">

And then if you launch a new request you are going to get a output similar to this:

2016-02-28 12:33:59.208 DEBUG [bwResourceHTTPConnector.qtp-141] com.tibco.bw.binding.soap - Incoming Soap Message on Service Binding
 2016-02-28 12:34:00.259 DEBUG [bwResourceHTTPConnector.qtp-141] com.tibco.bw.binding.soap - <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.example.org/schema/1456654694067">
 <soapenv:Body>
 <ns:operationRequest>
 <in>out</in>
 </ns:operationRequest>
 </soapenv:Body>
 </soapenv:Envelope>
 2016-02-28 12:34:00.279 DEBUG [bwEngThread:In-Memory Process Worker-5] com.tibco.bw.binding.soap - Service Reply Message

If you want to print also your internal request you could also add the “httpclient.wire” logger with a INFO o DEBUG level.

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