CXF部署到weblogic,客戶端訪問報錯:Cannot create a secure XMLInputFactory

這應該是一個終極解決方案,在查遍各類資料無果後可採用……web

加監聽器:apache

public class SealManageListener implements ServletContextListener {
    @Override
    public void contextDestroyed(ServletContextEvent arg0) {
        // TODO Auto-generated method stubide

    }.net

    @Override
    public void contextInitialized(ServletContextEvent arg0) {
        // TODO Auto-generated method stubxml

        Properties props = System.getProperties();
        props.setProperty("org.apache.cxf.stax.allowInsecureParser", "1");
        props.setProperty("UseSunHttpHandler", "true");
    }blog

}get



web.xml的配置it

<listener>  class

 <listener-class>xxx.xxx.xxx.filter.SealManageListener</listener-class>  配置

</listener>  

 

轉自:http://blog.csdn.net/wangchuankun1/article/details/78047957

相關文章
相關標籤/搜索