0
json이 serviceBean에서 GET 호출로 넘길 수없는 것 같습니다.도미노 REST 서비스 - GET 호출에서 매개 변수를 가져올 수 없습니다.
public class GetAccount extends CustomServiceBean {
@Override
public void renderService(CustomService service, RestServiceEngine engine) throws ServiceException {
XspOpenLogUtil.logEvent(null, "getAccount()", Level.INFO, null);
Map parameters = engine.getHttpRequest().getParameterMap();
XspOpenLogUtil.logEvent(null, "getAccount() - getHttpRequest().getParameterMap(): " + parameters.toString(), Level.INFO, null);
String json_string = IOUtils.toString(engine.getHttpRequest().getInputStream(), "UTF-8");
XspOpenLogUtil.logEvent(null, "getAccount() - jsonReaderString: " + json_string, Level.INFO, null); }
: 나는의 PathInfo = "getaccount"를 해봤의 PathInfo,의 PathInfo는 = "getaccount/{ID}"의 PathInfo는 = "getaccount {ID}"
serviceBean를 들어
<xe:restService id="restService1" pathInfo="getaccount">
<xe:this.service>
<xe:customRestService requestContentType="application/json" serviceBean="web.service.GetAccount" contentType="application/json"/>
</xe:this.service>
</xe:restService>
내가 POST로 변경하면 나는 json_string를 얻을 수 있습니다,하지만 난 GET을 수행하고, 즉 일부 JSON을 보낼 수있을 것입니다 : API로 자원과 SoapUI를 사용
{ "ID", "1234"}. xsp/getaccount {id} 및 매개 변수 N ame = id 및 값 = 1234
고마워, Scott.