axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pantvaidya, Vishwajit" <>
Subject [Axis2] Axis2 client code with ServiceClient created as dynamic client gives AxisFault: The anonOutInOp operation cannot be found
Date Sat, 19 Jan 2008 08:53:51 GMT
Using Axis2 1.3, I have written the following sample client code that calls a remote webservice
for currency conversion - it throws the exception:

AxisFault: The anonOutInOp operation cannot be found.
            at org.apache.axis2.client.ServiceClient.createClient(
            at org.apache.axis2.client.ServiceClient.sendReceive(
            at org.apache.axis2.client.ServiceClient.sendReceive(

/* 1 */ ServiceClient svcClient = new ServiceClient(null, new URL(""),
new QName("http://www.webserviceX.NET/","CurrencyConvertor"), "CurrencyConvertorSoap";);

OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace ns = fac.createOMNamespace("http://www.webserviceX.NET/", "ns1");
OMElement payload = fac.createOMElement("ConversionRate", ns);

OMElement fromValue = fac.createOMElement("FromCurrency", ns);

OMElement toValue = fac.createOMElement("ToCurrency", ns);

OMElement responseElem=svcClient.sendReceive(payload);

The client works when I replace the dynamic service client creation by a normal creation (new
ServiceClient()) without any args and set Options object into it i.e. replacing line marked
/* 1 */ above with the following works:

svcClient = new ServiceClient();
Options opts = new Options();
opts.setTo(new EndpointReference(""));

The first code worked in Axis1. Is something wrong in it or will it not work due to changes
in Axis2?

View raw message