Hi,

If you are constructing the payload, you need to do the way which is specified 
by the WSDL of the service. For example, the pay load of a request which will 
be sent to a particular Web service operation will differ depending on the 
style it uses (document, rpc) and the encoding (literal, encoded).
So I am not sure whether you can achieve that by just including the parameter 
names and values as child elements of a parent with operation name.

Best,
--Sanka




Pantvaidya, Vishwajit wrote:

I need to dynamically call any given webservice using its wsdl provided as a parameter. Since I do not know the signature of the service, I need to be able to provide for sending or receiving parameter arrays/lists. So I have coded a client which creates a payload by adding a number of children to an OMElement i.e

OMNamespace ns = fac.createOMNamespace(operationNamespace, "ns1");

payload = fac.createOMElement(operationName, ns);

for (each parameter value) {

OMElement value = fac.createOMElement(parameterName, ns);

value.addChild(fac.createOMText(value, parameterValue.toString()));

payload.addChild(value);

}

Is this correct?

And do I absolutely need to provide parameter names as in the call “OMElement value = fac.createOMElement(parameterName, ns)” or is their another way by which I can only provide a list of input param values and have them associated with the webservice parameters based on position rather than name?



--
Sanka Samaranayake
WSO2 Inc.

http://www.bloglines.com/blog/sanka
http://www.wso2.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to