You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Michael Mole <mj...@us.ibm.com> on 2007/10/02 18:16:17 UTC

Re: Axis2/C - USERNAME and PASSWORD

I tried to run echo.c using the Axis2C 1.1 release, but I'm not seeing the 
basic http authorization in the http headers.  I'm expecting to see 
something like "Authorization: Basic YJKLa35".  I'm using tcp monitor to 
check the outgoing message (shown below).  Is there something else I have 
to do to get this to work?

This is my command:
C:\axis2c-src-1.1.0\build\deploy\bin\samples>echo.exe -auth user pass

This is the outgoing message:
POST /axis2/services/echo HTTP/1.1
User-Agent: Axis2/C
Content-Length: 512
Content-Type: application/soap+xml;charset=UTF-8
Host: localhost:9090

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <wsa:To>http://localhost:9091/axis2/services/echo</wsa:To>
 <wsa:Action>http://ws.apache.org/axis2/c/samples/echoString</wsa:Action>
      <wsa:MessageID>4ecf636a-5637-4be9-afe4-80e80f0e3117</wsa:MessageID>
   </soapenv:Header>
   <soapenv:Body>
      <ns1:echoString 
xmlns:ns1="http://ws.apache.org/axis2/services/echo">
         <text>Hello World!</text>
      </ns1:echoString>
   </soapenv:Body></soapenv:Envelope>

Thanks,
Mike

Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710



Dumindu Pallewela <du...@wso2.com> 
08/13/2007 07:38 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>


To
Apache AXIS C User List <ax...@ws.apache.org>
cc
Michael Mole/Lexington/IBM@IBMUS
Subject
Re: Axis2/C - USERNAME and PASSWORD






Michael Mole wrote:
> 
> I'm looking for more information about AXIS2_USER_NAME and 
> AXIS2_PASSWORD in axis2_const.h.  What are they used for, and how are 
> they used?  I'm still trying to solve my issue of using Basic http 
> Authentication with my web services, and these look like they may be the 

> key.  Any help is greatly appreciated.
>

We have added HTTP basic authentication support for axis2/c client. All 
you have to do is to set the two properties HTTP_AUTH_USERNAME and 
HTTP_AUTH_PASSWD in your client code.

Please refer to echo.c [1] for a sample of its usage.

I propose that we remove the AXIS2_USER_NAME and AXIS2_PASSWORD 
declarations as they are not being used. HTTP authentication related 
declarations can be found in axis2_http_transport.h.

Regards,
Dumindu.

[1] 
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/echo/echo.c?view=markup


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org



Re: Axis2/C - USERNAME and PASSWORD

Posted by Dumindu Pallewela <du...@wso2.com>.
Michael Mole wrote:
> 
> Yes, that would be much appreciated.  Also, is it possible for me to
> submit these directly?  I was looking at the issue tracker, but couldn't
> find a way to do it.

You need to create an account in order to report issues in jira.

HTH,
Dumindu.

-- 
Dumindu Pallewela
http://blog.dumindu.com
GPG ID: 0x9E131672

WSO2 | http://wso2.com | "Oxygenating the Web Service Platform"


Re: Axis2/C - USERNAME and PASSWORD

Posted by Michael Mole <mj...@us.ibm.com>.
Thanks!  I've raised a JIRA for this one.  AXIS2C-716 

- Mike

Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710



Samisa Abeysinghe <sa...@wso2.com> 
10/03/2007 08:49 PM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>


To
Apache AXIS C User List <ax...@ws.apache.org>
cc

Subject
Re: Axis2/C - USERNAME and PASSWORD






Michael Mole wrote:
>
> Yes, that would be much appreciated.  Also, is it possible for me to 
> submit these directly? 
Yes you can. Go to http://issues.apache.org/jira/browse/AXIS2C. You need 
to create an account for you there. Once you login, you can create the 
issues.

Samisa...

-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"
http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP
"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org



Re: Axis2/C - USERNAME and PASSWORD

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Michael Mole wrote:
>
> Yes, that would be much appreciated.  Also, is it possible for me to 
> submit these directly? 
Yes you can. Go to http://issues.apache.org/jira/browse/AXIS2C. You need 
to create an account for you there. Once you login, you can create the 
issues.

Samisa...

-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Axis2/C - USERNAME and PASSWORD

Posted by Michael Mole <mj...@us.ibm.com>.
Yes, that would be much appreciated.  Also, is it possible for me to 
submit these directly?  I was looking at the issue tracker, but couldn't 
find a way to do it.

 - Mike

Michael J Molé
Software Engineer
IBM Software Group - Rational
(781)676-2710



Samisa Abeysinghe <sa...@wso2.com> 
10/03/2007 01:32 AM
Please respond to
"Apache AXIS C User List" <ax...@ws.apache.org>


To
Apache AXIS C User List <ax...@ws.apache.org>
cc

Subject
Re: Axis2/C - USERNAME and PASSWORD






Dumindu Pallewela wrote:
> Hi Mole,
>
> Currently the auth header is sent only if the server requests for
> it. So if your server sends a WWW-Authenticate:.... header when
> authentication failed at the first request, Axis2 will send another
> with the required header.
>
> However, I think we should have allowed the user to send the auth
> header without waiting for a failed response in the first place,
> because it is only an additional overhead, if the user already
> *knows* that the server requires basic auth, Somehow we missed it
> from 1.1 release :(
> 
Sounds like it is a good feature to have. Lets raise a Jira on this and 
fix it.

Samisa...

-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"
http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP
"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org



Re: Axis2/C - USERNAME and PASSWORD

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Dumindu Pallewela wrote:
> Hi Mole,
>
> Currently the auth header is sent only if the server requests for
> it. So if your server sends a WWW-Authenticate:.... header when
> authentication failed at the first request, Axis2 will send another
> with the required header.
>
> However, I think we should have allowed the user to send the auth
> header without waiting for a failed response in the first place,
> because it is only an additional overhead, if the user already
> *knows* that the server requires basic auth, Somehow we missed it
> from 1.1 release :(
>   
Sounds like it is a good feature to have. Lets raise a Jira on this and 
fix it.

Samisa...

-- 
Samisa Abeysinghe : WSO2 WSF/PHP
"http://wso2.org/projects/wsf/php?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework%2FPHP&nbsp;-&nbsp;Open&nbsp;source&nbsp;PHP&nbsp;extention&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services&nbsp;in&nbsp;PHP"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Re: Axis2/C - USERNAME and PASSWORD

Posted by Dumindu Pallewela <du...@wso2.com>.
Hi Mole,

Currently the auth header is sent only if the server requests for
it. So if your server sends a WWW-Authenticate:.... header when
authentication failed at the first request, Axis2 will send another
with the required header.

However, I think we should have allowed the user to send the auth
header without waiting for a failed response in the first place,
because it is only an additional overhead, if the user already
*knows* that the server requires basic auth, Somehow we missed it
from 1.1 release :(

Regards,
Dumindu.

Michael Mole wrote:
> 
> I tried to run echo.c using the Axis2C 1.1 release, but I'm not seeing
> the basic http authorization in the http headers.  I'm expecting to see
> something like "Authorization: Basic YJKLa35".  I'm using tcp monitor to
> check the outgoing message (shown below).  Is there something else I
> have to do to get this to work?
>
> *This is my command:*
> C:\axis2c-src-1.1.0\build\deploy\bin\samples>echo.exe -auth user pass
> 
> *This is the outgoing message:*
> POST /axis2/services/echo HTTP/1.1
> User-Agent: Axis2/C
> Content-Length: 512
> Content-Type: application/soap+xml;charset=UTF-8
> Host: localhost:9090
> 
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
>       <wsa:To>http://localhost:9091/axis2/services/echo</wsa:To>
>      
> <wsa:Action>http://ws.apache.org/axis2/c/samples/echoString</wsa:Action>
>       <wsa:MessageID>4ecf636a-5637-4be9-afe4-80e80f0e3117</wsa:MessageID>
>    </soapenv:Header>
>    <soapenv:Body>
>       <ns1:echoString xmlns:ns1="http://ws.apache.org/axis2/services/echo">
>          <text>Hello World!</text>
>       </ns1:echoString>
>    </soapenv:Body></soapenv:Envelope>
> 
> Thanks,
> Mike
> 
> Michael J Molé
> Software Engineer
> IBM Software Group - Rational
> (781)676-2710
> 
> 
> *Dumindu Pallewela <du...@wso2.com>*
> 
> 08/13/2007 07:38 AM
> Please respond to
> "Apache AXIS C User List" <ax...@ws.apache.org>
> 
> 
> 	
> To
> 	Apache AXIS C User List <ax...@ws.apache.org>
> cc
> 	Michael Mole/Lexington/IBM@IBMUS
> Subject
> 	Re: Axis2/C - USERNAME and PASSWORD
> 
> 
> 	
> 
> 
> 
> 
> 
> Michael Mole wrote:
>>
>> I'm looking for more information about AXIS2_USER_NAME and
>> AXIS2_PASSWORD in axis2_const.h.  What are they used for, and how are
>> they used?  I'm still trying to solve my issue of using Basic http
>> Authentication with my web services, and these look like they may be the
>> key.  Any help is greatly appreciated.
>>
> 
> We have added HTTP basic authentication support for axis2/c client. All
> you have to do is to set the two properties HTTP_AUTH_USERNAME and
> HTTP_AUTH_PASSWD in your client code.
> 
> Please refer to echo.c [1] for a sample of its usage.
> 
> I propose that we remove the AXIS2_USER_NAME and AXIS2_PASSWORD
> declarations as they are not being used. HTTP authentication related
> declarations can be found in axis2_http_transport.h.
> 
> Regards,
> Dumindu.
> 
> [1]
> http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/echo/echo.c?view=markup
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
> 
> 


-- 
Dumindu Pallewela
http://blog.dumindu.com
GPG ID: 0x9E131672

WSO2 | http://wso2.com | "Oxygenating the Web Service Platform"