2017-01-25 19 views
0

이것은 파일럿 오류 일 뿐이며 해결책을 찾을 수 없습니다. 첨부 파일이 포함 된 비누 페이로드 작업으로 jax-ws 웹 서비스를 갖습니다. 다음은 스키마 문서 스 니펫입니다. 이 요소 정의에 포함 된MTOM 첨부 파일이 SOAP 페이로드에서 두 번 인코딩 됨

<xs:complexType name="BinaryAttachmentType"> 
      <xs:simpleContent> 
       <xs:restriction base="xmime:base64Binary"> 
       <xs:attribute ref="xmime:contentType" use="required" /> 
       </xs:restriction> 
      </xs:simpleContent> 
    </xs:complexType> 

:이 정의 된 유형입니다 soapUI를 사용

<xs:element name="Contact"> 
    <xs:complexType> 
     <xs:sequence> 
      <!-- removed other elements --> 
      <xs:element name="Attachment" type="BinaryAttachmentType" minOccurs="0" maxOccurs="1"/> 
     </xs:sequence> 
    </xs:complexType> 
</xs:element 

는, SOAP 보이는 같은 : soapUI에

<hsn:Contact> 
    <!-- other elements --> 
     <hsn:Attachment xm:contentType="image/jpeg">cid:323665198529</hsn:Attachment> 
</hsn:Contact> 

첨부 파일 : enter image description here I 로그에서 http를 확인하십시오 :

HTTP 헤더 :

<hsn:AttachmentFileName>test1.jpg</hsn:AttachmentFileName> 
     <hsn:Attachment xm:contentType="image/jpeg">/9j/4AAQSkZJRgABAQEAYABgAAD .. rest of base64 encoding 

다음 SOAP 메시지 후, 인코딩 된 첨부 파일을 다시 :

------=_Part_15_23791896.1485382707426 
    Content-Type: image/jpeg; 
    name=Foo.jpg 
    Content-Transfer-Encoding: binary 
    Content-ID: <Foo.jpg> 
    Content-Disposition: attachment; name=Foo.jpg; filename=Foo.jpg 

    (... encoded attachment again) 
[0xff][0xd8][0xff][0xe0][0x0][0x10]JFIF[0x0][0x1][0x1][0x1][0x0]`[0x0]`[0x0][0x0][0xff][0xdb][0x0]C[0x0][\n] 

그럼, 왜

SOAP 본문에
"Content-Type: multipart/related; type="text/xml"; start="<[email protected]>"; boundary="----=_Part_15_23791896.1485382707426"" 
"SOAPAction: "http://hsn.us.banner.hsntech.com/Level1Request"" 
"MIME-Version: 1.0" 
"Content-Length: 104164" 
"Host: localhost:7001" 
"User-Agent: Apache-HttpClient/4.1.1 (java 1.5)" 
"------=_Part_15_23791896.1485382707426" 
"Content-Type: text/xml; charset=UTF-8" 
"Content-Transfer-Encoding: 8bit" 
"Content-ID: <[email protected]>" 

은 base64로 인코딩 된 파일을 첨부 요소를 참조 요청에서 두 번 인코딩 된 파일? 감사.

은 MTOM를 사용하는지 확인이 요청 속성에 진정한로 설정되어

답변

1

:

Request Properties