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 David R Robison <dr...@openroadsconsulting.com> on 2013/03/05 15:10:09 UTC

Using a web service where not all calls require security

I am using Axis2 with Rampart to communicate with a digital cameras 
supporting the ONVIF protocol which is a SOAP protocol. The camera 
manufacturer has designed their interface so that not all camera calls 
require authentication. For example, getting the system date/time does 
not require authentication while setting the system date/time does. I 
have setup my SOAP proxy with Rampart but when I call one of the 
functions that does not require authentication my call fails because the 
camera does not return the WS-Security reply. Is there a way to setup 
Rampart to work where some calls will require authentication and some 
will not or will I have to setup two proxies, one with Rampart and one 
without?

Thanks, David

-- 

David R Robison
Open Roads Consulting, Inc.
103 Watson Road, Chesapeake, VA 23320
phone: (757) 546-3401
e-mail: drrobison@openroadsconsulting.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: 
http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526



This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
If you are not the intended recipient, please delete this email immediately.


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


Re: Using a web service where not all calls require security

Posted by David R Robison <dr...@openroadsconsulting.com>.
Is there a way to tell which modules have been engaged? For example, if 
I disable the rampart module I then want to re-engage it if it was 
previously engaged. David

David R Robison
Open Roads Consulting, Inc.
103 Watson Road, Chesapeake, VA 23320
phone: (757) 546-3401
e-mail: drrobison@openroadsconsulting.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526

On 3/5/2013 11:12 AM, Ruchith Fernando wrote:
> Hi David,
>
> You can set up your Axis2 client that makes the call to the service
> engage rampart at the point of calling.
>
> It seems that maybe you have rampart engaged using the axis2.xml using
> the entry < module ref="rampart" /> .
> Instead you can remove this entry and (if you are using generated code) do :
>
> //Engage rampart
> your_stub_instance._getServiceClient().engageModule("rampart");
>
> //Make the call to operation() of the server
> your_stub_instance.operation();
>
> If you are reusing the same stub to call a different operation you
> should be able to do disengageModule() [1] before the call.
>
> Thanks,
> Ruchith
>
> 1. http://axis.apache.org/axis2/java/core/api/org/apache/axis2/client/ServiceClient.html#disengageModule(java.lang.String)
>
> On Tue, Mar 5, 2013 at 9:10 AM, David R Robison
> <dr...@openroadsconsulting.com> wrote:
>> I am using Axis2 with Rampart to communicate with a digital cameras
>> supporting the ONVIF protocol which is a SOAP protocol. The camera
>> manufacturer has designed their interface so that not all camera calls
>> require authentication. For example, getting the system date/time does
>> not require authentication while setting the system date/time does. I
>> have setup my SOAP proxy with Rampart but when I call one of the
>> functions that does not require authentication my call fails because the
>> camera does not return the WS-Security reply. Is there a way to setup
>> Rampart to work where some calls will require authentication and some
>> will not or will I have to setup two proxies, one with Rampart and one
>> without?
>>
>> Thanks, David
>>
>> --
>>
>> David R Robison
>> Open Roads Consulting, Inc.
>> 103 Watson Road, Chesapeake, VA 23320
>> phone: (757) 546-3401
>> e-mail: drrobison@openroadsconsulting.com
>> web: http://openroadsconsulting.com
>> blog: http://therobe.blogspot.com
>> book:
>> http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526
>>
>>
>>
>> This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
>> If you are not the intended recipient, please delete this email immediately.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>



This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
If you are not the intended recipient, please delete this email immediately.


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


Re: Using a web service where not all calls require security

Posted by Ruchith Fernando <ru...@gmail.com>.
Hi David,

You can set up your Axis2 client that makes the call to the service
engage rampart at the point of calling.

It seems that maybe you have rampart engaged using the axis2.xml using
the entry < module ref="rampart" /> .
Instead you can remove this entry and (if you are using generated code) do :

//Engage rampart
your_stub_instance._getServiceClient().engageModule("rampart");

//Make the call to operation() of the server
your_stub_instance.operation();

If you are reusing the same stub to call a different operation you
should be able to do disengageModule() [1] before the call.

Thanks,
Ruchith

1. http://axis.apache.org/axis2/java/core/api/org/apache/axis2/client/ServiceClient.html#disengageModule(java.lang.String)

On Tue, Mar 5, 2013 at 9:10 AM, David R Robison
<dr...@openroadsconsulting.com> wrote:
> I am using Axis2 with Rampart to communicate with a digital cameras
> supporting the ONVIF protocol which is a SOAP protocol. The camera
> manufacturer has designed their interface so that not all camera calls
> require authentication. For example, getting the system date/time does
> not require authentication while setting the system date/time does. I
> have setup my SOAP proxy with Rampart but when I call one of the
> functions that does not require authentication my call fails because the
> camera does not return the WS-Security reply. Is there a way to setup
> Rampart to work where some calls will require authentication and some
> will not or will I have to setup two proxies, one with Rampart and one
> without?
>
> Thanks, David
>
> --
>
> David R Robison
> Open Roads Consulting, Inc.
> 103 Watson Road, Chesapeake, VA 23320
> phone: (757) 546-3401
> e-mail: drrobison@openroadsconsulting.com
> web: http://openroadsconsulting.com
> blog: http://therobe.blogspot.com
> book:
> http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526
>
>
>
> This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
> If you are not the intended recipient, please delete this email immediately.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>



-- 
http://ruchith.org

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