[wsf-dev] ID-WSF Stack, starting point
Asa Hardcastle
asa.openliberty at zenn.net
Fri Feb 9 21:39:04 EST 2007
Hi All,
Not implementing the AS right away would save us time, yet I'm not
sure about hiding the DS. Could we run through an invocation
example? I had imagined beginning with the EPR of a discovery
service as part of the result from the SSO bootstrap. Like this (but
with Exception handling for failures and configuration problems):
/**
* SSO
*
**/
...
/**
* instantiate a WSFServiceInstance
*
**/
// OPTION 1: Get the needed bits, and create a service instance
WSFEndpointReference disco_epr = new WSFEndpointReference
( [extracted from the attributes of some SSO response] );
WSFIdentityToken token = new SOME_CLASS_IMPLEMENTING_WSFIdentityToken
( [extract parameters from some SSO response] );
WSFServiceInstance si = new WSFServiceInstance();
si.setDiscoveryServiceEndPointReference(disco_epr);
si.setIdentityToken(token);
// set more things, add certificates, etc...
...
// OPTION 2: use a utility that understands a SAML assertion to
extract the needed bits - in essence hiding the DS EPR?
// WSFServiceInstance si =
WSFServiceInstance.serviceInstanceFromSAMLAssertion
(assertion_object_or_string);
/**
* configure a WSFServiceRequest
*
*/
WSFServiceRequest request = si.creatServiceRequest
(WSFServiceInstance.SomeServiceType);
// optional settings
//request.setEndPointReference(some_epr);
//request.setPayload(some_payload_based_on_service_type_needs);
//request.OPTIONALLY_SET_THINGS_THAT_MAKE_YOU_HAPPY;
// optionally play with the request as an XML document
//request.getRequestDOMToPlayWithAndHopefullyNotMangle();
/**
* execute the request
*
*/
WSFServiceResponse response = request.makeItSoNumberOne(); // lots of
stuff done here
/**
* now do something with response, the response objects, or with the
DOM Doc representing the response
*
*/
...
What do you think?
later,
asa
--
Asa Hardcastle, Technical Lead, openLiberty
Tel: +1.413.429.1044 Skype: subsystem7
On Feb 9, 2007, at 12:01 PM, Scott Cantor wrote:
>> They are in mine as well... Although I defined a class for
>> instantiating a new service instance (the C++ object that
>> I use to send liberty messages to a service) which took a
>> service type as a parameter and did all the discovery
>> mumbo-jumbo to get the EPR for that service.
>
> Yes, I would imagine so. I would see that as a higher level
> component that
> just wraps a lot of the lower level work. Possibly with additional
> global
> configuration governing a kind of "automatic invocation" model
> while you
> could dive down and do things manually for special needs.
>
>> For the most part, I think our WSC library should hide the DS
>> from the WSC (and probably not even worry about the AS, given
>> that we want to bootstrap from an SSO session).
>
> As a first step, I would have no problem with ignoring the AS, but
> longer
> term it's an important piece for my project.
>
> -- Scott
>
>
> _______________________________________________
> wsf-dev mailing list
> wsf-dev at openliberty.org
> http://lists.openliberty.org/mailman/listinfo/wsf-dev
More information about the wsf-dev
mailing list