You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Jorge Medina (JIRA)" <ji...@apache.org> on 2008/10/01 21:43:44 UTC
[jira] Created: (AXIS2-4060) wsdl2java is unable to retrieve a WSDL
when basic authentication is required
wsdl2java is unable to retrieve a WSDL when basic authentication is required
----------------------------------------------------------------------------
Key: AXIS2-4060
URL: https://issues.apache.org/jira/browse/AXIS2-4060
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Affects Versions: 1.4, 1.4.1
Reporter: Jorge Medina
When access to the WSDL requires basic authentication, wsdl2java fails to send the credentials in version 1.4.1
while version 1.3 works fine.
Using version 1.4.1:
> wsdl2java -uri http://ssmith:password@myapp.example.com:8080/webservices/mywsdl.wsdl -s -uw -u
you will get HTTP error 401 as shown below, while the same command works fine when using version 1.3.
------ ---- --- --- --- --- --- ---
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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: [jira] Commented: (AXIS2-4060) wsdl2java is unable to retrieve
a WSDL when basic authentication is required
Posted by Lasith <la...@yahoo.com>.
The error is still with Axis2 version 1.5.1 as well
I can access the url with the browser
------------------
E:\workspace\temp\axis2WS\dictionaryServeice>
E:\software\java\axis2\axis2-1.5.1-bin\axis2-1.5.1\bin\WSDL2Java.bat -u
ri http://admin@<host>:<port>/adminserver/dictionaryService.jws?wsdl -o
client
Using AXIS2_HOME: E:\software\java\axis2\axis2-1.5.1-bin\axis2-1.5.1
Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_14
Retrieving document at
'http://admin@<host>:<port>/adminserver/dictionaryService.jws?wsdl'.
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.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:
Unable to resolve imported document at 'http:
//admin@<host>:<port>/adminserver/dictionaryService.jws?wsdl'.:
java.io.IOException: Server returned HTTP re
sponse code: 401 for URL:
http://admin@cmb1u267.ad.fast.no:16089/adminserver/dictionaryService.jws?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>(CodeGenerationEngine.java:111)
... 2 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for
URL: http://<host>:<port>/
adminserver/dictionaryService.jws?wsdl
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1305)
at java.net.URL.openStream(URL.java:1009)
at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
Source)
... 6 more
JIRA jira@apache.org wrote:
>
>
> [
> https://issues.apache.org/jira/browse/AXIS2-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781901#action_12781901
> ]
>
> Sbremal commented on AXIS2-4060:
> --------------------------------
>
> Is this issue going to be fixed? Is there any workaround?
>
> In enterprise environments it is quite common that the WSDL is stored at a
> password protected HTTP location. Would be good not to discurage people to
> use AXIS2 in business environments...
>
> Can someone give a boost to the fix of this incident? Hotfix would also be
> fine...
>
> Cheers,
> Balazs
>
>> wsdl2java is unable to retrieve a WSDL when basic authentication is
>> required
>> ----------------------------------------------------------------------------
>>
>> Key: AXIS2-4060
>> URL: https://issues.apache.org/jira/browse/AXIS2-4060
>> Project: Axis 2.0 (Axis2)
>> Issue Type: Bug
>> Affects Versions: 1.4.1, 1.4
>> Reporter: Jorge Medina
>> Assignee: Dimuthu Leelarathne
>>
>> When access to the WSDL requires basic authentication, wsdl2java fails to
>> send the credentials in version 1.4.1
>> while version 1.3 works fine.
>> Using version 1.4.1:
>> > wsdl2java -uri
>> http://ssmith:password@myapp.example.com:8080/webservices/mywsdl.wsdl -s
>> -uw -u
>> you will get HTTP error 401 as shown below, while the same command works
>> fine when using version 1.3.
>> ------ ---- --- --- --- --- --- ---
>> 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
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
>
--
View this message in context: http://old.nabble.com/-jira--Created%3A-%28AXIS2-4060%29-wsdl2java-is-unable-to-retrieve-a-WSDL-when-basic-authentication-is-required-tp19767680p27676257.html
Sent from the Axis - Dev mailing list archive at Nabble.com.
[jira] Commented: (AXIS2-4060) wsdl2java is unable to retrieve a
WSDL when basic authentication is required
Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636299#action_12636299 ]
Amila Chinthaka Suriarachchi commented on AXIS2-4060:
-----------------------------------------------------
how you specify the credentials in Axis2 1.3?
> wsdl2java is unable to retrieve a WSDL when basic authentication is required
> ----------------------------------------------------------------------------
>
> Key: AXIS2-4060
> URL: https://issues.apache.org/jira/browse/AXIS2-4060
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1, 1.4
> Reporter: Jorge Medina
>
> When access to the WSDL requires basic authentication, wsdl2java fails to send the credentials in version 1.4.1
> while version 1.3 works fine.
> Using version 1.4.1:
> > wsdl2java -uri http://ssmith:password@myapp.example.com:8080/webservices/mywsdl.wsdl -s -uw -u
> you will get HTTP error 401 as shown below, while the same command works fine when using version 1.3.
> ------ ---- --- --- --- --- --- ---
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-4060) wsdl2java is unable to retrieve a
WSDL when basic authentication is required
Posted by "Oliver Tupran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678283#action_12678283 ]
Oliver Tupran commented on AXIS2-4060:
--------------------------------------
Actually there is also a problem on axis2-1.3. The problem manifested itself if the wsdl file was referencing or importing xsd files located on the same server specified through relative paths.
...
<wsdl:types>
<xsd:schema ...>
<xsd:import namespace="namespace" schemaLocation="../../some_schema.xsd"/>
...
</xsd:schema>
</wsdl:types>
...
As I see it, it looks like the authentication worked for the wsdl url, but not for the rest of the files.
> wsdl2java is unable to retrieve a WSDL when basic authentication is required
> ----------------------------------------------------------------------------
>
> Key: AXIS2-4060
> URL: https://issues.apache.org/jira/browse/AXIS2-4060
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1, 1.4
> Reporter: Jorge Medina
> Assignee: Dimuthu Leelarathne
>
> When access to the WSDL requires basic authentication, wsdl2java fails to send the credentials in version 1.4.1
> while version 1.3 works fine.
> Using version 1.4.1:
> > wsdl2java -uri http://ssmith:password@myapp.example.com:8080/webservices/mywsdl.wsdl -s -uw -u
> you will get HTTP error 401 as shown below, while the same command works fine when using version 1.3.
> ------ ---- --- --- --- --- --- ---
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AXIS2-4060) wsdl2java is unable to retrieve a
WSDL when basic authentication is required
Posted by "Steve Cohen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649173#action_12649173 ]
Steve Cohen commented on AXIS2-4060:
------------------------------------
I wonder why the syntax in Axis 1.1
Wsdl2Java -U username -P password
was dropped.
> wsdl2java is unable to retrieve a WSDL when basic authentication is required
> ----------------------------------------------------------------------------
>
> Key: AXIS2-4060
> URL: https://issues.apache.org/jira/browse/AXIS2-4060
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1, 1.4
> Reporter: Jorge Medina
> Assignee: Dimuthu Leelarathne
>
> When access to the WSDL requires basic authentication, wsdl2java fails to send the credentials in version 1.4.1
> while version 1.3 works fine.
> Using version 1.4.1:
> > wsdl2java -uri http://ssmith:password@myapp.example.com:8080/webservices/mywsdl.wsdl -s -uw -u
> you will get HTTP error 401 as shown below, while the same command works fine when using version 1.3.
> ------ ---- --- --- --- --- --- ---
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Assigned: (AXIS2-4060) wsdl2java is unable to retrieve a
WSDL when basic authentication is required
Posted by "Dimuthu Leelarathne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dimuthu Leelarathne reassigned AXIS2-4060:
------------------------------------------
Assignee: Dimuthu Leelarathne
> wsdl2java is unable to retrieve a WSDL when basic authentication is required
> ----------------------------------------------------------------------------
>
> Key: AXIS2-4060
> URL: https://issues.apache.org/jira/browse/AXIS2-4060
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1, 1.4
> Reporter: Jorge Medina
> Assignee: Dimuthu Leelarathne
>
> When access to the WSDL requires basic authentication, wsdl2java fails to send the credentials in version 1.4.1
> while version 1.3 works fine.
> Using version 1.4.1:
> > wsdl2java -uri http://ssmith:password@myapp.example.com:8080/webservices/mywsdl.wsdl -s -uw -u
> you will get HTTP error 401 as shown below, while the same command works fine when using version 1.3.
> ------ ---- --- --- --- --- --- ---
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-4060) wsdl2java is unable to retrieve a
WSDL when basic authentication is required
Posted by "Sbremal (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781901#action_12781901 ]
Sbremal commented on AXIS2-4060:
--------------------------------
Is this issue going to be fixed? Is there any workaround?
In enterprise environments it is quite common that the WSDL is stored at a password protected HTTP location. Would be good not to discurage people to use AXIS2 in business environments...
Can someone give a boost to the fix of this incident? Hotfix would also be fine...
Cheers,
Balazs
> wsdl2java is unable to retrieve a WSDL when basic authentication is required
> ----------------------------------------------------------------------------
>
> Key: AXIS2-4060
> URL: https://issues.apache.org/jira/browse/AXIS2-4060
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1, 1.4
> Reporter: Jorge Medina
> Assignee: Dimuthu Leelarathne
>
> When access to the WSDL requires basic authentication, wsdl2java fails to send the credentials in version 1.4.1
> while version 1.3 works fine.
> Using version 1.4.1:
> > wsdl2java -uri http://ssmith:password@myapp.example.com:8080/webservices/mywsdl.wsdl -s -uw -u
> you will get HTTP error 401 as shown below, while the same command works fine when using version 1.3.
> ------ ---- --- --- --- --- --- ---
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AXIS2-4060) wsdl2java is unable to retrieve a
WSDL when basic authentication is required
Posted by "Jorge Medina (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636369#action_12636369 ]
Jorge Medina commented on AXIS2-4060:
-------------------------------------
I specified it in the URL to the WSDL:
http://user:password@server:8080/mywebservice/mywsdl.wsdl
-Jorge
> wsdl2java is unable to retrieve a WSDL when basic authentication is required
> ----------------------------------------------------------------------------
>
> Key: AXIS2-4060
> URL: https://issues.apache.org/jira/browse/AXIS2-4060
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1, 1.4
> Reporter: Jorge Medina
> Assignee: Dimuthu Leelarathne
>
> When access to the WSDL requires basic authentication, wsdl2java fails to send the credentials in version 1.4.1
> while version 1.3 works fine.
> Using version 1.4.1:
> > wsdl2java -uri http://ssmith:password@myapp.example.com:8080/webservices/mywsdl.wsdl -s -uw -u
> you will get HTTP error 401 as shown below, while the same command works fine when using version 1.3.
> ------ ---- --- --- --- --- --- ---
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org