Hi,

As wsdl retrieval is also through http:conduit, so for your client side, you can configure http:conduit to enable endpoint basic auth preemptively so that you won't encounter 401 http challenge. The configuration is like
<http:conduit name="http://remothost:port/.*";>
          <http:authorization>
             <sec:UserName>username_as_you_want</sec:UserName>
             <sec:Password>password_as_you_want</sec:Password>
          </http:authorization>
   </http:conduit>

Freeman

On 2012-7-6, at 上午10:17, alfred wrote:

Hi, the WSDL I am trying to access is hosted remotely and authentication protected. I am using Eclipse Helios, TOMCAT 7, and CFX 2.6.1. An attempt to create the client side stubs etc. fails because the authentication to the WSDL is not provided. If I use simple axis or Axis2 then they both prompt me to enter a username and password however using CXF I get no such prompt. I get the same result if I run the wsdl2java from the command line. I have tried options such as "user:pwd@" in front of the URL to the WSDL but still
the same response.  Any clues on how to get the process to request the
authentication details or to enter them into the command some how?

WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create
wsdl definition from :
http://xxx.xxx.xxx.xxx/xxxxx/services/ASyncActivityService?wsdl
Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing
'http://xxx.xxx.xxx.xxx/xxxxx/services/ASyncActivityService?wsdl'.:
java.io.IOException: Server returned HTTP response code: 401 for URL:
http://xxx.xxx.xxx.xxx/xxxxx/services/ASyncActivityService?wsdl

--
View this message in context: 
http://cxf.547215.n5.nabble.com/401-on-client-creation-from-WSDL-tp5710657.html
Sent from the cxf-user mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042










Reply via email to