org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(8.9k)|赞(0)|评价(0)|浏览(251)

本文整理了Java中org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive()方法的一些代码示例,展示了WebServiceTemplate.marshalSendAndReceive()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebServiceTemplate.marshalSendAndReceive()方法的具体详情如下:
包路径:org.springframework.ws.client.core.WebServiceTemplate
类名称:WebServiceTemplate
方法名:marshalSendAndReceive

WebServiceTemplate.marshalSendAndReceive介绍

暂无

代码示例

Official Spring framework guide

代码示例来源:origin: spring-guides/gs-producing-web-service

  1. @Test
  2. public void testSendAndReceive() {
  3. WebServiceTemplate ws = new WebServiceTemplate(marshaller);
  4. GetCountryRequest request = new GetCountryRequest();
  5. request.setName("Spain");
  6. assertThat(ws.marshalSendAndReceive("http://localhost:"
  7. + port + "/ws", request)).isNotNull();
  8. }
  9. }

代码示例来源:origin: spring-projects/spring-integration

  1. @Override
  2. protected Object doHandle(String uri, Message<?> requestMessage, WebServiceMessageCallback requestCallback) {
  3. return getWebServiceTemplate()
  4. .marshalSendAndReceive(uri, requestMessage.getPayload(),
  5. new PassThroughRequestMessageCallback(requestCallback, requestMessage));
  6. }

代码示例来源:origin: mercyblitz/segmentfault-lessons

  1. public static void main(String[] args) {
  2. WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
  3. Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller();
  4. jaxb2Marshaller.setClassesToBeBound(UserIdRequest.class, UserResponse.class, User.class);
  5. webServiceTemplate.setMarshaller(jaxb2Marshaller);
  6. webServiceTemplate.setUnmarshaller(jaxb2Marshaller);
  7. //构造 SOAP 请求
  8. UserIdRequest userIdRequest = new UserIdRequest();
  9. userIdRequest.setUserId(1L);
  10. userIdRequest.setTimestamp(Instant.now().toEpochMilli());
  11. UserResponse userResponse = (UserResponse) webServiceTemplate.marshalSendAndReceive("http://localhost:8080/web-services/user", userIdRequest);
  12. System.out.println(userResponse);
  13. }

代码示例来源:origin: stackoverflow.com

  1. @Service
  2. public class TestService {
  3. @Autowired
  4. private WebServiceTemplate webServiceTemplate;
  5. public Double getValue(String paramOne) {
  6. request.setParam(paramOne);
  7. Response response = (Response) webServiceTemplate.marshalSendAndReceive(
  8. request);
  9. return response.Result();
  10. }
  11. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Create a new activation directly, using the createActivation method of the PowerAuth Server
  3. * SOAP interface.
  4. * @param request Create activation request.
  5. * @return Create activation response.
  6. */
  7. public CreateActivationResponse createActivation(CreateActivationRequest request) {
  8. return (CreateActivationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  9. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Call the commitActivation method of the PowerAuth 3.0 Server SOAP interface.
  3. * @param request {@link CommitActivationRequest} instance
  4. * @return {@link CommitActivationResponse}
  5. */
  6. public CommitActivationResponse commitActivation(CommitActivationRequest request) {
  7. return (CommitActivationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Call the unblockActivation method of the PowerAuth 3.0 Server SOAP interface.
  3. * @param request {@link UnblockActivationRequest} instance.
  4. * @return {@link UnblockActivationResponse}
  5. */
  6. public UnblockActivationResponse unblockActivation(UnblockActivationRequest request) {
  7. return (UnblockActivationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Call the verifySignature method of the PowerAuth 3.0 Server SOAP interface.
  3. * @param request {@link VerifySignatureRequest} instance.
  4. * @return {@link VerifySignatureResponse}
  5. */
  6. public VerifySignatureResponse verifySignature(VerifySignatureRequest request) {
  7. return (VerifySignatureResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Call the verifyECDSASignature method of the PowerAuth 3.0 Server SOAP interface.
  3. * @param request {@link VerifyECDSASignatureRequest} instance.
  4. * @return {@link VerifyECDSASignatureResponse}
  5. */
  6. public VerifyECDSASignatureResponse verifyECDSASignature(VerifyECDSASignatureRequest request) {
  7. return (VerifyECDSASignatureResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Call the getActivationHistory method of the PowerAuth 3.0 Server SOAP interface.
  3. * @param request {@link ActivationHistoryRequest} instance.
  4. * @return {@link ActivationHistoryResponse}
  5. */
  6. public ActivationHistoryResponse getActivationHistory(ActivationHistoryRequest request) {
  7. return (ActivationHistoryResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Create a new application with given name.
  3. * @param request {@link CreateApplicationRequest} instance.
  4. * @return {@link CreateApplicationResponse}
  5. */
  6. public CreateApplicationResponse createApplication(CreateApplicationRequest request) {
  7. return (CreateApplicationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Cancel the support for a given application version.
  3. * @param request {@link UnsupportApplicationVersionRequest} instance.
  4. * @return {@link UnsupportApplicationVersionResponse}
  5. */
  6. public UnsupportApplicationVersionResponse unsupportApplicationVersion(UnsupportApplicationVersionRequest request) {
  7. return (UnsupportApplicationVersionResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Get the response with list of callback URL objects.
  3. * @param request SOAP request object with application ID.
  4. * @return Response with the list of all callback URLs for given application.
  5. */
  6. public GetCallbackUrlListResponse getCallbackUrlList(GetCallbackUrlListRequest request) {
  7. return (GetCallbackUrlListResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Call the prepareActivation method of the PowerAuth 3.0 Server SOAP interface.
  3. * @param request {@link io.getlime.powerauth.soap.v2.PrepareActivationRequest} instance
  4. * @return {@link io.getlime.powerauth.soap.v2.PrepareActivationResponse}
  5. */
  6. public io.getlime.powerauth.soap.v2.PrepareActivationResponse prepareActivation(io.getlime.powerauth.soap.v2.PrepareActivationRequest request) {
  7. return (io.getlime.powerauth.soap.v2.PrepareActivationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Create a new activation directly, using the createActivation method of the PowerAuth 2.0 Server
  3. * SOAP interface.
  4. * @param request Create activation request.
  5. * @return Create activation response.
  6. */
  7. public io.getlime.powerauth.soap.v2.CreateActivationResponse createActivation(io.getlime.powerauth.soap.v2.CreateActivationRequest request) {
  8. return (io.getlime.powerauth.soap.v2.CreateActivationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  9. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Call the vaultUnlock method of the PowerAuth 2.0 Server SOAP interface.
  3. * @param request {@link io.getlime.powerauth.soap.v2.VaultUnlockRequest} instance
  4. * @return {@link io.getlime.powerauth.soap.v2.VaultUnlockResponse}
  5. */
  6. public io.getlime.powerauth.soap.v2.VaultUnlockResponse unlockVault(io.getlime.powerauth.soap.v2.VaultUnlockRequest request) {
  7. return (io.getlime.powerauth.soap.v2.VaultUnlockResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Create a new token for basic token-based authentication.
  3. * @param request Request with token information.
  4. * @return Response with created token.
  5. */
  6. public CreateTokenResponse createToken(CreateTokenRequest request) {
  7. return (CreateTokenResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: io.getlime.security/powerauth-java-client-spring

  1. /**
  2. * Call the getSystemStatus method of the PowerAuth 3.0 Server SOAP interface.
  3. * @return {@link GetSystemStatusResponse}
  4. */
  5. public GetSystemStatusResponse getSystemStatus() {
  6. GetSystemStatusRequest request = new GetSystemStatusRequest();
  7. return (GetSystemStatusResponse) getWebServiceTemplate().marshalSendAndReceive(request);
  8. }

代码示例来源:origin: code-not-found/spring-ws

  1. @SuppressWarnings("unchecked")
  2. public List<BigInteger> listFlights() {
  3. ObjectFactory factory = new ObjectFactory();
  4. TListFlights tListFlights = factory.createTListFlights();
  5. JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);
  6. JAXBElement<TFlightsResponse> response =
  7. (JAXBElement<TFlightsResponse>) webServiceTemplate.marshalSendAndReceive(request);
  8. return response.getValue().getFlightNumber();
  9. }
  10. }

代码示例来源:origin: code-not-found/spring-ws

  1. @SuppressWarnings("unchecked")
  2. public List<BigInteger> listFlights() {
  3. ObjectFactory factory = new ObjectFactory();
  4. TListFlights tListFlights = factory.createTListFlights();
  5. JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);
  6. JAXBElement<TFlightsResponse> response =
  7. (JAXBElement<TFlightsResponse>) webServiceTemplate.marshalSendAndReceive(request);
  8. return response.getValue().getFlightNumber();
  9. }
  10. }

相关文章

WebServiceTemplate类方法