使用 CXF 组件时出现 Mule- 错误

Mule- error when using CXF component

我正在尝试通过 anypoint Studio IDE 连接到 Soap Api。 但我收到此错误:'rpc/encoded wsdls are not supported with cxf' 流@Stephan answer。 但是当 运行 在终端中执行此命令时:

java -cp axis.jar;commons-logging-1.0.4.jar;commons-discovery-0.2.jar;jaxrpc.jar;saaj.jar;wsdl4j-1.5.1.jar org.apache.axis.wsdl.WSDL2Java http://someURL?WSDL

我明白了:

MYCOMPUTER@PC2:~$ java -cp axis.jar;commons-logging-1.0.4.jar;commons-discovery-0.2.jar;jaxrpc.jar;saaj.jar;wsdl4j-1.5.1.jar org.apache.axis.wsdl.WSDL2Java http://127.0.0.1:8000/api/v2_soap/?wsdl
Usage: java [-options] class [args...]
       (to execute a class)
or  java [-options] -jar jarfile [args...]
       (to execute a jar file)
where options include:
-d32      use a 32-bit data model if available
-d64      use a 64-bit data model if available
-server   to select the "server" VM
-zero     to select the "zero" VM
-jamvm    to select the "jamvm" VM
-avian    to select the "avian" VM
-dcevm    to select the "dcevm" VM
              The default VM is server,
              because you are running on a server-class machine.


-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
              A : separated list of directories, JAR archives,
              and ZIP archives to search for class files.
-D<name>=<value>
              set a system property
-verbose:[class|gc|jni]
              enable verbose output
-version      print product version and exit
-version:<value>
              require the specified version to run
-showversion  print product version and continue
-jre-restrict-search | -no-jre-restrict-search
              include/exclude user private JREs in the version search
-? -help      print this help message
-X            print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
              enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
              disable assertions with specified granularity
-esa | -enablesystemassertions
              enable system assertions
-dsa | -disablesystemassertions
              disable system assertions
-agentlib:<libname>[=<options>]
              load native agent library <libname>, e.g. -agentlib:hprof
              see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
              load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
              load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
              show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
commons-logging-1.0.4.jar: command not found
commons-discovery-0.2.jar: command not found
jaxrpc.jar: command not found
saaj.jar: command not found
wsdl4j-1.5.1.jar: command not found

怎么了?

看起来您在 Unix/Linux 框中:您需要在 -cp 参数中使用冒号 (:) 作为分隔符而不是分号 (;)。