首页 > 解决方案 > 为什么我无法在 saveChanges 中获取标题流

问题描述

我正在尝试从 JDK8 中的 Jboss7.1 eap 中的 spring web mvc5 项目调用 web 服务。但是在运行时调用时出现以下错误

00:07:31,206 INFO  [com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd] (default task-13) step 6 try block+++++++++++++++++++++++++++++++++++++
00:07:31,490 SEVERE [com.sun.xml.messaging.saaj.soap] (default task-13) SAAJ0539: Unable to get header stream in saveChanges
00:07:31,491 SEVERE [com.sun.xml.messaging.saaj.soap] (default task-13) SAAJ0540: Error during saving a multipart message
00:07:31,492 ERROR [stderr] (default task-13) org.springframework.ws.soap.saaj.SaajSoapMessageException: Could not write message to OutputStream: Error during saving a multipart message; nested exception is co
m.sun.xml.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
00:07:31,493 ERROR [stderr] (default task-13)   at org.springframework.ws.soap.saaj.SaajSoapMessage.writeTo(SaajSoapMessage.java:282)
00:07:31,493 ERROR [stderr] (default task-13)   at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:46)
00:07:31,493 ERROR [stderr] (default task-13)   at org.springframework.ws.client.core.WebServiceTemplate.sendRequest(WebServiceTemplate.java:658)
00:07:31,493 ERROR [stderr] (default task-13)   at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:606)
00:07:31,494 ERROR [stderr] (default task-13)   at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:555)
00:07:31,494 ERROR [stderr] (default task-13)   at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:506)
00:07:31,494 ERROR [stderr] (default task-13)   at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:446)
00:07:31,494 ERROR [stderr] (default task-13)   at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:436)
00:07:31,494 ERROR [stderr] (default task-13)   at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:424)
00:07:31,495 ERROR [stderr] (default task-13)   at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd.invokeWS(ModelLockOutboundCmd.java:145)
00:07:31,495 ERROR [stderr] (default task-13)   at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd.updateMRFlagData(ModelLockOutboundCmd.java:132)
00:07:31,495 ERROR [stderr] (default task-13)   at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd.callWs(ModelLockOutboundCmd.java:98)
00:07:31,496 ERROR [stderr] (default task-13)   at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd.perform(ModelLockOutboundCmd.java:64)
00:07:31,496 ERROR [stderr] (default task-13)   at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd$$FastClassBySpringCGLIB$$2ab0219b.invoke(<generated>)
00:07:31,496 ERROR [stderr] (default task-13)   at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
00:07:31,496 ERROR [stderr] (default task-13)   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:747)
00:07:31,496 ERROR [stderr] (default task-13)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
00:07:31,497 ERROR [stderr] (default task-13)   at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
00:07:31,497 ERROR [stderr] (default task-13)   at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
00:07:31,497 ERROR [stderr] (default task-13)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
00:07:31,497 ERROR [stderr] (default task-13)   at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)

我的 lib 文件夹中有以下 jars

在此处输入图像描述

如果我在 lib 文件夹中添加 Xerces-2.9.1 和 xalan-2.7.1 jar,我会得到一个不同的错误

Caused by: org.springframework.ws.client.WebServiceTransportException: Not Found [404]
        at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:699)
        at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:609)
        at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:555)
        at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:506)
        at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:446)
        at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:436)
        at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:424)
        at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd.invokeWS(ModelLockOutboundCmd.java:145)
        at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd.updateMRFlagData(ModelLockOutboundCmd.java:132)
        at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd.callWs(ModelLockOutboundCmd.java:98)
        at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd.perform(ModelLockOutboundCmd.java:64)
        at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd$$FastClassBySpringCGLIB$$2ab0219b.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:747)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
        at com.gee.gecs.cosmos.cmd.config.model.ModelLockOutboundCmd$$EnhancerBySpringCGLIB$$678ff03a.perform(<generated>)
        at com.gee.gecs.cosmos.controller.config.model.ModelController.saveLockUnLockVersion(ModelController.java:1603)
        at com.gee.gecs.cosmos.controller.config.model.ModelController$$FastClassBySpringCGLIB$$9a0181ee.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:747)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
        at com.gee.gecs.cosmos.aspect.ExceptionAspectHandler.handleControllerExceptionsWithAroundReturnString(ExceptionAspectHandler.java:45)
        ... 68 more

标签: javaspringsoapjava-8jboss

解决方案


推荐阅读