axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (Resolved) (JIRA)" <axis-...@ws.apache.org>
Subject [jira] [Resolved] (AXIS-2830) javax.xml.rpc.JAXRPCException??????
Date Sun, 29 Jan 2012 16:05:10 GMT

     [ https://issues.apache.org/jira/browse/AXIS-2830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen resolved AXIS-2830.
-----------------------------------

    Resolution: Invalid

If you add one IN parameter using addParameter, then the array passed to the invoke method
must be of length 1. You pass an empty array, and therefore you get an exception.
                
> javax.xml.rpc.JAXRPCException??????
> -----------------------------------
>
>                 Key: AXIS-2830
>                 URL: https://issues.apache.org/jira/browse/AXIS-2830
>             Project: Axis
>          Issue Type: Wish
>          Components: Deployment / Registries
>         Environment: Apache Tomcat 6.0, Axis 1.4, Eclipse, Windows XP
>            Reporter: asadfx
>            Priority: Critical
>
> I have deployed a simple web service using Apache Tomcat 6.0 and Axis 1.4 in Windows
XP. Now the server is very simple:
> [code]
> import java.io.*;
> import java.util.*;
> /*
> HelloWorld.java
> This is our web service
> */
> public class HelloWorld
> {
> public String getHelloWorld(String id)
> {
> String retName="";
> try
> 		{
> 			File indexFile = new File("index.txt");
> 			retName=indexFile.getAbsolutePath()+id;
> 		}
> 		catch(Exception e)
> 		{
> 			e.printStackTrace();
> 		}
> 	return retName;
> }
> }
> [/code]
> Now if the client doesn't send any parameters then everything works well (I am using
Eclipse to run the client). But as sson as I try to send a parameter to the server, I get
the following error:
> "javax.xml.rpc.JAXRPCException: Number of parameters passed in (0) doesn't match the
number of IN/INOUT parameters (1) from the addParameter() calls"
> Why is this happening??? My client is also very simple:
> [code]
> package dummyC;
> import java.util.*;
> import org.apache.axis.client.Call;
> import org.apache.axis.client.Service;
> import org.apache.axis.encoding.XMLType;
> import org.apache.axis.utils.Options;
> import javax.xml.namespace.QName;
> import javax.xml.rpc.ParameterMode;
> import javax.xml.rpc.*;
> public class DummyC {
> 	/**
> 	 * @param args
> 	 */
> 	public static void main(String[] args) 
> 	{
> 		try
> 		{
> 		
> 		Service service = new Service();
> 		Call call = (Call)service.createCall();
> 		String endpoint ="http://localhost:8081/axis/HelloWorld.jws";
> 		call.setTargetEndpointAddress(new java.net.URL(endpoint));
> 		call.setOperationName(new QName("getHelloWorld"));
> 		call.addParameter("param1",XMLType.XSD_STRING, ParameterMode.IN);
> 		String output = (String)call.invoke(new Object[]{});
> 		System.out.println("Got result : " + output);
> 		}
> 		catch(Exception e)
> 		{
> 			System.out.print("sssss: "+e.toString());
> 		}
> 		
> 				
> 	}
> }
> [/code] 
> Please guys, I need to solve this problem with in the next couple of days.
> Bye.
>  
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message