cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Richins <Brandon.Rich...@imail.org>
Subject RE: How to use new ws-security.sts.applies-to
Date Tue, 25 May 2010 23:06:28 GMT
Here's a partial stack trace.  I'll work on getting a test case together.

Caused by: java.lang.NullPointerException
	at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:124)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:487)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
	... 2 more

- Brandon


-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Tuesday, May 25, 2010 1:39 PM
To: users@cxf.apache.org
Cc: Brandon Richins
Subject: Re: How to use new ws-security.sts.applies-to



That all looks correct.   If you could file a bug with a testcase, that would 
be a big help.    Also, what's the stack trace on the NPE?

Dan


On Tuesday 25 May 2010 2:08:47 pm Brandon Richins wrote:
> How should the new "ws-security.sts.applies-to" property in 2.2.8 be used? 
> I'm getting a NullPointerException with and without the property in
> IssuedTokenInterceptorProvider.  The stack trace seems to point to "String
> s =
> message.getContextualProperty(SecurityConstants.STS_APPLIES_TO).toString()
> ;"  I'm guessing that I'm just not using it correctly.
> 
> <jaxws:client name="{StockQuoteService}StockQuoteServiceHttpSoap11Endpoint"
> createdFromAPI="true"> <jaxws:features>
>          <wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing" />
>       </jaxws:features>
>       <jaxws:properties>
>          <entry key="ws-security.sts.client">
>             <!-- direct STSClient config and creation -->
>             <bean class="org.apache.cxf.ws.security.trust.STSClient">
>                <constructor-arg ref="cxf" />
>                <property name="requiresEntropy" value="false" />
>                <property name="wsdlLocation"
> value="src/main/resources/STS.wsdl" /> <property name="serviceName"
> value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512}SecurityTokenServ
> ice" /> <property name="endpointName"
> value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512}RequestSecurityTo
> ken" /> <property name="properties">
>                   <map>
>                      <entry key="ws-security.username" value="scott" />
>                      <entry key="ws-security.password" value="tiger" />
>                      <entry key="ws-security.sts.applies-to"
> value="http://foo.org/VER/SAML1.1" /> </map>
>                </property>
>             </bean>
>          </entry>
>       </jaxws:properties>
> 
> It was added to 2.2.8 after I had a problem with an STS provider that used
> the AppliesTo URL as it's only configuration mechanism.  I extended the
> STSClient class for 2.2.7 but wanted to use the new fix when I ran into
> this problem.  Let me know if I should write up a test?  Any help would be
> great.
> 
> Thanks again,
> 
> Brandon Richins
> ECIS Migration
> Intermountain Healthcare
> 4646 Lake Park Blvd
> Salt Lake City, UT  84120
> p. 801.442.5523
> c. 801.589.2428

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message