axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjay Vivek" <Sanjay.Vi...@newcastle.ac.uk>
Subject RE: Exceptions when using a Rampart client generated from stub classes.
Date Tue, 01 Jul 2008 09:20:12 GMT
Hi Nandana,
 
That worked perfectly! Thanks for your advice. On a separate note, I've
a question regarding disabling HTTPS. The primary reason I want to do
this is because TCPMON can't intercept encrypted messages. I disabled
HTTPS by commenting out the following line in the services.xml file : 

				<sp:TransportToken>
				  <wsp:Policy>
					<!-- <sp:HttpsToken
RequireClientCertificate="false"/>-->
				  </wsp:Policy>
				</sp:TransportToken>

However, I get various exceptions when I attempt to disable HTTPS in
this manner. Any pointers on what I'm doing wrong? Thanks again.

Regards
Sanjay 

 

________________________________

	From: Nandana Mihindukulasooriya [mailto:nandana.cse@gmail.com] 
	Sent: 01 July 2008 07:21
	To: axis-user@ws.apache.org
	Subject: Re: Exceptions when using a Rampart client generated
from stub classes.
	
	
	Hi Sanjay,
	


		  What is the workaround in this case? Does this mean we
can't use Stub classes for Axis2.1.4? Cheers.
		

	One work around would be to load the policy externally ( as
shown in Rampart policy samples ) and inject it to the Stub.
	
	eg.
	
	SecureServiceStub stub = new SecureServiceStub(ctx);
	ServiceClient sc = stub._getServiceClient();
	Options options = sc.getOptions();
	options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
loadPolicy("/path/to/policy"));
	
	
	and 
	
	private Policy loadPolicy(String xmlPath) throws Exception {
	   StAXOMBuilder builder = new StAXOMBuilder(xmlPath);
	   return PolicyEngine.getPolicy(builder.getDocumentElement());
	}
	
	thanks,
	nandana
	
	[1] -
https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/
rampart-samples/policy/sample01/src/org/apache/rampart/samples/policy/sa
mple01/Client.java
	
	 

________________________________

			From: Nandana Mihindukulasooriya
[mailto:nandana.cse@gmail.com] 
			Sent: 28 June 2008 05:31
			To: axis-user@ws.apache.org
			Subject: Re: Exceptions when using a Rampart
client generated from stub classes.
			
			
			I think the issue is with the code generation.
In Axis2 1.4, policies applied  like  this [1], will be attached to port
type not to the binding. So if you compare the WSDL generated by Axis2
1.3 [2]  with the WSDL generated by Axis2 1.4 , there are different. It
seems that code generator is not taking policies attached to the port
type in to account. If you go through the source code of the Stub,
popolateAxisService() method, you will be able to see whether policies
actually are attached to the stub or not. 
			
			thanks,
			nandana
			
			
			[1] -
http://wso2.org/library/3190#Step_4._Engaging_Rampart_and_applying_the_s
ecurity_policy 
			[2] - http://wso2.org/files/UToverHTTPS.xml
			
			
			On Thu, Jun 26, 2008 at 2:24 PM, Sanjay Vivek
<Sanjay.Vivek@newcastle.ac.uk> wrote:
			

				Hi everyone,
				
				I've installed and configured Rampart
1.4 to work with the tutorial at
				http://wso2.org/library/3190 However,
I'm having trouble getting the
				SOAP response from the service when
generating a client using the stub
				classes. The SOAP request headers send
by the client doesn't contain the
				WSSE security headers and I get a
"Exception in thread "main"
				org.apache.axis2.AxisFault: Missing
wsse:Security header in request".
				
				However, everything works fine when I
generate a client using AXIOM. Is
				there a reason why the WSSE headers are
being stripped out when using a
				client generated from the stub classes?
Any help would be appreciated.
				Cheers.
				
				Regards
				--------------
				Sanjay Vivek
				Web Analyst
				Middleware Team
				ISS
				Newcastle University
				
	
---------------------------------------------------------------------
				To unsubscribe, e-mail:
axis-user-unsubscribe@ws.apache.org
				For additional commands, e-mail:
axis-user-help@ws.apache.org
				
				





	-- 
	Nandana Mihindukulasooriya 
	WSO2 inc.
	
	http://nandana83.blogspot.com/
	


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


Mime
View raw message