Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JaxWsPortClientInterceptor gets an incorrect PortName [SPR-7505] #12162

Closed
spring-projects-issues opened this issue Aug 29, 2010 · 2 comments
Closed
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

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

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

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.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Liu, Yinwei David commented

Thanks Juergen.

David

@spring-projects-issues spring-projects-issues added type: bug A general bug in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0.5 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants