axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Dillon (ext. 944)" <>
Subject RE: INOUT / OUT parameters
Date Thu, 28 Nov 2002 15:33:33 GMT

At the moment I have a WSDD which defines;

      <operation name="myTestCall">
        <parameter nane="myStr" type="tns:string"
        xmlns:tns="" mode="INOUT"/>

In my Implementation code I have a method with signature;

    public String myTestCall(StringHolder in0) throws

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"/>

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;

           String strXmlOid = "Some arbitrary string";
           javax.xml.rpc.holders.StringHolder xmlOid = new
           String ret = (String) cll.invoke( new Object[] {xmlOid} );

But I get the exception 

	- Mapping Exception to AxisFault
	 faultCode: {}Server.userException
	 faultString: No serializer found for class
	in registry org.apache.axis.encoding.TypeMappingImpl@26f75b
	 faultActor: null
	        stackTrace: No serializer found for
class javax.xml.rpc.holders.StringH
	older in registry org.apache.axis.encoding.TypeMappingImpl@26f75b

This is why I presumed originally that I might need a serializer, but If I
don't do you know what I am doing wrong ?


-----Original Message-----
From: Cédric Chabanois []
Sent: 28 November 2002 14:55
To: ''
Subject: RE: INOUT / OUT parameters

> Hi,
> Has anyone used OUT/INOUT parameters in an Axis SOAP service 
> before ? If so;

Me and it works well.
> Do you need to provide Serializers/Deserializers to cope with 
> the Handlers ?
> If I want to use a String (or other basic type) as an INOUT 
> parameter should
> I be using 'avax.xml.rpc.holders.StringHolder' and is there already a
> (de)serialiser for this ?

For string, the holder class is javax.xml.rpc.holders.StringHolder. Many
holders are already defined in javax.xml.rpc.holders
You don't need to provide a serialiser (even if you use a bean holder or
array holder but you will need to write your holder classes in these cases)

> What should the WSDD look like ?

something like :


  <service name="TEST3" provider="java:RPC">
    <parameter name="allowedMethods" value="*"/>
    <parameter name="wsdlPortType" value="TEST3"/>
    <parameter name="wsdlTargetNamespace" value="http://soapNcl/TEST3/"/>
    <parameter name="className"
      <beanMapping qname="ns:SEG1Bean" xmlns:ns="http://soapNcl/TEST3/"

      <operation name="MODIFYCSTRING" >
        <parameter name="PARAM" mode="INOUT"/>
      <operation name="MODIFYINT4" >
        <parameter name="PARAM" mode="INOUT"/>
      <operation name="MODIFYNUM4" >
        <parameter name="PARAM" mode="INOUT"/>
      <operation name="MODIFYSEG" >
        <parameter name="PARAM" mode="INOUT"/>

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.

View raw message