Hi all,
I'm having a problem with WSDLReader trying to parse a
WSDL url, the URL is under HTTP Basic authentication.
My browsing through the WSDLReader api, I couldn't
find any method to pass the userid/passwd information
when I call readWSDL(...) on it. I am using AXIS 1.2
and WSDL4J-1.5.1.
My code is something like this:
WSDLFactory factory = WSDLFactory.newInstance();
WSDLReader reader = factory.newWSDLReader();
reader.setFeature("javax.wsdl.verbose", true);
reader.setFeature("javax.wsdl.importDocuments",
true);
Definition wsdlDef = reader.readWSDL( _wsdlURL );
When I run this, I got the following error:
WSDLException: faultCode=OTHER_ERROR: Unable to
resolve imported document at
'http://sj-w-01-xzhou:28080/diAdmin/servlet/webservices?wsdlxml'.:
Server returned HTTP response code: 401 for URL:
http://sj-w-01-xzhou:28080/diAdmin/servlet/webservices?wsdlxml:
java.io.IOException: Server returned HTTP response
code: 401 for URL:
http://sj-w-01-xzhou:28080/diAdmin/servlet/webservices?wsdlxml
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:800)
at
java.net.URLConnection.getContent(URLConnection.java:585)
at java.net.URL.getContent(URL.java:927)
at
com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown
Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown
Source)
......
===========================
I tried to search mail archive but couldn't find any
useful info. Any help is much appreicated.
Thanks in advance.
Frank
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]