Project: mule
Issue MULE-7347: CXF: proxy-service does not automatically recognise the port of a service
If the proxy-service receives the information of: -wsdlLocation -namespace -service but it does not receive the port name, this information is not automatically retrieved from the wsdl. This happens even if the service has only one port. There is an attached project where you can see that if you specify the port, this works fine, but if you don't use this property, you receive the following stacktrace: {code} ERROR 2014-02-18 14:14:17,050 [main] org.mule.module.launcher.application.DefaultMuleApplication: null java.net.ConnectException: Connection refused java.net.PlainSocketImpl.socketConnect(Native Method) java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) java.net.Socket.connect(Socket.java:579) java.net.Socket.connect(Socket.java:528) sun.net.NetworkClient.doConnect(NetworkClient.java:180) sun.net.www.http.HttpClient.openServer(HttpClient.java:432) sun.net.www.http.HttpClient.openServer(HttpClient.java:527) sun.net.www.http.HttpClient.(HttpClient.java:211) sun.net.www.http.HttpClient.New(HttpClient.java:308) sun.net.www.http.HttpClient.New(HttpClient.java:326) sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996) sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932) sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850) sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300) org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XMLParser.parse(Unknown Source) org.apache.xerces.parsers.DOMParser.parse(Unknown Source) org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source) com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:249) org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:192) org.mule.module.cxf.support.ProxyServiceConfiguration.getEndpointName(ProxyServiceConfiguration.java:50) org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1843) org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1835) org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:189) org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:62) org.mule.module.cxf.config.FlowConfiguringMessageProcessor.initialise(FlowConfiguringMessageProcessor.java:92) org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79) org.mule.construct.AbstractFlowConstruct.initialiseIfInitialisable(AbstractFlowConstruct.java:314) org.mule.construct.AbstractPipeline.doInitialise(AbstractPipeline.java:214) org.mule.construct.AbstractFlowConstruct$1.onTransition(AbstractFlowConstruct.java:109) org.mule.construct.AbstractFlowConstruct$1.onTransition(AbstractFlowConstruct.java:103) org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:138) org.mule.construct.FlowConstructLifecycleManager.fireInitialisePhase(FlowConstructLifecycleManager.java:78) org.mule.construct.AbstractFlowConstruct.initialise(AbstractFlowConstruct.java:102) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626) org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:85) org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:105) org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:133) org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:88) org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43) org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101) org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:52) org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43) org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80) org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:170) org.mule.module.launcher.artifact.ArtifactWrapper$2.execute(ArtifactWrapper.java:62) org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:129) org.mule.module.launcher.artifact.ArtifactWrapper.init(ArtifactWrapper.java:57) org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:25) org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:121) INFO 2014-02-18 14:14:17,055 [main] org.mule.module.launcher.application.DefaultMuleApplication: App 'withoutport' never started, nothing to dispose of Exception in thread "main" org.mule.module.launcher.DeploymentInitException: ConnectException: Connection refused org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:177) org.mule.module.launcher.artifact.ArtifactWrapper$2.execute(ArtifactWrapper.java:62) org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:129) org.mule.module.launcher.artifact.ArtifactWrapper.init(ArtifactWrapper.java:57) org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:25) org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:121) {code} This bug depends on the api that you are using. For example, if you use this one: http://www.webservicex.net/FedACH.asmx?WSDL, which is a .net based API, the port is automatically detected when it is not specified.
Story points: 8