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


Java RequestPayload类代码示例

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


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

示例1: createEmployee

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(localPart = "CreateEmployeeRequest", namespace = "http://sachinhandiekar.com/service/EmployeeService")
@ResponsePayload
public CreateEmployeeResponse createEmployee(@RequestPayload CreateEmployeeRequest request) {

    logger.info("Creating employee...");
    logger.info(":: Request ::");

    logger.info("First Name : " + request.getFirstName());
    logger.info("Last Name : " + request.getLastName());
    logger.info("City : " + request.getCity());

    CreateEmployeeResponse response = new ObjectFactory().createCreateEmployeeResponse();
    response.setStatus(true);

    return response;
}
 
开发者ID:sachin-handiekar,项目名称:springws-examples,代码行数:17,代码来源:EmployeeServiceEndpoint.java

示例2: getProcessClaim

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getProcessClaimRequest")
@ResponsePayload
public GetProcessClaimResponse getProcessClaim(@RequestPayload GetProcessClaimRequest request) throws CustomBCDSSException, BusinessException {
    LOGGER.debug("SOAP request to get a Process Claim... ...");
    GetProcessClaimResponse getProcessClaimResponse = new GetProcessClaimResponse();
    if (CollectionUtils.isNotEmpty(request.getVeteranClaimInput())) {
        List<VeteranClaimRating> veteranClaimRatings = claimDataService.findByVeteranId(request.getVeteranClaimInput());
        if (CollectionUtils.isNotEmpty(veteranClaimRatings)) {
            getProcessClaimResponse.getVeteranClaimRatingOutput().addAll(veteranClaimRatings);
        } else {
            throw new CustomBCDSSException("No valid Pattern found for the data selected");
        }
    }

    return getProcessClaimResponse;
}
 
开发者ID:VHAINNOVATIONS,项目名称:BCDS,代码行数:17,代码来源:BcdsModelingEndpoint.java

示例3: createOrder

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "order")
@ResponsePayload
public OrderConfirmation createOrder(@RequestPayload Order request) {
    LOGGER.info(
            "Endpoint received order for Customer[firstName={},lastName={}]",
            request.getCustomer().getFirstName(),
            request.getCustomer().getLastName());

    // process order

    ObjectFactory factory = new ObjectFactory();
    OrderConfirmation response = factory.createOrderConfirmation();
    response.setConfirmationId(UUID.randomUUID().toString());

    LOGGER.info("Endpoint sending orderConfirmationId='{}'",
            response.getConfirmationId());
    return response;
}
 
开发者ID:code-not-found,项目名称:spring-ws,代码行数:19,代码来源:CreateOrderEndpoint.java

示例4: saveCustoemr

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "saveCustomerRequest")
@ResponsePayload
public SaveCustomerResponse saveCustoemr(@RequestPayload SaveCustomerRequest request) {
    SaveCustomerResponse response = new SaveCustomerResponse();
    Customer customer = request.getCustomer();
    Kunde kunde = new Kunde();
    kunde.setNachname(customer.getLastName());
    kunde.setVorname(customer.getFirstName());
    kunde.setStrasse(customer.getStreet());
    kunde.setPlz(customer.getPostCode());
    kunde.setStadt(customer.getCity());
    Kunde savedKunde = kundeRepository.saveAndFlush(kunde);
    redisTemplate.convertAndSend("customer-created-events", new CustomerCreatedEvent(savedKunde));
    customer.setId(savedKunde.getId());
    response.setCustomer(customer);

    return response;
}
 
开发者ID:mploed,项目名称:ddd-strategic-design-spring-boot,代码行数:19,代码来源:CustomerEndpoint.java

示例5: menuRequest

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(localPart = "menuRequest", namespace = TARGET_NAMESPACE)
@ResponsePayload
public MenuResponse menuRequest(@RequestPayload MenuRequest request) {

	if (request == null) {
		log.trace("Null MenuRequest");
	}
	MenuResponse toRet = new MenuResponse();
	List<Menu> menus = menuServerLogic.getCurrentSystemMenu();

	if (menus.size() == 1) {
		toRet.setMenu(menus.get(0));
	} else {
		Menu newRoot = new Menu();
		newRoot.setSkipThis("true");
		newRoot.setItems(menus);
		toRet.setSkipRoot("true");
		toRet.setMenu(newRoot);
	}
	return toRet;
}
 
开发者ID:fpuna-cia,项目名称:karaku,代码行数:22,代码来源:MenuServiceEndpoint.java

示例6: storePackage

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(localPart = "PackageRequest", namespace = NAMESPACE)
@ResponsePayload
public PackageResponse storePackage(@RequestPayload PackageRequest packageRequest) {

    try {
        if (packageRequest.getPackageId() == 1) {
            return createPackage1Response();
        } else if (packageRequest.getPackageId() == 2) {
            return createPackage2Response();
        } else {
            return createErrorResponse(2, "No package Id in request");
        }
    } catch (DatatypeConfigurationException e) {
        return createErrorResponse(1, "Unexpected exception");
    }

}
 
开发者ID:jensalm,项目名称:ws-loadbalancer,代码行数:18,代码来源:PackageEndpoint.java

示例7: getFlights

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(localPart = GET_FLIGHTS_REQUEST, namespace = MESSAGES_NAMESPACE)
@Namespace(prefix = "m", uri = MESSAGES_NAMESPACE)
@ResponsePayload
public GetFlightsResponse getFlights(@RequestPayload GetFlightsRequest request) throws AirlineException{
	String from = request.getFrom();
	String to = request.getTo();
	ServiceClass serviceClass = request.getServiceClass();
	if (from.equals(to)) {
		throw new AirlineException("Departure and destination airport has to differ.");
	}

	GetFlightsResponse response = new GetFlightsResponse();
	Flight flight = new Flight();
	flight.setFrom(airport(from));
	flight.setTo(airport(to));
	flight.setNumber("OK1324");
	flight.setServiceClass(serviceClass);
	flight.setDepartureTime(time("2011-02-19T10:00:00"));
	flight.setArrivalTime(time("2011-02-19T12:00:00"));
	response.getFlight().add(flight);
	return response;

}
 
开发者ID:lukas-krecan,项目名称:smock,代码行数:24,代码来源:AirlineEndpoint.java

示例8: processCourseDetailsRequest

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(namespace = "http://in28minutes.com/courses", localPart = "GetCourseDetailsRequest")
@ResponsePayload
public GetCourseDetailsResponse processCourseDetailsRequest(@RequestPayload GetCourseDetailsRequest request) {

	Course course = service.findById(request.getId());

	if (course == null)
		throw new CourseNotFoundException("Invalid Course Id " + request.getId());

	return mapCourseDetails(course);
}
 
开发者ID:in28minutes,项目名称:spring-web-services,代码行数:12,代码来源:CourseDetailsEndpoint.java

示例9: processAllCourseDetailsRequest

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(namespace = "http://in28minutes.com/courses", localPart = "GetAllCourseDetailsRequest")
@ResponsePayload
public GetAllCourseDetailsResponse processAllCourseDetailsRequest(
		@RequestPayload GetAllCourseDetailsRequest request) {

	List<Course> courses = service.findAll();

	return mapAllCourseDetails(courses);
}
 
开发者ID:in28minutes,项目名称:spring-web-services,代码行数:10,代码来源:CourseDetailsEndpoint.java

示例10: deleteCourseDetailsRequest

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(namespace = "http://in28minutes.com/courses", localPart = "DeleteCourseDetailsRequest")
@ResponsePayload
public DeleteCourseDetailsResponse deleteCourseDetailsRequest(@RequestPayload DeleteCourseDetailsRequest request) {

	Status status = service.deleteById(request.getId());

	DeleteCourseDetailsResponse response = new DeleteCourseDetailsResponse();
	response.setStatus(mapStatus(status));

	return response;
}
 
开发者ID:in28minutes,项目名称:spring-web-services,代码行数:12,代码来源:CourseDetailsEndpoint.java

示例11: service

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(localPart="DataRequest",namespace=Namespace.NS)
public @ResponsePayload DataResponse service(@RequestPayload DataRequest request){
	String beanId=request.getBeanId();
	String methodName=request.getMethodName();
	String[] args=request.getMethodArgements();
	DataResponse response=new DataResponse();
	try{
		
		Object targetBean=ContextHolder.getBean(beanId);
		Method method=null;
		if(args==null || args.length==0){
			method=targetBean.getClass().getMethod(methodName);
		}else{
			Class<?>[] classes=new Class<?>[args.length];
			for(int i=0;i<args.length;i++){
				classes[i]=String.class;
			}
			method=targetBean.getClass().getMethod(methodName, classes);				
		}
		Object returnValue=null;
		if(args!=null && args.length>0){
			Object[] objs=new Object[args.length];
			for(int i=0;i<args.length;i++){
				objs[i]=args[i];
			}
			returnValue=method.invoke(targetBean, objs);				
		}else{
			returnValue=method.invoke(targetBean, new Object[]{});								
		}
		if(returnValue!=null){
			response.setReturnValue(returnValue.toString());				
		}
		response.setSuccessful(true);
	}catch(Exception ex){
		response.setReturnValue(ex.getMessage());
		response.setSuccessful(false);
	}
	return response;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:40,代码来源:RPCEndpoint.java

示例12: getCountry

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getCountryRequest")
@ResponsePayload
public GetCountryResponse getCountry(@RequestPayload GetCountryRequest request) {
    GetCountryResponse response = new GetCountryResponse();
    response.setCountry(countryRepository.findCountry(request.getName()));

    return response;
}
 
开发者ID:daishicheng,项目名称:outcomes,代码行数:9,代码来源:CountryEndpoint.java

示例13: getAccountDetails

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(localPart = "InvoiceProductRequest", namespace = TARGET_NAMESPACE)
public @ResponsePayload InvoiceProductResponse getAccountDetails(
		@RequestPayload InvoiceProductRequest request) {
	InvoiceProductResponse response = new InvoiceProductResponse();
	InvoicedProducts account = accountReceivableService
			.getInvProduct(request.getInvoiceId());
	response.setInvoicedProduct(account);
	return response;
}
 
开发者ID:PacktPublishing,项目名称:Spring-MVC-Blueprints,代码行数:10,代码来源:AccountReceivableServiceEndpoint.java

示例14: listMembers

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "ListMembers")
@ResponsePayload
public ListMembersResponse listMembers(@RequestPayload ListMembers request) {
    ListMembersResponse response = new ListMembersResponse();
    response.setMemberList(new MemberList());

    Iterable<Member> members = jaxbCatalogService.getAllMembers(request.getChangedAfter());
    response.getMemberList().getMember().addAll(Lists.newArrayList(members));
    return response;
}
 
开发者ID:vrk-kpa,项目名称:xroad-catalog,代码行数:11,代码来源:ServiceEndpoint.java

示例15: getWsdl

import org.springframework.ws.server.endpoint.annotation.RequestPayload; //导入依赖的package包/类
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "GetWsdl")
@ResponsePayload
public GetWsdlResponse getWsdl(@RequestPayload GetWsdl request) {
    GetWsdlResponse response = new GetWsdlResponse();
    Wsdl wsdl = catalogService.getWsdl(request.getExternalId());
    if (wsdl == null) {
        throw new WsdlNotFoundException("wsdl with external id " + request.getExternalId()
                + " not found");
    }
    response.setWsdl(wsdl.getData());
    return response;
}
 
开发者ID:vrk-kpa,项目名称:xroad-catalog,代码行数:13,代码来源:ServiceEndpoint.java


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