You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@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.
Good point, we didn't think of the case where you wanted the JAX-WS runtime to figure out the port name. In that case, you certainly don't want that 'smart' fallback to the annotation's name() attribute.
So as of Spring 3.0.5, JaxWsPortClientInterceptor does not fall back to the annotation-specified name as portName anymore. However, all other attributes are still taken from the annotation by default if not locally specified on the JaxWsPortProxyFactoryBean, since this doesn't seem to do any harm. Let me know if any problems remain...
This will be available in tonight's 3.0.5 snapshot.
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
The text was updated successfully, but these errors were encountered: