You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Michael Griffin <mg...@fsenablers.com> on 2007/02/08 14:52:51 UTC
XSLTMediator problem?
Hi,
I'm new to Synapse but it seems like a great project. After working through
some of the samples, I tried to transform the response from an existing web
service. The problem I ran into was that my SOAP body on the return
contained both the original contents plus the transformed contents. So
something like this....
...
<soapenv:Header>
<ns2:state soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0" xmlns:ns2="old-namespace">good</ns2:state>
</soapenv:Header>
<soapenv:Body>
<response xmlns="old-namespace">
<status>status</status>
<message>a message</message>
</responser>
<resp xmlns="new-namespace">
<sc>status</sc>
<msg>a message</msg>
</res>
</soapenv:Body>
...
Has anyone else run into this problem? Is there a way around it. I've
verified that my style sheet is working correctly, and the debug output from
synapse indicates that the result of the transformation is correct.
I did some poking around with the source and found that
XSLTMediator.performXLST handles the merge of the result back in to the
source document in two different ways - if the parent was a SOAPEnvelope
(uses setFirstOMChild) and the other (addChild) if it is not. With some
experimentation I can perform and additional test to see if the parent is a
SOAPBody and use setFirstOMChild accordingly - this results in a proper
replacement of the source with the transformed elements.
Thoughts?
Thanks
Griffin
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org
Re: XSLTMediator problem?
Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi Griffin
Can you confirm that you are using 0.91 release? also, is it possible
for you to share your XSLT and configuration with us? I will look into
this and get back to you.. but if the above is available, it would be
quicker for me to try and reproduce this.
asankha
Michael Griffin wrote:
> Hi,
>
> I'm new to Synapse but it seems like a great project. After working through
> some of the samples, I tried to transform the response from an existing web
> service. The problem I ran into was that my SOAP body on the return
> contained both the original contents plus the transformed contents. So
> something like this....
>
> ...
> <soapenv:Header>
> <ns2:state soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
> soapenv:mustUnderstand="0" xmlns:ns2="old-namespace">good</ns2:state>
> </soapenv:Header>
> <soapenv:Body>
> <response xmlns="old-namespace">
> <status>status</status>
> <message>a message</message>
> </responser>
> <resp xmlns="new-namespace">
> <sc>status</sc>
> <msg>a message</msg>
> </res>
> </soapenv:Body>
> ...
>
> Has anyone else run into this problem? Is there a way around it. I've
> verified that my style sheet is working correctly, and the debug output from
> synapse indicates that the result of the transformation is correct.
>
> I did some poking around with the source and found that
> XSLTMediator.performXLST handles the merge of the result back in to the
> source document in two different ways - if the parent was a SOAPEnvelope
> (uses setFirstOMChild) and the other (addChild) if it is not. With some
> experimentation I can perform and additional test to see if the parent is a
> SOAPBody and use setFirstOMChild accordingly - this results in a proper
> replacement of the source with the transformed elements.
>
> Thoughts?
>
> Thanks
> Griffin
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org