RE: wsdl2java and basic authentication
Report has been created: https://issues.apache.org/jira/browse/AXIS2-4060 From: keith chapman [mailto:[EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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-hostProxy host address if you are behind a firewall --http-proxy-portProxy 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: [EMAIL PROTECTED] 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:[EMAIL PROTECTED]:8080/webservices/mywsdl.wsdl -s http://ssmith:[EMAIL PROTECTED]:8080/webservices/mywsdl.wsdl-s -uw -u but I get HTTP error 401: Retrieving document at 'http://ssmith:[EMAIL PROTECTED]: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:[EMAIL PROTECTED]:8 080/webservices/mywsdl.wsdl'.: java.io.IOException: Server retu rned HTTP response code: 401 for URL: http://ssmith:[EMAIL PROTECTED] 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:[EMAIL PROTECTED]: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
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:[EMAIL PROTECTED] 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-hostProxy host address if you are behind a firewall --http-proxy-portProxy 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: [EMAIL PROTECTED] 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:[EMAIL PROTECTED]:8080/webservices/mywsdl.wsdl -s -uw -u but I get HTTP error 401: Retrieving document at 'http://ssmith:[EMAIL PROTECTED]: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:[EMAIL PROTECTED]:8 080/webservices/mywsdl.wsdl'.: java.io.IOException: Server retu rned HTTP response code: 401 for URL: http://ssmith:[EMAIL PROTECTED] 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:[EMAIL PROTECTED]: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
I got it. There is a bug in version 1.4 The same line works fine in version 1.3 From: Jorge Medina [mailto:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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-hostProxy host address if you are behind a firewall --http-proxy-portProxy 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: [EMAIL PROTECTED] 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:[EMAIL PROTECTED]:8080/webservices/mywsdl.wsdl -s -uw -u but I get HTTP error 401: Retrieving document at 'http://ssmith:[EMAIL PROTECTED]: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:[EMAIL PROTECTED]:8 080/webservices/mywsdl.wsdl'.: java.io.IOException: Server retu rned HTTP response code: 401 for URL: http://ssmith:[EMAIL PROTECTED] 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:[EMAIL PROTECTED]: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
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: [EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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-hostProxy host address if you are behind a firewall --http-proxy-portProxy 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: [EMAIL PROTECTED] 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:[EMAIL PROTECTED]:8080/webservices/mywsdl.wsdl -s -uw -u but I get HTTP error 401: Retrieving document at 'http://ssmith:[EMAIL PROTECTED]: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:[EMAIL PROTECTED]:8 080/webservices/mywsdl.wsdl'.: java.io.IOException: Server retu rned HTTP response code: 401 for URL: http://ssmith:[EMAIL PROTECTED] 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:[EMAIL PROTECTED]: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
Actually, I only tested with version 1.4.1 and version 1.3 Version 1.3 works fine From: Jorge Medina [mailto:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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-hostProxy host address if you are behind a firewall --http-proxy-portProxy 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: [EMAIL PROTECTED] 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:[EMAIL PROTECTED]:8080/webservices/mywsdl.wsdl -s -uw -u but I get HTTP error 401: Retrieving document at 'http://ssmith:[EMAIL PROTECTED]: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:[EMAIL PROTECTED]:8 080/webservices/mywsdl.wsdl'.: java.io.IOException: Server retu rned HTTP response code: 401 for URL: http://ssmith:[EMAIL PROTECTED] 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:[EMAIL PROTECTED]: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
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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED] *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:[EMAIL PROTECTED] *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-hostProxy host address if you are behind a firewall --http-proxy-portProxy 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: [EMAIL PROTECTED] 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:[EMAIL PROTECTED]:8080/webservices/mywsdl.wsdl -shttp://ssmith:[EMAIL PROTECTED]:8080/webservices/mywsdl.wsdl-s-uw -u but I get HTTP error 401: Retrieving document at ' http://ssmith:[EMAIL PROTECTED]: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:[EMAIL PROTECTED]:8 080/webservices/mywsdl.wsdl'.: java.io.IOException: Server retu rned HTTP response code: 401 for URL: http://ssmith:[EMAIL PROTECTED] 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:[EMAIL PROTECTED]: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 Nowhttp://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 with Basic Authentication
Thanks Upul ! it worked to me !! thanks again !!! Quino On 10/5/07, Upul Godage [EMAIL PROTECTED] wrote: Hi Quino, You can try giving username and password in the url. ./wsdljava.sh -uri http://username:[EMAIL PROTECTED]:port/path/service?WSDL Upul On 10/5/07, Leo Stevens [EMAIL PROTECTED] wrote: Thanks Upul but my problem is that I can´t generate the clases because the wsdl2java throws an exception because the server need user and password and I can´t give it. when wsdl2java.class invoke the server. Thanks again. Quino. On 10/1/07, Upul Godage [EMAIL PROTECTED] wrote: After you generate the classes, you can do something like this when using the stub. HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator(); authenticator.setPreemptiveAuthentication (true); authenticator.setAuthSchemes(Arrays.asList(new String[]{ HttpTransportProperties.Authenticator.BASIC})); authenticator.setUsername(username); authenticator.setPassword(password); stub._getServiceClient().getOptions().setProperty( HTTPConstants.AUTHENTICATE,authenticator); Upul On 10/2/07, Leo Stevens [EMAIL PROTECTED] wrote: Hi ! I have to invok a ws with Basic Authentication (user and pass), but first I need to create the java classes so I need run WSDL2JAVA.class with user and pass, so my question: Is it posible to set a java env param with username and password. Thanks . Quino.
Re: wsdl2java with Basic Authentication
Thanks Upul but my problem is that I can´t generate the clases because the wsdl2java throws an exception because the server need user and password and I can´t give it. when wsdl2java.class invoke the server. Thanks again. Quino. On 10/1/07, Upul Godage [EMAIL PROTECTED] wrote: After you generate the classes, you can do something like this when using the stub. HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator(); authenticator.setPreemptiveAuthentication (true); authenticator.setAuthSchemes(Arrays.asList(new String[]{ HttpTransportProperties.Authenticator.BASIC})); authenticator.setUsername(username); authenticator.setPassword(password); stub._getServiceClient().getOptions().setProperty( HTTPConstants.AUTHENTICATE,authenticator); Upul On 10/2/07, Leo Stevens [EMAIL PROTECTED] wrote: Hi ! I have to invok a ws with Basic Authentication (user and pass), but first I need to create the java classes so I need run WSDL2JAVA.classwith user and pass, so my question: Is it posible to set a java env param with username and password. Thanks . Quino.
Re: wsdl2java with Basic Authentication
Hi Quino, You can try giving username and password in the url. ./wsdljava.sh -uri http://username:[EMAIL PROTECTED]:port/path/service?WSDL Upul On 10/5/07, Leo Stevens [EMAIL PROTECTED] wrote: Thanks Upul but my problem is that I can´t generate the clases because the wsdl2java throws an exception because the server need user and password and I can´t give it. when wsdl2java.class invoke the server. Thanks again. Quino. On 10/1/07, Upul Godage [EMAIL PROTECTED] wrote: After you generate the classes, you can do something like this when using the stub. HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator(); authenticator.setPreemptiveAuthentication (true); authenticator.setAuthSchemes(Arrays.asList(new String[]{ HttpTransportProperties.Authenticator.BASIC})); authenticator.setUsername(username); authenticator.setPassword(password); stub._getServiceClient().getOptions().setProperty( HTTPConstants.AUTHENTICATE,authenticator); Upul On 10/2/07, Leo Stevens [EMAIL PROTECTED] wrote: Hi ! I have to invok a ws with Basic Authentication (user and pass), but first I need to create the java classes so I need run WSDL2JAVA.classwith user and pass, so my question: Is it posible to set a java env param with username and password. Thanks . Quino.
Re: wsdl2java with Basic Authentication
After you generate the classes, you can do something like this when using the stub. HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator(); authenticator.setPreemptiveAuthentication(true); authenticator.setAuthSchemes(Arrays.asList(new String[]{ HttpTransportProperties.Authenticator.BASIC})); authenticator.setUsername(username); authenticator.setPassword(password); stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE ,authenticator); Upul On 10/2/07, Leo Stevens [EMAIL PROTECTED] wrote: Hi ! I have to invok a ws with Basic Authentication (user and pass), but first I need to create the java classes so I need run WSDL2JAVA.class with user and pass, so my question: Is it posible to set a java env param with username and password. Thanks . Quino.