axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jorge Medina" <jmed...@e-dialog.com>
Subject wsdl2java and basic authentication
Date Tue, 30 Sep 2008 14:57:40 GMT
Hi, 

  I have a Tomcat server (6.0.16) using basic authentication through a
JDBC connection to a database.

  The server runs in port 8080.

 

   I am trying to run wsdl2java against this server, 

 

   > wsdl2java -uri
http://ssmith:password@myapp.example.com:8080/webservices/mywsdl.wsdl -s
-uw -u

 

but I get HTTP error 401:

 

Retrieving document at
'http://ssmith:password@myapp.example.com:8080/company

-webservices/mywsdl.wsdl'.

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException

: Error parsing WSDL

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat

ionEngine.java:156)

        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)

        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)

Caused by: javax.wsdl.WSDLException: WSDLException:
faultCode=OTHER_ERROR: Unabl

e to resolve imported document at
'http://ssmith:password@myapp.example.com:8

080/webservices/mywsdl.wsdl'.: java.io.IOException: Server retu

rned HTTP response code: 401 for URL:
http://ssmith:password@sdk.eng.e-dialog.co

m:8080/webservices/mywsdl.wsdl

        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)

        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(

CodeGenerationEngine.java:288)

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat

ionEngine.java:111)

        ... 2 more

Caused by: java.io.IOException: Server returned HTTP response code: 401
for URL:

 http://ssmith:password@myapp.example.com:8080/webservices/mailingCru

dWsdl.wsdl

        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon

nection.java:1241)

        at java.net.URL.openStream(URL.java:1009)

        at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
Source)

 

        ... 6 more

 

 

The same URL works perfectly fine in a browser.

Is there any other way to specify the user and password required to get
the WSDL when running wsdl2java?

 

-Jorge

 

 


Mime
View raw message