• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java InOutAxisOperation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.axis2.description.InOutAxisOperation的典型用法代码示例。如果您正苦于以下问题:Java InOutAxisOperation类的具体用法?Java InOutAxisOperation怎么用?Java InOutAxisOperation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



InOutAxisOperation类属于org.apache.axis2.description包,在下文中一共展示了InOutAxisOperation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createOperation

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
@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;
}
 
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:12,代码来源:AxisEchoEndpoint.java


示例2: createSpringService

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
private AxisService createSpringService(QName springServiceName,
                                        MessageReceiver messageReceiver, String supplierName,
                                        String beanName, QName opName) throws AxisFault {

    AxisService service = new AxisService(springServiceName.getLocalPart());

    service.setClassLoader(Thread.currentThread().getContextClassLoader());
    service.addParameter(new Parameter(Constants.SERVICE_OBJECT_SUPPLIER, supplierName));
    service.addParameter(new Parameter(Constants.SERVICE_TCCL, Constants.TCCL_COMPOSITE));
    service.addParameter(new Parameter(
            SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME, beanName));

    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;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:23,代码来源:SpringServiceTest.java


示例3: testMessageWithOmittedMessageIDInOutMEP

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
public void testMessageWithOmittedMessageIDInOutMEP() throws Exception {
    MessageContext messageContext = testMessageWithOmittedHeaders("noMessageID");
    String messageID = messageContext.getOptions().getMessageId();

    assertNull("The message id is not null.", messageID);

    AxisOperation axisOperation = new InOutAxisOperation();
    messageContext.setAxisOperation(axisOperation);
    AxisService axisService = new AxisService();
    messageContext.setAxisService(axisService);

    try {
        validationHandler.invoke(messageContext);
        fail("An AxisFault should have been thrown due to the absence of a message id.");
    }
    catch (AxisFault af) {
        //Test passed.
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:20,代码来源:AddressingValidationHandlerTest.java


示例4: testInOutMessageWithOmittedMessageID

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
public void testInOutMessageWithOmittedMessageID() throws Exception {
    MessageContext messageContext = testMessageWithOmittedHeaders("noMessageID");
    String messageID = messageContext.getOptions().getMessageId();

    assertNull("The message id is not null.", messageID);

    AxisOperation axisOperation = new InOutAxisOperation();
    messageContext.setAxisOperation(axisOperation);
    AxisService axisService = new AxisService();
    messageContext.setAxisService(axisService);

    try {
        validationHandler.invoke(messageContext);
    } catch (AxisFault axisFault) {
        // Confirm this is the correct fault
        assertEquals("Wrong fault code",
                     new QName(Final.WSA_NAMESPACE,
                               Final.FAULT_ADDRESSING_HEADER_REQUIRED),
                     axisFault.getFaultCode());
        return;
    }
    fail("Validated message with missing message ID!");
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:24,代码来源:AddressingValidationHandlerTest.java


示例5: createSimpleService

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
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;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:20,代码来源:Utils.java


示例6: testAddParameterOperationlockedByAxisConfig

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
public void testAddParameterOperationlockedByAxisConfig() {
    try {
        Parameter para = new Parameter();
        para.setValue(null);
        para.setName("PARA_NAME");
        para.setLocked(true);
        reg.addParameter(para);

        AxisService service = new AxisService("Service1");
        reg.addService(service);

        AxisOperation opertion = new InOutAxisOperation();
        opertion.setParent(service);
        opertion.addParameter(para);
        fail("This should fails with Parmter is locked can not overide");


    } catch (AxisFault axisFault) {

    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:22,代码来源:ParameterAddTest.java


示例7: testAddParameterOperationLockebyService

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
public void testAddParameterOperationLockebyService() {
    try {
        Parameter para = new Parameter();
        para.setValue(null);
        para.setName("PARA_NAME");
        para.setLocked(true);

        AxisService service = new AxisService("Service1");
        reg.addService(service);
        service.addParameter(para);

        AxisOperation opertion = new InOutAxisOperation();
        opertion.setParent(service);
        opertion.addParameter(para);
        fail("This should fails with Parmter is locked can not overide");
    } catch (AxisFault axisFault) {

    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:20,代码来源:ParameterAddTest.java


示例8: testGetInvocationPatternParameterValueFromBoth

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
public void testGetInvocationPatternParameterValueFromBoth() throws Exception {
    AxisService axisService = new AxisService();
    AxisOperation axisOperation = new InOutAxisOperation();
    axisService.addOperation(axisOperation);

    // Set invocation pattern on AxisOperation and AxisService 
    AddressingHelper.setInvocationPatternParameterValue(axisOperation,
            AddressingConstants.WSAM_INVOCATION_PATTERN_ASYNCHRONOUS);
    axisService.addParameter(new Parameter(
            AddressingConstants.WSAM_INVOCATION_PATTERN_PARAMETER_NAME,
            AddressingConstants.WSAM_INVOCATION_PATTERN_SYNCHRONOUS));

    // Check that the AxisOperation value has precedence over the AxisService value
    String value = AddressingHelper
            .getInvocationPatternParameterValue(axisOperation);
    assertEquals(value, AddressingConstants.WSAM_INVOCATION_PATTERN_ASYNCHRONOUS);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:18,代码来源:AddressingHelperTest.java


示例9: testMEPfindingOnRelatesTO

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
public void testMEPfindingOnRelatesTO() throws Exception {

        AxisService axisService = new AxisService("TempSC");
        configContext.getAxisConfiguration().addService(axisService);
        ServiceGroupContext sgc = configContext.createServiceGroupContext(
                axisService.getAxisServiceGroup());
        ServiceContext sessionContext = sgc.getServiceContext(axisService);
        MessageContext messageContext1 = this.getBasicMessageContext();

        messageContext1.setMessageID(UIDGenerator.generateURNString());
        AxisOperation axisOperation = new InOutAxisOperation(new QName("test"));
        OperationContext operationContext1 = axisOperation
                .findOperationContext(messageContext1, sessionContext);
        axisOperation.registerOperationContext(messageContext1, operationContext1);

        MessageContext messageContext2 = this.getBasicMessageContext();
        messageContext2.setMessageID(UIDGenerator.generateURNString());
        messageContext2.getOptions().addRelatesTo(
                new RelatesTo(messageContext1.getMessageID()));
        messageContext2.setAxisOperation(axisOperation);
        OperationContext operationContext2 = axisOperation
                .findOperationContext(messageContext2, sessionContext);
        assertEquals(operationContext1, operationContext2);
    }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:25,代码来源:OperationContextTest.java


示例10: createSynapseMessageContext

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
private MessageContext createSynapseMessageContext() throws AxisFault {
    org.apache.axis2.context.MessageContext axis2MC = new org.apache.axis2.context.MessageContext();
    axis2MC.setConfigurationContext(this.configContext);
    ServiceContext svcCtx = new ServiceContext();
    OperationContext opCtx = new OperationContext(new InOutAxisOperation(), svcCtx);
    axis2MC.setServiceContext(svcCtx);
    axis2MC.setOperationContext(opCtx);
    Axis2MessageContext mc = new Axis2MessageContext(axis2MC, this.synapseConfig, null);
    mc.setMessageID(UIDGenerator.generateURNString());

    mc.setEnvelope(OMAbstractFactory.getSOAP12Factory().createSOAPEnvelope());
    mc.getEnvelope().addChild(OMAbstractFactory.getSOAP12Factory().createSOAPBody());

    return mc;
}
 
开发者ID:wso2-extensions,项目名称:esb-connector-file,代码行数:16,代码来源:FileMoveUnitTest.java


示例11: setUp

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
protected void setUp() throws Exception {
    AxisService service = new AxisService(serviceName.getLocalPart());
    service.setClassLoader(Thread.currentThread().getContextClassLoader());
    service.addParameter(new Parameter(
            Constants.SERVICE_CLASS, EchoSwA.class
            .getName()));
    AxisOperation axisOp = new InOutAxisOperation(operationName);
    axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
    axisOp.setStyle(WSDLConstants.STYLE_DOC);
    service.addOperation(axisOp);
    UtilServer.deployService(service);

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:14,代码来源:EchoRawSwAFileInputTest.java


示例12: createMultiHopRedirectService1

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
AxisService createMultiHopRedirectService1() throws AxisFault {
    AxisService service = new AxisService("MultiHopRedirectService1");

    service.setClassLoader(Thread.currentThread().getContextClassLoader());
    service.addParameter(
            new Parameter(Constants.SERVICE_CLASS, MultiHopRedirectService1.class.getName()));

    AxisOperation axisOp = new InOutAxisOperation(new QName("echoRedirect"));

    axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
    service.addOperation(axisOp);
    service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect", axisOp);

    return service;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:16,代码来源:MultiHopRedirectServiceTest.java


示例13: createMultiHopRedirectService2

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
AxisService createMultiHopRedirectService2() throws AxisFault {
    AxisService service = new AxisService("MultiHopRedirectService2");

    service.setClassLoader(Thread.currentThread().getContextClassLoader());
    service.addParameter(
            new Parameter(Constants.SERVICE_CLASS, MultiHopRedirectService2.class.getName()));

    AxisOperation axisOp = new InOutAxisOperation(new QName("echoRedirect"));

    axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
    service.addOperation(axisOp);
    service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoRedirect", axisOp);

    return service;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:16,代码来源:MultiHopRedirectServiceTest.java


示例14: testMessageWithMessageIDInOutMEP

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
public void testMessageWithMessageIDInOutMEP() throws Exception {
    MessageContext messageContext = testMessageWithOmittedHeaders("noFrom");
    String messageID = messageContext.getOptions().getMessageId();

    assertNotNull("The message id is null.", messageID);

    AxisOperation axisOperation = new InOutAxisOperation();
    messageContext.setAxisOperation(axisOperation);
    AxisService axisService = new AxisService();
    messageContext.setAxisService(axisService);
    validationHandler.invoke(messageContext);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:13,代码来源:AddressingValidationHandlerTest.java


示例15: testGetInvocationPatternParameterValueFromAxisOperation

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
public void testGetInvocationPatternParameterValueFromAxisOperation() throws Exception {
    AxisService axisService = new AxisService();
    AxisOperation axisOperation = new InOutAxisOperation();
    axisService.addOperation(axisOperation);
    
    // Set invocation pattern on AxisOperation only 
    AddressingHelper.setInvocationPatternParameterValue(axisOperation,
            AddressingConstants.WSAM_INVOCATION_PATTERN_ASYNCHRONOUS);
    
    String value = AddressingHelper
            .getInvocationPatternParameterValue(axisOperation);
    assertEquals(value, AddressingConstants.WSAM_INVOCATION_PATTERN_ASYNCHRONOUS);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:14,代码来源:AddressingHelperTest.java


示例16: testGetInvocationPatternParameterValueFromAxisService

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
public void testGetInvocationPatternParameterValueFromAxisService() throws Exception {
    AxisService axisService = new AxisService();
    AxisOperation axisOperation = new InOutAxisOperation();
    axisService.addOperation(axisOperation);

    // Set invocation pattern on AxisService only
    axisService.addParameter(new Parameter(
            AddressingConstants.WSAM_INVOCATION_PATTERN_PARAMETER_NAME,
            AddressingConstants.WSAM_INVOCATION_PATTERN_ASYNCHRONOUS));

    String value = AddressingHelper
            .getInvocationPatternParameterValue(axisOperation);
    assertEquals(value, AddressingConstants.WSAM_INVOCATION_PATTERN_ASYNCHRONOUS);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:15,代码来源:AddressingHelperTest.java


示例17: setUp

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
protected void setUp() throws Exception {
    axisOperation = new InOutAxisOperation(new QName("Temp"));
    axisMessage = axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
    axisService = new AxisService("Temp");
    axisConfiguration = new AxisConfiguration();
    axisService.addOperation(axisOperation);
    axisConfiguration.addService(axisService);
    configurationContext = new ConfigurationContext(axisConfiguration);
    msgctx = configurationContext.createMessageContext();
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:11,代码来源:ContextHierarchyTest.java


示例18: setUp

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
protected void setUp() throws Exception {
    AxisOperation axisOperation = new InOutAxisOperation(new QName(ADD_OPERATION));
    axisMessage = new AxisMessage();
    axisMessage.setName("AddRequest");
    axisMessage.setElementQName(new QName("http://ws.apache.org/schemas/axis2", "AddRequest"));
    axisOperation.addMessage(axisMessage, WSDLConstants.MESSAGE_LABEL_IN_VALUE);
    axisMessage.setParent(axisOperation);

    axisService = new AxisService("DummyService");
    axisService.addOperation(axisOperation);
    axisOperation.setParent(axisService);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:13,代码来源:SchemaUnwrapperExtensionTest.java


示例19: start

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
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);
    }
}
 
开发者ID:wso2,项目名称:carbon-commons,代码行数:28,代码来源:SimpleMessageReceiver.java


示例20: setUp

import org.apache.axis2.description.InOutAxisOperation; //导入依赖的package包/类
protected void setUp() throws Exception {

        AxisConfiguration engineRegistry = new AxisConfiguration();
        configContext = new ConfigurationContext(engineRegistry);

        TransportOutDescription transport = new TransportOutDescription("null");
        transport.setSender(new CommonsHTTPTransportSender());

        TransportInDescription transportIn = new TransportInDescription("null");
        AxisOperation axisOp = new InOutAxisOperation(operationName);

        AxisService service = new AxisService(serviceName.getLocalPart());
        axisOp.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messageCtx) throws AxisFault {
                // TODO Auto-generated method stub

            }
        });
        engineRegistry.addService(service);
        service.addOperation(axisOp);

        mc = configContext.createMessageContext();
        mc.setTransportIn(transportIn);
        mc.setTransportOut(transport);

        ServiceGroupContext sgc = configContext.createServiceGroupContext(
                service.getAxisServiceGroup());
        ServiceContext sc = sgc.getServiceContext(service);

        OperationContext opContext = sc.createOperationContext(axisOp);

        mc.setOperationContext(opContext);
        mc.setTransportOut(transport);
        mc.setProperty(MessageContext.TRANSPORT_OUT, System.out);
        mc.setServerSide(true);
        SOAPFactory omFac = OMAbstractFactory.getSOAP11Factory();
        mc.setEnvelope(omFac.getDefaultEnvelope());


        mc.setWSAAction(operationName.getLocalPart());
        mc.setSoapAction(operationName.getLocalPart());
        System.out.flush();
    }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:44,代码来源:EngineWithoutPhaseResolvingTest.java



注:本文中的org.apache.axis2.description.InOutAxisOperation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JFXTreeTableColumn类代码示例发布时间:2022-05-23
下一篇:
Java CameraGroupStrategy类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap