Tag: transform

如何解决消息有效负载的类型为:BufferInputStream Mule中的exception

我已经转换为字节数组但我不断收到此错误: ERROR 2015-02-25 11:12:30,517 [[ESR].HTTP_Request_Listener.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : Response code 400 mapped as failure. Message payload is of type: BufferInputStream Code : MULE_ERROR–2 ——————————————————————————– Exception stack is: 1. Response code 400 mapped as failure. Message payload is of type: BufferInputStream (org.mule.module.http.internal.request.ResponseValidatorException) org.mule.module.http.internal.request.SuccessStatusCodeValidator:37 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/module/http/internal/request/ResponseValidatorException.html) ——————————————————————————– Root Exception stack trace: org.mule.module.http.internal.request.ResponseValidatorException: Response code 400 mapped as […]

图像转换会产生红色图像吗?

我试图通过水平翻转并调整图像大小来变换图像。 问题在于,当转换完成时,图片的颜色都很奇怪,它已经变成了红色调。 是否有可能以某种方式解决这个问题,我想我在某处看到它可能是AWT库中的一些错误,但我不确定? 这是代码: import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class LocalImageSizeFlip { public static void main(String[] args) { BufferedImage img = null; try { img = ImageIO.read(new File(“C:\\picture.jpg”)); AffineTransform tx = AffineTransform.getScaleInstance(1, -1); tx.translate(0, -img.getHeight(null)); AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); img = op.filter(img, null); […]

具有两个元素的Spring更新SOAP标头

我使用Spring-WS和WebServiceTemplate来调用SOAP WebService。 目前,我在更新SOAP标头时遇到问题。 下面是SOAP请求的完整结构: ? ? ? 如上所示,我需要在Header中包含2个元素。 我有以下代码来更新WebServiceTemplate的SOAP标头 Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.transform(new StringSource(soapHeaderStr), ((SoapMessage) message).getSoapHeader().getResult()); 但是当我尝试使用两个元素(String)更新标头时,我收到以下错误消息: SOAPHeaderString ? ? ? 错误 [Fatal Error] :1:197: The markup in the document following the root element must be well-formed. ERROR: ‘The markup in the document following the root element must be well-formed.’ 原因是Security和MessageData元素没有根元素,它不应该是。 请帮助我在这种情况下如何更新标题? 谢谢