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 <[EMAIL PROTECTED]>*
> 
> 08/13/2007 07:38 AM
> Please respond to
> "Apache AXIS C User List" <axis-c-user@ws.apache.org>
> 
> 
>       
> To
>       Apache AXIS C User List <axis-c-user@ws.apache.org>
> cc
>       Michael Mole/Lexington/[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to