本文整理汇总了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);
}
示例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;
}
示例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);
示例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;