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 Cédric Chabanois <CC...@cognicase.fr> on 2002/11/29 09:49:47 UTC
RE: INOUT / OUT parameters
Brian told me that Call.getOutputParameters should return a map with the
parameter names as strings.
According to the specification, he is right :
"
getOutputParams
public java.util.Map getOutputParams()
Returns a Map of {name, value} for the output parameters of the last invoked
operation.
The parameter names in the returned Map are of type java.lang.String.
Returns:
Map Output parameters for the last Call.invoke(). Empty Map is returned if
there are no output parameters
"
But we return a map with the parameter names as QNames
So, are we JAX-RPC compliant here ?
Cédric
> I have however one quick question which you may be able to
> answer for me,
> according to the API getOuputParameters() returns a map with
> the parameter
> names as strings. However the map I was returned had the
> parameter names as
> QName types, is this correct or is it a bug in my version
> v1.0 of axis ?
>
> Thanks,
>
> Brian
>
> -----Original Message-----
> From: Cédric Chabanois [mailto:CChabanois@cognicase.fr]
> Sent: 28 November 2002 15:38
> To: 'axis-user@xml.apache.org'
> Subject: RE: INOUT / OUT parameters
>
>
>
> >
> > Cedric,
> >
> > At the moment I have a WSDD which defines;
> >
> > <operation name="myTestCall">
> > <parameter nane="myStr" type="tns:string"
> > xmlns:tns="http://www.w3.org/2001/XMLSchema" mode="INOUT"/>
> > </operation>
> >
> > In my Implementation code I have a method with signature;
> >
> > public String myTestCall(StringHolder in0) throws
> > java.rmi.RemoteException;
> >
> > This seems to deploy ok (and the WSDL looks ok i.e. it has a
> > response type
> > which contains an extra String for the INOUT parameter).
> >
> > <wsdl:message name="myTestCallResponse">
> > <wsdl:part name="myTestCallReturn" type="xsd:string"/>
> > <wsdl:part type="xsd:string"/>
> > </wsdl:message>
> >
> > My problem is, since I am not using generated stubs and
> > skeletons how should
> > my client call the service ?
> >
> > This is what I am using;
> >
> > cll.addParameter("testParam",
> > org.apache.axis.Constants.XSD_STRING,
> > javax.xml.rpc.ParameterMode.INOUT);
> > cll.setReturnType(org.apache.axis.Constants.XSD_STRING);
> > String strXmlOid = "Some arbitrary string";
> > javax.xml.rpc.holders.StringHolder xmlOid = new
> > javax.xml.rpc.holders.StringHolder(strXmlOid);
> > String ret = (String) cll.invoke( new Object[]
> {xmlOid} );
> >
>
> Don't put the holder as the parameter but the value itself :
> String ret = (String) cll.invoke( new Object[] {strXmlOid} );
> then get the output parameters :
> java.util.Map output = cll.getOutputParams();
> xmlOid.value = (java.lang.String) output.get("testParam");
>
> But why in your sample, your parameter is named "testParam"
> but in your wsdd
> myStr ?
>
> Cédric Chabanois
>
>
> **************************************************************
> ************
> The information contained in this e-mail is confidential,
> may be privileged and is intended only for the use of the
> recipient named above. If you are not the intended
> recipient or a representative of the intended recipient,
> you have received this e-mail in error and must not copy,
> use or disclose the contents of this email to anybody
> else. If you have received this e-mail in error, please
> notify the sender immediately by return e-mail and
> permanently delete the copy you received. This email has
> been swept for computer viruses. However, you should
> carry out your own virus checks.
>
>
> Registered in Ireland, No. 205721. http://www.FINEOS.com
> **************************************************************
> ************
>
RE: INOUT / OUT parameters
Posted by Davanum Srinivas <di...@yahoo.com>.
C�dric,
Please create a bugzilla report (http://nagoya.apache.org/bugzilla). Just looked at
http://java.sun.com/webservices/docs/1.0/api/javax/xml/rpc/Call.html#getOutputParams()
Thanks,
dims
--- C�dric_Chabanois <CC...@cognicase.fr> wrote:
> Brian told me that Call.getOutputParameters should return a map with the
> parameter names as strings.
>
> According to the specification, he is right :
> "
> getOutputParams
> public java.util.Map getOutputParams()
> Returns a Map of {name, value} for the output parameters of the last invoked
> operation.
> The parameter names in the returned Map are of type java.lang.String.
> Returns:
> Map Output parameters for the last Call.invoke(). Empty Map is returned if
> there are no output parameters
> "
>
> But we return a map with the parameter names as QNames
>
> So, are we JAX-RPC compliant here ?
>
>
> C�dric
>
>
> > I have however one quick question which you may be able to
> > answer for me,
> > according to the API getOuputParameters() returns a map with
> > the parameter
> > names as strings. However the map I was returned had the
> > parameter names as
> > QName types, is this correct or is it a bug in my version
> > v1.0 of axis ?
> >
> > Thanks,
> >
> > Brian
> >
> > -----Original Message-----
> > From: C�dric Chabanois [mailto:CChabanois@cognicase.fr]
> > Sent: 28 November 2002 15:38
> > To: 'axis-user@xml.apache.org'
> > Subject: RE: INOUT / OUT parameters
> >
> >
> >
> > >
> > > Cedric,
> > >
> > > At the moment I have a WSDD which defines;
> > >
> > > <operation name="myTestCall">
> > > <parameter nane="myStr" type="tns:string"
> > > xmlns:tns="http://www.w3.org/2001/XMLSchema" mode="INOUT"/>
> > > </operation>
> > >
> > > In my Implementation code I have a method with signature;
> > >
> > > public String myTestCall(StringHolder in0) throws
> > > java.rmi.RemoteException;
> > >
> > > This seems to deploy ok (and the WSDL looks ok i.e. it has a
> > > response type
> > > which contains an extra String for the INOUT parameter).
> > >
> > > <wsdl:message name="myTestCallResponse">
> > > <wsdl:part name="myTestCallReturn" type="xsd:string"/>
> > > <wsdl:part type="xsd:string"/>
> > > </wsdl:message>
> > >
> > > My problem is, since I am not using generated stubs and
> > > skeletons how should
> > > my client call the service ?
> > >
> > > This is what I am using;
> > >
> > > cll.addParameter("testParam",
> > > org.apache.axis.Constants.XSD_STRING,
> > > javax.xml.rpc.ParameterMode.INOUT);
> > > cll.setReturnType(org.apache.axis.Constants.XSD_STRING);
> > > String strXmlOid = "Some arbitrary string";
> > > javax.xml.rpc.holders.StringHolder xmlOid = new
> > > javax.xml.rpc.holders.StringHolder(strXmlOid);
> > > String ret = (String) cll.invoke( new Object[]
> > {xmlOid} );
> > >
> >
> > Don't put the holder as the parameter but the value itself :
> > String ret = (String) cll.invoke( new Object[] {strXmlOid} );
> > then get the output parameters :
> > java.util.Map output = cll.getOutputParams();
> > xmlOid.value = (java.lang.String) output.get("testParam");
> >
> > But why in your sample, your parameter is named "testParam"
> > but in your wsdd
> > myStr ?
> >
> > C�dric Chabanois
> >
> >
> > **************************************************************
> > ************
> > The information contained in this e-mail is confidential,
> > may be privileged and is intended only for the use of the
> > recipient named above. If you are not the intended
> > recipient or a representative of the intended recipient,
> > you have received this e-mail in error and must not copy,
> > use or disclose the contents of this email to anybody
> > else. If you have received this e-mail in error, please
> > notify the sender immediately by return e-mail and
> > permanently delete the copy you received. This email has
> > been swept for computer viruses. However, you should
> > carry out your own virus checks.
> >
> >
> > Registered in Ireland, No. 205721. http://www.FINEOS.com
> > **************************************************************
> > ************
> >
=====
Davanum Srinivas - http://xml.apache.org/~dims/
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com