JAX-WS 및 wsimport를 사용하여 웹 서비스 클라이언트를 생성했습니다. 나는 위의 웹 서비스 호출을하기 전에 주어진 스키마 트론 규칙에 대한 processStuffObject
을 검증 할 필요가Schematron에 대한 WebService 메시지 유효성 확인
URL url = new URL("http://localhost:9999/ws/processstuff?wsdl");
QName qname = new QName("namespace", "ProcessStuffImplService");
Service service = Service.create(url, qname);
ProcessStuffInterface processStuffInterface = service.getPort(ProcessStuffInterface.class);
ProcessStuffObject processStuffObject = new ProcessStuffObject();
//Web service call
processStuffInterface.processStuff(processStuffObject);
:
이 내 클라이언트 코드입니다. 필자는 ph-schematron과 같은 라이브러리를 살펴 보았지만 유효성 검증은 File
또는 그와 유사한 객체에서만 가능하다고 보입니다. 누구든지 내 ProcessStuffObject
과 같은 JAX-WS로 생성 된 객체를 Schematron 규칙과 비교하여 검증하는 방법을 알고 있습니까?
업데이트 :
가 지금은 산도 스키마 트론과 유효성을 검사 할 수있는 File
객체에 ProcessStuffObject
를 정렬 화, 그러나 이것은 정말 어리석은 솔루션처럼 보인다.