Hi,

I am trying to revise a little bit to the Counter example of ws-core-4.2.0
to have the *add* method to have two parameters. That is add(int in0, int
int1).
For the file
ws-core-4.2.0/schema/core/samples/counter/counter_flattened.wsdl, I have
added
*<xsd:element name="add1" type="xsd:int"/>*  under the
*<xsd:element name="add" type="xsd:int"/>*
and changed the message from
*<wsdl:message name="AddInputMessage">
    <wsdl:part name="parameters" element="tns:add"/>
  </wsdl:message>*
To
*<wsdl:message name="AddInputMessage">
    <wsdl:part name="parameters" element="tns:add"/>
    <wsdl:part name="parameters" element="tns:add1"/>
  </wsdl:message>
*I leave the binding unchanged. *
* I have also changed following java files:
CounterService.java
*public int add(int arg0) throws RemoteException*
To
*public int add(int arg0, int arg1) throws RemoteException*

client/Add.java
*add(value);*
to
* add(value, value1);*

client/CounterClient.java
 *addPort.add(3 );*
to *addPort.add(3,4);*

* addPort.add(10); *
to
 *addPort.add(10, 11);*

Then I recompiled the ws-core-4.2.0 package, every thing seems fine and
server can be started. However, when I try to run the
bin/counter-create command line with the given service url, it told me:
Error: java.lang.Exception: [CORE] Having more than one input parameter is
not allowed

It seems in the ServiceDescUtil.java file the public static boolean
fixNamespaces() method, the following checking gives the error:
if (params.list.size() > 1) {
                            throw new Exception(
                                i18n.getMessage("invalidNumberOfParams"));
                        }
It seems when the service is initialized, it does not allow the two
parameters for the add operation. Even though the counter creation operation
does not invoke the add operation.
Would you please explain what is this used for? And how I can change the
add(int in0) method into add(int in0, int in1)?

Thanks,

-- 
Donglai Zhang

Reply via email to