axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maicon Stihler" <stih...@gmail.com>
Subject [Axis2] Calling a service from another service
Date Fri, 30 Nov 2007 16:22:49 GMT
Hi,

I'm trying to create a service that calls another service, I followed
the tutorial on
http://ws.apache.org/axis2/1_3/userguide-buildingservices.html#createscratch
but it doesn't work. Everything works fine if I'm calling the service
form a client application, but when I try to make a service to act
like a client I got some errors.

The code is as follows (try/catch ommited):

    private OMElement publish(OMElement msg) throws Exception {
            EndpointReference EventBoxEPR =
                new EndpointReference(
                    "http://localhost:8080/axis2/services/EventBox");

            Options options = new Options();
            options.setTo(EventBoxEPR);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            ServiceClient sender = new ServiceClient();
            sender.setOptions(options);
            OMElement rq = makeRequest(msg);
            sender.sendReceive(rq); // here it fails
            return msg;
   ------------

The error says something about WS-Addressing. If I call the service
(http://localhost:8080/axis2/services/EventBox) from a command line
client, it works fine.

So how is the right way to call a service from another service?

Best regards,
Maicon

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


Mime
View raw message