aspose file tools*
The moose likes Web Services and the fly likes Error while invoking web service method from Axis 1.4 client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error while invoking web service method from Axis 1.4 client" Watch "Error while invoking web service method from Axis 1.4 client" New topic
Author

Error while invoking web service method from Axis 1.4 client

PrasadRama Vara
Greenhorn

Joined: Mar 25, 2013
Posts: 2
Hi,

I am trying to invoke the web service method from Axis 1.4 client code as below

Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(endpoint);
System.out.println("endpoint ===> "+endpoint.toString());
call.setOperation("listGetPersons");

call.addParameter("status", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
String msg = (String)call.invoke(new Object[] {param[0]});
String res = call.getResponseMessage().getSOAPPartAsString();
System.out.println("Reply: " + msg);
System.out.println("response in SOAP format : " + res);


Below is the web service method details from WSDL file:

<operation name="listGetPersons">
<input message="tns:listGetPersonsRequest" name="input10" />
<output message="tns:listGetPersonsResponse" name="output10" />
</operation>



But I am getting the below error while invoking web service method. Please help me on this and let me know what will be the root cause/solution?
Thanks in advance.

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Unmarshalling Error: cvc-elt.1: Cannot find the declaration of element 'listGetPersons'

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while invoking web service method from Axis 1.4 client