【问题标题】:Axis wsdl2java not generating all interfaces in stubAxis wsdl2java 未在存根中生成所有接口
【发布时间】:2010-01-18 13:09:33
【问题描述】:

我正在尝试使用 wsdl2java.bat 生成存根,我的 wsdl 包含两个绑定。我看到 wsdl2bat 为第一个绑定中的操作创建接口,但没有为第二个绑定中的操作生成任何内容。 wsdl2java.bat -uri http://... -o client -d adb -s -u.

例如代码应该是这样的

try {
     //Create the stub by passing the AXIS_HOME and target EPR.
     //We pass null to the AXIS_HOME and hence the stub will use the current directory as the AXIS_HOME 
     Axis2SampleDocLitPortTypeStub stub= new Axis2SampleDocLitPortTypeStub(null,
                                "http://localhost:8080/axis2/services/Axis2SampleStub");
     //Create the request document to be sent.
     EchoString  reqDoc= EchoString.Factory.newInstance();
     reqDoc.setEchoString("Echo this");
     //invokes the Web service.
     EchoStringReturn resDoc=stub.echoString(reqDoc);
     System.out.println(resDoc.getEchoStringReturn());

    } catch (Exception e) {
        e.printStackTrace();
    }

这里的问题是,我确实在存根的 resDoc 实例中看到了 getEchoStringReturn 方法。

【问题讨论】:

    标签: axis binding stub wsdl2java


    【解决方案1】:

    简单的是::

    E:\use\jars\axis jars>set classpath=%classpath%;axis-1.4.jar;axis-ant.jar;axis-1.4.jar;commons-discovery-0.5.jar;commons-logging- api-1.1.1.jar;jaxrpc-api.jar;log4j-1.2.jar;org.apache.commons.logging.jar;saaj.jar;wsdl4j-1.5.1.jar;

    然后::

    E:\use\jars\axis jars>java org.apache.axis.wsdl.WSDL2Java -N"urn:/crmondemand/xml/Contact/Data"="crmondemand.xml.Contact.Data" -N" urn:/crmondemand/xml/Contact/Query"="crmondemand.xml.Contact.Query" -N"urn:crmondemand/ws/ecbs/contact/10/2004"="crmondemand.ws.ecbs.contact" -o E:\use\test2 "Contact1.wsdl"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      • 2019-04-16
      • 2011-03-28
      • 2011-08-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多