This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
First of all, I do not think you can disable the kind of rewriting of characters such as '>' and '<' in XML data that you are talking about.
Second, I do not see anything wrong with the '>' character being replaced in your string, since the string in question is the value of an attribute, namely the query attribute.
Finally, I would like to see a complete SOAP message that you are trying to create in order to be able to give further advise - I suspect that you are trying to do something that perhaps can be done in a better way.