0

我有一个带有这个 url ( http://192.168.1.2:9095/postcode) 的 wsdl,它在上面设置了用户名 + 密码。现在我想在我的 .mflow (configurationXML) 文件中使用这个 url 作为wsdlLocation ,例如这些代码:

    <flow name="PostCode" doc:name="PostCode">
    <http:inbound-endpoint host="localhost" port="8085"
            path="postcode/service" exchange-pattern="request-response" doc:name="HTTP">
        <cxf:proxy-service doc:name="post_code" service="PostcodeWSService"
            wsdlLocation="http://192.168.1.2:9095/postcode?wsdl" namespace="http://service.post.net/"
            payload="body" />
    </http:inbound-endpoint>

    <copy-properties propertyName="SOAPAction" />

    <http:outbound-endpoint address="http://192.168.1.2:9095/postcode"  doc:name="HTTP" encoding="UTF-8" responseTimeout="1000000"  exchange-pattern="request-response">
        <cxf:proxy-client payload="body" doc:name="post_code" />
    </http:outbound-endpoint>
</flow>

但是当我在 MULE 中启动它时,出现以下错误:


    ERROR 2013-02-18 09:55:25,726 [main] org.mule.module.launcher.application.DefaultMuleApplication: null
java.io.IOException: Server returned HTTP response code: 401 for URL: http://192.168.1.2:9095/postcode?wsdl
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1305)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:244)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:191)
    at org.mule.module.cxf.support.ProxyServiceConfiguration.getEndpointName(ProxyServiceConfiguration.java:54)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1807)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1799)
    at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:193)
    at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:66)
    at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.initialise(FlowConfiguringMessageProcessor.java:94)
    at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
    at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
    at org.mule.endpoint.DefaultInboundEndpoint.createMessageProcessorChain(DefaultInboundEndpoint.java:163)
    at org.mule.endpoint.AbstractEndpoint.getMessageProcessorChain(AbstractEndpoint.java:517)
    at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:104)
    at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:317)
    at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:259)
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:143)
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:139)
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
    at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:95)
    at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:138)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
    at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
    at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
    at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:249)
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:151)
    at org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107)
    at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:47)
    at org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:56)
    at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:88)
Exception in thread "main" org.mule.module.launcher.DeploymentStartException: IOException: Server returned HTTP response code: 401 for URL: http://192.168.1.2:9094/iran/postcode?wsdl
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:174)
    at org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107)
    at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:47)
    at org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:56)
    at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:88)
Caused by: org.mule.api.lifecycle.LifecycleException: Failed to start inbound endpoint "endpoint.http.localhost.9094.iran.postcode"
    at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:122)
    at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:317)
    at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:259)
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:143)
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:139)
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
    at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:95)
    at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:138)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
    at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
    at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
    at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:249)
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:151)
    ... 4 more
Caused by: org.mule.api.lifecycle.InitialisationException: SERVICE_CREATION_MSG
    at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.initialise(FlowConfiguringMessageProcessor.java:98)
    at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
    at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
    at org.mule.endpoint.DefaultInboundEndpoint.createMessageProcessorChain(DefaultInboundEndpoint.java:163)
    at org.mule.endpoint.AbstractEndpoint.getMessageProcessorChain(AbstractEndpoint.java:517)
    at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:104)
    ... 27 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: SERVICE_CREATION_MSG
    at org.mule.module.cxf.support.ProxyServiceConfiguration.getEndpointName(ProxyServiceConfiguration.java:69)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1807)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1799)
    at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:193)
    at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:66)
    at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.initialise(FlowConfiguringMessageProcessor.java:94)
    ... 32 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://192.168.1.2:9095/postcode?wsdl'.: java.io.IOException: Server returned HTTP response code: 401 for URL: http://192.168.1.2:9095/postcode?wsdl
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:244)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:191)
    at org.mule.module.cxf.support.ProxyServiceConfiguration.getEndpointName(ProxyServiceConfiguration.java:54)
    ... 37 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://192.168.1.2:9095/postcode?wsdl
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1305)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    ... 43 more

当 WSDL 上没有用户名+密码时,我的代码可以工作,但是现在它有用户名+密码,我的代码不起作用?

如何在我的代码中传递该用户名+密码以扩展然后正常工作我的 wsdl 没有任何问题??????????

///////////////////////////////////////// ////////////

我更改了我的代码,如下所示:

(我编码了我的密码)

<http:connector name="httpConnector" doc:name="HTTP\HTTPS">
<service-overrides sessionHandler="org.mule.session.NullSessionHandler" />

<http:inbound-endpoint host="localhost" port="8085"
    path="MyService/Service"
    exchange-pattern="request-response" doc:name="HTTP">
<cxf:proxy-service 
    payload="envelope" 
    service="PostcodeWSService"
    wsdlLocation="http://postcode:%2A%25P%40%24T-C%40DE%25%2A@192.168.1.2:8082/postcode?wsdl"
    namespace="http://service.post.net/"
    validationEnabled="true" doc:name="SOAP" />     
</http:inbound-endpoint>

<outbound-endpoint 
    address="http://192.168.1.2:8082/postcode"
    exchange-pattern="request-response" doc:name="Generic">
<cxf:proxy-client payload="body" enableMuleSoapHeaders="true"  doc:name="SOAP"/>   
</outbound-endpoint>

但我又遇到了这些错误:

ERROR 2013-02-19 08:03:17,092 [main] org.mule.module.launcher.application.DefaultMuleApplication: null
java.io.IOException: Server returned HTTP response code: 401 for URL: http://postcode:%2A%25P%40%24T-C%40DE%25%2A@192.168.1.2:8082/postcode?wsdl
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1305)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:244)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:191)
    at org.mule.module.cxf.support.ProxyServiceConfiguration.getEndpointName(ProxyServiceConfiguration.java:54)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1807)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1799)
    at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:193)
    at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:66)
    at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.initialise(FlowConfiguringMessageProcessor.java:94)
    at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
    at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
    at org.mule.endpoint.DefaultInboundEndpoint.createMessageProcessorChain(DefaultInboundEndpoint.java:163)
    at org.mule.endpoint.AbstractEndpoint.getMessageProcessorChain(AbstractEndpoint.java:517)
    at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:104)
    at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:317)
    at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:259)
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:143)
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:139)
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
    at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:95)
    at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:138)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
    at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
    at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
    at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:249)
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:151)
    at org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107)
    at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:47)
    at org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:56)
    at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:88)
Exception in thread "main" org.mule.module.launcher.DeploymentStartException: IOException: Server returned HTTP response code: 401 for URL: http://postcode:%2A%25P%40%24T-C%40DE%25%2A@192.168.1.2:8082/postcode?wsdl
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:174)
    at org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107)
    at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:47)
    at org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:56)
    at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:88)
Caused by: org.mule.api.lifecycle.LifecycleException: Failed to start inbound endpoint "endpoint.http.localhost.8085.MyService.Service"
    at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:122)
    at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:317)
    at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:259)
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:143)
    at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:139)
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
    at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:95)
    at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:138)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
    at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
    at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
    at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:249)
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:151)
    ... 4 more
Caused by: org.mule.api.lifecycle.InitialisationException: SERVICE_CREATION_MSG
    at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.initialise(FlowConfiguringMessageProcessor.java:98)
    at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
    at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
    at org.mule.endpoint.DefaultInboundEndpoint.createMessageProcessorChain(DefaultInboundEndpoint.java:163)
    at org.mule.endpoint.AbstractEndpoint.getMessageProcessorChain(AbstractEndpoint.java:517)
    at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:104)
    ... 27 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: SERVICE_CREATION_MSG
    at org.mule.module.cxf.support.ProxyServiceConfiguration.getEndpointName(ProxyServiceConfiguration.java:69)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1807)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getEndpointName(ReflectionServiceFactoryBean.java:1799)
    at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:193)
    at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:66)
    at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.initialise(FlowConfiguringMessageProcessor.java:94)
    ... 32 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://postcode:%2A%25P%40%24T-C%40DE%25%2A@192.168.1.2:8082/iran/postcode?wsdl'.: java.io.IOException: Server returned HTTP response code: 401 for URL: http://postcode:%2A%25P%40%24T-C%40DE%25%2A@192.168.1.2:808/postcode?wsdl
    at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:244)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:191)
    at org.mule.module.cxf.support.ProxyServiceConfiguration.getEndpointName(ProxyServiceConfiguration.java:54)
    ... 37 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://postcode:%2A%25P%40%24T-C%40DE%25%2A@192.168.1.2:8082/postcode?wsdl
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1305)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    ... 43 more

我怎么解决这个问题?

4

1 回答 1

1

尝试使用以下格式设置wsdlLocation :

http://username:password@192.168.1.2:9095/postcode?wsdl
于 2013-02-18T11:02:57.603 回答