本文整理匯總了Java中org.apache.cxf.phase.Phase.MARSHAL屬性的典型用法代碼示例。如果您正苦於以下問題:Java Phase.MARSHAL屬性的具體用法?Java Phase.MARSHAL怎麽用?Java Phase.MARSHAL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.apache.cxf.phase.Phase
的用法示例。
在下文中一共展示了Phase.MARSHAL屬性的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: CommonInterceptor
public CommonInterceptor() {
super(Phase.MARSHAL);
}
示例2: publishEndpointWithCxfInterceptors
@Test
public void publishEndpointWithCxfInterceptors() throws Exception {
TestInterceptor inInterceptor = new TestInterceptor(Phase.UNMARSHAL);
TestInterceptor inInterceptor2 = new TestInterceptor(Phase.PRE_INVOKE);
TestInterceptor outInterceptor = new TestInterceptor(Phase.MARSHAL);
jaxwsEnvironment.publishEndpoint(
new EndpointBuilder("local://path", service)
.cxfInInterceptors(inInterceptor, inInterceptor2)
.cxfOutInterceptors(outInterceptor));
verify(mockInvokerBuilder).create(any(), any(Invoker.class));
Node soapResponse = testutils.invoke("local://path",
LocalTransportFactory.TRANSPORT_ID, soapRequest.getBytes());
verify(mockInvoker).invoke(any(Exchange.class), any());
assertThat(inInterceptor.getInvocationCount(), equalTo(1));
assertThat(inInterceptor2.getInvocationCount(), equalTo(1));
assertThat(outInterceptor.getInvocationCount(), equalTo(1));
testutils.assertValid("/soap:Envelope/soap:Body/a:fooResponse", soapResponse);
soapResponse = testutils.invoke("local://path",
LocalTransportFactory.TRANSPORT_ID, soapRequest.getBytes());
verify(mockInvoker, times(2)).invoke(any(Exchange.class), any());
assertThat(inInterceptor.getInvocationCount(), equalTo(2));
assertThat(inInterceptor2.getInvocationCount(), equalTo(2));
assertThat(outInterceptor.getInvocationCount(), equalTo(2));
testutils.assertValid("/soap:Envelope/soap:Body/a:fooResponse", soapResponse);
}
示例3: SonosFaultInterceptor
/**
* Constructor, setting the phase to Marshal. This happens before the default Fault Interceptor
*/
public SonosFaultInterceptor() {
super(Phase.MARSHAL);
}
示例4: DataOutInterceptor
public DataOutInterceptor() {
super(Phase.MARSHAL);
}
示例5: CleanupInterceptor
public CleanupInterceptor() {
super(Phase.MARSHAL);
}
示例6: CustomFaultInterceptor
public CustomFaultInterceptor() {
super(Phase.MARSHAL);
}
示例7: TraceInterceptor
public TraceInterceptor() {
super(Phase.MARSHAL);
}
示例8: AllowOriginProvider
public AllowOriginProvider() {
super(Phase.MARSHAL);
}
示例9: AbstractClientIheTestcaseOutInterceptor
protected AbstractClientIheTestcaseOutInterceptor(String resultPropName, Class<V> resultClass) {
this(Phase.MARSHAL, resultPropName, resultClass);
}
示例10: CustomHandler
public CustomHandler() {
super(Phase.MARSHAL);
addBefore(JAXRSOutInterceptor.class.getName());
}
示例11: getClient
@Test
public void getClient() {
String address = "http://address";
Handler handler = mock(Handler.class);
// simple
DummyInterface clientProxy = jaxwsEnvironment.getClient(
new ClientBuilder<>(DummyInterface.class, address)
);
assertThat(clientProxy, is(instanceOf(Proxy.class)));
Client c = ClientProxy.getClient(clientProxy);
assertThat(c.getEndpoint().getEndpointInfo().getAddress(), equalTo(address));
assertThat(c.getEndpoint().getService().get("endpoint.class").equals(DummyInterface.class), equalTo(true));
assertThat(((BindingProvider)clientProxy).getBinding() .getHandlerChain().size(), equalTo(0));
HTTPClientPolicy httpclient = ((HTTPConduit)c.getConduit()).getClient();
assertThat(httpclient.getConnectionTimeout(), equalTo(500L));
assertThat(httpclient.getReceiveTimeout(), equalTo(2000L));
// with timeouts, handlers, interceptors, properties and MTOM
TestInterceptor inInterceptor = new TestInterceptor(Phase.UNMARSHAL);
TestInterceptor inInterceptor2 = new TestInterceptor(Phase.PRE_INVOKE);
TestInterceptor outInterceptor = new TestInterceptor(Phase.MARSHAL);
clientProxy = jaxwsEnvironment.getClient(
new ClientBuilder<>(DummyInterface.class, address)
.connectTimeout(123)
.receiveTimeout(456)
.handlers(handler)
.cxfInInterceptors(inInterceptor, inInterceptor2)
.cxfOutInterceptors(outInterceptor)
.enableMtom());
c = ClientProxy.getClient(clientProxy);
assertThat(c.getEndpoint().getEndpointInfo().getAddress(), equalTo(address));
assertThat(c.getEndpoint().getService().get("endpoint.class").equals(DummyInterface.class), equalTo(true));
httpclient = ((HTTPConduit)c.getConduit()).getClient();
assertThat(httpclient.getConnectionTimeout(), equalTo(123L));
assertThat(httpclient.getReceiveTimeout(), equalTo(456L));
assertThat(((BindingProvider)clientProxy).getBinding().getHandlerChain(), contains(handler));
BindingProvider bp = (BindingProvider)clientProxy;
SOAPBinding binding = (SOAPBinding)bp.getBinding();
assertThat(binding.isMTOMEnabled(), equalTo(true));
}
示例12: ProtobufMessageOutInterceptor
/**
*
*/
public ProtobufMessageOutInterceptor() {
super(Phase.MARSHAL);
}