You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Ali, Haneef" <ha...@hp.com> on 2007/08/22 07:42:03 UTC

Axis2 1.2 SSL and basic auth -- Strange behavior

Hi,

I have the following strange behavior with Axis2 client. Can some one
explain me what is happening?

My webservice is written in Axis2.  Assume the operations in the
webservice are Op1 and Op2.


With Axis2 Client via https + basic auth
	1)    Initialize stub with https url
      2)    Do preemptive basic auth
	3)    Call Op1()
	4)    Call Op2()  -- Doesn't work . Getting 401 not authorized

With Axis2 Client via https + client cert
	1)    Initialize stub with https url
	3)    Call Op1()
	4)    Call Op2()  -- Doesn't work . Getting 401 not authorized

Looks like there is something wrong with HTTPS session.


With Axis2 Client via http + basic auth
	1)    Initialize stub with http url
      2)    Do preemptive basic auth
	3)    Call Op1()
	4)    Call Op2()  
      5)    Everything works well		


 With Axis1 1.4  Client via https + basic auth
	1)    Initialize stub with https url
      2)    Do preemptive basic auth
	3)    Call Op1()
	4)    Call Op2()  
	5)    Everything works well

Is Axis2 client doing anything with the SSL session? I don't think this
is a problem with HTTPClient, since both Axis1.4 and Axis2 use the same
HTTPClient.

BTW I'm using Axis2 1.2 with default settings. My server uses HTTP 1.1

Thanks,
Haneef




-----Original Message-----
From: Deepal Jayasinghe [mailto:deepal@opensource.lk] 
Sent: Tuesday, August 21, 2007 9:30 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2]Can't use SSL with scope="transportsession"

Hi Andrew ,
Please create a JIRA , I think this is an issue in Axis2,

Thanks
Deepal
> When I try to invoke my service via https, Axis2 1.2 throws a
> NullPointerException:
>
> Caused by: java.lang.NullPointerException
> 	at
>
org.apache.axis2.engine.InstanceDispatcher.fillContextsFromSessionContex
t(InstanceDispatcher.java:123)
> 	at
>
org.apache.axis2.engine.InstanceDispatcher.invoke(InstanceDispatcher.jav
a:70)
> 	at org.apache.axis2.engine.Phase.invoke(Phase.java:383)
> 	at
org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:203)
> 	at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:131)
> 	at
>
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
t(HTTPTransportUtils.java:279)
> 	at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
> 	... 33 more
>
> I think I found what's causing it.  My service is defined like this in
> services.xml:
> <service name="..." scope="transportsession">...</service>
>
> If I remove 'scope="transportsession"', Axis2 no longer throws this 
> Exception, and my own code is invoked (though it causes my code to 
> fail, since mc.getSessionContext() returns null).
>
> Is there any reason why 'scope="transportsession"' would work via http

> but not https?
>   



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


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