public TransportInDescription createTransportInDescription() throws Exception { TransportInDescription trpInDesc = new TransportInDescription(name); trpInDesc.setReceiver(listenerClass.newInstance()); return trpInDesc; }
public TransportInDescription createTransportInDescription() throws Exception { TransportInDescription trpInDesc = new TransportInDescription(name); trpInDesc.setReceiver(listenerClass.newInstance()); return trpInDesc; }
public TransportInDescription createTransportInDescription() throws Exception { TransportInDescription trpInDesc = new TransportInDescription(name); trpInDesc.setReceiver(listenerClass.newInstance()); return trpInDesc; }
(TransportListener) service; TransportInDescription txInDes = new TransportInDescription(protocol); txInDes.setReceiver(txListener); String[] keys = reference.getPropertyKeys();
/** * Create a configured SimpleHTTPServer */ public SimpleHTTPServer(HttpFactory httpFactory) throws AxisFault { this.httpFactory = httpFactory; this.configurationContext = httpFactory.getConfigurationContext(); this.port = httpFactory.getPort(); TransportInDescription httpDescription = new TransportInDescription(Constants.TRANSPORT_HTTP); httpDescription.setReceiver(this); trpInDesc = httpDescription; httpFactory.getListenerManager().addListener(httpDescription, true); sessionManager = new SessionManager(); }
/** * Create a sample synapse message context with a simple payload * * @param payload payload of the envelope of message context * @return Axis2MessageContext with payload and parameters * @throws Exception on creating the context */ private Axis2MessageContext getMessageContext(String payload) throws Exception { Map<String, Entry> properties = new HashMap<>(); Axis2MessageContext messageContext = TestUtils.getAxis2MessageContext(payload, properties); messageContext.getAxis2MessageContext().setTransportIn(new TransportInDescription("http")); return messageContext; }
receiver.start(); ListenerManager listenerManager = configctx .getListenerManager(); TransportInDescription trsIn = new TransportInDescription(Constants.TRANSPORT_HTTP); trsIn.setReceiver(receiver); if (listenerManager == null) {
/** * Create a configured SimpleHTTPServer */ public SimpleHTTPServer(HttpFactory httpFactory) throws AxisFault { this.httpFactory = httpFactory; this.configurationContext = httpFactory.getConfigurationContext(); this.port = httpFactory.getPort(); TransportInDescription httpDescription = new TransportInDescription(Constants.TRANSPORT_HTTP); httpDescription.setReceiver(this); trpInDesc = httpDescription; httpFactory.getListenerManager().addListener(httpDescription, true); sessionManager = new SessionManager(); }
receiver.start(); ListenerManager listenerManager = configctx .getListenerManager(); TransportInDescription trsIn = new TransportInDescription(Constants.TRANSPORT_HTTP); trsIn.setReceiver(receiver); if (listenerManager == null) {
if (trsName != null) { String name = trsName.getAttributeValue(); transportIN = new TransportInDescription(name);
if (trsName != null) { String name = trsName.getAttributeValue(); transportIN = new TransportInDescription(name);
public TransportInDescription createTransportInDescription() throws Exception { TransportInDescription desc = new TransportInDescription("http"); desc.setReceiver(new LifecycleFixTransportListenerProxy(new SimpleHTTPServer(), port)); desc.addParameter(new Parameter(SimpleHTTPServer.PARAM_PORT, String.valueOf(port))); return desc; }
"Please update your axis2.xml file!"); httpListener = new AxisServletListener(); TransportInDescription transportInDescription = new TransportInDescription( Constants.TRANSPORT_HTTP); transportInDescription.setReceiver(httpListener);
"Please update your axis2.xml file!"); httpListener = new AxisServletListener(); TransportInDescription transportInDescription = new TransportInDescription( Constants.TRANSPORT_HTTP); transportInDescription.setReceiver(httpListener);
/** * Method for return ServerConnectionFactory by building ServerConnectionFactory with given SSL Configurations * * @param endpointName Endpoint Name * @param configuration PassThroughSharedListenerConfiguration * @return ServerConnectionFactory * @throws AxisFault */ public static ServerConnFactory getServerConnectionFactory(String endpointName, PassThroughSharedListenerConfiguration configuration, SSLConfiguration sslConfiguration) throws AxisFault { TransportInDescription transportInDescription = new TransportInDescription(endpointName); HttpHost host = new HttpHost( configuration.getSourceConfiguration().getHostname(), configuration.getSourceConfiguration().getPort(), configuration.getSourceConfiguration().getScheme().getName()); SSLServerConnFactoryBuilder sslServerConnFactoryBuilder = new SSLServerConnFactoryBuilder(transportInDescription, host); return sslServerConnFactoryBuilder. parseSSL(sslConfiguration.getKeyStoreElement(), sslConfiguration.getTrustStoreElement(), sslConfiguration.getClientAuthElement(), sslConfiguration.getHttpsProtocolElement(), sslConfiguration.getSslProtocol(), sslConfiguration.getRevocationVerifierElement(), sslConfiguration.getPreferredCiphersElement()). build(configuration.getSourceConfiguration().getHttpParams()); }
/** * Create a empty message context * * @return A context with empty message * @throws AxisFault on an error creating a context */ private MessageContext createMessageContext() throws AxisFault { Axis2SynapseEnvironment synapseEnvironment = new Axis2SynapseEnvironment(new SynapseConfiguration()); org.apache.axis2.context.MessageContext axis2MC = new org.apache.axis2.context.MessageContext(); axis2MC.setConfigurationContext(new ConfigurationContext(new AxisConfiguration())); ServiceContext svcCtx = new ServiceContext(); OperationContext opCtx = new OperationContext(new InOutAxisOperation(), svcCtx); axis2MC.setServiceContext(svcCtx); axis2MC.setOperationContext(opCtx); axis2MC.setTransportIn(new TransportInDescription("http")); axis2MC.setTo(new EndpointReference("http://localhost:9000/services/SimpleStockQuoteService")); MessageContext mc = new Axis2MessageContext(axis2MC, new SynapseConfiguration(), synapseEnvironment); mc.setMessageID(UIDGenerator.generateURNString()); mc.setEnvelope(OMAbstractFactory.getSOAP12Factory().createSOAPEnvelope()); mc.getEnvelope().addChild(OMAbstractFactory.getSOAP12Factory().createSOAPBody()); return mc; } }
/** * Create a empty message context * * @return A context with empty message * @throws AxisFault on an error creating a context */ private MessageContext createMessageContext() throws AxisFault { Axis2SynapseEnvironment synapseEnvironment = new Axis2SynapseEnvironment(new SynapseConfiguration()); org.apache.axis2.context.MessageContext axis2MC = new org.apache.axis2.context.MessageContext(); axis2MC.setConfigurationContext(new ConfigurationContext(new AxisConfiguration())); ServiceContext svcCtx = new ServiceContext(); OperationContext opCtx = new OperationContext(new InOutAxisOperation(), svcCtx); axis2MC.setServiceContext(svcCtx); axis2MC.setOperationContext(opCtx); axis2MC.setTransportIn(new TransportInDescription("http")); // axis2MC.setTo(new EndpointReference("http://localhost:9000/services/SimpleStockQuoteService")); MessageContext mc = new Axis2MessageContext(axis2MC, new SynapseConfiguration(), synapseEnvironment); mc.setMessageID(UIDGenerator.generateURNString()); mc.setEnvelope(OMAbstractFactory.getSOAP12Factory().createSOAPEnvelope()); mc.getEnvelope().addChild(OMAbstractFactory.getSOAP12Factory().createSOAPBody()); return mc; } }