axis1.4 클라이언트가있는 파일을 jaxws 서비스에 보내려고합니다. 내 클라이언트 코드는 아래와 같습니다.axis1.4 클라이언트가 Mtom을 사용하여 파일을 전송하는 중
System.out.println(service.getCalcImplPort().getFile(new DataHandler(new DataSource() {
@Override
public OutputStream getOutputStream() throws IOException {
// TODO Auto-generated method stub
return null;
}
@Override
public String getName() {
// TODO Auto-generated method stub
return "abc.txt";
}
@Override
public InputStream getInputStream() throws IOException {
InputStream bs = new ByteArrayInputStream("Hello world".getBytes());
return bs;
}
@Override
public String getContentType() {
// TODO Auto-generated method stub
return "application/soap+xml";
}
})));
내가 tcpmon에서 볼 때 아래 메시지가 생성됩니다.
------=_Part_0_1601756168.1386618236799
Content-Type : text/xml; 문자셋 = UTF-8 콘텐츠 전송 인코딩 : 이진 컨텐츠 ID :
------ = _ Part_0_1601756168.1386618236799 콘텐츠 형식 : 응용 프로그램/비누 + XML 콘텐츠 전송 인코딩 : 진 컨텐츠 ID :
안녕하세요 세계 ------ =
는XML 부분은
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><getFile xmlns="http://ws.kasim.com/"><arg0 href="cid:5C354342D8307DD2EC87841AD94BCCB0" xsi:type="xsd:base64Binary" xmlns=""/></getFile></soapenv:Body></soapenv:Envelope>
01 _ Part_0_1601756168.1386618236799--
서버 측에서는 서비스의 DataHandler 매개 변수에 전송 된 데이터가없는 것을 확인합니다. 우선이 메시지는 유효한 mtom 메시지입니까? 아무도 내가 여기에없는 것을 제발 말할 수 없으면?
감사합니다.