の初心者ですSpring Webservices
。を使用して契約優先のWebサービスを作成しようとしていますspring-ws 2.0
。web.xml
(MessageDispatcherServlet)構成、コントラクトデザイン(XSD)、生成されたJAXB
クラス、およびサービスの実装を行いました。エンドポイントで混乱しています。次のmvcRESTコントローラーまたはエンポイントのどれが、どのシナリオで使用するのが正しいですか、またその理由は何ですか?前もって感謝します。
@Endpoint
public class PersonEndpoint {
@Autowired
private PersonServiceImpl personService;
@PayloadRoot(localPart = "PersonRequest", namespace = Constants.PERSON_NAMESPACE)
public @ResponsePayload
PersonResponseType personReadMethod(@RequestPayload PersonReadRequestType requestElement) {
return personService.isBiometricNeeded(requestElement);
}
}
また
@Controller
public class PersonController {
@Autowired
private PersonServiceImpl personService;
@RequestMapping(value = "/person", method = RequestMethod.GET)
public @ResponseBody
PersonResponseType personReadMethod(@RequestBody PersonReadRequestType requestElement) {
return personService.isBiometricNeeded(requestElement);
}
}