woodstox

CXF 2.7.x Woodstox Compatibility via Maven

二次信任 提交于 2019-11-28 20:55:48
In the CXF's documentation it is said that the 2.7.x version requires the Woodstox jars not under the 4.2.0 version to be available in the classpath. Can somebody, please, suggest Maven dependencies for Woodstox to work with CXF? The main problem is when I try to use the cxf's client, an exception "Cannot create a secure XMLInputFactory" is raised. According to different forums ( for example ), it is possible to use the "org.apache.cxf.stax.allowInsecureParser" system property to solve the problem, but it seems not a good way. So that maven dependencies are the way to go... Thanks in advance.

CXF 2.7.x Woodstox Compatibility via Maven

删除回忆录丶 提交于 2019-11-27 13:18:59
问题 In the CXF's documentation it is said that the 2.7.x version requires the Woodstox jars not under the 4.2.0 version to be available in the classpath. Can somebody, please, suggest Maven dependencies for Woodstox to work with CXF? The main problem is when I try to use the cxf's client, an exception "Cannot create a secure XMLInputFactory" is raised. According to different forums (for example), it is possible to use the "org.apache.cxf.stax.allowInsecureParser" system property to solve the

CXF web service client: “Cannot create a secure XMLInputFactory”

拜拜、爱过 提交于 2019-11-27 13:09:41
I am wrote and deployed a CXF web service into a Tomcat server using the instructions here . The web service deploys fine as I can see the WSDL file in a web browser. My standalone Java client program doesn't work though. Here is the code: System.out.println("Creating client"); Properties properties = System.getProperties(); properties.put("org.apache.cxf.stax.allowInsecureParser", "1"); System.setProperties(properties); JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setServiceClass(ExampleWebService.class); factory.setAddress("http://X.X.X.X:9090/WebServices

StAX XML formatting in Java

[亡魂溺海] 提交于 2019-11-27 01:49:34
Is it possible using StAX (specifically woodstox) to format the output xml with newlines and tabs, i.e. in the form: <element1> <element2> someData </element2> </element1> instead of: <element1><element2>someData</element2></element1> If this is not possible in woodstox, is there any other lightweight libs that can do this? Via the JDK: transformer.setOutputProperty(OutputKeys.INDENT, "yes"); . There is com.sun.xml.txw2.output.IndentingXMLStreamWriter XMLOutputFactory xmlof = XMLOutputFactory.newInstance(); XMLStreamWriter writer = new IndentingXMLStreamWriter(xmlof.createXMLStreamWriter(out))

CXF web service client: “Cannot create a secure XMLInputFactory”

社会主义新天地 提交于 2019-11-26 16:06:47
问题 I am wrote and deployed a CXF web service into a Tomcat server using the instructions here. The web service deploys fine as I can see the WSDL file in a web browser. My standalone Java client program doesn't work though. Here is the code: System.out.println("Creating client"); Properties properties = System.getProperties(); properties.put("org.apache.cxf.stax.allowInsecureParser", "1"); System.setProperties(properties); JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory

StAX XML formatting in Java

孤街醉人 提交于 2019-11-26 09:49:05
问题 Is it possible using StAX (specifically woodstox) to format the output xml with newlines and tabs, i.e. in the form: <element1> <element2> someData </element2> </element1> instead of: <element1><element2>someData</element2></element1> If this is not possible in woodstox, is there any other lightweight libs that can do this? 回答1: Via the JDK: transformer.setOutputProperty(OutputKeys.INDENT, "yes"); . 回答2: There is com.sun.xml.txw2.output.IndentingXMLStreamWriter XMLOutputFactory xmlof =