RE: How can Axis2/Java 1.4.1 client detect soap response contains a ?
Your stub class is already throwing an Exception when a SOAP fault is received. Just catch the exception and do whatever you want with it. -Original Message- From: SGE0 [mailto:stefangee...@hotmail.com] Sent: Wednesday, November 11, 2009 7:13 AM To: axis-user@ws.apache.org Subject: How can Axis2/Java 1.4.1 client detect soap response contains a ? Hi, we have a Axis2/Java 1.4.1 client which sends a soap request and gets back a soap response containing a . We want to throw an error in case the soap response contains a . How can we detect the soap response contains a ? We use client classes derived with wsdl2java (adb). The code is as follows: ... prepare the soaprequest... // Send the request client.remove.RemoveStub.RequestResponse resp = stub.request(operation); // In case an is returnd, throw error // The response object contains a reference to this request String UUID = resp.get_return(); An example of a response with http://www.w3.org/2003/05/soap-envelope";> soapenv:Receiver documentUUID has not correct format. Should start with urn:uuid: -- View this message in context: http://old.nabble.com/How-can-Axis2-Java-1.4.1-client-detect-soap-response-contains-a-%3Csoapenv%3AFault%3E---tp26300313p26300313.html Sent from the Axis - User mailing list archive at Nabble.com.
RE: Axis SOAP header security with wsp tags in soap header
What have you tried? -Original Message- From: sh_santosh [mailto:santosh.nc...@gmail.com] Sent: Friday, September 25, 2009 11:14 AM To: axis-user@ws.apache.org Subject: Axis SOAP header security with wsp tags in soap header Dear All, I have to expose/provide the service method in which I have to implement the Soap Headers Security. Below is the Sample SOAP Header which I have to implement in my Service Method. I am using Axis 1.4, Tomcat 5 and Java 1.5. Response XML : XXUserName XXPassword 2007B Please Provide your valuable suggestions , how I can implement the above above SOAP Header. Regards, Santosh -- View this message in context: http://www.nabble.com/Axis-SOAP-header-security-with-wsp-tags-in-soap-header-tp25613897p25613897.html Sent from the Axis - User mailing list archive at Nabble.com.
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.(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.(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
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.(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.(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.(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.(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
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.(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.(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>
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:[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.(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.(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