[jboss-user] [JBossWS] - Re: How Do I See the XML?

joshlam do-not-reply at jboss.com
Fri Mar 30 14:02:23 EDT 2007


You can try something like:


  | public boolean handleMessage(SOAPMessageContext ctx)
  | {
  | 	boolean outbound= ((Boolean)ctx.get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY)).booleanValue();
  | 		SOAPMessage m = ctx.getMessage();
  | 		ByteArrayOutputStream bo = new ByteArrayOutputStream();
  |                 try
  | 		{
  | 			if (outbound) 
  | 			{
  | 			   
  | 			    m.writeTo(bo);
  | 				System.out.println("Outbound: "+bo.toString());
  | 			} 
  | 			else // inbound
  | 			{
  | 			   
  | 			    m.writeTo(bo);
  | 				System.out.println("Inbound: "+bo.toString());
  | 			}
  | 		}
  | 		catch (SOAPException e)
  | 		{
  | 			e.printStackTrace();
  | 			return false;
  | 		}
  | 		catch (IOException e)
  | 		{
  | 			e.printStackTrace();
  | 			return false;
  | 		} 
  | 
  | 		return true;
  | 	}
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033308#4033308

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033308



More information about the jboss-user mailing list