Topic
  • 8 replies
  • Latest Post - ‏2011-08-31T19:02:56Z by izhd
YotamAvivi
YotamAvivi
17 Posts

Pinned topic Accessing SOAP/HTTP Headers in an OSGi application externalized as a SCA ws

‏2010-11-14T14:49:40Z |
Hi,

We have an OSGi application that is externalized as a WebService using SCA architecture.
is there's a way to access the request's HTTP or SOAP headers somehow ?

Thanks

Yotam
Updated on 2011-08-31T19:02:56Z at 2011-08-31T19:02:56Z by izhd
  • Graham_Charters
    Graham_Charters
    14 Posts

    Re: Accessing SOAP/HTTP Headers in an OSGi application externalized as a SCA ws

    ‏2010-11-16T10:53:01Z  
    Hi Yotam,

    I'm not aware of a way to do this. It would not be a good practice from an SCA perspective because it would tie your implementation to a specific binding, whereas a goal of SCA is to separate implementation from binding to enable them to be switched independently, and even chosen by the runtime.

    Could I ask what it is you want to do with the headers?

    Regards, Graham.
  • YotamAvivi
    YotamAvivi
    17 Posts

    Re: Accessing SOAP/HTTP Headers in an OSGi application externalized as a SCA ws

    ‏2010-11-17T09:13:19Z  
    Hi Yotam,

    I'm not aware of a way to do this. It would not be a good practice from an SCA perspective because it would tie your implementation to a specific binding, whereas a goal of SCA is to separate implementation from binding to enable them to be switched independently, and even chosen by the runtime.

    Could I ask what it is you want to do with the headers?

    Regards, Graham.
    Hi,

    I understand your answer and basically agree.
    But sometimes we need to pass some internal authentication/authorization headers of a user requesting the service and want to make a decision whether to decline or accept his request.

    Thanks,

    Yotam
  • Graham_Charters
    Graham_Charters
    14 Posts

    Re: Accessing SOAP/HTTP Headers in an OSGi application externalized as a SCA ws

    ‏2010-11-18T17:56:05Z  
    Hi,

    I understand your answer and basically agree.
    But sometimes we need to pass some internal authentication/authorization headers of a user requesting the service and want to make a decision whether to decline or accept his request.

    Thanks,

    Yotam
    Hi Yotam,

    By 'internal' do you mean using something other than what WebSphere provides for authentication/authorization? This isn't an areas I'm particularly familiar with, but I've built a demo in the past which authenticated in a web application and then used the SCA policy framework to ensure any calls into the OSGi application were in the correct role. This was done with an authorization implementation policy configured for the OSGi application and used the default SCA binding. In WebSphere that uses rmi, but this may be possible for binding.ws. I'll try to get someone from the SCA Feature Pack team to comment.

    Regards, Graham.
  • SteveKinder
    SteveKinder
    5 Posts

    Re: Accessing SOAP/HTTP Headers in an OSGi application externalized as a SCA ws

    ‏2010-11-29T14:15:40Z  
    Yotam,

    At the moment unfortunately, we don't support assessing custom headers using SCA via the SCA Feature Pack for WAS V7. By the time the business logic is dispatched, all transport headers have been consumed and processed. That said, we do support attaching policy to web service endpoints which can process the standard SOAP headers. We do have a couple of customer stories related to custom headers, can you elaborate on your use case?

    Thanks,
    Steve Kinder
  • SteveKinder
    SteveKinder
    5 Posts

    Re: Accessing SOAP/HTTP Headers in an OSGi application externalized as a SCA ws

    ‏2010-11-29T14:20:59Z  
    Yotam,

    At the moment unfortunately, we don't support assessing custom headers using SCA via the SCA Feature Pack for WAS V7. By the time the business logic is dispatched, all transport headers have been consumed and processed. That said, we do support attaching policy to web service endpoints which can process the standard SOAP headers. We do have a couple of customer stories related to custom headers, can you elaborate on your use case?

    Thanks,
    Steve Kinder
    Sorry Yotam, I also meant to add this link for an IBM education assistant module regarding SCA and WS Policy, located here.
  • SystemAdmin
    SystemAdmin
    153 Posts

    Re: Accessing SOAP/HTTP Headers in an OSGi application externalized as a SCA ws

    ‏2010-12-04T13:46:32Z  
    Yotam,

    At the moment unfortunately, we don't support assessing custom headers using SCA via the SCA Feature Pack for WAS V7. By the time the business logic is dispatched, all transport headers have been consumed and processed. That said, we do support attaching policy to web service endpoints which can process the standard SOAP headers. We do have a couple of customer stories related to custom headers, can you elaborate on your use case?

    Thanks,
    Steve Kinder
    Could you provide some pointers as to how one would go about implementing a custom policy that accesses custom headers in WAS SCA FP? Something like a PolicyInterceptor? It doesn't have to be a Policy, anything that lets me process custom headers before they are "consumed and processed" would be nice. What's the approach taken in these customer stories you mentioned.
    http://media.techtarget.com/searchSOA/downloads/TuscanyCH10.pdf
  • SteveKinder
    SteveKinder
    5 Posts

    Re: Accessing SOAP/HTTP Headers in an OSGi application externalized as a SCA ws

    ‏2010-12-07T22:01:58Z  
    Could you provide some pointers as to how one would go about implementing a custom policy that accesses custom headers in WAS SCA FP? Something like a PolicyInterceptor? It doesn't have to be a Policy, anything that lets me process custom headers before they are "consumed and processed" would be nice. What's the approach taken in these customer stories you mentioned.
    http://media.techtarget.com/searchSOA/downloads/TuscanyCH10.pdf
    @MiddleInitials... we have yet to support custom header propagation, or custom policy in WebSphere. The user stories I was referring to was an agile user story backlog which is customer driven by user story. We understand the "business-level" context scenarios customers have related to passing application context that is placed on the thread of the execution of the target service, and then accessed through the framework methods to augment/enrich things like application traces with correlations for instance.

    What scenarios or user stories would you use custom header/custom policy? I think we want to have this capability somewhat generic, but at some point the "context" and/or header must be serialized and that leads the handler to need to know what protocol is being used, so it can be put in an http, soap or jms header for instance.

    Steve Kinder
  • izhd
    izhd
    17 Posts

    Re: Accessing SOAP/HTTP Headers in an OSGi application externalized as a SCA ws

    ‏2011-08-31T19:02:56Z  
    @MiddleInitials... we have yet to support custom header propagation, or custom policy in WebSphere. The user stories I was referring to was an agile user story backlog which is customer driven by user story. We understand the "business-level" context scenarios customers have related to passing application context that is placed on the thread of the execution of the target service, and then accessed through the framework methods to augment/enrich things like application traces with correlations for instance.

    What scenarios or user stories would you use custom header/custom policy? I think we want to have this capability somewhat generic, but at some point the "context" and/or header must be serialized and that leads the handler to need to know what protocol is being used, so it can be put in an http, soap or jms header for instance.

    Steve Kinder
    I see it's pretty old conversation, but I might have the similar inquiry.
    We use WS binding, and organization for which we implement service has some requirements about special SOAP header added (i would guess at this point) mainly for tracing requests. So what should I do if I need to log information from SOAP header? Is it possible to attach header for response message and reuse some information from request header?

    Thanks,
    Igor