Folks,

 

I am using axis2 (build 95) to create a client for an existing web service.  I am getting the following error, but I do not know why the generated client is passing the wrong number of arguments.  Anyone have any suggestions about what the problem might be or how to work around it?

 

Thanks!

 

Here are the details.

 

Here is the exception that I am getting:

 

Exception in thread "main" org.apache.axis2.AxisFault: Illegal argument invoking 'gov.nih.nci.lmp.gominer.webservice.GOMinerWS.getReport([Ljava.lang.String;, [Ljava.lang.String;, java.lang.String, java.lang.String, java.lang.String, boolean, boolean, boolean)': wrong number of arguments

        at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:291)

        at org.apache.axis2.GOMinerWSPortTypeStub.getReport(GOMinerWSPortTypeStub.java:114)

        at Demo.main(Demo.java:29)

 

The WSDL for the service: http://discover.nci.nih.gov/gominer/xfire/GMService?wsdl

 

My Demonstration program that can create the error:

 

import java.io.*;

import java.util.*;

import org.w3c.dom.*;

import org.apache.axis2.*;

 

public class Demo {

 

    public static void main(String[] args) throws Exception {

        GOMinerWSPortTypeStub goMinerStub = new GOMinerWSPortTypeStub();

 

        final String[] totals = new String[]{"BAD", "TP53"};

        final String[] changed = new String[]{"BAD", "TP53"};

        final String organism = "9606;10090";

        final String dataSource = "all";

        final String evidence = "all";

        final GOMinerWSPortTypeStub.GetReport requestParams = new GOMinerWSPortTypeStub.GetReport();

        final GOMinerWSPortTypeStub.ArrayOfString ta = new GOMinerWSPortTypeStub.ArrayOfString();

        ta.setString(totals);

        final GOMinerWSPortTypeStub.ArrayOfString ca = new GOMinerWSPortTypeStub.ArrayOfString();

        ca.setString(changed);

        requestParams.setIn0(ta);

        requestParams.setIn1(ca);

        requestParams.setIn2(organism);

        requestParams.setIn3(dataSource);

        requestParams.setIn4(evidence);

        requestParams.setIn5(true);

        requestParams.setIn6(true);

        requestParams.setIn7(true);

        GOMinerWSPortTypeStub.GetReportResponse data = "">

        System.out.println(data.getOut()); 

    }

}

 

Command used to generate the client:

../devEnv/axis2-std-0/bin/WSDL2Java.sh -o . -t false -uri http://discover.nci.nih.gov/gominer/xfire/GMService?wsdl

 

tcpmon log from a second run:

Sent:

POST /gominer/xfire/GMService HTTP/1.1

User-Agent: Axis/2.0

SOAPAction:

Host: discover.nci.nih.gov:8081

Transfer-Encoding: chunked

Content-Type: text/xml; charset=UTF-8

 

120

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><ns1:getReport xmlns:ns1="http://webservice.gominer.lmp.nci.nih.gov"><ns1:in7>true</ns1:in7></ns1:getReport></soapenv:Body></soapenv:Envelope>

0

 

Received:

HTTP/1.1 500 Internal Server Error

Date: Thu, 06 Apr 2006 18:30:02 GMT

Server: Apache

Content-Type: text/xml;charset=UTF-8

Connection: close

Transfer-Encoding: chunked

 

22f

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>Server</faultcode><faultstring>Illegal argument invoking 'gov.nih.nci.lmp.gominer.webservice.GOMinerWS.getReport([Ljava.lang.String;, [Ljava.lang.String;, java.lang.String, java.lang.String, java.lang.String, boolean, boolean, boolean)': wrong number of arguments</faultstring></soap:Fault></soap:Body></soap:Envelope>

0

 

Command used to invoke the demo code:

dkane$ java -cp build/lib/GOMinerWS-test-client.jar:../devEnv/axis2-std-0/lib/XmlSchema-SNAPSHOT.jar:../devEnv/axis2-std-0/lib/axis2-kernel-0.95.jar:../devEnv/axis2-std-0/lib/jaxen-1.1-beta-7.jar:../devEnv/axis2-std-0/lib/stax-api-1.0.jar:../devEnv/axis2-std-0/lib/annogen-0.1.0.jar:../devEnv/axis2-std-0/lib/backport-util-concurrent-2.0_01_pd.jar:../devEnv/axis2-std-0/lib/jaxme2-0.5.1.jar:../devEnv/axis2-std-0/lib/wstx-asl-2.8.2.jar:../devEnv/axis2-std-0/lib/axiom-api-0.95.jar:../devEnv/axis2-std-0/lib/commons-codec-1.3.jar:../devEnv/axis2-std-0/lib/jaxmejs-0.5.1.jar:../devEnv/axis2-std-0/lib/xbean-2.1.0.jar:../devEnv/axis2-std-0/lib/axiom-impl-0.95.jar:../devEnv/axis2-std-0/lib/commons-httpclient-3.0.jar:../devEnv/axis2-std-0/lib/jaxmexs-0.5.1.jar:../devEnv/axis2-std-0/lib/xercesImpl-2.7.1.jar:../devEnv/axis2-std-0/lib/axis-wsdl4j-1.2.jar:../devEnv/axis2-std-0/lib/commons-logging-1.0.4.jar:../devEnv/axis2-std-0/lib/log4j-1.2.13.jar:../devEnv/axis2-std-0/lib/xml-apis-1.3.02.jar:../devEnv/axis2-std-0/lib/axis2-adb-0.95.jar:../devEnv/axis2-std-0/lib/geronimo-spec-activation-1.0.2-rc4.jar:../devEnv/axis2-std-0/lib/maven-itest-plugin-1.0.jar:../devEnv/axis2-std-0/lib/axis2-codegen-0.95.jar:../devEnv/axis2-std-0/lib/geronimo-spec-javamail-1.3.1-rc5.jar:../devEnv/axis2-std-0/lib/policy-1.0.jar:../devEnv/axis2-std-0/lib/axis2-doom-0.95.jar:../devEnv/axis2-std-0/lib/geronimo-spec-jms-1.1-rc4.jar:../devEnv/axis2-std-0/lib/servletapi-2.3.jar  Demo

 

Thanks again!

 

Sincerely,

David Kane

 

Reply via email to