You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/22 10:36:28 UTC

[jira] Created: (AXIS-1616) Problems with Call.addParameter and ParameterMode.OUT

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1616

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1616
    Summary: Problems with Call.addParameter and ParameterMode.OUT
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             1.1

   Assignee: 
   Reporter: Markus Schmitt

    Created: Fri, 22 Oct 2004 1:34 AM
    Updated: Fri, 22 Oct 2004 1:34 AM
Environment: WinXP, ApplicationServer WebSphere 5.0.2.4

Description:
I defined a operation within a WebService Implementation Class.

Here a code snipplet of an Axis Client call to this Webservice method:

Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new URL(endpoint));
QName method = new QName("getDCCFile");

call.setUsername(userName);
call.setPassword(password);

//Jetzt noch nicht nutzbar, da Bug in AXIS Framework !!!
QName qName = new QName("http://ais.gzs.de", "Ticket");
call.registerTypeMapping(
	LongHolder.class, qName,
	new BeanSerializerFactory(LongHolder.class, qName),
	new BeanDeserializerFactory(LongHolder.class, qName)
);
call.addParameter("ticket", qName, ParameterMode.OUT);

call.setOperationName(method);

call.setReturnType(XMLType.XSD_INT);
Integer retValue = (Integer) call.invoke(params);

After calling "invoke" the following error occurs:

java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType.  The java type javax.xml.rpc.holders.LongHolder does not match the mode in
java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType.  The java type javax.xml.rpc.holders.LongHolder does not match the mode in
	at org.apache.axis.description.ParameterDesc.setJavaType(ParameterDesc.java:263)
	at org.apache.axis.client.Call.addParameter(Call.java:894)
	at org.apache.axis.client.Call.addParameter(Call.java:926)
	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.doGetFile(ActionEventListener.java:244)
	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.doRequest(ActionEventListener.java:178)
	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.access$4(ActionEventListener.java:168)
	at de.gzs.asp.clients.webservice.dcc.ActionEventListener$ActionThread.run(ActionEventListener.java:91)
	at java.lang.Thread.run(Thread.java:513)


The WebService is definded like this:

<service name="DCC" provider="java:RPC">
<requestFlow>
	<!--<handler type="ServerSecurityHandler"/>-->
	<handler type="soapmonitor"/>
</requestFlow>
<responseFlow>
	<handler type="soapmonitor"/>
	<handler type="LogHandler"/>
</responseFlow>

<parameter name="className" value="de.gzs.ais.service.dcc.DCCImpl"/>
<parameter name="allowedMethods" value="getState getDCCFile sendConfirmation"/>
<parameter name="scope" value="request"/>

<beanMapping qname="GzsAisDccNS:Ticket"
			 xmlns:GzsAisDccNS="http://ais.gzs.de"
			 languageSpecificType="java:javax.xml.rpc.holders.LongHolder"/>

<operation name="getDCCFile">
	<parameter name="ticket" mode="OUT"/>
</operation>

</service>


I think the problem lies in the ParameterDesc Class.
The "setJavaType" method is called before the mode of the parameter is set.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-1616) Problems with Call.addParameter and ParameterMode.OUT

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1616?page=history ]
     
Davanum Srinivas resolved AXIS-1616:
------------------------------------

    Resolution: Invalid

Holders are used ONLY when you need to send a value AND get a value back. 

-- dims

> Problems with Call.addParameter and ParameterMode.OUT
> -----------------------------------------------------
>
>          Key: AXIS-1616
>          URL: http://issues.apache.org/jira/browse/AXIS-1616
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.1
>  Environment: WinXP, ApplicationServer WebSphere 5.0.2.4
>     Reporter: Markus Schmitt

>
> I defined a operation within a WebService Implementation Class.
> Here a code snipplet of an Axis Client call to this Webservice method:
> Call call = (Call) service.createCall();
> call.setTargetEndpointAddress(new URL(endpoint));
> QName method = new QName("getDCCFile");
> call.setUsername(userName);
> call.setPassword(password);
> //Jetzt noch nicht nutzbar, da Bug in AXIS Framework !!!
> QName qName = new QName("http://ais.gzs.de", "Ticket");
> call.registerTypeMapping(
> 	LongHolder.class, qName,
> 	new BeanSerializerFactory(LongHolder.class, qName),
> 	new BeanDeserializerFactory(LongHolder.class, qName)
> );
> call.addParameter("ticket", qName, ParameterMode.OUT);
> call.setOperationName(method);
> call.setReturnType(XMLType.XSD_INT);
> Integer retValue = (Integer) call.invoke(params);
> After calling "invoke" the following error occurs:
> java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType.  The java type javax.xml.rpc.holders.LongHolder does not match the mode in
> java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType.  The java type javax.xml.rpc.holders.LongHolder does not match the mode in
> 	at org.apache.axis.description.ParameterDesc.setJavaType(ParameterDesc.java:263)
> 	at org.apache.axis.client.Call.addParameter(Call.java:894)
> 	at org.apache.axis.client.Call.addParameter(Call.java:926)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.doGetFile(ActionEventListener.java:244)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.doRequest(ActionEventListener.java:178)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.access$4(ActionEventListener.java:168)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener$ActionThread.run(ActionEventListener.java:91)
> 	at java.lang.Thread.run(Thread.java:513)
> The WebService is definded like this:
> <service name="DCC" provider="java:RPC">
> <requestFlow>
> 	<!--<handler type="ServerSecurityHandler"/>-->
> 	<handler type="soapmonitor"/>
> </requestFlow>
> <responseFlow>
> 	<handler type="soapmonitor"/>
> 	<handler type="LogHandler"/>
> </responseFlow>
> <parameter name="className" value="de.gzs.ais.service.dcc.DCCImpl"/>
> <parameter name="allowedMethods" value="getState getDCCFile sendConfirmation"/>
> <parameter name="scope" value="request"/>
> <beanMapping qname="GzsAisDccNS:Ticket"
> 			 xmlns:GzsAisDccNS="http://ais.gzs.de"
> 			 languageSpecificType="java:javax.xml.rpc.holders.LongHolder"/>
> <operation name="getDCCFile">
> 	<parameter name="ticket" mode="OUT"/>
> </operation>
> </service>
> I think the problem lies in the ParameterDesc Class.
> The "setJavaType" method is called before the mode of the parameter is set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1616) Problems with Call.addParameter and ParameterMode.OUT

Posted by "Markus Schmitt (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1616?page=comments#action_54611 ]
     
Markus Schmitt commented on AXIS-1616:
--------------------------------------

Ok.
But I only want to get an out parameter value.
The parameter was declared as OUT not INOUT.
If I don't specify the Holder Class, as you mentioned, what do I have to do?


> Problems with Call.addParameter and ParameterMode.OUT
> -----------------------------------------------------
>
>          Key: AXIS-1616
>          URL: http://issues.apache.org/jira/browse/AXIS-1616
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.1
>  Environment: WinXP, ApplicationServer WebSphere 5.0.2.4
>     Reporter: Markus Schmitt

>
> I defined a operation within a WebService Implementation Class.
> Here a code snipplet of an Axis Client call to this Webservice method:
> Call call = (Call) service.createCall();
> call.setTargetEndpointAddress(new URL(endpoint));
> QName method = new QName("getDCCFile");
> call.setUsername(userName);
> call.setPassword(password);
> //Jetzt noch nicht nutzbar, da Bug in AXIS Framework !!!
> QName qName = new QName("http://ais.gzs.de", "Ticket");
> call.registerTypeMapping(
> 	LongHolder.class, qName,
> 	new BeanSerializerFactory(LongHolder.class, qName),
> 	new BeanDeserializerFactory(LongHolder.class, qName)
> );
> call.addParameter("ticket", qName, ParameterMode.OUT);
> call.setOperationName(method);
> call.setReturnType(XMLType.XSD_INT);
> Integer retValue = (Integer) call.invoke(params);
> After calling "invoke" the following error occurs:
> java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType.  The java type javax.xml.rpc.holders.LongHolder does not match the mode in
> java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType.  The java type javax.xml.rpc.holders.LongHolder does not match the mode in
> 	at org.apache.axis.description.ParameterDesc.setJavaType(ParameterDesc.java:263)
> 	at org.apache.axis.client.Call.addParameter(Call.java:894)
> 	at org.apache.axis.client.Call.addParameter(Call.java:926)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.doGetFile(ActionEventListener.java:244)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.doRequest(ActionEventListener.java:178)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.access$4(ActionEventListener.java:168)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener$ActionThread.run(ActionEventListener.java:91)
> 	at java.lang.Thread.run(Thread.java:513)
> The WebService is definded like this:
> <service name="DCC" provider="java:RPC">
> <requestFlow>
> 	<!--<handler type="ServerSecurityHandler"/>-->
> 	<handler type="soapmonitor"/>
> </requestFlow>
> <responseFlow>
> 	<handler type="soapmonitor"/>
> 	<handler type="LogHandler"/>
> </responseFlow>
> <parameter name="className" value="de.gzs.ais.service.dcc.DCCImpl"/>
> <parameter name="allowedMethods" value="getState getDCCFile sendConfirmation"/>
> <parameter name="scope" value="request"/>
> <beanMapping qname="GzsAisDccNS:Ticket"
> 			 xmlns:GzsAisDccNS="http://ais.gzs.de"
> 			 languageSpecificType="java:javax.xml.rpc.holders.LongHolder"/>
> <operation name="getDCCFile">
> 	<parameter name="ticket" mode="OUT"/>
> </operation>
> </service>
> I think the problem lies in the ParameterDesc Class.
> The "setJavaType" method is called before the mode of the parameter is set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1616) Problems with Call.addParameter and ParameterMode.OUT

Posted by "Markus Schmitt (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1616?page=comments#action_54615 ]
     
Markus Schmitt commented on AXIS-1616:
--------------------------------------

Please forget the last comment.

Everything is allright.

Thanks a lot and sorry.

MS

> Problems with Call.addParameter and ParameterMode.OUT
> -----------------------------------------------------
>
>          Key: AXIS-1616
>          URL: http://issues.apache.org/jira/browse/AXIS-1616
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.1
>  Environment: WinXP, ApplicationServer WebSphere 5.0.2.4
>     Reporter: Markus Schmitt

>
> I defined a operation within a WebService Implementation Class.
> Here a code snipplet of an Axis Client call to this Webservice method:
> Call call = (Call) service.createCall();
> call.setTargetEndpointAddress(new URL(endpoint));
> QName method = new QName("getDCCFile");
> call.setUsername(userName);
> call.setPassword(password);
> //Jetzt noch nicht nutzbar, da Bug in AXIS Framework !!!
> QName qName = new QName("http://ais.gzs.de", "Ticket");
> call.registerTypeMapping(
> 	LongHolder.class, qName,
> 	new BeanSerializerFactory(LongHolder.class, qName),
> 	new BeanDeserializerFactory(LongHolder.class, qName)
> );
> call.addParameter("ticket", qName, ParameterMode.OUT);
> call.setOperationName(method);
> call.setReturnType(XMLType.XSD_INT);
> Integer retValue = (Integer) call.invoke(params);
> After calling "invoke" the following error occurs:
> java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType.  The java type javax.xml.rpc.holders.LongHolder does not match the mode in
> java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType.  The java type javax.xml.rpc.holders.LongHolder does not match the mode in
> 	at org.apache.axis.description.ParameterDesc.setJavaType(ParameterDesc.java:263)
> 	at org.apache.axis.client.Call.addParameter(Call.java:894)
> 	at org.apache.axis.client.Call.addParameter(Call.java:926)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.doGetFile(ActionEventListener.java:244)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.doRequest(ActionEventListener.java:178)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener.access$4(ActionEventListener.java:168)
> 	at de.gzs.asp.clients.webservice.dcc.ActionEventListener$ActionThread.run(ActionEventListener.java:91)
> 	at java.lang.Thread.run(Thread.java:513)
> The WebService is definded like this:
> <service name="DCC" provider="java:RPC">
> <requestFlow>
> 	<!--<handler type="ServerSecurityHandler"/>-->
> 	<handler type="soapmonitor"/>
> </requestFlow>
> <responseFlow>
> 	<handler type="soapmonitor"/>
> 	<handler type="LogHandler"/>
> </responseFlow>
> <parameter name="className" value="de.gzs.ais.service.dcc.DCCImpl"/>
> <parameter name="allowedMethods" value="getState getDCCFile sendConfirmation"/>
> <parameter name="scope" value="request"/>
> <beanMapping qname="GzsAisDccNS:Ticket"
> 			 xmlns:GzsAisDccNS="http://ais.gzs.de"
> 			 languageSpecificType="java:javax.xml.rpc.holders.LongHolder"/>
> <operation name="getDCCFile">
> 	<parameter name="ticket" mode="OUT"/>
> </operation>
> </service>
> I think the problem lies in the ParameterDesc Class.
> The "setJavaType" method is called before the mode of the parameter is set.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira