SOAP Trace Reading Basics

  • 7020676
  • 17-Feb-2015
  • 07-Aug-2017

Environment


Retain
GroupWise
Exchange
SOAP Traces

Situation

My customer sent me a SOAP trace because they are getting archive errors and there are insufficient details in the Retain Worker log to determine what is happening.  How do I read the SOAP trace?

Resolution


The SOAP conversation between Retain and the messaging system (Exchange or GroupWise) is done through XML.  When looking at a SOAP trace, you will see XML tags surrounding key information (e.g., message subject).  You see XML tags in the /opt/beginfinite/retain/RetainServer/WEB-INF/cfg/ASConfig.cfg as well.  It is not as intimidating as it might seem.
Preparation

Before you can effectively find what you are looking for, it's best to do some preparatory work on the file after pulling it into a text editor.  There are several varieties of text editors, but the most useful ones have certain features:
  • Ability to read large files (1 - 2G).
  • Ability to do block select (to select columns and not entire rows of text).
  • Ability to search using regular expressions.

This author likes using TextPad for that reason, but there are others.

First thing to do after opening the file into your text editor of choice is remove the first two columns of information.  These columns break up the SOAP text and can make it almost impossible to find what you are looking for.  For example, if I'm looking for, "the brown dog chased after the white cat", part of that text could be on one line and the other on another.  In such cases, my search would not return any results.  So we first want to convert the trace into one contiguous text, which means it will ALL be in ONE line.

1.  Enable Block Select Mode in your editor.  In TextPad, this is under the Configure menu.

2.  Highlight the first two columns, including the what space between column 2 and the text of the trace as shown above. 
3.  Delete the blocked columns.

4.  Now you want to use a regular expression search.  You'll be looking for the "escape character" for a new line and replacing it with nothing, which removes the "new line" character.  Now everything will be on one line.
a.  In your editor, invoke a search and replace (in TextPad, this is invoked by hitting F8).

b.  Enable a regular expression search condition.

c.  In the "Find what" field, type "\n" (backslash followed by the letter "n").  This is the escape character for a "new line".

d.  Click on Replace All or similar button in your text editor.  Everything will be placed on a single line if you've done this correctly.
If the \n does not produce any results, it could be that you are not using TextPad.  That's ok, it just means your editor is interpreting the "new line" character differently.  It might be interpreting it as a carriage return.  If that's the case, try \r.
5.  Turn on word wrap so that you can see all of the text.  Now you are ready to perform searches.

Structure


Just like HTML tags, XML tags have a begin tag and and end tag for every piece of organized information.  So, for the message subject, you'll see <gwt:subject>this is the message subject</gwt:subject>.  You'll also notice that each tag begins with "gwt:" 

So, if I know the exact subject of a message, I could search for "</gwt:subject>this is the message subject" and I can be assured of finding what I'm looking for.  I could even look for the string "subject>this is the message subject" or "this is the message subject"; although, the more specific the string, the less chances of hits that do not match.

Additional Information

This article was originally published in the GWAVA knowledgebase as article ID 2467.