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?

Reply via email to