Home Zenfolio Development API

Need Immediate Answers? Check out our SUPPORT CENTER or CONTACT OUR SUPPORT TEAM

Trying to generate webservice client using Java and the Maven CXF Plugin

damogallagherdamogallagher Member Posts: 1
edited February 2016 in Zenfolio Development API
Hi

I am trying to generate a webservice client using Java and the Apache CXF Maven plugin but I am running into errors.
I just have a very simple maven project setup in eclipse
I am using the wsdl file - http://api.zenfolio.com/api/1.8/zfapi.asmx?wsdl

The pom file I am using is as follows

    
	4.0.0
	com.test
	WebserviceClientGenerator
	0.0.1-SNAPSHOT
	
		3.1.4
	

	
		
			
				org.apache.cxf
				cxf-codegen-plugin
				${cxf.plugin.version}
				
					
						generate-sources
						generate-sources
						
							${project.build.directory}/src/main/java/com/test
							
								
									http://api.zenfolio.com/api/1.8/zfapi.asmx?wsdl 
									
										-impl
										-verbose
									
								
														
						
						
							wsdl2java
						
					
				
			
		
	


When I run a maven install on this pom file, I get the following error
 [ERROR] http://api.zenfolio.com/api/1.8/zfapi.asmx?wsdl [1559:11]: undefined simple or complex type 'soapenc:Array'
    org.xml.sax.SAXParseExceptionpublicId: http://api.zenfolio.com/api/1.8/zfapi.asmx?wsdl; systemId: http://api.zenfolio.com/api/1.8/zfapi.asmx?wsdl; lineNumber: 1559; columnNumber: 11; undefined simple or complex type 'soapenc:Array'
    	at com.sun.xml.xsom.impl.parser.ParserContext$1.reportError(ParserContext.java:180)
    	at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.java:175)
    	at com.sun.xml.xsom.impl.parser.DelayedRef.resolve(DelayedRef.java:110)
    	at com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:85)
    	at com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:135)
    	at com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:214)
    	at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:538)
    	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:269)
    	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:95)
    	at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:460)
    	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:726)
    	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:270)
    	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
    	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:415)
    	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.maven_plugin.wsdl2java.WSDL2JavaMojo.generate(WSDL2JavaMojo.java:415)
    	at org.apache.cxf.maven_plugin.AbstractCodegenMoho.execute(AbstractCodegenMoho.java:260)
    	at org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:512)
    	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
Is using Java and the CXF plugin is supported for your wsdl file??
If not - do you have any recommendations on what other Java components I could use?

Thanks
Damien
Sign In or Register to comment.