当前位置: 首页>>代码示例>>Java>>正文


Java SoapAction类代码示例

本文整理汇总了Java中org.springframework.ws.soap.server.endpoint.annotation.SoapAction的典型用法代码示例。如果您正苦于以下问题:Java SoapAction类的具体用法?Java SoapAction怎么用?Java SoapAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SoapAction类属于org.springframework.ws.soap.server.endpoint.annotation包,在下文中一共展示了SoapAction类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: listFlights

import org.springframework.ws.soap.server.endpoint.annotation.SoapAction; //导入依赖的package包/类
@SoapAction(value = "http://example.com/TicketAgent/listFlights")
@ResponsePayload
public JAXBElement<TFlightsResponse> listFlights(
    @RequestPayload JAXBElement<TListFlights> request, MessageContext messageContext) {
  // access the SOAPAction value
  WebServiceMessage webServiceMessage = messageContext.getRequest();
  SoapMessage soapMessage = (SoapMessage) webServiceMessage;
  LOGGER.info("SOAPAction header: {}", soapMessage.getSoapAction());

  ObjectFactory factory = new ObjectFactory();
  TFlightsResponse tFlightsResponse = factory.createTFlightsResponse();
  tFlightsResponse.getFlightNumber().add(BigInteger.valueOf(101));

  return factory.createListFlightsResponse(tFlightsResponse);
}
 
开发者ID:code-not-found,项目名称:spring-ws,代码行数:16,代码来源:TicketAgentEndpoint.java

示例2: getEntity

import org.springframework.ws.soap.server.endpoint.annotation.SoapAction; //导入依赖的package包/类
/**
 * Receives a query for an entity and returns the data for said entity.
 * <p>
 * The data to be returned will be acquired from the persistence layer, and
 * then set into the response.
 * <p>
 * But the domain model classes won't be returned. Instead JAXB beans,
 * generated from the XSD file, will be used both for mapping the SOAP
 * request payload, and to generate the SOAP response payload.
 *
 * @param request
 *            payload of the SOAP request for the entity
 * @return payload for the SOAP response with the entity
 */
@PayloadRoot(localPart = ExampleEntityEndpointConstants.REQUEST,
        namespace = ExampleEntityEndpointConstants.ENTITY_NS)
@SoapAction(ExampleEntityEndpointConstants.ACTION)
@ResponsePayload
public final GetEntityResponse
        getEntity(@RequestPayload final GetEntityRequest request) {
    final GetEntityResponse response; // SOAP response with the result
    final ExampleEntity entity;       // Found entity
    final Entity entityResponse;      // Entity to return

    checkNotNull(request, "Received a null pointer as request");

    LOGGER.debug("Received request for id {}", request.getId());

    // Acquires the entity
    entity = getExampleEntityService().findById(request.getId());

    // The entity is transformed from the domain model to the JAXB model
    entityResponse = new Entity();
    BeanUtils.copyProperties(entity, entityResponse);

    LOGGER.debug("Found entity with id {} and name {}", entity.getId(),
            entity.getName());

    response = new GetEntityResponse();
    response.setEntity(entityResponse);

    return response;
}
 
开发者ID:Bernardo-MG,项目名称:spring-ws-security-soap-example,代码行数:44,代码来源:ExampleEntityEndpoint.java

示例3: loadContent

import org.springframework.ws.soap.server.endpoint.annotation.SoapAction; //导入依赖的package包/类
/**
 * Handles LoadContentRequests
 * @param loadContentRequest The request
 * @return The LoadContentResponse
 */
@SoapAction("")
@ResponsePayload
public LoadContentResponse loadContent(@RequestPayload LoadContentRequest loadContentRequest);
 
开发者ID:vanioinformatika,项目名称:spring-ws-mtom-example,代码行数:9,代码来源:MtomEndpointInterface.java

示例4: storeContent

import org.springframework.ws.soap.server.endpoint.annotation.SoapAction; //导入依赖的package包/类
/**
 * Handles StoreContentRequests
 * @param storeContentRequest The request
 * @return The StoreContentResponse
 * @throws java.io.IOException If an error occurs during storing the content
 */
@SoapAction("")
@ResponsePayload
public StoreContentResponse storeContent(@RequestPayload StoreContentRequest storeContentRequest) throws IOException;
 
开发者ID:vanioinformatika,项目名称:spring-ws-mtom-example,代码行数:10,代码来源:MtomEndpointInterface.java


注:本文中的org.springframework.ws.soap.server.endpoint.annotation.SoapAction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。