在Mule中从消息流中剥离非法字符

在Mule中从消息流中剥离非法字符,mule,dataweave,Mule,Dataweave,我遇到过一个问题,源系统中有一个非法字符,当它击中DataWeave transformer时抛出了一个错误。我们已经修复了源系统中的数据,但是我们应该能够在Mule中去除这个非法字符。下面是当它击中DataWeave Transformer时发生的错误。我需要帮助,在如何和在哪里剥离这些“非法”字符 ERROR 2015-11-30 17:46:16,837 [[ServiceNow].HTTP_8081_listener.worker.01] org.mule.exception.Catch

我遇到过一个问题,源系统中有一个非法字符,当它击中DataWeave transformer时抛出了一个错误。我们已经修复了源系统中的数据,但是我们应该能够在Mule中去除这个非法字符。下面是当它击中DataWeave Transformer时发生的错误。我需要帮助,在如何和在哪里剥离这些“非法”字符

ERROR 2015-11-30 17:46:16,837 [[ServiceNow].HTTP_8081_listener.worker.01] org.mule.exception.CatchMessagingExceptionStrategy: 
********************************************************************************
Message               : Illegal character ((CTRL-CHAR, code 25))
 at [row,col {unknown-source}]: [1,916] (com.ctc.wstx.exc.WstxUnexpectedCharException). Message payload is of type: WeaveMessageProcessor$WeaveOutputHandler
Type                  : org.mule.api.MessagingException
Code                  : MULE_ERROR--2
JavaDoc               : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html
Payload               : com.mulesoft.weave.mule.WeaveMessageProcessor$WeaveOutputHandler@692ffd69
********************************************************************************
Exception stack is:
1. Illegal character ((CTRL-CHAR, code 25))
 at [row,col {unknown-source}]: [1,916] (com.ctc.wstx.exc.WstxUnexpectedCharException)
  com.ctc.wstx.sr.StreamScanner:674 (null)
2. Illegal character ((CTRL-CHAR, code 25))
 at [row,col {unknown-source}]: [1,916] (com.ctc.wstx.exc.WstxUnexpectedCharException). Message payload is of type: WeaveMessageProcessor$WeaveOutputHandler (org.mule.api.MessagingException)
  org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
********************************************************************************

流需要有效的SOAP消息。如果消息无效,那么您所做的就是正确的解决方案:修复源系统。仅删除字符并不意味着消息有意义。

创建了自定义类以从消息中删除非法字符。

不幸的是,消息是有效的,但其中一个属性中存在非法ascii字符。XML标准指定了如何对字符进行编码。如果消息不符合标准,则消息无效。