cxf框架,java代码中使用http post请求webservice,出现不能创建一个安全的xml工厂,
@PostConstruct
public void init(){
System.setProperty(StaxUtils.ALLOW_INSECURE_PARSER, "true");
}
在类加载的时候我设置系统属性,然后报出
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:158)
... 27 more
这个问题怎么解决呢?还请大家帮帮忙......