Hi guys,
I have several interfaces and each of them have a number of methods. I have recently exposed one of them as a Web Service and tested it with SOAP UI, to demonstrate that it would easier to perform such component testing as compared to an existing tool that we have.
So I have one EndPoint mapped and it exposed only one method so far. I now wanted to expose more methods and since they take the same parameters
Code:@PayloadRoot(namespace = NAMESPACE_URI, localPart = "CustomerSearchRequest") @ResponsePayload @Transactional(readOnly=true) public SearchCustomerResponse method2(@RequestPayload Element customerSearchOptions) throws JDOMException, JAXBException{I end up with an error when trying to access the Web ServiceCode:@PayloadRoot(namespace = NAMESPACE_URI, localPart = "CustomerSearchRequest") @ResponsePayload @Transactional(readOnly=true) public SearchCustomerResponse method1(@RequestPayload Element customerSearchOptions) throws JDOMException, JAXBException
org.springframework.context.ApplicationContextExce ption: Cannot map endpoint [public com.
etc.SearchCustomerResponse com.etc.CustomerSearchEndPoint.method2(org.jdom2.E lement) throws org.jdom2.JDOMException,javax.xml.bind.JAXBExcepti on] on registration key [{http://www.etc.com/et/schemas/1/00}CustomerSearchRequest]: there's already endpoint [public com.etc.SearchCustomerResponse com.etc.CustomerSearchEndPoint.method1(org.jdom2.E lement) throws org.jdom2.JDOMException,javax.xml.bind.JAXBExcepti on] mapped
My question is how would you suggest I expose multiple methods on the same EndPoint, with different names
but with the same parameter and return type?
Also, what do you think of the approach? Would you normally have an interfaces' methods on 1 endpoint, or would you have 1 EndPoint for each method. That would be a real pain in my case.
Cheers
Kris


Reply With Quote