2
SOAP 웹 서비스 용 클라이언트 및 서버 측 구성 요소 (WSDL에서 정의 됨) (WSDL에서 정의 됨)가 있지만 인 경우 조사해야 할 리소스/라이브러리가 있습니까? 클라이언트 및 서버 스텁에 WSDL/JAXB 기반 코드 생성을 사용하고 싶지 않으십니까? 사용에도 불구하고 - 많은 오히려 복잡 한 - 공식적으로 JAXB/JAX-WS WSDL 코드 생성이없는 Java SOAP 웹 서비스
가, 이유는 내가 스텁 생성을위한wsimport
을 피하다하려고하는 것은 모두
wsimport
및
xjc
제대로 내가 사용해야하는 스키마 파일에 자바 코드를 생성하지 못할 것입니다 episodic compilation JAXB 코드 생성 로직 (예 :
here 및
here 참조)에서 버그 일 가능성이있는 코드는 여전히 충돌했으며 복잡한 스키마의 경우이 기술은 그다지 견고하지 못하다는 인상을 받았습니다.
그래서 HTTP 연결에서 직접 XML 컨텐츠를 작성하고 읽음으로써 SOAP 서비스를 빌드하는 데 도움이되는 리소스 또는 라이브러리가 있습니까? SAAJ에서 보면 한
URLConnection connection = url.openConnection();
connection.setDoOutput(true); // Triggers POST.
connection.setRequestProperty("Accept" , "text/xml, multipart/related");
connection.setRequestProperty("Content-Type" , "text/xml; charset=utf-8");
connection.setRequestProperty("Host" , url.getHost());
connection.setRequestProperty("Proxy-Connection", "keep-alive");
connection.setRequestProperty("Content-Length" , String.valueOf(postContent.length()));
OutputStream output = connection.getOutputStream();
output.write(postContent.getBytes("UTF-8"));