2016-07-26 2 views
0

MIME 경계가 누락되었다고 불만을 제기하는 문제를 해결하려고합니다.org.apache.cxf.interceptor.Fault : MIME 경계를 찾을 수 없습니다.

비누 webservice를 호출하는 중, 응답 구문 분석에서 예외가 발생하는 것처럼 보입니까? 가능한 원인에 대해 알고있는 사람이 있습니까? 내가 사용하고

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) 

아파치 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 

답변

1

(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: <[email protected]> 

<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 경계입니다.

관련 문제