Java Code Examples for org.apache.cxf.service.model.OperationInfo#setName()
The following examples show how to use
org.apache.cxf.service.model.OperationInfo#setName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SOAPLoggingTest.java From cxf with Apache License 2.0 | 6 votes |
@Test public void testSoap() { DefaultLogEventMapper mapper = new DefaultLogEventMapper(); Message message = new MessageImpl(); ExchangeImpl exchange = new ExchangeImpl(); ServiceInfo service = new ServiceInfo(); BindingInfo info = new BindingInfo(service, "bindingId"); SoapBinding value = new SoapBinding(info); exchange.put(Binding.class, value); OperationInfo opInfo = new OperationInfo(); opInfo.setName(new QName("http://my", "Operation")); BindingOperationInfo boi = new BindingOperationInfo(info, opInfo); exchange.put(BindingOperationInfo.class, boi); message.setExchange(exchange); LogEvent event = mapper.map(message); Assert.assertEquals("{http://my}Operation", event.getOperationName()); }
Example 2
Source File: MessageUtilsTest.java From cxf with Apache License 2.0 | 6 votes |
@Test public void getTargetMethodFromBindingOperationInfo() throws Exception { Method method = MessageUtilsTest.class.getMethod("getTargetMethodFromBindingOperationInfo"); Message message = new MessageImpl(); Exchange exchange = new ExchangeImpl(); message.setExchange(exchange); OperationInfo oi = new OperationInfo(); oi.setName(QName.valueOf("getTargetMethod_fromBindingOperationInfo")); BindingOperationInfo boi = new BindingOperationInfo(null, oi); ServiceImpl serviceImpl = new ServiceImpl(); MethodDispatcher md = new SimpleMethodDispatcher(); md.bind(oi, method); serviceImpl.put(MethodDispatcher.class.getName(), md); exchange.put(Service.class, serviceImpl); exchange.put(BindingOperationInfo.class, boi); Optional<Method> optMethod = MessageUtils.getTargetMethod(message); assertTrue(optMethod.isPresent()); assertEquals(method, optMethod.get()); }
Example 3
Source File: MethodMapperTest.java From cxf with Apache License 2.0 | 4 votes |
private OperationInfo getOperation() { OperationInfo operation = new OperationInfo(); operation.setName(new QName("urn:test:ns", "OperationTest")); return operation; }