English 中文(简体)
Axis wsdl2java not generating all interfaces in stub
原标题:

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.

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

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

最佳回答

Easy one is::

E:usejarsaxis 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;

and then::

E:usejarsaxis 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 est2 "Contact1.wsdl"

问题回答

暂无回答




相关问题
Can t consume webservice from Java

I created the webservice stubs using axis2-1.5 s wsdl2java.bat. This created a src folder with the following structure in it: src/net/mycompany/www/services/SessionIntegrationStub.java The package ...

WSDL2Java tool error Apache CXF

We get the following error when we use WSDL2Java tool to generate stubs. The webservice is up and running. WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsd l ...

Code generation from WSDL using XML Catalog

Is there any tool for generating Java code from WSDL using XML Catalogs? The problem is that I have wsdl files that import XML schemas which also import other schemas and the schemas are not available ...

Apache Axis WSDL2Java error - Missing <soap:fault> element

We are integrating a third party SOAP web services in our application. The WSDL is used with SOAPUI tool, where sample requests and responses worked fine. When we try to integrate with apache Axis 1....

Axis wsdl2java not generating all interfaces in stub

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 ...

热门标签