Details
Description
In quarkus-cxf, we are executing the following snippet
JaxWsServerFactoryBean factoryBean = new JaxWsServerFactoryBean(); factoryBean.setServiceClass(Thread.currentThread().getContextClassLoader().loadClass(sei)); factoryBean.setAddress(path); Server server = factoryBean.create();
for all service interfaces available in the class path of an application. We do it at build time, for the sake of generating all necessary ancillary classes.
When doing this for org.apache.cxf.ws.security.sts.provider.SecurityTokenService, the following exception is thrown:
java.lang.IllegalArgumentException: An operation with name [{http://docs.oasis-open.org/ws-sx/ws-trust/200512/wsdl}Issue] already exists in this service
at org.apache.cxf.service.model.InterfaceInfo.addOperation(InterfaceInfo.java:78)
at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.createOperation(ReflectionServiceFactoryBean.java:1008)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.createOperation(JaxWsServiceFactoryBean.java:631)
at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:1000)
at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:460)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:693)
at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:529)
at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:262)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:103)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:210)
at io.quarkiverse.cxf.deployment.CxfDeploymentUtils.createServer(CxfDeploymentUtils.java:42)
at io.quarkiverse.cxf.deployment.QuarkusCxfProcessor.lambda$generateClasses$2(QuarkusCxfProcessor.java:213)
...
This is caused by the fact that there are two methods annotated with @WebMethod(operationName = "Issue") in org.apache.cxf.ws.security.sts.provider.SecurityTokenService:
@WebResult(name = "RequestSecurityTokenResponseCollection", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", partName = "responseCollection") @Action(input = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue", output = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal") @WebMethod(operationName = "Issue") RequestSecurityTokenResponseCollectionType issue( @WebParam(partName = "request", name = "RequestSecurityToken", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512") RequestSecurityTokenType request ); @WebResult(name = "RequestSecurityTokenResponse", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", partName = "response") @Action(input = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue", output = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal") @WebMethod(operationName = "Issue") RequestSecurityTokenResponseType issueSingle( @WebParam(partName = "request", name = "RequestSecurityToken", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512") RequestSecurityTokenType request );
I wonder whether one of the operationNames in SecurityTokenService needs to be changed?
Attachments
Issue Links
- links to