Hi all,

I'm running Axis2 1.0 and I would like to send a message from my own
module, during the initialization phase, so I added the code into the
init() method:


public class MyModule implements Module {


        public void init(ConfigurationContext configContext, AxisModule
module) throws AxisFault {

        ServiceClient sender = new ServiceClient();
        Options options = new Options();                                        
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
        EndpointReference managerEPR = new
EndpointReference("http://localhost:8080/axis2/services/ManagerService";);
        options.setTo(managerEPR);
                                                                                
        options.setProperty(QOSPConstants.QOSP_MESSAGE_TYPE,                    
QOSPMessageType.NEW_NODE.value());
                        
        OMElement payload = getHostOMElement(address);
        sender.fireAndForget(payload);
                        

        // send a message to another service (deployed on a running Tomcat 
server)
        }

        //...

        private final OMElement getHostOMElement(final String host) {
                OMFactory factory = OMAbstractFactory.getOMFactory();
                OMNamespace omNs = factory.createOMNamespace(
                        QOSPSOAPConstants.URI, 
QOSPSOAPConstants.EXEUCUTOR_NODE);
                
                OMElement payload = factory.createOMElement("registerNode", 
omNs);
                OMElement value = factory.createOMElement("value", omNs);
                value.setText(host);
                payload.addChild(value);
                
                return payload;
        }       //-- getHostOMElement()

}

Unfortunately I get an error ("No address information in EPR, cannot
infer transport; nested exception is ConfigurationContextFactory:107
....... ConfigurationContextFactory:128)


which prevents me both from sending the message and both from running
that tomcat instance.


Any suggestion is welcome.

Michele

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to