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 "Marvin D. Toll" <Ma...@gtcGroup.com> on 2007/06/13 12:19:37 UTC
AxisFault: Message Receiver not found for AxisOperation: sendEmail
I'm a "newbie" and must have a fundamental gap in my understanding of how
Axis2 works. Any suggestion(s)?
_Marvin
** Immutable POJO **
public class RiEmail {
/** String */
final SjStringPopulatedMessage message;
/**
* @param message
*/
public RiEmail(SjStringPopulatedMessage message) {
super();
this.message = message;
}
/**
* @return the message
*/
public SjStringPopulatedMessage getMessage() {
return this.message;
}
}
** Application Service Object **
public class RiServiceForMail {
/** Email POJO */
RiEmail riEmail;
/**
* @param riEmail
* @return String - Indicating "true" or "false".
*/
public String sendEmail(@SuppressWarnings("unused")
RiEmail riEmail) {
return "true";
}
}
** Services Dot XML **
<?xml version="1.0" encoding="UTF-8"?>
<service name="ri001Service" scope="application">
<description>Email POJO Service</description>
<messageReceivers>
<messageReceiver mep="http://localhost/ri001/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"
/>
</messageReceivers>
<parameter name="ServiceClass">
net.soaj.ri001.service.RiServiceForMail
</parameter>
</service>
Available services
ri001Service <http://localhost:8080/axis2/services/ri001Service?wsdl>
Service EPR : http://localhost:8080/axis2/services/ri001Service
Service Description : ri001Service
Service Status : Active
Available Operations
* sendEmail
<wsdl:definitions xmlns:axis2="http://service.ri001.soaj.net"
xmlns:ns1="http://service.ri001.soaj.net/xsd"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns0="http://string.core.soaj.net/xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
targetNamespace="http://service.ri001.soaj.net">
<wsdl:documentation>ri001Service</wsdl:documentation>
<wsdl:types>
<xs:schema xmlns:ax21="http://string.core.soaj.net/xsd"
attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://string.core.soaj.net/xsd">
<xs:element name="SjStringPopulatedMessage"
type="ax21:SjStringPopulatedMessage" />
<xs:complexType name="SjStringPopulatedMessage">
<xs:complexContent>
<xs:extension
base="ax21:SjBaseStringPopulated">
<xs:sequence />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ax22="http://string.core.soaj.net/xsd"
xmlns:ns="http://service.ri001.soaj.net/xsd"
attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://service.ri001.soaj.net/xsd">
<xs:import namespace="http://string.core.soaj.net/xsd" />
<xs:element name="sendEmail">
<xs:complexType>
<xs:sequence>
<xs:element name="param0"
nillable="true"
type="ns:RiEmail" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="RiEmail" type="ns:RiEmail" />
<xs:complexType name="RiEmail">
<xs:sequence>
<xs:element name="message" nillable="true"
type="ax22:SjStringPopulatedMessage" />
</xs:sequence>
</xs:complexType>
<xs:element name="sendEmailResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return"
nillable="true"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="sendEmailMessage">
<wsdl:part name="part1" element="ns1:sendEmail" />
</wsdl:message>
<wsdl:message name="sendEmailResponse">
<wsdl:part name="part1" element="ns1:sendEmailResponse" />
</wsdl:message>
<wsdl:portType name="ri001ServicePortType">
<wsdl:operation name="sendEmail">
<wsdl:input
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
message="axis2:sendEmailMessage"
wsaw:Action="urn:sendEmail" />
<wsdl:output message="axis2:sendEmailResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ri001ServiceSOAP11Binding"
type="axis2:ri001ServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:operation name="sendEmail">
<soap:operation soapAction="urn:sendEmail"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ri001ServiceSOAP12Binding"
type="axis2:ri001ServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:operation name="sendEmail">
<soap12:operation soapAction="urn:sendEmail"
style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ri001ServiceHttpBinding"
type="axis2:ri001ServicePortType">
<http:binding verb="POST" />
<wsdl:operation name="sendEmail">
<http:operation location="sendEmail" />
<wsdl:input>
<mime:content type="text/xml" />
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ri001Service">
<wsdl:port name="ri001ServiceSOAP11port_http"
binding="axis2:ri001ServiceSOAP11Binding">
<soap:address
location="http://192.168.0.3:8080/axis2/services/ri001Service" />
</wsdl:port>
<wsdl:port name="ri001ServiceSOAP12port_http"
binding="axis2:ri001ServiceSOAP12Binding">
<soap12:address
location="http://192.168.0.3:8080/axis2/services/ri001Service" />
</wsdl:port>
<wsdl:port name="ri001ServiceHttpport"
binding="axis2:ri001ServiceHttpBinding">
<http:address
location="http://192.168.0.3:8080/axis2/services/ri001Service" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
** Outside Container JUnit Test **
public void testSetRiEmails() throws AxisFault {
RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference targetEPR = new EndpointReference(
"http://localhost:8099/axis2/services/ri001Service");
options.setTo(targetEPR);
QName opQname = new QName("sendEmail");
RiEmail riEmail = new RiEmail(new SjStringPopulatedMessage(
"test message"));
Object[] opMailArgs = new Object[] { riEmail };
Class<?>[] returnTypes = new Class[] { String.class };
Object[] response = serviceClient.invokeBlocking(opQname,
opMailArgs,
returnTypes);
String result = (String) response[0];
assertEquals("true", result);
}
** TCP Mon **
POST /axis2/services/ri001Service HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:anonOutInOp"
User-Agent: Axis2
Host: 127.0.0.1:8099
Transfer-Encoding: chunked
f6
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><sen
dEmail><arg0><message><string>test
message</string></message></arg0></sendEmail></soapenv:Body></soapenv:Envelo
pe>
0
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 13 Jun 2007 10:15:47 GMT
Connection: close
142
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soa
penv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Message
Receiver not found for AxisOperation: sendEmail</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>
0
** Stack Trace **
org.apache.axis2.AxisFault: Message Receiver not found for AxisOperation:
sendEmail
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:434
)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
n.java:373)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOpera
tion.java:294)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)
at
org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient
.java:97)
at
net.soaj.ri001.service.RiServiceForMailTest.testSetRiEmails(RiServiceForMail
Test.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at
junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76
)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
erence.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)
------------------------------------------
| USA Cell: 248.866.4897
| Email: <ma...@gtcGroup.com> MarvinToll@gtcGroup.com
| Web: <http://www.gtcGroup.com> http://www.gtcGroup.com
------------------------------------------
RE: AxisFault: Message Receiver not found for AxisOperation: sendEmail
Posted by Ted Jones <Tj...@metamatrix.com>.
Hi Marvin,
At first glance, your mep in the message receiver of your services.xml
looks incorrect. You might try this one:
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out
<http://www.w3.org/2004/08/wsdl/in-out> "
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
Ted
________________________________
From: Marvin D. Toll [mailto:MarvinToll@gtcGroup.com]
Sent: Wednesday, June 13, 2007 5:20 AM
To: axis-user@ws.apache.org
Subject: AxisFault: Message Receiver not found for AxisOperation:
sendEmail
I'm a "newbie" and must have a fundamental gap in my understanding of
how Axis2 works. Any suggestion(s)?
_Marvin
** Immutable POJO **
public class RiEmail {
/** String */
final SjStringPopulatedMessage message;
/**
* @param message
*/
public RiEmail(SjStringPopulatedMessage message) {
super();
this.message = message;
}
/**
* @return the message
*/
public SjStringPopulatedMessage getMessage() {
return this.message;
}
}
** Application Service Object **
public class RiServiceForMail {
/** Email POJO */
RiEmail riEmail;
/**
* @param riEmail
* @return String - Indicating "true" or "false".
*/
public String sendEmail(@SuppressWarnings("unused")
RiEmail riEmail) {
return "true";
}
}
** Services Dot XML **
<?xml version="1.0" encoding="UTF-8"?>
<service name="ri001Service" scope="application">
<description>Email POJO Service</description>
<messageReceivers>
<messageReceiver mep="http://localhost/ri001/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</messageReceivers>
<parameter name="ServiceClass">
net.soaj.ri001.service.RiServiceForMail
</parameter>
</service>
Available services
ri001Service <http://localhost:8080/axis2/services/ri001Service?wsdl>
Service EPR : http://localhost:8080/axis2/services/ri001Service
Service Description : ri001Service
Service Status : Active
Available Operations
* sendEmail
<wsdl:definitions xmlns:axis2="http://service.ri001.soaj.net"
xmlns:ns1="http://service.ri001.soaj.net/xsd"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns0="http://string.core.soaj.net/xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
targetNamespace="http://service.ri001.soaj.net">
<wsdl:documentation>ri001Service</wsdl:documentation>
<wsdl:types>
<xs:schema xmlns:ax21="http://string.core.soaj.net/xsd"
attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://string.core.soaj.net/xsd">
<xs:element name="SjStringPopulatedMessage"
type="ax21:SjStringPopulatedMessage" />
<xs:complexType name="SjStringPopulatedMessage">
<xs:complexContent>
<xs:extension
base="ax21:SjBaseStringPopulated">
<xs:sequence />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ax22="http://string.core.soaj.net/xsd"
xmlns:ns="http://service.ri001.soaj.net/xsd"
attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://service.ri001.soaj.net/xsd">
<xs:import namespace="http://string.core.soaj.net/xsd"
/>
<xs:element name="sendEmail">
<xs:complexType>
<xs:sequence>
<xs:element name="param0"
nillable="true"
type="ns:RiEmail" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="RiEmail" type="ns:RiEmail" />
<xs:complexType name="RiEmail">
<xs:sequence>
<xs:element name="message" nillable="true"
type="ax22:SjStringPopulatedMessage"
/>
</xs:sequence>
</xs:complexType>
<xs:element name="sendEmailResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return"
nillable="true"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="sendEmailMessage">
<wsdl:part name="part1" element="ns1:sendEmail" />
</wsdl:message>
<wsdl:message name="sendEmailResponse">
<wsdl:part name="part1" element="ns1:sendEmailResponse" />
</wsdl:message>
<wsdl:portType name="ri001ServicePortType">
<wsdl:operation name="sendEmail">
<wsdl:input
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
message="axis2:sendEmailMessage"
wsaw:Action="urn:sendEmail" />
<wsdl:output message="axis2:sendEmailResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ri001ServiceSOAP11Binding"
type="axis2:ri001ServicePortType">
<soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:operation name="sendEmail">
<soap:operation soapAction="urn:sendEmail"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ri001ServiceSOAP12Binding"
type="axis2:ri001ServicePortType">
<soap12:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<wsdl:operation name="sendEmail">
<soap12:operation soapAction="urn:sendEmail"
style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ri001ServiceHttpBinding"
type="axis2:ri001ServicePortType">
<http:binding verb="POST" />
<wsdl:operation name="sendEmail">
<http:operation location="sendEmail" />
<wsdl:input>
<mime:content type="text/xml" />
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ri001Service">
<wsdl:port name="ri001ServiceSOAP11port_http"
binding="axis2:ri001ServiceSOAP11Binding">
<soap:address
location="http://192.168.0.3:8080/axis2/services/ri001Service" />
</wsdl:port>
<wsdl:port name="ri001ServiceSOAP12port_http"
binding="axis2:ri001ServiceSOAP12Binding">
<soap12:address
location="http://192.168.0.3:8080/axis2/services/ri001Service" />
</wsdl:port>
<wsdl:port name="ri001ServiceHttpport"
binding="axis2:ri001ServiceHttpBinding">
<http:address
location="http://192.168.0.3:8080/axis2/services/ri001Service" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
** Outside Container JUnit Test **
public void testSetRiEmails() throws AxisFault {
RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference targetEPR = new EndpointReference(
"http://localhost:8099/axis2/services/ri001Service");
options.setTo(targetEPR);
QName opQname = new QName("sendEmail");
RiEmail riEmail = new RiEmail(new SjStringPopulatedMessage(
"test message"));
Object[] opMailArgs = new Object[] { riEmail };
Class<?>[] returnTypes = new Class[] { String.class };
Object[] response = serviceClient.invokeBlocking(opQname,
opMailArgs,
returnTypes);
String result = (String) response[0];
assertEquals("true", result);
}
** TCP Mon **
POST /axis2/services/ri001Service HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:anonOutInOp"
User-Agent: Axis2
Host: 127.0.0.1:8099
Transfer-Encoding: chunked
f6
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<sendEmail><arg0><message><string>test
message</string></message></arg0></sendEmail></soapenv:Body></soapenv:En
velope>
0
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 13 Jun 2007 10:15:47 GMT
Connection: close
142
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Message
Receiver not found for AxisOperation: sendEmail</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>
0
** Stack Trace **
org.apache.axis2.AxisFault: Message Receiver not found for
AxisOperation: sendEmail
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
:434)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:373)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:294)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520
)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500
)
at
org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceCl
ient.java:97)
at
net.soaj.ri001.service.RiServiceForMailTest.testSetRiEmails(RiServiceFor
MailTest.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at
junit.framework.TestResult$1.protect(TestResult.java:110)
at
junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.jav
a:76)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4Tes
tReference.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja
va:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:196)
------------------------------------------
| USA Cell: 248.866.4897
| Email: MarvinToll@gtcGroup.com <ma...@gtcGroup.com>
| Web: http://www.gtcGroup.com <http://www.gtcGroup.com>
------------------------------------------