axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: AXIS2 Auto-WSDL generation incompatible (when including ?WSDL in the endpoint)
Date Mon, 20 Nov 2006 11:32:41 GMT
Hi Andrew ;
When your method take OMElement as argument that is what we can generate
. So if you like to see something nice then change your method signature
as follows and see whether you get the right thing.

public int add(int a , int b){
return a + b;
}

> 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;
>    }
>}
>
>------------------------------------------------------------------------
>
><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: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message