Hi Deepal! Thank you for your asnwer! I got that! It worked fine now, with 2
parameters! :)
So, when I want to parse the WSDL to get the input parameters (for example,
parse the wsdl to get the 2 inputs of a sum), I cannot use the OMElement?
Because even if I have for example 4 parameters, there will be only one
input par in the WSDL right? In this cases, the best way is NOT using
OMElement?
Thanks again!
Andrews
----- Original Message -----
From: "Deepal Jayasinghe" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, November 20, 2006 9:32 AM
Subject: Re: AXIS2 Auto-WSDL generation incompatible (when including ?WSDL
in the endpoint)
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
__________ Informação do NOD32 IMON 1872 (20061120) __________
Esta mensagem foi verificada pelo NOD32 sistema antivírus
http://www.eset.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]