You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by brijesh <br...@gmail.com> on 2010/04/12 11:09:31 UTC
Missing operation for soapAction
[http://www.example.org/manage_engnr_task/createTask] and body element
[{http://www.example.org/manage_engnr_task/}createTask] with SOAP Version
[SOAP 1.1]
hello there ,
When I execute client I get the following fault, client is created using
dynamic client.
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
[http://www.example.org/manage_engnr_task/createTask] 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:78)
at
com.etisalat.webservice.client.TestTransformDoc.main(TestTransformDoc.java:40)
I have following wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.example.org/manage_engnr_task/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="manage_engnr_task"
targetNamespace="http://www.example.org/manage_engnr_task/"
xmlns:xsd1="com.ekaplus.commons.document">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="com.ekaplus.commons.document"
schemaLocation="GenericDocument.xsd">
</xsd:import></xsd:schema></wsdl:types>
<wsdl:message name="createTaskRequest">
<wsdl:part element="xsd1:GenericDocument" name="parameters"/>
</wsdl:message>
<wsdl:message name="createTaskResponse">
<wsdl:part element="xsd1:GenericDocument" name="parameters"/>
</wsdl:message>
<wsdl:portType name="manage_engnr_taskPortType">
<wsdl:operation name="createTask">
<wsdl:input message="tns:createTaskRequest"/>
<wsdl:output message="tns:createTaskResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="manage_engnr_taskSOAP"
type="tns:manage_engnr_taskPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="createTask">
<soap:operation
soapAction="http://www.example.org/manage_engnr_task/createTask"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="manage_engnr_taskService">
<wsdl:port binding="tns:manage_engnr_taskSOAP"
name="manage_engnr_taskPort">
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
java client code as below
package com.etisalat.webservice.client;
import javax.xml.rpc.Call;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.ParameterMode;
import javax.xml.namespace.QName;
import org.w3c.dom.Document;
public class ServicInvoker {
/**
*
* @param args
*/
// public static void main(String[] args)
// {
// Invoke invokeService = new Invoke();
// }
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 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(namespaceURI,"createTask"));
/*
* Add parameters definitions in the call object.
*/
call.addParameter("gendoc", genDocQName, ParameterMode.IN);
/*
* Set definition of the return type.
*/
call.setReturnType(genDocQName);
Object[] inParams = new Object[1];
inParams[0] = domTrnfrmddoc;
returnDocument = ((Document)call.invoke(inParams));
System.out.println("Result of process " +
returnDocument.getDocumentElement());
}
catch (Exception e)
{
e.printStackTrace();
}
return returnDocument;
}
}
}
can anybody help me what I am doing wrong here??
Brijesh N K
--
View this message in context: http://old.nabble.com/Missing-operation-for-soapAction--http%3A--www.example.org-manage_engnr_task-createTask--and-body-element--%7Bhttp%3A--www.example.org-manage_engnr_task-%7DcreateTask--with-SOAP-Version--SOAP-1.1--tp28215395p28215395.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
Re: Missing operation for soapAction [http://www.example.org/manage_engnr_task/createTask]
and body element [{http://www.example.org/manage_engnr_task/}createTask] with
SOAP Version [SOAP 1.1]
Posted by Andreas Veithen <an...@gmail.com>.
As part of the promotion of the Axis project to a top level project,
we have decided to create separate mailing lists for Axis 1 and Axis2.
For all Axis 1 related questions please subscribe and post to
axis1-java-user@axis.apache.org. Thanks!
Andreas
On Mon, Apr 12, 2010 at 11:09, brijesh <br...@gmail.com> wrote:
>
> hello there ,
>
>
> When I execute client I get the following fault, client is created using
> dynamic client.
>
>
> 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
> [http://www.example.org/manage_engnr_task/createTask] 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:78)
> at
> com.etisalat.webservice.client.TestTransformDoc.main(TestTransformDoc.java:40)
>
>
>
>
>
> I have following wsdl
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://www.example.org/manage_engnr_task/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="manage_engnr_task"
> targetNamespace="http://www.example.org/manage_engnr_task/"
> xmlns:xsd1="com.ekaplus.commons.document">
> <wsdl:types>
>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:import namespace="com.ekaplus.commons.document"
> schemaLocation="GenericDocument.xsd">
> </xsd:import></xsd:schema></wsdl:types>
> <wsdl:message name="createTaskRequest">
> <wsdl:part element="xsd1:GenericDocument" name="parameters"/>
> </wsdl:message>
> <wsdl:message name="createTaskResponse">
> <wsdl:part element="xsd1:GenericDocument" name="parameters"/>
> </wsdl:message>
> <wsdl:portType name="manage_engnr_taskPortType">
> <wsdl:operation name="createTask">
> <wsdl:input message="tns:createTaskRequest"/>
> <wsdl:output message="tns:createTaskResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="manage_engnr_taskSOAP"
> type="tns:manage_engnr_taskPortType">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="createTask">
> <soap:operation
> soapAction="http://www.example.org/manage_engnr_task/createTask"/>
> <wsdl:input>
> <soap:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <soap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="manage_engnr_taskService">
> <wsdl:port binding="tns:manage_engnr_taskSOAP"
> name="manage_engnr_taskPort">
> <soap:address location="http://www.example.org/"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
>
> java client code as below
>
> package com.etisalat.webservice.client;
>
> import javax.xml.rpc.Call;
> import javax.xml.rpc.Service;
> import javax.xml.rpc.ServiceFactory;
> import javax.xml.rpc.ParameterMode;
> import javax.xml.namespace.QName;
>
> import org.w3c.dom.Document;
>
>
> public class ServicInvoker {
>
>
> /**
> *
> * @param args
> */
> // public static void main(String[] args)
> // {
> // Invoke invokeService = new Invoke();
> // }
>
>
>
> 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 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(namespaceURI,"createTask"));
> /*
> * Add parameters definitions in the call object.
> */
>
> call.addParameter("gendoc", genDocQName, ParameterMode.IN);
>
>
> /*
> * Set definition of the return type.
> */
> call.setReturnType(genDocQName);
>
> Object[] inParams = new Object[1];
> inParams[0] = domTrnfrmddoc;
>
>
> returnDocument = ((Document)call.invoke(inParams));
> System.out.println("Result of process " +
> returnDocument.getDocumentElement());
>
> }
> catch (Exception e)
> {
> e.printStackTrace();
> }
>
> return returnDocument;
> }
>
> }
>
> }
>
> can anybody help me what I am doing wrong here??
>
> Brijesh N K
> --
> View this message in context: http://old.nabble.com/Missing-operation-for-soapAction--http%3A--www.example.org-manage_engnr_task-createTask--and-body-element--%7Bhttp%3A--www.example.org-manage_engnr_task-%7DcreateTask--with-SOAP-Version--SOAP-1.1--tp28215395p28215395.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org