You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jorge Medina <jm...@e-dialog.com> on 2008/09/30 16:57:40 UTC
wsdl2java and basic authentication
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
RE: wsdl2java and basic authentication
Posted by Jorge Medina <jm...@e-dialog.com>.
Actually, I only tested with version 1.4.1 and version 1.3
Version 1.3 works fine
________________________________
From: Jorge Medina [mailto:jmedina@e-dialog.com]
Sent: Tuesday, September 30, 2008 11:22 AM
To: axis-user@ws.apache.org
Subject: RE: wsdl2java and basic authentication
I got it. There is a bug in version 1.4
The same line works fine in version 1.3
________________________________
From: Jorge Medina [mailto:jmedina@e-dialog.com]
Sent: Tuesday, September 30, 2008 11:15 AM
To: axis-user@ws.apache.org
Subject: RE: wsdl2java and basic authentication
No, I have the two computers in the same network, no firewall between
them.
The error wouldn't be 401 if the issue was a firewall, right?
Nevertheless, I will repeat my test directly at the server.
-Jorge
________________________________
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Tuesday, September 30, 2008 11:09 AM
To: Jorge Medina
Subject: RE: wsdl2java and basic authentication
appears you're behind a proxy server so
you'll either need to specify WSDL2Java proxy settings e.g.
--http-proxy-host Proxy host address if you are behind a
firewall
--http-proxy-port Proxy prot address if you are behind a
firewall
or d/l the wsdl to an accessible file or webserver and use that
Saludos Cordiales desde Mass
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission.
________________________________
Subject: wsdl2java and basic authentication
Date: Tue, 30 Sep 2008 10:57:40 -0400
From: jmedina@e-dialog.com
To: axis-user@ws.apache.org
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
________________________________
Want to do more with Windows Live? Learn "10 hidden secrets" from Jamie.
Learn Now
<http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-c
ns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008>
RE: wsdl2java and basic authentication
Posted by Jorge Medina <jm...@e-dialog.com>.
Report has been created:
https://issues.apache.org/jira/browse/AXIS2-4060
________________________________
From: keith chapman [mailto:keithgchapman@gmail.com]
Sent: Tuesday, September 30, 2008 9:25 PM
To: axis-user@ws.apache.org
Subject: Re: wsdl2java and basic authentication
Could you please file a JIRA please so that we will be able to fix this
for the next release.
Thanks,
Keith.
On Tue, Sep 30, 2008 at 8:51 PM, Jorge Medina <jm...@e-dialog.com>
wrote:
I got it. There is a bug in version 1.4
The same line works fine in version 1.3
________________________________
From: Jorge Medina [mailto:jmedina@e-dialog.com]
Sent: Tuesday, September 30, 2008 11:15 AM
To: axis-user@ws.apache.org
Subject: RE: wsdl2java and basic authentication
No, I have the two computers in the same network, no firewall between
them.
The error wouldn't be 401 if the issue was a firewall, right?
Nevertheless, I will repeat my test directly at the server.
-Jorge
________________________________
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Tuesday, September 30, 2008 11:09 AM
To: Jorge Medina
Subject: RE: wsdl2java and basic authentication
appears you're behind a proxy server so
you'll either need to specify WSDL2Java proxy settings e.g.
--http-proxy-host Proxy host address if you are behind a
firewall
--http-proxy-port Proxy prot address if you are behind a
firewall
or d/l the wsdl to an accessible file or webserver and use that
Saludos Cordiales desde Mass
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission.
________________________________
Subject: wsdl2java and basic authentication
Date: Tue, 30 Sep 2008 10:57:40 -0400
From: jmedina@e-dialog.com
To: axis-user@ws.apache.org
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
<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
________________________________
Want to do more with Windows Live? Learn "10 hidden secrets" from Jamie.
Learn Now
<http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-c
ns%21550F681DAD532637%215295.entry?ocid=TXT_TAGLM_WL_domore_092008>
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org
Re: wsdl2java and basic authentication
Posted by keith chapman <ke...@gmail.com>.
Could you please file a JIRA please so that we will be able to fix this for
the next release.
Thanks,
Keith.
On Tue, Sep 30, 2008 at 8:51 PM, Jorge Medina <jm...@e-dialog.com> wrote:
> I got it. There is a bug in version 1.4
>
>
>
> The same line works fine in version 1.3
>
>
>
>
> ------------------------------
>
> *From:* Jorge Medina [mailto:jmedina@e-dialog.com]
> *Sent:* Tuesday, September 30, 2008 11:15 AM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: wsdl2java and basic authentication
>
>
>
> No, I have the two computers in the same network, no firewall between them.
>
>
> The error wouldn't be 401 if the issue was a firewall, right?
>
>
>
> Nevertheless, I will repeat my test directly at the server.
>
>
>
>
>
> -Jorge
>
>
> ------------------------------
>
> *From:* Martin Gainty [mailto:mgainty@hotmail.com]
> *Sent:* Tuesday, September 30, 2008 11:09 AM
> *To:* Jorge Medina
> *Subject:* RE: wsdl2java and basic authentication
>
>
>
> appears you're behind a proxy server so
> you'll either need to specify WSDL2Java proxy settings e.g.
> --http-proxy-host Proxy host address if you are behind a firewall
> --http-proxy-port Proxy prot address if you are behind a firewall
>
> or d/l the wsdl to an accessible file or webserver and use that
>
> Saludos Cordiales desde Mass
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
> ------------------------------
>
> Subject: wsdl2java and basic authentication
> Date: Tue, 30 Sep 2008 10:57:40 -0400
> From: jmedina@e-dialog.com
> To: axis-user@ws.apache.org
>
> 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<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
>
>
>
>
>
>
> ------------------------------
>
> Want to do more with Windows Live? Learn "10 hidden secrets" from Jamie. Learn
> Now<http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns%21550F681DAD532637%215295.entry?ocid=TXT_TAGLM_WL_domore_092008>
>
--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org
RE: wsdl2java and basic authentication
Posted by Martin Gainty <mg...@hotmail.com>.
it seems you have found a malicious bug..please let us know how to remove
thanks
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
Subject: RE: wsdl2java and basic authentication
Date: Tue, 30 Sep 2008 11:21:31 -0400
From: jmedina@e-dialog.com
To: axis-user@ws.apache.org
I got it. There is a bug in version 1.4
The same line works fine in version 1.3
From: Jorge Medina
[mailto:jmedina@e-dialog.com]
Sent: Tuesday, September 30, 2008 11:15
AM
To: axis-user@ws.apache.org
Subject: RE: wsdl2java and basic
authentication
No, I have the two computers in the same
network, no firewall between them.
The error wouldn’t be 401 if the
issue was a firewall, right?
Nevertheless, I will repeat my test
directly at the server.
-Jorge
From: Martin Gainty
[mailto:mgainty@hotmail.com]
Sent: Tuesday, September 30, 2008
11:09 AM
To: Jorge Medina
Subject: RE: wsdl2java and basic
authentication
appears you're behind a proxy
server so
you'll either need to specify WSDL2Java proxy settings e.g.
--http-proxy-host Proxy host
address if you are behind a firewall
--http-proxy-port Proxy prot
address if you are behind a firewall
or d/l the wsdl to an accessible file or webserver and use that
Saludos Cordiales desde Mass
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business
of Sender. This transmission is of a confidential nature and Sender does not
endorse distribution to any party other than intended recipient. Sender does
not necessarily endorse content contained within this transmission.
Subject: wsdl2java and basic
authentication
Date: Tue, 30 Sep 2008 10:57:40 -0400
From: jmedina@e-dialog.com
To: axis-user@ws.apache.org
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
Want to do more with Windows Live? Learn “10 hidden
secrets” from Jamie. Learn Now
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
RE: wsdl2java and basic authentication
Posted by Jorge Medina <jm...@e-dialog.com>.
I got it. There is a bug in version 1.4
The same line works fine in version 1.3
________________________________
From: Jorge Medina [mailto:jmedina@e-dialog.com]
Sent: Tuesday, September 30, 2008 11:15 AM
To: axis-user@ws.apache.org
Subject: RE: wsdl2java and basic authentication
No, I have the two computers in the same network, no firewall between
them.
The error wouldn't be 401 if the issue was a firewall, right?
Nevertheless, I will repeat my test directly at the server.
-Jorge
________________________________
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Tuesday, September 30, 2008 11:09 AM
To: Jorge Medina
Subject: RE: wsdl2java and basic authentication
appears you're behind a proxy server so
you'll either need to specify WSDL2Java proxy settings e.g.
--http-proxy-host Proxy host address if you are behind a
firewall
--http-proxy-port Proxy prot address if you are behind a
firewall
or d/l the wsdl to an accessible file or webserver and use that
Saludos Cordiales desde Mass
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission.
________________________________
Subject: wsdl2java and basic authentication
Date: Tue, 30 Sep 2008 10:57:40 -0400
From: jmedina@e-dialog.com
To: axis-user@ws.apache.org
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
________________________________
Want to do more with Windows Live? Learn "10 hidden secrets" from Jamie.
Learn Now
<http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-c
ns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008>
RE: wsdl2java and basic authentication
Posted by Jorge Medina <jm...@e-dialog.com>.
No, I have the two computers in the same network, no firewall between
them.
The error wouldn't be 401 if the issue was a firewall, right?
Nevertheless, I will repeat my test directly at the server.
-Jorge
________________________________
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Tuesday, September 30, 2008 11:09 AM
To: Jorge Medina
Subject: RE: wsdl2java and basic authentication
appears you're behind a proxy server so
you'll either need to specify WSDL2Java proxy settings e.g.
--http-proxy-host Proxy host address if you are behind a
firewall
--http-proxy-port Proxy prot address if you are behind a
firewall
or d/l the wsdl to an accessible file or webserver and use that
Saludos Cordiales desde Mass
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission.
________________________________
Subject: wsdl2java and basic authentication
Date: Tue, 30 Sep 2008 10:57:40 -0400
From: jmedina@e-dialog.com
To: axis-user@ws.apache.org
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
________________________________
Want to do more with Windows Live? Learn "10 hidden secrets" from Jamie.
Learn Now
<http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-c
ns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008>