Forum Discussion

Brijesh's avatar
Brijesh
New Contributor
15 years ago

Missing operation for soapAction [] and body element

hello there,

When i execute dynamic client against a mock service generated using SOAPUI 3.5 , I get following error.
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (500)Internal Server Error
faultActor:
faultNode:
faultDetail:
{}:return code:  500
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <soapenv:Fault>
      <faultcode>Server</faultcode>
      <faultstring>Missing operation for soapAction [] and body element [{http://www.example.org/manage_engnr_task/}createTask] with SOAP Version [SOAP 1.1]</faultstring>
    </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>
{http://xml.apache.org/axis/}HttpErrorCode:500

(500)Internal Server Error
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.etisalat.webservice.client.ServicInvoker.Invoke(ServicInvoker.java:76)
at com.etisalat.webservice.client.TestTransformDoc.main(TestTransformDoc.java:40)


I am using dynamic java client , which is as follows

public Document Invoke(Document domTrnfrmddoc) {
{

Document returnDocument = null;
try {
/*
* URL of the web service
*/
String address = "http://wks086:8088/mockmanage_engnr_taskSOAP";
String namespaceURI = "http://www.example.org/manage_engnr_task/";
String serviceName = "manage_engnr_taskService";
// String serviceName = "manage_engnr_taskServicetEST";

String portName = "manage_engnr_taskPort";

ServiceFactory factory = ServiceFactory.newInstance();

/*
* Create an instance of the Service with the given service
* QName
*/
Service service = factory.createService(new QName(serviceName));

Call call = service.createCall(new QName(portName));

// call.setProperty(Call.SOAPACTION_URI_PROPERTY,
// "http://www.example.org/manage_engnr_task/createTask");
call.setTargetEndpointAddress(address);

QName genDocQName = new QName("com.ekaplus.commons.document",
"doc"); /*
* Set operation name to invoke.
*/
call.setOperationName(new QName("createTask"));

/*
* Add parameters definitions in the call object.

*/

call.addParameter("gendoc", genDocQName, ParameterMode.IN);
// call.addParameter("gendoc", genDocQName, ParameterMode.OUT);

System.out.println("Added parameter");
/*
* Set definition of the return type.
*/
call.setReturnType(genDocQName);

Object[] inParams = new Object[1];
inParams[0] = domTrnfrmddoc;

System.out.println("param content is "
+ domTrnfrmddoc.getDocumentElement());
returnDocument = ((Document) call.invoke(inParams));

System.out.println("Result of process  "
+ returnDocument.getDocumentElement());

} catch (Exception e) {
e.printStackTrace();
}

return returnDocument;
}

}


WSDL as follows



 
 
   
   
    schemaLocation="GenericDocument.xsd">
   

 
   
 

 
   
 

 
   
     
     
   

 

 
   
   
     
     
       
     
     
       
     

   

 

 
   
     

   

 




any idea what I am doing wrong here?

Regards
brijesh N K
No RepliesBe the first to reply