本文整理了Java中org.springframework.ws.transport.WebServiceMessageReceiver.receive()
方法的一些代码示例,展示了WebServiceMessageReceiver.receive()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebServiceMessageReceiver.receive()
方法的具体详情如下:
包路径:org.springframework.ws.transport.WebServiceMessageReceiver
类名称:WebServiceMessageReceiver
方法名:receive
[英]Receives the given message context. The given message context can be used to create a response.
[中]接收给定的消息上下文。给定的消息上下文可用于创建响应。
代码示例来源:origin: spring-projects/spring-integration
when(request.getPayloadSource()).thenReturn(payloadSource);
this.messageReceiver.receive(context);
this.messageReceiver.receive(context);
when(request.getPayloadSource()).thenReturn(payloadSource);
this.messageReceiver.receive(context);
代码示例来源:origin: net.javacrumbs/spring-ws-test
public void send(WebServiceMessage message) throws IOException {
context = createMessageContext(message);
try {
getWebServiceMessageReceiver().receive(context);
} catch (IOException e) {
throw e;
} catch (Exception e) {
throw new IOException(e);
}
}
代码示例来源:origin: spring-projects/spring-ws
/**
* Sends a request message by using the given {@link RequestCreator}. Typically called by using the default request
* creators provided by {@link RequestCreators}.
*
* @param requestCreator the request creator
* @return the response actions
* @see RequestCreators
*/
public ResponseActions sendRequest(RequestCreator requestCreator) {
Assert.notNull(requestCreator, "'requestCreator' must not be null");
try {
WebServiceMessage request = requestCreator.createRequest(messageFactory);
MessageContext messageContext = new DefaultMessageContext(request, messageFactory);
messageReceiver.receive(messageContext);
return new MockWebServiceClientResponseActions(messageContext);
}
catch (Exception ex) {
logger.error("Could not send request", ex);
fail(ex.getMessage());
return null;
}
}
代码示例来源:origin: org.springframework.ws/spring-ws-test
/**
* Sends a request message by using the given {@link RequestCreator}. Typically called by using the default request
* creators provided by {@link RequestCreators}.
*
* @param requestCreator the request creator
* @return the response actions
* @see RequestCreators
*/
public ResponseActions sendRequest(RequestCreator requestCreator) {
Assert.notNull(requestCreator, "'requestCreator' must not be null");
try {
WebServiceMessage request = requestCreator.createRequest(messageFactory);
MessageContext messageContext = new DefaultMessageContext(request, messageFactory);
messageReceiver.receive(messageContext);
return new MockWebServiceClientResponseActions(messageContext);
}
catch (Exception ex) {
logger.error("Could not send request", ex);
fail(ex.getMessage());
return null;
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Sends a request message by using the given {@link RequestCreator}. Typically called by using the default request
* creators provided by {@link RequestCreators}.
*
* @param requestCreator the request creator
* @return the response actions
* @see RequestCreators
*/
public ResponseActions sendRequest(RequestCreator requestCreator) {
Assert.notNull(requestCreator, "'requestCreator' must not be null");
try {
WebServiceMessage request = requestCreator.createRequest(messageFactory);
MessageContext messageContext = new DefaultMessageContext(request, messageFactory);
messageReceiver.receive(messageContext);
return new MockWebServiceClientResponseActions(messageContext);
}
catch (Exception ex) {
logger.error("Could not send request", ex);
fail(ex.getMessage());
return null;
}
}
代码示例来源:origin: net.javacrumbs/smock-common
public void interceptRequest(MessageContext messageContext, WebServiceMessageReceiver messageReceiver) throws Exception {
int interceptorIndex = -1;
if (interceptors != null) {
for (int i = 0; i < interceptors.length; i++) {
interceptorIndex = i;
if (!interceptors[i].handleRequest(messageContext)) {
break;
}
}
}
// if an interceptor has set a response, we don't send/receive
if (!messageContext.hasResponse()) {
messageReceiver.receive(messageContext);
}
if (messageContext.hasResponse()) {
if (!hasFault(messageContext.getResponse())) {
triggerHandleResponse(interceptorIndex, messageContext);
}
else {
triggerHandleFault(interceptorIndex, messageContext);
}
}
}
代码示例来源:origin: org.springframework.ws/spring-ws-core
WebServiceMessage request = connection.receive(getMessageFactory());
MessageContext messageContext = new DefaultMessageContext(request, getMessageFactory());
receiver.receive(messageContext);
if (messageContext.hasResponse()) {
WebServiceMessage response = messageContext.getResponse();
代码示例来源:origin: org.springframework.ws/org.springframework.ws
WebServiceMessage request = connection.receive(getMessageFactory());
MessageContext messageContext = new DefaultMessageContext(request, getMessageFactory());
receiver.receive(messageContext);
if (messageContext.hasResponse()) {
WebServiceMessage response = messageContext.getResponse();
代码示例来源:origin: spring-projects/spring-ws
WebServiceMessage request = connection.receive(getMessageFactory());
MessageContext messageContext = new DefaultMessageContext(request, getMessageFactory());
receiver.receive(messageContext);
if (messageContext.hasResponse()) {
WebServiceMessage response = messageContext.getResponse();
代码示例来源:origin: apache/servicemix-bundles
WebServiceMessage request = connection.receive(getMessageFactory());
MessageContext messageContext = new DefaultMessageContext(request, getMessageFactory());
receiver.receive(messageContext);
if (messageContext.hasResponse()) {
WebServiceMessage response = messageContext.getResponse();
内容来源于网络,如有侵权,请联系作者删除!