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 Andrew Martin <am...@regenstrief.org> on 2007/08/21 20:42:10 UTC

[Axis2]Can't use SSL with scope="transportsession"

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.fillContextsFromSessionContext(InstanceDispatcher.java:123)
	at
org.apache.axis2.engine.InstanceDispatcher.invoke(InstanceDispatcher.java: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.processHTTPPostRequest(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?
-- 
Andrew Martin
Computer Programmer
Regenstrief Institute, Inc.
410 West 10th Street, Suite 2000
Indianapolis, IN 46202-3012
Phone: (317) 423-5542
Fax: (317) 423-5695
amartin@regenstrief.org


Confidentiality Notice: The contents of this message and any files
transmitted with it may contain confidential and/or privileged
information and are intended solely for the use of the named
addressee(s). Additionally, the information contained herein may have
been disclosed to you from medical records with confidentiality
protected by federal and state laws. Federal regulations and State laws
prohibit you from making further disclosure of such information without
the specific written consent of the person to whom the information
pertains or as otherwise permitted by such regulations. A general
authorization for the release of medical or other information is not
sufficient for this purpose.

If you have received this message in error, please notify the sender by
return e-mail and delete the original message. Any retention,
disclosure, copying, distribution or use of this information by anyone
other than the intended recipient is strictly prohibited.

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


Axis2 1.2 SSL and basic auth -- Strange behavior

Posted by "Ali, Haneef" <ha...@hp.com>.
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


Re: [Axis2]Can't use SSL with scope="transportsession"

Posted by Deepal Jayasinghe <de...@opensource.lk>.
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.fillContextsFromSessionContext(InstanceDispatcher.java:123)
> 	at
> org.apache.axis2.engine.InstanceDispatcher.invoke(InstanceDispatcher.java: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.processHTTPPostRequest(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