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

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

本文整理了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

@Test
  public void testSendAndReceive() {
    WebServiceTemplate ws = new WebServiceTemplate(marshaller);
    GetCountryRequest request = new GetCountryRequest();
    request.setName("Spain");

    assertThat(ws.marshalSendAndReceive("http://localhost:"
        + port + "/ws", request)).isNotNull();
  }
}

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

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

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

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

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

@Service
 public class TestService {
   @Autowired
   private WebServiceTemplate webServiceTemplate;
   public Double getValue(String paramOne) {
      request.setParam(paramOne);
     Response response = (Response) webServiceTemplate.marshalSendAndReceive(
         request);
     return response.Result();
   }
 }

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

/**
 * Create a new activation directly, using the createActivation method of the PowerAuth Server
 * SOAP interface.
 * @param request Create activation request.
 * @return Create activation response.
 */
public CreateActivationResponse createActivation(CreateActivationRequest request) {
  return (CreateActivationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
}

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

/**
 * Call the commitActivation method of the PowerAuth 3.0 Server SOAP interface.
 * @param request {@link CommitActivationRequest} instance
 * @return {@link CommitActivationResponse}
 */
public CommitActivationResponse commitActivation(CommitActivationRequest request) {
  return (CommitActivationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
}

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

/**
 * Call the unblockActivation method of the PowerAuth 3.0 Server SOAP interface.
 * @param request {@link UnblockActivationRequest} instance.
 * @return {@link UnblockActivationResponse}
 */
public UnblockActivationResponse unblockActivation(UnblockActivationRequest request) {
  return (UnblockActivationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
}

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

/**
 * Call the verifySignature method of the PowerAuth 3.0 Server SOAP interface.
 * @param request {@link VerifySignatureRequest} instance.
 * @return {@link VerifySignatureResponse}
 */
public VerifySignatureResponse verifySignature(VerifySignatureRequest request) {
  return (VerifySignatureResponse) getWebServiceTemplate().marshalSendAndReceive(request);
}

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

/**
 * Call the verifyECDSASignature method of the PowerAuth 3.0 Server SOAP interface.
 * @param request {@link VerifyECDSASignatureRequest} instance.
 * @return {@link VerifyECDSASignatureResponse}
 */
public VerifyECDSASignatureResponse verifyECDSASignature(VerifyECDSASignatureRequest request) {
  return (VerifyECDSASignatureResponse) getWebServiceTemplate().marshalSendAndReceive(request);
}

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

/**
 * Call the getActivationHistory method of the PowerAuth 3.0 Server SOAP interface.
 * @param request {@link ActivationHistoryRequest} instance.
 * @return {@link ActivationHistoryResponse}
 */
public ActivationHistoryResponse getActivationHistory(ActivationHistoryRequest request) {
  return (ActivationHistoryResponse) getWebServiceTemplate().marshalSendAndReceive(request);
}

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

/**
 * Create a new application with given name.
 * @param request {@link CreateApplicationRequest} instance.
 * @return {@link CreateApplicationResponse}
 */
public CreateApplicationResponse createApplication(CreateApplicationRequest request) {
  return (CreateApplicationResponse) getWebServiceTemplate().marshalSendAndReceive(request);
}

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

/**
 * Cancel the support for a given application version.
 * @param request {@link UnsupportApplicationVersionRequest} instance.
 * @return {@link UnsupportApplicationVersionResponse}
 */
public UnsupportApplicationVersionResponse unsupportApplicationVersion(UnsupportApplicationVersionRequest request) {
  return (UnsupportApplicationVersionResponse) getWebServiceTemplate().marshalSendAndReceive(request);
}

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

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

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

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

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

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

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

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

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

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

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

/**
 * Call the getSystemStatus method of the PowerAuth 3.0 Server SOAP interface.
 * @return {@link GetSystemStatusResponse}
 */
public GetSystemStatusResponse getSystemStatus() {
  GetSystemStatusRequest request = new GetSystemStatusRequest();
  return (GetSystemStatusResponse) getWebServiceTemplate().marshalSendAndReceive(request);
}

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

@SuppressWarnings("unchecked")
 public List<BigInteger> listFlights() {

  ObjectFactory factory = new ObjectFactory();
  TListFlights tListFlights = factory.createTListFlights();

  JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);

  JAXBElement<TFlightsResponse> response =
    (JAXBElement<TFlightsResponse>) webServiceTemplate.marshalSendAndReceive(request);

  return response.getValue().getFlightNumber();
 }
}

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

@SuppressWarnings("unchecked")
 public List<BigInteger> listFlights() {
  ObjectFactory factory = new ObjectFactory();
  TListFlights tListFlights = factory.createTListFlights();

  JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);

  JAXBElement<TFlightsResponse> response =
    (JAXBElement<TFlightsResponse>) webServiceTemplate.marshalSendAndReceive(request);

  return response.getValue().getFlightNumber();
 }
}

相关文章

WebServiceTemplate类方法