Hi Dan,
Can you please help me with similar issue?
My use-case is very the same (see config file below).
I've got the same exception (401 - authentication failed) under both Mule 2.0.2 and Mule 2.1.1 despite I pass username and pasword info in url (i.e. wsdl-cxf:
http://username:password@localhost:8080/services/DictionaryCurrencyService?method=getCurrencyId)
My web service is hosting under Tomcat 5.5 or 6.0 (CXF 2.1.3).
Thank you in advanced,
<service name="test">
<inbound>
<quartz:inbound-endpoint name="example"
cronExpression="0/5 * * * * ?" jobName="job5">
</quartz:inbound-endpoint>
</inbound>
<outbound>
<chaining-router >
<outbound-endpoint address="wsdl-cxf:
http://username:password@localhost:8080/services/DictionaryCurrencyService?method=getCurrencyId">
<properties>
<spring:entry key="wsdlLocation" value="file:///c:/DictionaryCurrencyService.xml"/>
</properties>
</outbound-endpoint>
24 жовт 2008 14:59:07 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: <html><head><title>Apache Tomcat/5.5.26 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 401 - </h1><HR size="1" noshade="noshade"><p>
type Status report</p><p>
message <u></u></p><p>
description <u>This request requires HTTP authentication ().</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.26</h3></body></html>
at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:73)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:633)
at org.mule.transport.cxf.transport.MuleUniversalConduit.dispatchMuleMessage(MuleUniversalConduit.java:194)
at org.mule.transport.cxf.transport.MuleUniversalConduit$1.handleMessage(MuleUniversalConduit.java:142)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:466)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:308)
at org.mule.transport.cxf.CxfMessageDispatcher.doSendWithClient(CxfMessageDispatcher.java:194)
at org.mule.transport.cxf.CxfMessageDispatcher.doSend(CxfMessageDispatcher.java:128)
at org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:168)
at org.mule.transport.AbstractConnector.send(AbstractConnector.java:1910)
at org.mule.endpoint.DefaultOutboundEndpoint.send(DefaultOutboundEndpoint.java:77)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:213)
at org.mule.routing.outbound.AbstractOutboundRouter$2.doInTransaction(AbstractOutboundRouter.java:149)
at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99)
at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:156)
at org.mule.routing.outbound.ChainingRouter.route(ChainingRouter.java:71)
at org.mule.routing.outbound.DefaultOutboundRouterCollection$1.doInTransaction(DefaultOutboundRouterCollection.java:64)
at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:45)
at org.mule.routing.outbound.DefaultOutboundRouterCollection.route(DefaultOutboundRouterCollection.java:69)
at org.mule.service.AbstractService.dispatchToOutboundRouter(AbstractService.java:877)
at org.mule.model.seda.SedaService.dispatchToOutboundRouter(SedaService.java:500)
at org.mule.model.seda.SedaService$ComponentStageWorker.run(SedaService.java:523)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Unknown Source)
Hi Heimo,
he Mule CXF connector does not use the CXF HTTP transport (Maybe we need to
create an option to allow this though). It uses the Mule HTTP transport. So
you must configure basic authentication at the Mule level.
I think this would mean that you can just put the credentials in the URL:
http://user:password@mycompany.com/secure
Dan