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 Te...@HVBIS.com on 2008/04/29 14:39:02 UTC

RAMPRAT examples question/help

Hi 

I am going thru the ramprat v1.3 examples and seems to me that all the
examples are also using use Axis2 as a client to invoke the service.
Hence requiring all the ramprat/axis2 jars, axis2.xml,  etc.
1-) Is this a MUST criteria?
2-) Can some one point me to ramprat examples that use the WSDL2Java
gereated stubs? 

cheers
Tezcan




Re: RAMPRAT examples question/help

Posted by Nandana Mihindukulasooriya <na...@gmail.com>.
Hi Tezcan,

> 2-) Can some one point me to ramprat examples that use the WSDL2Java
> gereated stubs?
>
This tutorial [1] may help you.

thanks,
/nandana

[1] - http://wso2.org/library/3190

Re: AW: RAMPRAT examples question/help

Posted by Dimuthu Leelarathne <mu...@apache.org>.
Hi,

The client repo's directory structure should be as follows. 

repo
 |
 |----conf 
 |
 |----modules - contains rampart and adrressing mars.
 |


If you look  at samples/policy/build/client_repositories/, you can find
many examples for client repos.

Thank you,
Dimuthu

On Wed, 2008-04-30 at 14:44 +0200, Tezcan.Dilshener.extern@HVBIS.com
wrote:
> Hi Dimuthu
> thanks for the example.
> I am having a problem with enagging the modules and receiving 
> "org.apache.axis2.AxisFault: Unable to engage module : addressing"
> 
> what, exactly, do I need to have in my repo directory, apart from rampart.mar and addressing.mar ?
> 
> cheers
> Tezcan
> -----Ursprüngliche Nachricht-----
> Von: Dimuthu Leelarathne [mailto:muthulee@apache.org] 
> Gesendet: Mittwoch, 30. April 2008 04:46
> An: axis-user@ws.apache.org
> Betreff: Re: RAMPRAT examples question/help
> 
> 
> Hi,
> 
> On Tue, 2008-04-29 at 14:39 +0200, Tezcan.Dilshener.extern@HVBIS.com
> wrote:
> > Hi
> > 
> > I am going thru the ramprat v1.3 examples and seems to me that all the 
> > examples are also using use Axis2 as a client to invoke the service.
> > 
> > Hence requiring all the ramprat/axis2 jars, axis2.xml,  etc.
> > 1-) Is this a MUST criteria? 
> It is not a must. Rampart successfully passes interop tests with many. 
> 
> > 2-) Can some one point me to ramprat examples that use the WSDL2Java
> > gereated stubs? 
> Here is a sample code. In this code "EchoStub" is a WSDL2Java generated
> stub and the "repo" folder is the client repo which has the required
> rampart.mar and addressing.mar [1]
> 
> 
> Thank you,
> Dimuthu
> http://wso2.org
> 
> 
> public static void main(String[] args) throws Exception{
> 		
> 	    ConfigurationContext ctx = 
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("repo", null);
> 	    
> 	    
> 		EchoStub stub = new
> EchoStub(ctx,"http://localhost:9763/services/echo");
> 		
> 		EchoString str = new EchoString();
> 		str.setIn("hi dimuthu");
> 		
> 		ServiceClient client = stub._getServiceClient();
> 	    Options options = client.getOptions();
> 	    options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
> loadPolicy("policy.xml"));
> 	    client.setOptions(options);
> 	        
> 	    client.engageModule("rampart");
> 	    
> 		
> 		EchoStringResponse res = stub.echoString(str);
> 		System.out.println(res.get_return());
> 		
> 	}
> 
> > cheers 
> > Tezcan
> > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> 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


AW: RAMPRAT examples question/help

Posted by Te...@HVBIS.com.
Hi Dimuthu
thanks for the example.
I am having a problem with enagging the modules and receiving 
"org.apache.axis2.AxisFault: Unable to engage module : addressing"

what, exactly, do I need to have in my repo directory, apart from rampart.mar and addressing.mar ?

cheers
Tezcan
-----Ursprüngliche Nachricht-----
Von: Dimuthu Leelarathne [mailto:muthulee@apache.org] 
Gesendet: Mittwoch, 30. April 2008 04:46
An: axis-user@ws.apache.org
Betreff: Re: RAMPRAT examples question/help


Hi,

On Tue, 2008-04-29 at 14:39 +0200, Tezcan.Dilshener.extern@HVBIS.com
wrote:
> Hi
> 
> I am going thru the ramprat v1.3 examples and seems to me that all the 
> examples are also using use Axis2 as a client to invoke the service.
> 
> Hence requiring all the ramprat/axis2 jars, axis2.xml,  etc.
> 1-) Is this a MUST criteria? 
It is not a must. Rampart successfully passes interop tests with many. 

> 2-) Can some one point me to ramprat examples that use the WSDL2Java
> gereated stubs? 
Here is a sample code. In this code "EchoStub" is a WSDL2Java generated
stub and the "repo" folder is the client repo which has the required
rampart.mar and addressing.mar [1]


Thank you,
Dimuthu
http://wso2.org


public static void main(String[] args) throws Exception{
		
	    ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem("repo", null);
	    
	    
		EchoStub stub = new
EchoStub(ctx,"http://localhost:9763/services/echo");
		
		EchoString str = new EchoString();
		str.setIn("hi dimuthu");
		
		ServiceClient client = stub._getServiceClient();
	    Options options = client.getOptions();
	    options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
loadPolicy("policy.xml"));
	    client.setOptions(options);
	        
	    client.engageModule("rampart");
	    
		
		EchoStringResponse res = stub.echoString(str);
		System.out.println(res.get_return());
		
	}

> cheers 
> Tezcan
> 
> 
> 


---------------------------------------------------------------------
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: RAMPRAT examples question/help

Posted by Dimuthu Leelarathne <mu...@apache.org>.
Hi,

On Tue, 2008-04-29 at 14:39 +0200, Tezcan.Dilshener.extern@HVBIS.com
wrote:
> Hi 
> 
> I am going thru the ramprat v1.3 examples and seems to me that all the
> examples are also using use Axis2 as a client to invoke the service.
> 
> Hence requiring all the ramprat/axis2 jars, axis2.xml,  etc. 
> 1-) Is this a MUST criteria? 
It is not a must. Rampart successfully passes interop tests with many. 

> 2-) Can some one point me to ramprat examples that use the WSDL2Java
> gereated stubs? 
Here is a sample code. In this code "EchoStub" is a WSDL2Java generated
stub and the "repo" folder is the client repo which has the required
rampart.mar and addressing.mar [1]


Thank you,
Dimuthu
http://wso2.org


public static void main(String[] args) throws Exception{
		
	    ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem("repo", null);
	    
	    
		EchoStub stub = new
EchoStub(ctx,"http://localhost:9763/services/echo");
		
		EchoString str = new EchoString();
		str.setIn("hi dimuthu");
		
		ServiceClient client = stub._getServiceClient();
	    Options options = client.getOptions();
	    options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
loadPolicy("policy.xml"));
	    client.setOptions(options);
	        
	    client.engageModule("rampart");
	    
		
		EchoStringResponse res = stub.echoString(str);
		System.out.println(res.get_return());
		
	}

> cheers 
> Tezcan
> 
> 
> 


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