本文整理汇总了Java中org.apache.axis2.description.InOutAxisOperation类的典型用法代码示例。如果您正苦于以下问题:Java InOutAxisOperation类的具体用法?Java InOutAxisOperation怎么用?Java InOutAxisOperation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InOutAxisOperation类属于org.apache.axis2.description包,在下文中一共展示了InOutAxisOperation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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.
}
}
示例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!");
}
示例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;
}
示例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) {
}
}
示例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) {
}
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}