You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by ObjectOrange <br...@briantaylor.us> on 2009/07/27 21:22:02 UTC

Wrapped Document Services Routing

Hi,

I'm having difficulties understanding how ServiceMix-EIP routes an XML
document from one service to another when using wrapped documents to
determine service operations.

For example, an XML document (<Save><Document/></Save>) is picked up by the
File BC and forwarded to an EIP Pipeline route service. That service routes
this document to a data service deployed in the JSR181 SE which is
configured as a JSR181/JAXB2 service with Save as its operation and Document
as its input parameter type. When that service persists to the database, it
returns a <SaveResponse><Document></SaveResponse>. This all is working fine
to this point and is where I'm getting stuck. The next service is an
external HTTP service (Intalio BPM) that requires a <Document> payload and
SOAP action to be set. The EIP Pipeline Routing service is attempting to
call that service with the output from the data service call using the
<SaveResponse> as an operation wrapper around it as such:
<SaveResponse><Document></SaveResponse>. Is the EIP supposed to unwrap this
response and wrap it again with the operation required by the next service
or none if that service doesn't use wrapped documents?

Respectively,
Brian
-- 
View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24686738.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Wrapped Document Services Routing

Posted by ObjectOrange <br...@briantaylor.us>.
Hi Vivian,

Yes that's correct I'm using the output of the first service as input to the
second though the operation is different. I'm going from an In Only MEP
(File BC) to an In-Out MEP (JSR181 SE) to an In-Only MEP (HTTP BC) so I was
using the Pipeline EIP and I would assume I'm automatically getting
asynchronous messaging because I'm using SEDA flows; is that not safe to
assume? The main issue is the operation of the first service (in JSR181 SE)
is being determined by the first element <Save> in the xml body
<Save><Document/></Save> and it returns the <Document> element wrapped with
a <SaveResponse> element. The Pipeline EIP currently is sending this
<SaveResponse> wrapped <Document> to the next service but that service's
operation is not <SaveResponse> and in fact it doesn't use a wrapped
document to determine the operation, it requires a SOAP Action (it's an
external call through ServiceMix-HTTP) therefore it just requires the xml
body to be <Document>. So the question is does the EIP SE handle automatic
wrapping/unwrapping documents based on the operation setting in the
<exchange-target>? If not, is there another method I can use to configure
this on a per <exchange-target> basis?

Respectfully,
Brian


Madesclair Vivian wrote:
> 
> Hello Brian,
> 
> If my understanding of your problem is right, you are using the output of
> your first service as the input of your second service (this is a routing
> slip right?). But your second service would require the same input. I
> think you should use a Recipient List EIP, or a WireTap EIP for your use
> case. To this end, you might have to consider using asynchronous
> messaging, which can be done with the AsyncBridge smx EIP.
> 
> Regards,
> Vivian
> 
> 
> -----Message d'origine-----
> De : ObjectOrange [mailto:brian@briantaylor.us] 
> Envoyé : lundi 27 juillet 2009 21:22
> À : users@servicemix.apache.org
> Objet : Wrapped Document Services Routing
> 
> 
> Hi,
> 
> I'm having difficulties understanding how ServiceMix-EIP routes an XML
> document from one service to another when using wrapped documents to
> determine service operations.
> 
> For example, an XML document (<Save><Document/></Save>) is picked up by
> the File BC and forwarded to an EIP Pipeline route service. That service
> routes this document to a data service deployed in the JSR181 SE which is
> configured as a JSR181/JAXB2 service with Save as its operation and
> Document as its input parameter type. When that service persists to the
> database, it returns a <SaveResponse><Document></SaveResponse>. This all
> is working fine to this point and is where I'm getting stuck. The next
> service is an external HTTP service (Intalio BPM) that requires a
> <Document> payload and SOAP action to be set. The EIP Pipeline Routing
> service is attempting to call that service with the output from the data
> service call using the <SaveResponse> as an operation wrapper around it as
> such:
> <SaveResponse><Document></SaveResponse>. Is the EIP supposed to unwrap
> this response and wrap it again with the operation required by the next
> service or none if that service doesn't use wrapped documents?
> 
> Respectively,
> Brian
> --
> View this message in context:
> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24686738.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24698093.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Wrapped Document Services Routing

Posted by Madesclair Vivian <vm...@sopragroup.com>.
Hello Brian,

If my understanding of your problem is right, you are using the output of your first service as the input of your second service (this is a routing slip right?). But your second service would require the same input. I think you should use a Recipient List EIP, or a WireTap EIP for your use case. To this end, you might have to consider using asynchronous messaging, which can be done with the AsyncBridge smx EIP.

Regards,
Vivian


-----Message d'origine-----
De : ObjectOrange [mailto:brian@briantaylor.us] 
Envoyé : lundi 27 juillet 2009 21:22
À : users@servicemix.apache.org
Objet : Wrapped Document Services Routing


Hi,

I'm having difficulties understanding how ServiceMix-EIP routes an XML document from one service to another when using wrapped documents to determine service operations.

For example, an XML document (<Save><Document/></Save>) is picked up by the File BC and forwarded to an EIP Pipeline route service. That service routes this document to a data service deployed in the JSR181 SE which is configured as a JSR181/JAXB2 service with Save as its operation and Document as its input parameter type. When that service persists to the database, it returns a <SaveResponse><Document></SaveResponse>. This all is working fine to this point and is where I'm getting stuck. The next service is an external HTTP service (Intalio BPM) that requires a <Document> payload and SOAP action to be set. The EIP Pipeline Routing service is attempting to call that service with the output from the data service call using the <SaveResponse> as an operation wrapper around it as such:
<SaveResponse><Document></SaveResponse>. Is the EIP supposed to unwrap this response and wrap it again with the operation required by the next service or none if that service doesn't use wrapped documents?

Respectively,
Brian
--
View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24686738.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Wrapped Document Services Routing

Posted by Brian Taylor <br...@briantaylor.us>.
Just to clarify, the servicemix-eip-se does not support auto parameter
wrapping/unwrapping correct?



-- 
View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24829396.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Wrapped Document Services Routing

Posted by ObjectOrange <br...@briantaylor.us>.
I set the @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle=BARE) on the
JSR-181 annotated class which means that the first element in the SOAP body
will be the document. The other option is WRAPPED which means that the first
element in the SOAP body will be the operation name followed by child
element which is the document. This seems to be the default set up though
when I used it, I would get a response wrapper around the returned document
and I couldn't figure out how to unwrap that response wrapper with the next
service operation's wrapper (operation) without using a transformation to
which would be horrendous when working with a large service library with
many routes.

Now I have another issue. I'm unable to get the ServiceMix-HTTP component to
map a WS-Addressing or SOAP Action to an Operation...it continues to default
to the first method on the JSR-181 annotated class! Any ideas would be much
appreciated. I have tried to use the CXF BC and have not been impressed. I
keep getting HTTP 404 errors with HTML being returned!

Brian 


Madesclair Vivian wrote:
> 
> Glad you solve it!
> 
> Could you explain a bit more? I am not using jsr181 myself, but I guess it
> could help some people.
> 
> 
> -----Message d'origine-----
> De : ObjectOrange [mailto:brian@briantaylor.us] 
> Envoyé : mardi 28 juillet 2009 17:43
> À : users@servicemix.apache.org
> Objet : RE: Wrapped Document Services Routing
> 
> 
> I think I answered this for myself! Change my internal services to use the
> Bare Parameter Style so that these wrapped elements are not returned.
> 
> 
> Madesclair Vivian wrote:
>> 
>> 
>> Your asynchronous messaging seems safe to assume. I understand better 
>> with your new explanation. I think, as gert said, that you will have 
>> to wrap, unwrap yourself with a saxon component then. However, in your 
>> specific case, you only have to do that once.
>> 
>> I am not very experienced yet about servicemix, but in the use case I 
>> implemented, the SOAP wrapping was done by the CXF-BC component. I had 
>> no time to finish my most complex use case (SOAP input call, 
>> dispatched on 2 SOAP output calls) yet because I am currently working on
>> something else.
>> So now you got gert to help you, I am leaving it to him, he knows better!
>> 
>> Regards
>> Vivian
>> 
>> 
>> -----Message d'origine-----
>> De : ObjectOrange [mailto:brian@briantaylor.us] Envoyé : mardi 28 
>> juillet 2009 15:55 À : users@servicemix.apache.org Objet : Re: Wrapped 
>> Document Services Routing
>> 
>> 
>> Thanks Gert,
>> 
>> So, I could drop the <Save> element from the <Document> that the File 
>> BC picks up, specify Save as the operation on the JSR181 service in 
>> the Pipeline EIP <Exchange-Target>, add a route to a Saxon XSLT 
>> endpoint to strip the resulting <SaveResponse> returned from the 
>> JSR181 service? That sounds like it would work but am I going to have 
>> to strip every response from every service call like this? The sounds 
>> like something infrastructure should take into consideration in the 
>> EIP SE, no? Say, if an operation (e.g.
>> Save) is specified in the <Exchange-Target> and the first element 
>> returned in an In-Out MEP has the operation name in it (e.g. 
>> <SaveResponse>) then remove it?
>> 
>> Respectfully,
>> Brian
>> 
>> 
>> Gert Vanthienen wrote:
>>> 
>>> Brian,
>>> 
>>> One way to handle this would be by adding a Saxon XSLT endpont to the 
>>> pipeline to translate the XML message payloads in between webservice 
>>> invocations.  The other solution would be to only send the plain 
>>> payload (<Document/>) in the ESB and specify an operation name on the 
>>> <eip:exchange-target/>, so the JSR181/CXF endpoint knows what 
>>> operation to invoke.
>>> 
>>> Regards,
>>> 
>>> Gert Vanthienen
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>> Blog: http://gertvanthienen.blogspot.com/
>>> 
>>> 
>>> 
>>> 2009/7/27 ObjectOrange <br...@briantaylor.us>:
>>>>
>>>> Hi,
>>>>
>>>> I'm having difficulties understanding how ServiceMix-EIP routes an 
>>>> XML document from one service to another when using wrapped 
>>>> documents to determine service operations.
>>>>
>>>> For example, an XML document (<Save><Document/></Save>) is picked up 
>>>> by the File BC and forwarded to an EIP Pipeline route service. That 
>>>> service routes this document to a data service deployed in the 
>>>> JSR181 SE which is configured as a JSR181/JAXB2 service with Save as 
>>>> its operation and Document as its input parameter type. When that 
>>>> service persists to the database, it returns a 
>>>> <SaveResponse><Document></SaveResponse>. This all is working fine to 
>>>> this point and is where I'm getting stuck. The next service is an 
>>>> external HTTP service (Intalio BPM) that requires a <Document> 
>>>> payload and SOAP action to be set. The EIP Pipeline Routing service 
>>>> is attempting to call that service with the output from the data 
>>>> service call using the <SaveResponse> as an operation wrapper around 
>>>> it as such:
>>>> <SaveResponse><Document></SaveResponse>. Is the EIP supposed to 
>>>> unwrap this response and wrap it again with the operation required 
>>>> by the next service or none if that service doesn't use wrapped 
>>>> documents?
>>>>
>>>> Respectively,
>>>> Brian
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p2
>>>> 4 686738.html Sent from the ServiceMix - User mailing list archive 
>>>> at Nabble.com.
>>>>
>>>>
>>> 
>>> 
>>> -----
>>> ---
>>> Gert Vanthienen
>>> http://gertvanthienen.blogspot.com
>>> 
>> 
>> --
>> View this message in context:
>> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p246
>> 98096.html Sent from the ServiceMix - User mailing list archive at 
>> Nabble.com.
>> 
>> 
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24702087.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24798147.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Wrapped Document Services Routing

Posted by Madesclair Vivian <vm...@sopragroup.com>.
Glad you solve it!

Could you explain a bit more? I am not using jsr181 myself, but I guess it could help some people.


-----Message d'origine-----
De : ObjectOrange [mailto:brian@briantaylor.us] 
Envoyé : mardi 28 juillet 2009 17:43
À : users@servicemix.apache.org
Objet : RE: Wrapped Document Services Routing


I think I answered this for myself! Change my internal services to use the Bare Parameter Style so that these wrapped elements are not returned.


Madesclair Vivian wrote:
> 
> 
> Your asynchronous messaging seems safe to assume. I understand better 
> with your new explanation. I think, as gert said, that you will have 
> to wrap, unwrap yourself with a saxon component then. However, in your 
> specific case, you only have to do that once.
> 
> I am not very experienced yet about servicemix, but in the use case I 
> implemented, the SOAP wrapping was done by the CXF-BC component. I had 
> no time to finish my most complex use case (SOAP input call, 
> dispatched on 2 SOAP output calls) yet because I am currently working on something else.
> So now you got gert to help you, I am leaving it to him, he knows better!
> 
> Regards
> Vivian
> 
> 
> -----Message d'origine-----
> De : ObjectOrange [mailto:brian@briantaylor.us] Envoyé : mardi 28 
> juillet 2009 15:55 À : users@servicemix.apache.org Objet : Re: Wrapped 
> Document Services Routing
> 
> 
> Thanks Gert,
> 
> So, I could drop the <Save> element from the <Document> that the File 
> BC picks up, specify Save as the operation on the JSR181 service in 
> the Pipeline EIP <Exchange-Target>, add a route to a Saxon XSLT 
> endpoint to strip the resulting <SaveResponse> returned from the 
> JSR181 service? That sounds like it would work but am I going to have 
> to strip every response from every service call like this? The sounds 
> like something infrastructure should take into consideration in the 
> EIP SE, no? Say, if an operation (e.g.
> Save) is specified in the <Exchange-Target> and the first element 
> returned in an In-Out MEP has the operation name in it (e.g. 
> <SaveResponse>) then remove it?
> 
> Respectfully,
> Brian
> 
> 
> Gert Vanthienen wrote:
>> 
>> Brian,
>> 
>> One way to handle this would be by adding a Saxon XSLT endpont to the 
>> pipeline to translate the XML message payloads in between webservice 
>> invocations.  The other solution would be to only send the plain 
>> payload (<Document/>) in the ESB and specify an operation name on the 
>> <eip:exchange-target/>, so the JSR181/CXF endpoint knows what 
>> operation to invoke.
>> 
>> Regards,
>> 
>> Gert Vanthienen
>> ------------------------
>> Open Source SOA: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>> 
>> 
>> 
>> 2009/7/27 ObjectOrange <br...@briantaylor.us>:
>>>
>>> Hi,
>>>
>>> I'm having difficulties understanding how ServiceMix-EIP routes an 
>>> XML document from one service to another when using wrapped 
>>> documents to determine service operations.
>>>
>>> For example, an XML document (<Save><Document/></Save>) is picked up 
>>> by the File BC and forwarded to an EIP Pipeline route service. That 
>>> service routes this document to a data service deployed in the 
>>> JSR181 SE which is configured as a JSR181/JAXB2 service with Save as 
>>> its operation and Document as its input parameter type. When that 
>>> service persists to the database, it returns a 
>>> <SaveResponse><Document></SaveResponse>. This all is working fine to 
>>> this point and is where I'm getting stuck. The next service is an 
>>> external HTTP service (Intalio BPM) that requires a <Document> 
>>> payload and SOAP action to be set. The EIP Pipeline Routing service 
>>> is attempting to call that service with the output from the data 
>>> service call using the <SaveResponse> as an operation wrapper around 
>>> it as such:
>>> <SaveResponse><Document></SaveResponse>. Is the EIP supposed to 
>>> unwrap this response and wrap it again with the operation required 
>>> by the next service or none if that service doesn't use wrapped 
>>> documents?
>>>
>>> Respectively,
>>> Brian
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p2
>>> 4 686738.html Sent from the ServiceMix - User mailing list archive 
>>> at Nabble.com.
>>>
>>>
>> 
>> 
>> -----
>> ---
>> Gert Vanthienen
>> http://gertvanthienen.blogspot.com
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p246
> 98096.html Sent from the ServiceMix - User mailing list archive at 
> Nabble.com.
> 
> 
> 

--
View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24702087.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Wrapped Document Services Routing

Posted by ObjectOrange <br...@briantaylor.us>.
I think I answered this for myself! Change my internal services to use the
Bare Parameter Style so that these wrapped elements are not returned.


Madesclair Vivian wrote:
> 
> 
> Your asynchronous messaging seems safe to assume. I understand better with
> your new explanation. I think, as gert said, that you will have to wrap,
> unwrap yourself with a saxon component then. However, in your specific
> case, you only have to do that once.
> 
> I am not very experienced yet about servicemix, but in the use case I
> implemented, the SOAP wrapping was done by the CXF-BC component. I had no
> time to finish my most complex use case (SOAP input call, dispatched on 2
> SOAP output calls) yet because I am currently working on something else.
> So now you got gert to help you, I am leaving it to him, he knows better!
> 
> Regards
> Vivian
> 
> 
> -----Message d'origine-----
> De : ObjectOrange [mailto:brian@briantaylor.us] 
> Envoyé : mardi 28 juillet 2009 15:55
> À : users@servicemix.apache.org
> Objet : Re: Wrapped Document Services Routing
> 
> 
> Thanks Gert,
> 
> So, I could drop the <Save> element from the <Document> that the File BC
> picks up, specify Save as the operation on the JSR181 service in the
> Pipeline EIP <Exchange-Target>, add a route to a Saxon XSLT endpoint to
> strip the resulting <SaveResponse> returned from the JSR181 service? That
> sounds like it would work but am I going to have to strip every response
> from every service call like this? The sounds like something
> infrastructure should take into consideration in the EIP SE, no? Say, if
> an operation (e.g.
> Save) is specified in the <Exchange-Target> and the first element returned
> in an In-Out MEP has the operation name in it (e.g. <SaveResponse>) then
> remove it?
> 
> Respectfully,
> Brian
> 
> 
> Gert Vanthienen wrote:
>> 
>> Brian,
>> 
>> One way to handle this would be by adding a Saxon XSLT endpont to the 
>> pipeline to translate the XML message payloads in between webservice 
>> invocations.  The other solution would be to only send the plain 
>> payload (<Document/>) in the ESB and specify an operation name on the 
>> <eip:exchange-target/>, so the JSR181/CXF endpoint knows what 
>> operation to invoke.
>> 
>> Regards,
>> 
>> Gert Vanthienen
>> ------------------------
>> Open Source SOA: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>> 
>> 
>> 
>> 2009/7/27 ObjectOrange <br...@briantaylor.us>:
>>>
>>> Hi,
>>>
>>> I'm having difficulties understanding how ServiceMix-EIP routes an 
>>> XML document from one service to another when using wrapped documents 
>>> to determine service operations.
>>>
>>> For example, an XML document (<Save><Document/></Save>) is picked up 
>>> by the File BC and forwarded to an EIP Pipeline route service. That 
>>> service routes this document to a data service deployed in the JSR181 
>>> SE which is configured as a JSR181/JAXB2 service with Save as its 
>>> operation and Document as its input parameter type. When that service 
>>> persists to the database, it returns a 
>>> <SaveResponse><Document></SaveResponse>. This all is working fine to 
>>> this point and is where I'm getting stuck. The next service is an 
>>> external HTTP service (Intalio BPM) that requires a <Document> 
>>> payload and SOAP action to be set. The EIP Pipeline Routing service 
>>> is attempting to call that service with the output from the data 
>>> service call using the <SaveResponse> as an operation wrapper around 
>>> it as such:
>>> <SaveResponse><Document></SaveResponse>. Is the EIP supposed to 
>>> unwrap this response and wrap it again with the operation required by 
>>> the next service or none if that service doesn't use wrapped 
>>> documents?
>>>
>>> Respectively,
>>> Brian
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24
>>> 686738.html Sent from the ServiceMix - User mailing list archive at 
>>> Nabble.com.
>>>
>>>
>> 
>> 
>> -----
>> ---
>> Gert Vanthienen
>> http://gertvanthienen.blogspot.com
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24698096.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24702087.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Wrapped Document Services Routing

Posted by Madesclair Vivian <vm...@sopragroup.com>.
Your asynchronous messaging seems safe to assume. I understand better with your new explanation. I think, as gert said, that you will have to wrap, unwrap yourself with a saxon component then. However, in your specific case, you only have to do that once.

I am not very experienced yet about servicemix, but in the use case I implemented, the SOAP wrapping was done by the CXF-BC component. I had no time to finish my most complex use case (SOAP input call, dispatched on 2 SOAP output calls) yet because I am currently working on something else. So now you got gert to help you, I am leaving it to him, he knows better!

Regards
Vivian


-----Message d'origine-----
De : ObjectOrange [mailto:brian@briantaylor.us] 
Envoyé : mardi 28 juillet 2009 15:55
À : users@servicemix.apache.org
Objet : Re: Wrapped Document Services Routing


Thanks Gert,

So, I could drop the <Save> element from the <Document> that the File BC picks up, specify Save as the operation on the JSR181 service in the Pipeline EIP <Exchange-Target>, add a route to a Saxon XSLT endpoint to strip the resulting <SaveResponse> returned from the JSR181 service? That sounds like it would work but am I going to have to strip every response from every service call like this? The sounds like something infrastructure should take into consideration in the EIP SE, no? Say, if an operation (e.g.
Save) is specified in the <Exchange-Target> and the first element returned in an In-Out MEP has the operation name in it (e.g. <SaveResponse>) then remove it?

Respectfully,
Brian


Gert Vanthienen wrote:
> 
> Brian,
> 
> One way to handle this would be by adding a Saxon XSLT endpont to the 
> pipeline to translate the XML message payloads in between webservice 
> invocations.  The other solution would be to only send the plain 
> payload (<Document/>) in the ESB and specify an operation name on the 
> <eip:exchange-target/>, so the JSR181/CXF endpoint knows what 
> operation to invoke.
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
> 
> 2009/7/27 ObjectOrange <br...@briantaylor.us>:
>>
>> Hi,
>>
>> I'm having difficulties understanding how ServiceMix-EIP routes an 
>> XML document from one service to another when using wrapped documents 
>> to determine service operations.
>>
>> For example, an XML document (<Save><Document/></Save>) is picked up 
>> by the File BC and forwarded to an EIP Pipeline route service. That 
>> service routes this document to a data service deployed in the JSR181 
>> SE which is configured as a JSR181/JAXB2 service with Save as its 
>> operation and Document as its input parameter type. When that service 
>> persists to the database, it returns a 
>> <SaveResponse><Document></SaveResponse>. This all is working fine to 
>> this point and is where I'm getting stuck. The next service is an 
>> external HTTP service (Intalio BPM) that requires a <Document> 
>> payload and SOAP action to be set. The EIP Pipeline Routing service 
>> is attempting to call that service with the output from the data 
>> service call using the <SaveResponse> as an operation wrapper around 
>> it as such:
>> <SaveResponse><Document></SaveResponse>. Is the EIP supposed to 
>> unwrap this response and wrap it again with the operation required by 
>> the next service or none if that service doesn't use wrapped 
>> documents?
>>
>> Respectively,
>> Brian
>> --
>> View this message in context:
>> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24
>> 686738.html Sent from the ServiceMix - User mailing list archive at 
>> Nabble.com.
>>
>>
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 

--
View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24698096.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Wrapped Document Services Routing

Posted by ObjectOrange <br...@briantaylor.us>.
Thanks Gert,

So, I could drop the <Save> element from the <Document> that the File BC
picks up, specify Save as the operation on the JSR181 service in the
Pipeline EIP <Exchange-Target>, add a route to a Saxon XSLT endpoint to
strip the resulting <SaveResponse> returned from the JSR181 service? That
sounds like it would work but am I going to have to strip every response
from every service call like this? The sounds like something infrastructure
should take into consideration in the EIP SE, no? Say, if an operation (e.g.
Save) is specified in the <Exchange-Target> and the first element returned
in an In-Out MEP has the operation name in it (e.g. <SaveResponse>) then
remove it?

Respectfully,
Brian


Gert Vanthienen wrote:
> 
> Brian,
> 
> One way to handle this would be by adding a Saxon XSLT endpont to the
> pipeline to translate the XML message payloads in between webservice
> invocations.  The other solution would be to only send the plain
> payload (<Document/>) in the ESB and specify an operation name on the
> <eip:exchange-target/>, so the JSR181/CXF endpoint knows what
> operation to invoke.
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
> 
> 2009/7/27 ObjectOrange <br...@briantaylor.us>:
>>
>> Hi,
>>
>> I'm having difficulties understanding how ServiceMix-EIP routes an XML
>> document from one service to another when using wrapped documents to
>> determine service operations.
>>
>> For example, an XML document (<Save><Document/></Save>) is picked up by
>> the
>> File BC and forwarded to an EIP Pipeline route service. That service
>> routes
>> this document to a data service deployed in the JSR181 SE which is
>> configured as a JSR181/JAXB2 service with Save as its operation and
>> Document
>> as its input parameter type. When that service persists to the database,
>> it
>> returns a <SaveResponse><Document></SaveResponse>. This all is working
>> fine
>> to this point and is where I'm getting stuck. The next service is an
>> external HTTP service (Intalio BPM) that requires a <Document> payload
>> and
>> SOAP action to be set. The EIP Pipeline Routing service is attempting to
>> call that service with the output from the data service call using the
>> <SaveResponse> as an operation wrapper around it as such:
>> <SaveResponse><Document></SaveResponse>. Is the EIP supposed to unwrap
>> this
>> response and wrap it again with the operation required by the next
>> service
>> or none if that service doesn't use wrapped documents?
>>
>> Respectively,
>> Brian
>> --
>> View this message in context:
>> http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24686738.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 

-- 
View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24698096.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Wrapped Document Services Routing

Posted by Gert Vanthienen <ge...@gmail.com>.
Brian,

One way to handle this would be by adding a Saxon XSLT endpont to the
pipeline to translate the XML message payloads in between webservice
invocations.  The other solution would be to only send the plain
payload (<Document/>) in the ESB and specify an operation name on the
<eip:exchange-target/>, so the JSR181/CXF endpoint knows what
operation to invoke.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/7/27 ObjectOrange <br...@briantaylor.us>:
>
> Hi,
>
> I'm having difficulties understanding how ServiceMix-EIP routes an XML
> document from one service to another when using wrapped documents to
> determine service operations.
>
> For example, an XML document (<Save><Document/></Save>) is picked up by the
> File BC and forwarded to an EIP Pipeline route service. That service routes
> this document to a data service deployed in the JSR181 SE which is
> configured as a JSR181/JAXB2 service with Save as its operation and Document
> as its input parameter type. When that service persists to the database, it
> returns a <SaveResponse><Document></SaveResponse>. This all is working fine
> to this point and is where I'm getting stuck. The next service is an
> external HTTP service (Intalio BPM) that requires a <Document> payload and
> SOAP action to be set. The EIP Pipeline Routing service is attempting to
> call that service with the output from the data service call using the
> <SaveResponse> as an operation wrapper around it as such:
> <SaveResponse><Document></SaveResponse>. Is the EIP supposed to unwrap this
> response and wrap it again with the operation required by the next service
> or none if that service doesn't use wrapped documents?
>
> Respectively,
> Brian
> --
> View this message in context: http://www.nabble.com/Wrapped-Document-Services-Routing-tp24686738p24686738.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>