{"record":{"id":"d6256112b781ee60","repo":"flowable/flowable-engine","slug":"an-error-occurs-creating-a-web-service-client-for","errorCode":null,"errorMessage":"An error occurs creating a web-service client for WSDL '\" + wsdl + \"'.","messagePattern":"An error occurs creating a web-service client for WSDL '\" \\+ wsdl \\+ \"'\\.","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cxf/src/main/java/org/flowable/engine/impl/webservice/CxfWebServiceClient.java","lineNumber":62,"sourceCode":"        JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();\n        Enumeration<URL> xjcBindingUrls;\n        try {\n            xjcBindingUrls = Thread.currentThread().getContextClassLoader()\n                    .getResources(CxfWSDLImporter.JAXB_BINDINGS_RESOURCE);\n            if (xjcBindingUrls.hasMoreElements()) {\n                final URL xjcBindingUrl = xjcBindingUrls.nextElement();\n                if (xjcBindingUrls.hasMoreElements()) {\n                    throw new FlowableException(\"Several JAXB binding definitions found for flowable-cxf: \"\n                            + CxfWSDLImporter.JAXB_BINDINGS_RESOURCE);\n                }\n                this.client = dcf.createClient(wsdl, Arrays.asList(new String[] { xjcBindingUrl.toString() }));\n                this.client.getRequestContext().put(\"org.apache.cxf.stax.force-start-document\", Boolean.TRUE);\n            } else {\n                throw new FlowableException(\"The JAXB binding definitions are not found for flowable-cxf: \"\n                        + CxfWSDLImporter.JAXB_BINDINGS_RESOURCE);\n            }\n        } catch (IOException e) {\n            throw new FlowableException(\"An error occurs creating a web-service client for WSDL '\" + wsdl + \"'.\", e);\n        }\n    }\n\n    @Override\n    public Object[] send(String methodName, Object[] arguments, ConcurrentMap<QName, URL> overridenEndpointAddresses) throws Exception {\n        try {\n            URL newEndpointAddress = null;\n            if (overridenEndpointAddresses != null) {\n                newEndpointAddress = overridenEndpointAddresses\n                        .get(this.client.getEndpoint().getEndpointInfo().getName());\n            }\n\n            if (newEndpointAddress != null) {\n                this.client.getRequestContext().put(Message.ENDPOINT_ADDRESS, newEndpointAddress.toExternalForm());\n            }\n            return client.invoke(methodName, arguments);\n        } catch (Fault e) {\n            LOGGER.debug(\"Technical error calling WS\", e);","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cxf/src/main/java/org/flowable/engine/impl/webservice/CxfWebServiceClient.java#L44-L80","documentation":"The CxfWebServiceClient constructor wraps any IOException raised while creating the CXF dynamic client (resource lookup or client creation) in a FlowableException naming the WSDL. It indicates the underlying I/O or resource access failed, not a business-logic problem.","triggerScenarios":"new CxfWebServiceClient(wsdl) where loading the WSDL URL or enumerating classpath resources throws IOException (unreachable WSDL URL, malformed URL, I/O error reading resource).","commonSituations":"WSDL served over HTTP with connection problems, file:// WSDL path missing, network/firewall issues at engine startup when initializing a web-service task.","solutions":["Verify the WSDL URL is reachable and correct (open it in a browser or curl it from the server host).","Check that the wsdl argument is a well-formed URL; fix scheme/host/port.","Inspect the wrapped IOException cause for the root error (connection refused, file not found, etc.)."],"exampleFix":"// before\nnew CxfWebServiceClient(\"http://internal:8080/service?WSDL\") // host unreachable\n// after\nnew CxfWebServiceClient(\"http://correct-host:8080/service?wsdl\") // verified reachable","handlingStrategy":"try-catch","validationCode":"// Verify WSDL reachability before constructing the client\nURL url = new URL(wsdl);\nURLConnection conn = url.openConnection();\nconn.setConnectTimeout(3000);\nconn.connect(); // throws early if unreachable","typeGuard":null,"tryCatchPattern":"try { new CxfWebServiceClient(wsdl); } catch (FlowableException e) {\n    Throwable cause = e.getCause();\n    if (cause instanceof IOException) { log.error(\"WSDL '{}' unreachable: {}\", wsdl, cause.getMessage()); }\n    throw e;\n}","preventionTips":["Validate WSDL URLs in configuration at startup","Use a health check against the WSDL endpoint","Prefer file:/classpath WSDL copies for stability"],"tags":["io","wsdl","cxf","network"],"backgroundTag":"http-request-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}