Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while invoking web service method from Axis 1.4 client

 
PrasadRama Vara
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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'

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic