gpt4 book ai didi

web-services - Web 服务测试 ejb3 作为日期参数传递

转载 作者:行者123 更新时间:2023-11-28 21:32:08 25 4
gpt4 key购买 nike

我的网络服务看起来像

import entities.Expense;
import java.math.BigDecimal;
import java.util.Date;
import javax.ejb.EJB;
import javax.jws.WebService;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import logic.ExpenseSessionBeanLocal;

/**
*
* @author nikola
*/
@WebService(serviceName = "ExpenseWebService")
@Stateless()
public class ExpenseWebService {
@EJB
private ExpenseSessionBeanLocal ejbRef;// Add business logic below. (Right-click in editor and choose
// "Insert Code > Add Web Service Operation")

@WebMethod(operationName = "makeExpenseOnce")
public Expense makeExpenseOnce(@WebParam(name = "expenseName") String expenseName, @WebParam(name = "expenseRecipient") String expenseRecipient, @WebParam(name = "purpose") String purpose, @WebParam(name = "username") String username, @WebParam(name = "expenseDate") Date expenseDate, @WebParam(name = "amount") BigDecimal amount, @WebParam(name = "currency") String currency) {
return ejbRef.makeExpenseOnce(expenseName, expenseRecipient, purpose, username, expenseDate, amount, currency);
}

}

下面是测试图

enter image description here

如何在javax.xml.datatype.XMLGregorianCalendar参数的测试中输入日期?

最佳答案

据我所知,不可能将对象传递给 Web 服务测试器(字符串除外)。例如,至少我从来没有设法发布 BigIntegers。

关于web-services - Web 服务测试 ejb3 作为日期参数传递,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16350140/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com