You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Maxim Y. Tebenev" <mt...@softech.ru> on 2006/12/26 20:18:41 UTC

consumer to provider SOAP transformation

Hello Guillaume,

I'm trying to transform SOAP message coming from consumer http endpoint and
pass it to provider http endpoint.
Let's say that consumer endpoint receives <ws1:param>value</ws1:param> and
provider endpoint should accept <ws2:param>value</ws2:param> meaning that
value is the same for the both web services. Should in this case SMX
transparently convert value from service1 to service2?

And what the best method to perform that? As I understand if I use http
endpoints with soap="true" that should be done automatically. Am I right
with that consumption?

Best regards, Maxim Tebenev.
-- 
View this message in context: http://www.nabble.com/consumer-to-provider-SOAP-transformation-tf2883435s12049.html#a8056087
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: consumer to provider SOAP transformation

Posted by "Maxim Y. Tebenev" <mt...@softech.ru>.
Hello Guillaume,

You will find JIRA issue at:
http://issues.apache.org/activemq/browse/SM-795

Perhaps it could be another property for http endpoint like
'omit_response_headers'.
But I'm not sure if such a behavior must be fixed at all. As I understand
that's specific of HTTP request/response.

Best regards, Maxim Tebenev.

-- 
View this message in context: http://www.nabble.com/consumer-to-provider-SOAP-transformation-tf2883435s12049.html#a8088345
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: consumer to provider SOAP transformation

Posted by Guillaume Nodet <gn...@gmail.com>.
This is a problem I have not found a clean solution yet.
You can remove the unwanted properties yourself,
or use the MPS component (in servicemix-components),
which can be used to set / copy / remove properties.

Some components can also be configured to copy or not
copy the properties from a message to the other, but it really
depends on the component used.  I think the best solution
may be to configure that on the servicemix-http component
so that i does not send unwanted properties in the exchange.
Could you please raise a JIRA for that ?

On 12/27/06, Maxim Y. Tebenev <mt...@softech.ru> wrote:
>
> I've found a workaround for this issue. Intermediate endpoint added. That
> endpoint runs Groovy script as following:
>
> outMessage.setProperty("javax.jbi.messaging.protocol.headers", null)
> outMessage.setContent(inMessage.getContent());
>
> Are there solution for that without such a trick?
>
> Best regards, Maxim Tebenev.
> --
> View this message in context: http://www.nabble.com/consumer-to-provider-SOAP-transformation-tf2883435s12049.html#a8063979
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: consumer to provider SOAP transformation

Posted by "Maxim Y. Tebenev" <mt...@softech.ru>.
I've found a workaround for this issue. Intermediate endpoint added. That
endpoint runs Groovy script as following:

outMessage.setProperty("javax.jbi.messaging.protocol.headers", null)
outMessage.setContent(inMessage.getContent());

Are there solution for that without such a trick?

Best regards, Maxim Tebenev.
-- 
View this message in context: http://www.nabble.com/consumer-to-provider-SOAP-transformation-tf2883435s12049.html#a8063979
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: consumer to provider SOAP transformation

Posted by "Maxim Y. Tebenev" <mt...@softech.ru>.
Hello Guillaume,

Thanks for clarification!

I still have unresolved issue: message properties from one provider
propogated as HTTP headers in request to provider2
(consumer->provider1->provider2). Namely request to provider2 has following
headers:

POST /DeliveryService/DeliveryService HTTP/1.1
Date: Wed, 27 Dec 2006 13:24:46 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Content-Type: text/xml
Content-Length: 359
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.0
Host: localhost:8082

Some of them like Transfer-encoding are from provider1 response. Tomcat
fails with 500 error when recieves them.  Is there simple way how to remove
them. Perhaps I could create new message. What do you think?

Best regards, Maxim Tebenev.

-- 
View this message in context: http://www.nabble.com/consumer-to-provider-SOAP-transformation-tf2883435s12049.html#a8062910
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: consumer to provider SOAP transformation

Posted by Guillaume Nodet <gn...@gmail.com>.
Both SAAJ and servicemix-http components only
handle the SOAP protocol.  It is the responsibility of
the consumer to send an xml request which is compliant
with the WSDL of the consumed service.  The consumer
does not need to know about SOAP, but it needs to know
the abstract WSDL description of the service so that it can
build a valid request.

On 12/27/06, Maxim Y. Tebenev <mt...@softech.ru> wrote:
>
> Guillaume, thank you for your reply!
>
> Ok, that works fine for consumer -> provider transformation. I've
> encountered with another issue when transforming provider -> provider
> transformation. The route is following:
>
> consumer -> XSL transform -> provider1 -> XSL transform -> provider2
>
> The problem relies somewhere between provider1 and provider2. When SMX
> receives response from provider1 it puts all HTTP headers from response and
> sends them to provider2. In result I have time-out error on client and HTTP
> 500 error on provider2. Is there any way to remove those headers from the
> first response?
>
> Another intriguing question is the following: having provider2 WSDL ESB can
> construct valid SOAP request without XSL (that's my guess of course). My
> task is just get parameters from provider1 response and put them to
> provider2 request without known SOAP request details. Is that possible?
> I've heard the magic word SAAJ but that component deprecated in favor of
> HTTP. What do you say?
>
> Best regards, Maxim Tebenev.
>
>
>
> --
> View this message in context: http://www.nabble.com/consumer-to-provider-SOAP-transformation-tf2883435s12049.html#a8061851
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: consumer to provider SOAP transformation

Posted by "Maxim Y. Tebenev" <mt...@softech.ru>.
Guillaume, thank you for your reply!

Ok, that works fine for consumer -> provider transformation. I've
encountered with another issue when transforming provider -> provider
transformation. The route is following:

consumer -> XSL transform -> provider1 -> XSL transform -> provider2

The problem relies somewhere between provider1 and provider2. When SMX
receives response from provider1 it puts all HTTP headers from response and
sends them to provider2. In result I have time-out error on client and HTTP
500 error on provider2. Is there any way to remove those headers from the
first response?

Another intriguing question is the following: having provider2 WSDL ESB can
construct valid SOAP request without XSL (that's my guess of course). My
task is just get parameters from provider1 response and put them to
provider2 request without known SOAP request details. Is that possible?
I've heard the magic word SAAJ but that component deprecated in favor of
HTTP. What do you say?

Best regards, Maxim Tebenev.



-- 
View this message in context: http://www.nabble.com/consumer-to-provider-SOAP-transformation-tf2883435s12049.html#a8061851
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: consumer to provider SOAP transformation

Posted by Guillaume Nodet <gn...@gmail.com>.
The HTTP/SOAP BC won't transform anything, it's role is to
handle the soap protocol.  If you need transformations,
you can use an xslt stylesheet between the consumer and
provider (servicemix-saxon for XSLT, and a servicemix-eip
static routing slip to call sequentiqlly call the transformation,
the http provider and optionally another transformation back).

On 12/26/06, Maxim Y. Tebenev <mt...@softech.ru> wrote:
>
> Hello Guillaume,
>
> I'm trying to transform SOAP message coming from consumer http endpoint and
> pass it to provider http endpoint.
> Let's say that consumer endpoint receives <ws1:param>value</ws1:param> and
> provider endpoint should accept <ws2:param>value</ws2:param> meaning that
> value is the same for the both web services. Should in this case SMX
> transparently convert value from service1 to service2?
>
> And what the best method to perform that? As I understand if I use http
> endpoints with soap="true" that should be done automatically. Am I right
> with that consumption?
>
> Best regards, Maxim Tebenev.
> --
> View this message in context: http://www.nabble.com/consumer-to-provider-SOAP-transformation-tf2883435s12049.html#a8056087
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet