我正在使用soap服务为oracle的销售云创建一个anypoint连接器,但在创建连接器时,我收到了错误。
这是我的wsdl文件 https://cagc-test.crm.us1.oraclecloud.com/foundationParties/LocationService?WSDL
我做了以下步骤
1)使用anypoint studio创建anypoint连接器。
2)选择SOAP并提供上面的wsdl url。 单击完成后,控制台上将显示以下错误和警告。
log4j:WARN No appenders could be found for logger
(org.apache.cxf.common.logging.LogUtils).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
for more info.
org.apache.cxf.tools.common.ToolException: org.w3c.dom.DOMException:
NAMESPACE_ERR: An attempt is made to create or change an object in a
way which is incorrect with regard to namespaces.
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
(WSDLToJavaContainer.java:294)
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.mule.devkit.generation.wsdl.WsdlConnectorGenerator.
generateJavaCode(WsdlC onnectorGenerator.java:161)
at
org.mule.devkit.generation.wsdl.WsdlConnectorGenerator.initialize
(WsdlConnectorGenerator.java:84)
at org.mule.devkit.generation.core.ConnectorGenerator.execute
(ConnectorGenerator.java:119)
at org.mule.tools.devkit.ConnectorGeneratorMavenPlugin.execute
(ConnectorGeneratorMavenPlugin.java:108)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:209)
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:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder
.buildProject
(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter
.singleThreadedBuild
(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch
(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main
(Launcher.java:352)
Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR:
An attempt is made to create or change an object in a way
which is incorrect with regard to namespaces.
at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl
.checkDOMNSErr
(CoreDocumentImpl.java:2530)
at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName
(AttrNSImpl.java:117)
at com.sun.org.apache.xerces.internal.dom.AttrNSImpl.
<init> (AttrNSImpl.java:78)
at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl
.createAttributeNS(CoreDocumentImpl.java:2142)
at com.sun.org.apache.xerces.internal.dom.ElementImpl
.setAttributeNS
(ElementImpl.java:659)
at org.apache.ws.commons.schema.XmlSchemaSerializer.serializeAttribute
(XmlSchemaSerializer.java:470)
at org.apache.ws.commons.schema.XmlSchemaSerializer.setupAttr
(XmlSchemaSerializer.java:2201)
at org.apache.ws.commons.schema.XmlSchemaSerializer
.serializeComplexType
(XmlSchemaSerializer.java:938)
at org.apache.ws.commons.schema.XmlSchemaSerializer
.serializeSchemaChild
(XmlSchemaSerializer.java:2400)
at org.apache.ws.commons.schema.XmlSchemaSerializer
.serializeSchemaElement
(XmlSchemaSerializer.java:1659)
at org.apache.ws.commons.schema.XmlSchemaSerializer
.serializeSchema
(XmlSchemaSerializer.java:132)
at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding
.addSchemas
(JAXBDataBinding.java:639)
at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding
.initialize
(JAXBDataBinding.java:439)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes
(WSDLToJavaContainer.java:591)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl
(WSDLToJavaContainer.java:243)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
(WSDLToJavaContainer.java:138)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute
(WSDLToJavaContainer.java:286)
... 28 more
Jan 19, 2015 11:43:39 AM
org.mule.devkit.generation.core.ConnectorGenerator execute
WARNING: icons/temp-connector-24x16.png (Permission denied)
[INFO] ---------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ---------------------------------------------------------------
[INFO] Total time: 3:16.671s
[INFO] Finished at: Mon Jan 19 11:43:39 IST 2015
[INFO] Final Memory: 23M/156M
[INFO] ---------------------------------------------------------------
[ERROR] Failed to execute goal
org.mule.tools.devkit:connector- generator-wsdl2connector
-maven-plugin:1.0.3:connector-generator (default)
on project temp-connector:
Execution default of goal org.mule.tools.devkit
:connector-generator-wsdl2connector
-maven-plugin:1.0.3:connector-generator failed. NullPointerException - > [Help 1]
答案 0 :(得分:1)
这里的问题似乎是wsdl与devkit中使用的wsdl2java工具不兼容。有关更详细的答案,请查看http://forum.mulesoft.org/mulesoft/topics/error-while-creating-oracle-sales-cloud-connector-using-mule-soft
答案 1 :(得分:0)
Devkit 3.7.0现在有一个名为SOAP Connect的新功能,您可以直接从WDSL文件创建一个功能齐全的连接器。