【发布时间】:2020-01-24 13:39:50
【问题描述】:
我在向第三方应用程序发送肥皂请求时遇到异常,并且在代码中我没有为肥皂请求设置内容类型。
我尝试在 marshalSendAndReceive(..) 之前打印 soap 请求,但我看不到任何打印请求,我认为错误发生在它可以打印/记录请求之前。
需要帮助!!
以下是例外:
.sun.xml.internal.messaging.saaj.soap : SAAJ0537: Invalid Content-Type.
Could be an error message instead of a SOAP message
2020-01-22 09:09:42.116 ERROR [cheque-
service,ca93accf0bdaa764,85d910ae8dabce62,false] 230 --- [0.0-8888-exec-2]
c.d.i.m.p.c.e.ExceptionLoggerAspect : Cheque Print service - Unexpected
error occurred:
org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.createWebServiceMessage(SaajSoapMessageFactory.java:216)
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.createWebServiceMessage(SaajSoapMessageFactory.java:60)
at org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:92)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:611)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:555)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:390)
at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:383)
at com.deloitte.insurcloud.microservices.payment.chequeservice.service.client.GwApiClient.callGuidewire(GwApiClient.java:43)
at com.deloitte.insurcloud.microservices.payment.chequeservice.service.client.GwApiClient.updateCheckStatus(GwApiClient.java:36)
at com.deloitte.insurcloud.microservices.payment.chequeservice.service.client.GwApiClient$$FastClassBySpringCGLIB$$9966cc9c.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:736)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:84)
at com.deloitte.insurcloud.microservices.payment.chequeservice.exception.ExceptionLoggerAspect.aroundProcessException(ExceptionLoggerAspect.java:26)
【问题讨论】:
标签: spring-boot web-services soap marshalling