繁体   English   中英

org.apache.cxf.interceptor.Fault:找不到MIME边界

[英]org.apache.cxf.interceptor.Fault: Couldn't find MIME boundary

尝试解决有关缺少MIME边界的问题。

我正在调用Soap Web服务,看起来像来自解析响应的异常? 有人知道任何可能的原因吗?

2016-07-25 18:39:51.373 +0000 [lcbatch-scheduler_Worker-1] [WARN] o.a.cxf.phase.PhaseInterceptorChain   - Interceptor for {http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/}ErpIntegrationServiceService#{http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/}uploadFileToUcm has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Couldn't find MIME boundary: ------=_Part_679_384721743.1469471991267
        at org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:60)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1641)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1532)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1330)
        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:652)
        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
        at com.sun.proxy.$Proxy156.uploadFileToUcm(Unknown Source)

我正在使用的Apache CXF依赖项:

+- org.apache.cxf:cxf-rt-frontend-jaxws:jar:3.1.2:compile
[INFO] |  |  +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] |  |  +- org.apache.cxf:cxf-core:jar:3.1.2:compile
[INFO] |  |  |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
[INFO] |  |  |  |  \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] |  |  |  \- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.1:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-bindings-soap:jar:3.1.2:compile
[INFO] |  |  |  +- org.apache.cxf:cxf-rt-wsdl:jar:3.1.2:compile
[INFO] |  |  |  |  \- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] |  |  |  \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:3.1.2:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.1.2:compile
[INFO] |  |  +- org.apache.cxf:cxf-rt-frontend-simple:jar:3.1.2:compile
[INFO] |  |  \- org.apache.cxf:cxf-rt-ws-addr:jar:3.1.2:compile
[INFO] |  |     \- org.apache.cxf:cxf-rt-ws-policy:jar:3.1.2:compile
[INFO] |  |        \- org.apache.neethi:neethi:jar:3.0.3:compile
[INFO] |  \- org.apache.cxf:cxf-rt-transports-http:jar:3.1.2:compile

您收到一条Multipart消息(如https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html所述 )。

您可以先验证标题“ Content-Type”的值。 应该是这样的

Content-Type : multipart/related; type="application/xop+xml"; boundary="----=_Part_679_384721743.1469471991267"

然后,您可以检查响应的内容,这可以使您了解缺少的内容。 为了检查内容,您可以使用Wiremock作为代理来拦截通过网络传输的所有内容( http://wiremock.org/docs/proxying/ )。 例如,我最近做了,Wiremock为我录制了

--uuid:0a6c8ffe-9f63-4fdb-a416-43acd1044b8b
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>

<soap:Envelope   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body> <myxml>....</myxml></soap:Body></soap:Envelope>
--uuid:0a6c8ffe-9f63-4fdb-a416-43acd1044b8b--

就我而言, uuid:0a6c8ffe-9f63-4fdb-a416-43acd1044b8b是MIME边界。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM