I've spent a day trying to figure out how to build a code only STSClient. I
would like to do the analogue of the following in code only:
<cxf:bus>
<cxf:features>
<cxf:logging />
</cxf:features>
</cxf:bus>
<jaxws:client
name="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"
createdFromAPI="false" username="alice" password="clarinet" />
<http:conduit name="https://localhost:.*">
<http:tlsClientParameters
disableCNCheck="true">
<sec:trustManagers>
<sec:keyStore type="jks" password="cspass"
resource="certs/clientKeystore.jks" />
</sec:trustManagers>
</http:tlsClientParameters>
</http:conduit>
SpringBusFactory bf = new SpringBusFactory();
SpringBus bus = (SpringBus) bf.createBus("clientSts.xml");
SpringBusFactory.setDefaultBus(bus);
SpringBusFactory.setThreadDefaultBus(bus);
.....
STSClient stsClient = new STSClient(bus);
Why in code only? Because I can't figure out how to make the example as is
work in an OSGI bundle. Clearly I lack the low level understanding of these
framework that is required to get this work. I've been reading through the
documentation to figure this out. There are examples of how to create
standard REST clients and SOAP clients from code only and those I have
applied with success; however, none of those examples seem to fit with this
particular use case.
Finally, it would be nice to know what the patter is for building and using
clients in OSGI using Spring. I've grepped through the sample code looking
for a simple example of this but the only osgi sample is hosting a service
not making calls from a bundle.
I'm probably missing something or maybe I have not done enough research but
I've spent a day trying to figure this out and there's just too much to
learn. I would really appreciate some clues that would at least point me in
the right direction. Thanks in advance.
--
View this message in context:
http://cxf.547215.n5.nabble.com/Code-only-STSClient-tp5724575.html
Sent from the cxf-user mailing list archive at Nabble.com.