轴WSDL2JAVA不产生存根中的所有接口 [英] Axis wsdl2java not generating all interfaces in stub

查看:178
本文介绍了轴WSDL2JAVA不产生存根中的所有接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用wsdl2java.bat的生成存根,我的WSDL包含两个绑定。我看到wsdl2bat在第一结合操作创建接口,但不产生在秒绑定操作任何东西。 wsdl2java.bat的-uri的http:// ... -o客户-d ADB -s -u

I am trying to generate stub using wsdl2java.bat, my wsdl consists of two bindings. I see that wsdl2bat creates interface for operations in the first binding but does not generate anything for operations in the seconds binding. wsdl2java.bat -uri http://... -o client -d adb -s -u.

例如,code应该是这样的。

For example the code should look like this

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();
    }

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

The problem here is, I do see a the method getEchoStringReturn in resDoc instance of stub.

推荐答案

易一种是:

E:\\使用\\罐\\轴罐子>集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>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:\\使用\\罐\\轴罐子>的Java org.apache.axis.wsdl.WSDL2Java -N金塔:/ crmondemand / XML /联系/数据=crmondemand.xml.Contact.Data-N金塔:/ crmondemand / XML /联系人/查询=crmondemand.xml.Contact.Query-N金塔:crmondemand / WS /欧洲央行/联系人/ 10/2004年的=crmondemand.ws.ecbs.contact-o E:\\使用\\ TEST2Contact1.wsdl

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"

这篇关于轴WSDL2JAVA不产生存根中的所有接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆