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/07/11 16:55:33 UTC
wsdd file
Hi,
I have read "Deployment (WSDD) Reference" from "Axis Reference Guide"
but I still have many questions about this file format.
In fact, I don't know what is mandatory and when.
Here is what I have understood, please correct me when I am wrong :
1) If I have a very simple web service (no beans, no holders), I can keep
this file very simple.
I have just to tell to axis which class implements my web service
<parameter name="className" value="samples.userguide.example3.MyService"/>
2) When a method takes a bean as a parameter
I just have to add a <beanMapping> element
<beanMapping qname="myNS:Order" xmlns:myNS="urn:BeanService"
languageSpecificType="java:samples.userguide.example5.Order"/>
I still don't need to add <operation> elements
3) When a method takes an holder of a primitive type as parameter
(FloatHolder, StringHolder ...)
I have to use an <operation> element
<operation name="ADDWORLD" returnQName="return" >
<parameter name="STR" mode="INOUT"/>
</operation>
I don't know if "returnQName" is necessary, probably not.
I let Axis discover what parameter types are but I tell him that "STR"
parameter is INOUT because it can't know otherwise if this parameter is
INOUT or OUT.
4) When a method takes an holder of a bean as parameter
2) + 3) I think
5) When a method takes an array as parameter (IN mode)
I don't know if I need to add that or if it is not necessary
<typeMapping
xmlns:ns="http://soapinterop.org/xsd"
qname="ns:ArrayOfint"
type="java:int[]"
serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
If it is needed (I don't think so), I have to add somethink like :
<parameter name="inputIntegerArray" type="tns:ArrayOfint"
xmlns:tns="http://soapinterop.org/xsd"/>
If it is not needed, what will be the qname in the wsdl file ?
6) When a method takes an array as parameter (OUT or INOUT mode)
I must create a java file :
public final class IntArrayHolder implements Holder {
public int[] value;
public IntArrayHolder() {}
public IntArrayHolder(int[] value) {
this.value = value;
}
}
In the wsdd, this is like 5), I probably just have to add mode="INOUT" for
the parameter
7) When a method takes an array of beans as parameter (IN mode)
2) + 5) I think
8) When a method takes an array of beans as parameter (OUT or INOUT mode)
I need to create a java file MyBeanArrayHolder which has a field
public myBean[] value;
same as 7), I probably just have to add mode="INOUT" for the parameter
That's all the cases I see...
Something else :
in which case I need to tell Axis the type of each parameter ?
<parameter name="inputInteger" type="tns:int"
xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
Thanks,
Cédric Chabanois