cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Menachem Glazer" <mgla...@prodigiousworldwide.com>
Subject RE: CXF support for wsse:Nonce (client side)
Date Mon, 21 Jul 2008 13:25:54 GMT
I get a multiple header error when using that for passwordType plain
text - works in soap ui not with the cxf/xfire code.
The exact java stack trace error;

Jul 21, 2008 9:21:20 AM org.apache.commons.httpclient.HttpMethodBase
getResponseContentLength
WARNING: Multiple content-length headers detected

org.codehaus.xfire.XFireRuntimeException: Could not invoke service..
Nested exception is org.codehaus.xfire.fault.XFireFault: Service
specific exception:
com.gm.ciss.service.incentive.exception.CISSPublishingServiceException

org.codehaus.xfire.fault.XFireFault: Service specific exception:
com.gm.ciss.service.incentive.exception.CISSPublishingServiceException
	at
org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSe
rializer.java:31)
	at
org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerial
izer.java:28)
	at
org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHea
dersHandler.java:111)
	at
org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHan
dler.java:67)
	at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1
31)
	at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
	at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.
java:139)
	at
org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
	at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java
:26)
	at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1
31)
	at
org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
	at
org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
	at org.codehaus.xfire.client.Client.invoke(Client.java:336)
	at
org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
	at
org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
	at $Proxy12.getOffer(Unknown Source)
	at com.digitas.Test.main(Test.java:201)


Before adding the authentication code I would get a 'Forbidden' error
then the above error when I added this code:

Client client = Client.getInstance(service);
		
client.addOutHandler(new DOMOutHandler());
Properties outProperties = new Properties();
			// CONFIGURE OUTGOING SECURITY HERE
(outProperties) <--


outProperties.setProperty(WSHandlerConstants.ACTION,
WSHandlerConstants.USERNAME_TOKEN);
		    // Password type : plain text
outProperties.setProperty(WSHandlerConstants.PASSWORD_TYPE,
WSConstants.PW_TEXT);

outProperties.setProperty(WSHandlerConstants.USER, "dbclick");

outProperties.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
PasswordHandler.class.getName());

			
client.addOutHandler(new WSS4JOutHandler(outProperties));
			

If anyone has had experience and gotten this to work I would be forever
grateful. I can send all my code 'Test.java' code and the password
handler code ('PasswordHandler.java.' and anything else requested.
Getting this to work for many would prove very nice.

Thanks. 

-----Original Message-----
From: Maciej Kwiecien [mailto:maciej.kwiecien@gmail.com] 
Sent: Monday, July 21, 2008 9:01 AM
To: users@cxf.apache.org
Subject: Re: CXF support for wsse:Nonce (client side)

Thanks Colm for information.

I'd like to check one more thing: Does CXF generate nonces when
PasswordText is used instead of Password digest?

Regards,
Maciej

On Mon, Jul 21, 2008 at 1:12 PM, O hEigeartaigh, Colm <
Colm.OhEigeartaigh@iona.com> wrote:

>
> On the client side, a nonce is automatically created and inserted into

> the Username Token when password digest is used. CXF currently has no 
> support on the server side for caching/processing nonces.
>
> Colm.
>
> -----Original Message-----
> From: Maciej Kwiecien [mailto:maciej.kwiecien@gmail.com]
> Sent: 21 July 2008 12:09
> To: users@cxf.apache.org
> Subject: CXF support for wsse:Nonce (client side)
>
> Hello All,
>
> I am working on client who is supposed to invoke web service requiring

> UserNameToken authentication and wsse:Nonce.
> Please let me know if CXF framework provides support for that feature.
>
> I am little confused because I found on CXF project site information 
> that it is not supported by CXF 2.0 
> http://cwiki.apache.org/confluence/display/CXF20DOC/WS-Security
>
> but on the other hand there is tutorial available:
> http://www.jroller.com/gmazza/entry/using_cxf_and_wss4j_to
>
> where wsse:Nonce is present in reqeust header content...
>
> Any clarification would be appreciated.
>
> Regards,
> Maciej
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland) Registered Number: 
> 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 
> 4, Ireland
>

Mime
View raw message