-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Liu, Yinwei David opened SPR-7505 and commented
Hi,
It looks like a bug in JaxWsPortClientInterceptor that it uses the name of @WebServiceClient
as the client PortName.
In Spring 3.0.4, Spring tried to get some webservice info from @WebService
annotation, please see the jira https://jira.springframework.org/browse/SPR-7412 . however, it should not get Port name from @WebService
because one webservice could have multiple ports, and every ports have its own port name. Also, JaxWsPortClientInterceptor should not assume that the default PortName is the name of @WebService
.
e.g. we could have one webservice client class below, it does not have the portname in @WebServiceClient
. In this case, JaxWsPortClientInterceptor will use the name of WebServiceClient as its portname, and it leads to error.
@WebServiceClient
(name = "CalculatorService", targetNamespace = "http://xml.ms.com/ns/msjava/cxfutils/examples/calculator")
public class CalculatorService extends Service {
@WebEndpoint
(name = "CalculatorHTTPPort")
public Calculator getCalculatorHTTPPort() {...}
@WebEndpoint
(name = "CalculatorTCPPort")
public Calculator getCalculatorTCPPort() {...}
I think JaxWsPortClientInterceptor should not get Port name from its annotation, and it should not pick up servicename and targetNamespace from annotation. Also, the portname will be dynamically generated by the underlying webservice framework when portname is null and it can be decided at runtime. Could you please fix it? thanks.
Affects: 3.0.4
Referenced from: commits 66a5bb7