You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Deepal Jayasinghe <de...@opensource.lk> on 2007/05/06 18:06:30 UTC

Problem with saaj implementation

Forwarding to Axis2 dev list

> Hi,
>
>  
>
> I have a question about using Axis2 saaj implementation.
>
> I need to add Authorization and SoapAction to the message.
>
> In the sun implementation I do it with adding headers to the MimeHeaders:
>
>  
>
>  
>
>              byte[] authorization = Base64.encode(
> "username:password".getBytes());            
>
>              MimeHeaders hd = message.getMimeHeaders();
>
>               hd.addHeader("Authorization", "Basic " + new
> String(authorization));
>
>               hd.addHeader("SOAPAction", "RetrieveKeysList");
>
>  
>
> However, in the Axis2 implementation this code is not working and I
> get org.apache.axis2.AxisFault: HTTP Transport error : '401' -
> 'Unauthorized' exception.
>
> Moreover, I checked the source code and saw that nobody access to the
> MimeHeaders in the message.
>
>  
>
> Can you please help me and tell me how I can do it in Axis2?
>
>  
>
> Thank you,
>
> Olga.
>
>


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


Re: Problem with saaj implementation

Posted by sumedha rubasinghe <su...@wso2.com>.
Hi Olga,
You problem is most probably due to mime header value not being carried 
to the server side. This has already been reported under issue number 
AXIS2-1014.
I have attempted to fix this with minimum changes to existing working 
functionalities (in SOAPConnectionImpl) & I am bit stuck with it right 
now. I will put a patch as soon as possible.

Thank you.
/sumedha




Deepal Jayasinghe wrote:
> Forwarding to Axis2 dev list
>
>   
>> Hi,
>>
>>  
>>
>> I have a question about using Axis2 saaj implementation.
>>
>> I need to add Authorization and SoapAction to the message.
>>
>> In the sun implementation I do it with adding headers to the MimeHeaders:
>>
>>  
>>
>>  
>>
>>              byte[] authorization = Base64.encode(
>> "username:password".getBytes());            
>>
>>              MimeHeaders hd = message.getMimeHeaders();
>>
>>               hd.addHeader("Authorization", "Basic " + new
>> String(authorization));
>>
>>               hd.addHeader("SOAPAction", "RetrieveKeysList");
>>
>>  
>>
>> However, in the Axis2 implementation this code is not working and I
>> get org.apache.axis2.AxisFault: HTTP Transport error : '401' -
>> 'Unauthorized' exception.
>>
>> Moreover, I checked the source code and saw that nobody access to the
>> MimeHeaders in the message.
>>
>>  
>>
>> Can you please help me and tell me how I can do it in Axis2?
>>
>>  
>>
>> Thank you,
>>
>> Olga.
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>   


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