axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-3501) specified MessageReceiver from services.xml is ignored
Date Sun, 10 Feb 2008 17:45:07 GMT
specified MessageReceiver from services.xml is ignored
------------------------------------------------------

                 Key: AXIS2-3501
                 URL: https://issues.apache.org/jira/browse/AXIS2-3501
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.3
         Environment: axis2-1.3
JDK 1.5
TC 5.5.17
            Reporter: Martin Gainty


given the following axis2/META-INF/services.xml
<service name="MyService" scope="application">
    <description>
        MyService
    </description>
    <operation name="getVersion">
    <messageReceiver  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
    </operation>
    <parameter name="ServiceClass">samples.quickstart.service.axiom.MyService</parameter>
</service>

axis2 service engine COMPLETELY IGNORES the messageReceiver for this service

service code:

   package samples.quickstart.service.axiom;
    public class MyService
    {
    public String getVersion() throws Exception {
        return "Hello I am Axis2 version service ," +
                " My version is " + org.apache.axis2.Version.getVersionText();
    }
  }

client code:
public class AXIOMClient {

    private static EndpointReference targetEPR = new EndpointReference( "http://localhost:8080/axis2/services/MyService");

    public static OMElement getPricePayload(String symbol) {
   {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace("http://quickstart.samples/xsd", "tns");

//assign the getVersion Method
        OMElement method = fac.createOMElement("getVersion", omNs);
        return method;
    }


    public static void main(String[] args) {
        try {
        OMElement getPricePayload = getPricePayload("WSO");
            Options options = new Options();
            options.setTo(targetEPR);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

            ServiceClient sender = new ServiceClient();
            sender.setOptions(options);

            Thread.sleep(3000);
            OMElement result = sender.sendReceive(getPricePayload);

            String response = result.getFirstElement().getText();
            System.err.println("returned value: " + response);

        }
        catch (Exception e)
        {
            java.lang.System.out.println("Exception encountered ="+e.getMessage());
            e.printStackTrace();
        }
    }

consistenly produces the ERROR
java samples.quickstart.clients.AXIOMClient
Exception encountered =Message Receiver not found for AxisOperation: getVersion
org.apache.axis2.AxisFault: Message Receiver not found for AxisOperation: getVersion
        at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.j
ava:486)
        at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
OutInAxisOperation.java:343)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisO
peration.java:389)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(Out
InAxisOperation.java:211)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:
163)
        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:
528)
        at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:
508)
        at samples.quickstart.clients.AXIOMClient.main(AXIOMClient.java:98)

}

why does the Axis2 engine completely ignore the MessageReceiver specified for MyService?

M-

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message