0

我正在尝试通过 anypoint Studio IDE 连接到 Soap Api。但我收到此错误:'rpc/encoded wsdls is not supported with cxf' flowed @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

怎么了?

4

1 回答 1

1

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

于 2015-12-16T20:47:40.487 回答