Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Web Service Client creation problem with Apache CXF(Web service client creation from WSDL using Apache CXF and Glassfish server)
Web Service Client creation problem with Apache CXF [message #1060455] Fri, 24 May 2013 18:22
Marco Bertini is currently offline Marco BertiniFriend
Messages: 1
Registered: May 2013
Junior Member
I'm having serious problems with my (initial) attempts to work with Eclipse, CXF and web service wizards.

I've successfully deployed a web service to a Glassfish server 3.1.2. Now I'm trying to create a client using the Eclipse Juno SR2 wizard for Web Service Client creation within a Dynamic Web project created for a Glassfish server 3.1.2. I can see the WSDL file from a web browser, I can create a client when using the AXIS runtime, but when I try to create the client with CXF 2.x runtime (either CXF 2.6.8 and 2.7.5) I get (http edited to obey eclipse.org forum rules about links in posts):

==
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -client -d /Users/bertini/Documents/presentazioni/lezioni/SOA/workspace/TestServiceClientGlassfish/.cxftmp/src -classdir /Users/bertini/Documents/presentazioni/lezioni/SOA/workspace/TestServiceClientGlassfish/target/classes -p http_://testservice.csiaf.unifi.it/=it.unifi.csiaf.testservice -impl -validate -exsh false -dns true -dex true -wsdlLocation http_://localhost:8888/TestServiceGlassfish/TeamsService?wsdl -verbose -defaultValues -fe jaxws -db jaxb -wv 1.1 http_://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
wsdl2java - Apache CXF 2.6.8

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/bertini/glassfish3/glassfish/modules/weld-osgi-bundle.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/apache-cxf-2.6.8/lib/slf4j-jdk14-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http_://www.slf4j.org/codes.html#multiple_bindings for an explanation.

WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : http_://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
Caused by : WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory 

org.apache.cxf.tools.common.ToolException: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : http_://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
Caused by : WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory 
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:420)
	at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
	at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
Caused by: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : http_://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
Caused by : WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory 
	at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:97)
	at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.build(WSDLDefinitionBuilder.java:69)
	at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:82)
	at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:59)
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:198)
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
	... 4 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
	at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:243)
	at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:192)
	at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:78)
	... 10 more
Caused by: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
	at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:299)
	at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:254)
	at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1423)
	at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1317)
	at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:233)
	... 12 more

==

If I try to execute the wsdl2java script from command line it works and the messages are:

/usr/local/apache-cxf-2.6.8/bin/wsdl2java -client -d /Users/bertini/Documents/presentazioni/lezioni/SOA/workspace/gf/.cxftmp/src -classdir /Users/bertini/Documents/presentazioni/lezioni/SOA/workspace/gf/build/classes -p http_://testservice.csiaf.unifi.it/=it.unifi.csiaf.testservice -impl -validate -exsh false -dns true -dex true -wsdlLocation http_://localhost:8888/TestServiceGlassfish/TeamsService?wsdl -verbose -defaultValues -fe jaxws -db jaxb -wv 1.1 http_://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -client -d /Users/bertini/Documents/presentazioni/lezioni/SOA/workspace/gf/.cxftmp/src -classdir /Users/bertini/Documents/presentazioni/lezioni/SOA/workspace/gf/build/classes -p http_://testservice.csiaf.unifi.it/=it.unifi.csiaf.testservice -impl -validate -exsh false -dns true -dex true -wsdlLocation http_://localhost:8888/TestServiceGlassfish/TeamsService?wsdl -verbose -defaultValues -fe jaxws -db jaxb -wv 1.1 http_://localhost:8888/TestServiceGlassfish/TeamsService?wsdl
wsdl2java - Apache CXF 2.6.8


I've also seen that the code is correctly generated.

Apparently there's some problem with my Eclipse+CXF combo, but I can't figure what is causing the issue. ANy help ?
Previous Topic: Eclipse wsdl validator doesn't show exact error
Next Topic:Instantiating variables from a custom Javascript user library
Goto Forum:
  


Current Time: Sat Dec 20 18:44:19 GMT 2014

Powered by FUDForum. Page generated in 0.01563 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software