WSDL2Constants.MEP_URI_IN_OUT.equals(mepURI) || WSDL2Constants.MEP_URI_IN_OUT.equals(mepURI)) { abOpdesc = new InOutAxisOperation(); } else if (WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI) || WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI) || WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI)) { abOpdesc = new InOutAxisOperation(); } else if (WSDL2Constants.MEP_URI_OUT_IN.equals(mepURI) || WSDL2Constants.MEP_URI_OUT_IN.equals(mepURI) ||
@Override protected InOutAxisOperation createOperation() { InOutAxisOperation operation = new InOutAxisOperation(new QName("echo")); operation.setMessageReceiver(new AbstractInOutMessageReceiver() { @Override public void invokeBusinessLogic(MessageContext inMessage, MessageContext outMessage) throws AxisFault { outMessage.setEnvelope(inMessage.getEnvelope()); } }); return operation; }
public InOutAxisOperation() { super(); //setup a temporary name QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID()); this.setName(tmpName); }
WSDL2Constants.MEP_URI_IN_OUT.equals(mepURI) || WSDL2Constants.MEP_URI_IN_OUT.equals(mepURI)) { abOpdesc = new InOutAxisOperation(); } else if (WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI) || WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI) || WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT.equals(mepURI)) { abOpdesc = new InOutAxisOperation(); } else if (WSDL2Constants.MEP_URI_OUT_IN.equals(mepURI) || WSDL2Constants.MEP_URI_OUT_IN.equals(mepURI) ||
@Override protected InOutAxisOperation createOperation() { InOutAxisOperation operation = new InOutAxisOperation(new QName("echo")); operation.setMessageReceiver(new AbstractInOutMessageReceiver() { @Override public void invokeBusinessLogic(MessageContext inMessage, MessageContext outMessage) throws AxisFault { outMessage.setEnvelope(inMessage.getEnvelope()); } }); return operation; }
public InOutAxisOperation() { super(); //setup a temporary name QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID()); this.setName(tmpName); }
new InOutAxisOperation(SynapseConstants.SYNAPSE_OPERATION_NAME); AxisOperation subscribeOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_SUBSCRIBE_OP)); AxisOperation unsubscribeOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_UNSUBSCRIBE_OP)); AxisOperation renewOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_RENEW_OP)); AxisOperation getStatusOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_GET_STATUS_OP)); AxisOperation subscriptionEndOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_SUBSCRIPTIONEND_OP));
@Override protected InOutAxisOperation createOperation() { InOutAxisOperation operation = new InOutAxisOperation(new QName("echo")); operation.setMessageReceiver(new AbstractInOutMessageReceiver() { @Override public void invokeBusinessLogic(MessageContext inMessage, MessageContext outMessage) throws AxisFault { outMessage.setEnvelope(inMessage.getEnvelope()); } }); return operation; }
new InOutAxisOperation(SynapseConstants.SYNAPSE_OPERATION_NAME); AxisOperation subscribeOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_SUBSCRIBE_OP)); AxisOperation unsubscribeOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_UNSUBSCRIBE_OP)); AxisOperation renewOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_RENEW_OP)); AxisOperation getStatusOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_GET_STATUS_OP)); AxisOperation subscriptionEndOperation = new InOutAxisOperation(new QName(EventingConstants.WSE_SUBSCRIPTIONEND_OP));
public void start()throws AxisFault { try { //Register the callback service AxisService messageCollectorService = new AxisService("MessageCollector"); MessageReceiver messageReceiver = new MessageReceiver() { public void receive(MessageContext messageCtx) throws AxisFault { if(callback != null){ callback.mesageReceived(messageCtx.getEnvelope()); }else{ System.out.println("Received " + messageCtx.getEnvelope()); } } }; InOutAxisOperation operation1 = new InOutAxisOperation(new QName("receive")); operation1.setMessageReceiver(messageReceiver); messageCollectorService.addOperation(operation1); configContext.getAxisConfiguration().addService(messageCollectorService); axis2Server = new SimpleHTTPServer(configContext, 7777); axis2Server.start(); eventSinkUrl = axis2Server.getEPRForService(messageCollectorService.getName(), InetAddress.getLocalHost().getHostName()); } catch (UnknownHostException e) { throw AxisFault.makeFault(e); } }
AxisOperation axisOp = new InOutAxisOperation(new QName("echoOMElement")); axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver()); axisOp.setStyle(WSDLConstants.STYLE_RPC); axisOp = new InOutAxisOperation(new QName("echoOMElementNoResponse")); axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver()); axisOp.setStyle(WSDLConstants.STYLE_RPC);
public static AxisService createSimpleService(QName serviceName, MessageReceiver messageReceiver, String className, QName opName) throws AxisFault { AxisService service = new AxisService(serviceName.getLocalPart()); service.setClassLoader(getContextClassLoader_DoPriv()); service.addParameter(new Parameter(Constants.SERVICE_CLASS, className)); AxisOperation axisOp = new InOutAxisOperation(opName); axisOp.setMessageReceiver(messageReceiver); axisOp.setStyle(WSDLConstants.STYLE_RPC); service.addOperation(axisOp); service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + opName.getLocalPart(), axisOp); return service; }
public static AxisService createSimpleService(QName serviceName, MessageReceiver messageReceiver, String className, QName opName) throws AxisFault { AxisService service = new AxisService(serviceName.getLocalPart()); service.setClassLoader(getContextClassLoader_DoPriv()); service.addParameter(new Parameter(Constants.SERVICE_CLASS, className)); AxisOperation axisOp = new InOutAxisOperation(opName); axisOp.setMessageReceiver(messageReceiver); axisOp.setStyle(WSDLConstants.STYLE_RPC); service.addOperation(axisOp); service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + opName.getLocalPart(), axisOp); return service; }
/** * Adds Synapse Service to Axis2 configuration which enables the main message mediation. * * @throws AxisFault if an error occurs during Axis2 service initialization */ private void deploySynapseService() throws AxisFault { log.info("Deploying the Synapse service..."); // Dynamically initialize the Synapse Service and deploy it into Axis2 AxisConfiguration axisCfg = configurationContext.getAxisConfiguration(); AxisService synapseService = new AxisService(SynapseConstants.SYNAPSE_SERVICE_NAME); AxisOperation mediateOperation = new InOutAxisOperation( SynapseConstants.SYNAPSE_OPERATION_NAME); mediateOperation.setMessageReceiver(new SynapseMessageReceiver()); synapseService.addOperation(mediateOperation); List<String> transports = new ArrayList<String>(); transports.add(Constants.TRANSPORT_HTTP); transports.add(Constants.TRANSPORT_HTTPS); synapseService.setExposedTransports(transports); AxisServiceGroup synapseServiceGroup = new AxisServiceGroup(axisCfg); synapseServiceGroup.setServiceGroupName(SynapseConstants.SYNAPSE_SERVICE_NAME); synapseServiceGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); synapseServiceGroup.addService(synapseService); axisCfg.addServiceGroup(synapseServiceGroup); }
AxisOperation axisOp = new InOutAxisOperation(new QName("echoOMElement")); axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver()); axisOp.setStyle(WSDLConstants.STYLE_RPC); axisOp = new InOutAxisOperation(new QName("echoOMElementNoResponse")); axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver()); axisOp.setStyle(WSDLConstants.STYLE_RPC);
AxisOperation axisOp = new InOutAxisOperation(new QName("echoOMElement")); axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver()); axisOp.setStyle(WSDLConstants.STYLE_RPC); axisOp = new InOutAxisOperation(new QName("echoOMElementNoResponse")); axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver()); axisOp.setStyle(WSDLConstants.STYLE_RPC);
/** * Adds Synapse Service to Axis2 configuration which enables the main message mediation. * * @throws AxisFault if an error occurs during Axis2 service initialization */ private void deploySynapseService() throws AxisFault { log.info("Deploying the Synapse service..."); // Dynamically initialize the Synapse Service and deploy it into Axis2 AxisConfiguration axisCfg = configurationContext.getAxisConfiguration(); AxisService synapseService = new AxisService(SynapseConstants.SYNAPSE_SERVICE_NAME); AxisOperation mediateOperation = new InOutAxisOperation( SynapseConstants.SYNAPSE_OPERATION_NAME); mediateOperation.setMessageReceiver(new SynapseMessageReceiver()); synapseService.addOperation(mediateOperation); List<String> transports = new ArrayList<String>(); transports.add(Constants.TRANSPORT_HTTP); transports.add(Constants.TRANSPORT_HTTPS); synapseService.setExposedTransports(transports); AxisServiceGroup synapseServiceGroup = new AxisServiceGroup(axisCfg); synapseServiceGroup.setServiceGroupName(SynapseConstants.SYNAPSE_SERVICE_NAME); synapseServiceGroup.addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true"); synapseServiceGroup.addService(synapseService); axisCfg.addServiceGroup(synapseServiceGroup); }
abOpdesc = new InOutAxisOperation(); abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_OUT); break; abOpdesc = new InOutAxisOperation(); abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT); break; abOpdesc = new InOutAxisOperation(); abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY); break;
abOpdesc = new InOutAxisOperation(); abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_OUT); break; abOpdesc = new InOutAxisOperation(); abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_OPTIONAL_OUT); break; abOpdesc = new InOutAxisOperation(); abOpdesc.setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_IN_ONLY); break;
if (mepurl == null) { op_descrip = new InOutAxisOperation(); op_descrip.setParent(service);