How to do basic http authentication with axis 1.3 client?
I generated my stubs using the axis-wsdl2java ant task specifying a username/password. When the service was unsecured, I used to be able to call it like this: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); result = mspt.getSomeResult(79744); Now that the service has been secured using basic authentication (username/password), how do I specify my username/password when connecting to the service? Regards, Joshua * This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. *
Re: How to do basic http authentication with axis 1.3 client?
I tried the following and I still get a 401 error: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); Stub stub = (Stub)mspt; stub.setUsername(someusername); stub.setPassword(somepassword); result = mspt.getSomeResult(79744); Is there something else I need to do? [EMAIL PROTECTED] 05/11/2006 02:08 PM Please respond to axis-user To: axis-user@ws.apache.org cc: Subject: How to do basic http authentication with axis 1.3 client? I generated my stubs using the axis-wsdl2java ant task specifying a username/password. When the service was unsecured, I used to be able to call it like this: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); result = mspt.getSomeResult(79744); Now that the service has been secured using basic authentication (username/password), how do I specify my username/password when connecting to the service? Regards, Joshua * This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. *
Re: How to do basic http authentication with axis 1.3 client?
I am new to this, so by all means this may not be the way to do it, but perhaps you can try: URL serviceUrl = new URL(http://username:[EMAIL PROTECTED]:7001/webservice/MyService?WSDL); Jim [EMAIL PROTECTED] wrote: I tried the following and I still get a 401 error: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL;); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); * Stub stub = (Stub)mspt;* *stub.setUsername(someusername);* *stub.setPassword(somepassword);* result = mspt.getSomeResult(79744); Is there something else I need to do? [EMAIL PROTECTED] 05/11/2006 02:08 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:How to do basic http authentication with axis 1.3 client? I generated my stubs using the axis-wsdl2java ant task specifying a username/password. When the service was unsecured, I used to be able to call it like this: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL;); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); result = mspt.getSomeResult(79744); Now that the service has been secured using basic authentication (username/password), how do I specify my username/password when connecting to the service? Regards, Joshua * This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. *
Re: How to do basic http authentication with axis 1.3 client?
Thanks for the reply James. No dice though. Any other ideas? -joshua James Gough [EMAIL PROTECTED] 05/11/2006 02:39 PM Please respond to axis-user To: axis-user@ws.apache.org cc: Subject: Re: How to do basic http authentication with axis 1.3 client? I am new to this, so by all means this may not be the way to do it, but perhaps you can try: URL serviceUrl = new URL(http://username:[EMAIL PROTECTED]:7001/webservice/MyService?WSDL); Jim [EMAIL PROTECTED] wrote: I tried the following and I still get a 401 error: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); * Stub stub = (Stub)mspt;* *stub.setUsername(someusername);* *stub.setPassword(somepassword);* result = mspt.getSomeResult(79744); Is there something else I need to do? [EMAIL PROTECTED] 05/11/2006 02:08 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:How to do basic http authentication with axis 1.3 client? I generated my stubs using the axis-wsdl2java ant task specifying a username/password. When the service was unsecured, I used to be able to call it like this: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); result = mspt.getSomeResult(79744); Now that the service has been secured using basic authentication (username/password), how do I specify my username/password when connecting to the service? Regards, Joshua * This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. *
Re: How to do basic http authentication with axis 1.3 client?
Never mind! [EMAIL PROTECTED] 05/11/2006 02:45 PM Please respond to axis-user To: axis-user@ws.apache.org cc: Subject: Re: How to do basic http authentication with axis 1.3 client? Thanks for the reply James. No dice though. Any other ideas? -joshua James Gough [EMAIL PROTECTED] 05/11/2006 02:39 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:Re: How to do basic http authentication with axis 1.3 client? I am new to this, so by all means this may not be the way to do it, but perhaps you can try: URL serviceUrl = new URL(http://username:[EMAIL PROTECTED]:7001/webservice/MyService?WSDL); Jim [EMAIL PROTECTED] wrote: I tried the following and I still get a 401 error: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); * Stub stub = (Stub)mspt;* *stub.setUsername(someusername);* *stub.setPassword(somepassword);* result = mspt.getSomeResult(79744); Is there something else I need to do? [EMAIL PROTECTED] 05/11/2006 02:08 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:How to do basic http authentication with axis 1.3 client? I generated my stubs using the axis-wsdl2java ant task specifying a username/password. When the service was unsecured, I used to be able to call it like this: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); result = mspt.getSomeResult(79744); Now that the service has been secured using basic authentication (username/password), how do I specify my username/password when connecting to the service? Regards, Joshua * This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. *
Re: How to do basic http authentication with axis 1.3 client?
So that worked? [EMAIL PROTECTED] wrote: Never mind! [EMAIL PROTECTED] 05/11/2006 02:45 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:Re: How to do basic http authentication with axis 1.3 client? Thanks for the reply James. No dice though. Any other ideas? -joshua *James Gough [EMAIL PROTECTED]* 05/11/2006 02:39 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:Re: How to do basic http authentication with axis 1.3 client? I am new to this, so by all means this may not be the way to do it, but perhaps you can try: URL serviceUrl = new URL(http://username:[EMAIL PROTECTED]:7001/webservice/MyService?WSDL); Jim [EMAIL PROTECTED] wrote: I tried the following and I still get a 401 error: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL;); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); * Stub stub = (Stub)mspt;* *stub.setUsername(someusername);* *stub.setPassword(somepassword);* result = mspt.getSomeResult(79744); Is there something else I need to do? [EMAIL PROTECTED] 05/11/2006 02:08 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:How to do basic http authentication with axis 1.3 client? I generated my stubs using the axis-wsdl2java ant task specifying a username/password. When the service was unsecured, I used to be able to call it like this: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL;); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); result = mspt.getSomeResult(79744); Now that the service has been secured using basic authentication (username/password), how do I specify my username/password when connecting to the service? Regards, Joshua * This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. *
Re: How to do basic http authentication with axis 1.3 client?
James, It was a PEBCAK error. I mistyped the username. =) Joshua James Gough [EMAIL PROTECTED] 05/11/2006 02:53 PM Please respond to axis-user To: axis-user@ws.apache.org cc: Subject: Re: How to do basic http authentication with axis 1.3 client? So that worked? [EMAIL PROTECTED] wrote: Never mind! [EMAIL PROTECTED] 05/11/2006 02:45 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:Re: How to do basic http authentication with axis 1.3 client? Thanks for the reply James. No dice though. Any other ideas? -joshua *James Gough [EMAIL PROTECTED]* 05/11/2006 02:39 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:Re: How to do basic http authentication with axis 1.3 client? I am new to this, so by all means this may not be the way to do it, but perhaps you can try: URL serviceUrl = new URL(http://username:[EMAIL PROTECTED]:7001/webservice/MyService?WSDL); Jim [EMAIL PROTECTED] wrote: I tried the following and I still get a 401 error: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); * Stub stub = (Stub)mspt;* *stub.setUsername(someusername);* *stub.setPassword(somepassword);* result = mspt.getSomeResult(79744); Is there something else I need to do? [EMAIL PROTECTED] 05/11/2006 02:08 PM Please respond to axis-user To:axis-user@ws.apache.org cc: Subject:How to do basic http authentication with axis 1.3 client? I generated my stubs using the axis-wsdl2java ant task specifying a username/password. When the service was unsecured, I used to be able to call it like this: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); result = mspt.getSomeResult(79744); Now that the service has been secured using basic authentication (username/password), how do I specify my username/password when connecting to the service? Regards, Joshua * This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. *
Re: How to do basic http authentication with axis 1.3 client?
Hello James, Joshua, Just in case, I'll quote the example from the JAX-RPC 1.1 spec that explains the way to do this. StockQuoteProvider_Stub sqp = // ... get to the stub; sqp._setProperty(Stub.USERNAME_PROPERTY, username); sqp._setProperty(Stub.PASSWORD_PROPERTY, password); float quote = sqp.getLastTradePrice(ACME); This will make your client also work with any other (JAX-RPC1.1 compatible) SOAP engine. Regards, Dies James Gough wrote: I am new to this, so by all means this may not be the way to do it, but perhaps you can try: URL serviceUrl = new URL(http://username:[EMAIL PROTECTED]:7001/webservice/MyService?WSDL); Jim [EMAIL PROTECTED] wrote: I tried the following and I still get a 401 error: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL;); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); * Stub stub = (Stub)mspt;* *stub.setUsername(someusername);* *stub.setPassword(somepassword);* result = mspt.getSomeResult(79744); Is there something else I need to do? [EMAIL PROTECTED] 05/11/2006 02:08 PM Please respond to axis-user To:axis-user@ws.apache.org cc:Subject:How to do basic http authentication with axis 1.3 client? I generated my stubs using the axis-wsdl2java ant task specifying a username/password. When the service was unsecured, I used to be able to call it like this: MyService myService = new MyServiceLocator(); URL serviceUrl = new URL(http://localhost:7001/webservice/MyService?WSDL;); MyServicePortType mspt = myService.getMyServicePortTypeSoapPort(serviceUrl); result = mspt.getSomeResult(79744); Now that the service has been secured using basic authentication (username/password), how do I specify my username/password when connecting to the service? Regards, Joshua * This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * -- Dies KOPER [EMAIL PROTECTED] Fujitsu Ltd - Middleware Platform Div. (MWPF1) Tech Bldg., Shin-Yokohama, Japan Tel. +81(45)-473-9392 (internal 7124-3023)