Petals BC SOAP

Inject headers to call external WebServices

Details

  • Type: New Feature New Feature
  • Status: New New
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 4.0.3
  • Fix Version/s: None
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    The SOAP component can inject the headers given in the "headers-to-inject" element of a SOAP service unit. This works just fine, but :

    1) the injected headers are defined statically in the jbi.xml of the provide service unit. What if we need to parametrize dynamically theses informations using the content of the message sent by a consumer endpoint to a SOAP provide endpoint ?

    2) If the header already exists in the message, the SOAP component crashes. It might be useful to have a parameter indicating the treatment to apply if the headers already exists (do noting, overwrite, raise an exception, ...)

    Show
    The SOAP component can inject the headers given in the "headers-to-inject" element of a SOAP service unit. This works just fine, but : 1) the injected headers are defined statically in the jbi.xml of the provide service unit. What if we need to parametrize dynamically theses informations using the content of the message sent by a consumer endpoint to a SOAP provide endpoint ? 2) If the header already exists in the message, the SOAP component crashes. It might be useful to have a parameter indicating the treatment to apply if the headers already exists (do noting, overwrite, raise an exception, ...)
  • Environment:
    petals-platform-1.1
    petals-bc-soap-4.0.3-20100704.073518-7

Activity

Charles Casadei made changes - Tue, 3 Aug 2010 - 08:56:28 +0200
Field Original Value New Value
Link This issue blocks SPVEOLIAE-17 [ SPVEOLIAE-17 ]
Charles Casadei made changes - Thu, 5 Aug 2010 - 11:18:40 +0200
Priority Minor [ 4 ]
Hide
Christophe DENEUX added a comment - Thu, 12 Aug 2010 - 09:57:33 +0200

This issue must be divided in two parts. The first part is a new feature, the second is a bug. Please create a new issue for the second part.

For the first part, a solution could be to use an XSL provided by the SU. This XSL will generate the header from the message content. Header generated from an XSL and the static header must be exclusives.

Show
Christophe DENEUX added a comment - Thu, 12 Aug 2010 - 09:57:33 +0200 This issue must be divided in two parts. The first part is a new feature, the second is a bug. Please create a new issue for the second part. For the first part, a solution could be to use an XSL provided by the SU. This XSL will generate the header from the message content. Header generated from an XSL and the static header must be exclusives.
Hide
strivella added a comment - Thu, 12 Aug 2010 - 14:01:17 +0200

I created "PETALSBCSOAP-31" for the second part of this issue.

For the first part, I wanted to make clear that we don't have such a use case for now, but I think it could happen later (or in another context), that's why I reported it. So it up to you to provide the solution you think to be the best for your product. I agree: an XSL applied on th emessage could be a good solution: flexible enough and efficient. However I don't really agree with the idea of having this XSL and the static headers in the jbi.xml beside. I think all could be assumed by the XSL and the solution would be clearer (only 1 place to set up headers). But again, this is only my point of view.

Show
strivella added a comment - Thu, 12 Aug 2010 - 14:01:17 +0200 I created "PETALSBCSOAP-31" for the second part of this issue. For the first part, I wanted to make clear that we don't have such a use case for now, but I think it could happen later (or in another context), that's why I reported it. So it up to you to provide the solution you think to be the best for your product. I agree: an XSL applied on th emessage could be a good solution: flexible enough and efficient. However I don't really agree with the idea of having this XSL and the static headers in the jbi.xml beside. I think all could be assumed by the XSL and the solution would be clearer (only 1 place to set up headers). But again, this is only my point of view.
Hide
strivella added a comment - Thu, 9 Sep 2010 - 10:08:01 +0200

New updates: with now have a use case where we need to set up dynamically the SOAP header.

However we realized that the solution consisting in using an XSLT to generate the SOAP headers is not sufficient. Indeed when the flow arrives on the SOAP provide (where the XSLT would be executed) the message has changed and we don't have anymore the needed content to create the headers.

We need global solution to manage headers at any time of the flow. We think that the proper way would be to be able to set up at any point of the flow the "javax.jbi.messaging.protocol.headers". Then the question is : on what BC/SE would it be possible to set up these jbi properties: maybe a specific SE for editing jbi properties?

Then the SOAP provide instead of injecting static headers would only generates the SOAP header with the content in the jbi properties. Then the question is: how to render XML structure in the jbi property?

This solution would solve the 2 parts of this issue, the first as evoked above, and the second because if there was already headers in the incoming request, there would be set in the jbi property by the SOAP consume and then treated as any other header information.

Show
strivella added a comment - Thu, 9 Sep 2010 - 10:08:01 +0200 New updates: with now have a use case where we need to set up dynamically the SOAP header. However we realized that the solution consisting in using an XSLT to generate the SOAP headers is not sufficient. Indeed when the flow arrives on the SOAP provide (where the XSLT would be executed) the message has changed and we don't have anymore the needed content to create the headers. We need global solution to manage headers at any time of the flow. We think that the proper way would be to be able to set up at any point of the flow the "javax.jbi.messaging.protocol.headers". Then the question is : on what BC/SE would it be possible to set up these jbi properties: maybe a specific SE for editing jbi properties? Then the SOAP provide instead of injecting static headers would only generates the SOAP header with the content in the jbi properties. Then the question is: how to render XML structure in the jbi property? This solution would solve the 2 parts of this issue, the first as evoked above, and the second because if there was already headers in the incoming request, there would be set in the jbi property by the SOAP consume and then treated as any other header information.

People

Dates

  • Created:
    Tue, 3 Aug 2010 - 08:55:56 +0200
    Updated:
    Thu, 9 Sep 2010 - 10:08:01 +0200