public OperationContext createOperationContext(AxisOperation axisOp) { OperationContext ctx = new OperationContext(axisOp, this); configContext.contextCreated(ctx); return ctx; }
public OperationContext createOperationContext(AxisOperation axisOp) { OperationContext ctx = new OperationContext(axisOp, this); configContext.contextCreated(ctx); return ctx; }
axis2Ctx.setAxisOperation(axisOperation); } else if (axis2Ctx.getOperationContext() == null) { axis2Ctx.setOperationContext(new OperationContext(new InOutAxisOperation(), new ServiceContext()));
OperationContext opCtx = new OperationContext(new InOutAxisOperation(), svcCtx); axis2MC.setServiceContext(svcCtx); axis2MC.setOperationContext(opCtx);
OperationContext opCtx = new OperationContext(new InOutAxisOperation(), svcCtx); axis2MC.setServiceContext(svcCtx); axis2MC.setOperationContext(opCtx);
OperationContext context = new OperationContext(operation, pollMessage.getMessageContext().getServiceContext());
/** * Send via http. * * @param httpMethod * the http method * @param soapAction * the soap action * @param address * the address * @param rest * the rest * @throws IOException * Signals that an I/O exception has occurred. */ protected void sendViaHTTP(String httpMethod, String soapAction, String address, boolean rest) throws IOException { httpSender = getHTTPSender(); MessageContext msgContext = new MessageContext(); ConfigurationContext configContext = ConfigurationContextFactory .createEmptyConfigurationContext(); OperationContext opContext = new OperationContext(); msgContext.setConfigurationContext(configContext); msgContext.setEnvelope(getEnvelope()); msgContext.setDoingREST(rest); msgContext.setProperty(Constants.Configuration.HTTP_METHOD, httpMethod); msgContext.setOperationContext(opContext); URL url = new URL(address); httpSender.send(msgContext, url, soapAction); }
/** * 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); 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); 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; } }