16.7. How to let camel-cxf response start with xml processing instruction
PHP와 같은 일부 CHAP 클라이언트를 사용하는 경우 CXF가 XML 처리 명령 < ?xml version="1.0" encoding="utf-8"
>을 추가하지 않기 때문에 이러한 종류의 오류가 발생합니다.
Error:sendSms: SoapFault exception: [Client] looks like we got no XML document in [...]
Error:sendSms: SoapFault exception: [Client] looks like we got no XML document in [...]
이 문제를 해결하려면 아래 WriteECDHEDeclarationInterceptor에서와 같이 사용자를 위해 XML 시작 문서를 작성하도록 staffxOutInterceptor 에게 지시합니다.
대안으로 CxfConsumerTest 에 설명된 대로 메시지 헤더를 추가할 수 있습니다.
// set up the response context which force start document Map<String, Object> map = new HashMap<String, Object>(); map.put("org.apache.cxf.stax.force-start-document", Boolean.TRUE); exchange.getOut().setHeader(Client.RESPONSE_CONTEXT, map);
// set up the response context which force start document
Map<String, Object> map = new HashMap<String, Object>();
map.put("org.apache.cxf.stax.force-start-document", Boolean.TRUE);
exchange.getOut().setHeader(Client.RESPONSE_CONTEXT, map);