Vitalii Tymchyshyn created CXF-5460:
---------------------------------------
Summary: Problem with creating server for service with imported
porttype
Key: CXF-5460
URL: https://issues.apache.org/jira/browse/CXF-5460
Project: CXF
Issue Type: Bug
Components: JAX-WS Runtime
Affects Versions: 2.7.3
Reporter: Vitalii Tymchyshyn
Hello.
I have a problem with imported porttype. When I try to build a server I get
"org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service <myService>"
I've tried to debug it and it looks like a bug in WSDLServiceFactory.java:
{code}
if (wsdlService == null) {
if ((!PartialWSDLProcessor.isServiceExisted(definition,
serviceName))
&& (!PartialWSDLProcessor.isBindingExisted(definition,
serviceName))
&& (PartialWSDLProcessor.isPortTypeExisted(definition,
serviceName))) {
try {
Map<QName, PortType> portTypes =
CastUtils.cast(definition.getPortTypes());
{code}
definition.getPortTypes should be replaced with definition.getAllPortTypes
(much like in isPortTypeExisted), otherwise porttype can't be found and NPE is
thrown later.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)