Hello list!

I'm using the Axis2 1.1, and I have a sample add service that has 2 input 
parameters as input. But when I auto-generate the wsdl, including an ?WSDL in 
the end of the endpoint, it generates my WSDL fine. *BUT* the weird thing is 
that my WSDL has only *ONE* input parameter of "anyType", but, should be 2, 
isn't it?? I'm using the OMElement, that suppose to get 2 integers, but in the 
WSDL there is only one! Am I misconcepting something?!

I'm attaching my .java, services.xml and the auto-generated wsdl!

Thanks in advance for any help

Andrews
import java.util.Iterator;
import org.apache.axiom.om.*;
public class AddService  {
    public OMElement add(OMElement omelement)  {
        Iterator iterator = omelement.getChildElements();
        String par1 = ((OMElement)iterator.next()).getText();
        String par2 = ((OMElement)iterator.next()).getText();
        int i = Integer.parseInt(par1);
        int j = Integer.parseInt(par2);
        int k = i + j;
        OMFactory omfactory = OMAbstractFactory.getOMFactory();
        org.apache.axiom.om.OMNamespace omnamespace = omfactory.createOMNamespace("http://axis2/test/namespace1";, "ns1");
        OMElement omelement1 = omfactory.createOMElement("return", omnamespace);
        omelement1.setText(Integer.toString(k));
        return omelement1;
    }
}

Attachment: AddService.wsdl
Description: application/xml

<service name="AddService">
    <parameter name="ServiceClass" locked="false">AddService</parameter>
    <operation name="add">
        <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </operation>
</service>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to