RE: please help with transformation of a response by xslt

2016-06-14 Thread dpravin
One quick update, I replace cxf producer end point with http4 component and
the route ran with no issues/problems.

However I still would like to understand why cxf end point is failing.

Thanks,
Pravin



--
View this message in context: 
http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5784050.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: please help with transformation of a response by xslt

2016-06-13 Thread dpravin
My route is very similar to the route what is being discussed on this thread
and I too am facing same issues. I have tried all the options suggested,
however nothing works.

Did anyone fixed this problem in their route. Appreciate any inputs.

Thanks,
Pravin



--
View this message in context: 
http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5783986.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: please help with transformation of a response by xslt

2015-09-01 Thread Jaishankar
After XSLT transformation try converting to  "org.w3c.dom.Document". 









--
View this message in context: 
http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p577.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: please help with transformation of a response by xslt

2014-09-22 Thread aioria3077
thanks, run the transformation to String after the XSLT transformation,
continuous error, I think it's my transformation which is having problems,
I'll check, thank you very much for your help



--
View this message in context: 
http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5756850.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: please help with transformation of a response by xslt

2014-09-22 Thread aioria3077
Thank you very much for this information, and check the coding of the
original RESPONSE and matches my XSLT transformation, both are UTF-8.



--
View this message in context: 
http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5756852.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: please help with transformation of a response by xslt

2014-09-22 Thread aioria3077
effectively, since last week Always change a PAYLOAD to MESSAGE data format.

 I'm about to check out the transformation with the manager of that part
because apparently that's where we're having problems, thank you very much



--
View this message in context: 
http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5756851.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: please help with transformation of a response by xslt

2014-09-21 Thread Siano, Stephan
Hi,

Just some comments about the convert to string workaround for XML documents. 
Though XML documents may look like strings, they are in fact binary data, so 
even if converting the data to string may help to work around an existing 
issue, it can cause other issues with specific XML documents. This will 
specifically happen if the document encoding is not the same as the default 
encoding of the platform (e.g. platform default encoding is ISO-8859-1 whereas 
the document is UTF-8 encoded (or vice versa)). In that case all documents 
containing non-ASCII characters will be destroyed by converting a byte-like 
representation into a character-like representation (e.g. file to string).

So if there is some type converter issue the best solution would be to analyze 
and resolve that issue. If you need a workaround, the second best solution is 
to convert the data to byte[] not to String, this will at least not destroy the 
encoding (and the BOM).

Best regards
Stephan

-Original Message-
From: aioria3077 [mailto:aioria3...@gmail.com] 
Sent: Samstag, 20. September 2014 00:27
To: users@camel.apache.org
Subject: Re: please help with transformation of a response by xslt

if the call to the original web service, the change will dataFormat MESSAGE 
by PAYLOAD, The error is:

The PayLoad elements cannot fit with the message parts of the
BindingOperation. Please check the BindingOperation and PayLoadMessage. 


I make the first transformation successfully receiving the REQUEST as
dataFormat PAYLOAD, I realize that a change to MESSAGE in the original WS
call is where the transformation does not work, 

There is some problem the xslt with MESSAGE dataFormat being that before
sending the body convert STRING



--
View this message in context: 
http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5756757.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: please help with transformation of a response by xslt

2014-09-20 Thread Henrique Viecili
Do the conversion after:
 to uri=xslt:xslt/ClubPremier/response.xslt /
 convertBodyTo type=java.lang.String /

Henrique Viecili

On 20 September 2014 00:00, aioria3077 aioria3...@gmail.com wrote:

 *thanks for replying, really like right before calling xsl transformer, I
 have this line*


 * convertBodyTo type=java.lang.String /*
  to uri=xslt:xslt/ClubPremier/response.xslt /

 will try to put it back then see what happens.

 any other suggestions?



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5756748.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: please help with transformation of a response by xslt

2014-09-20 Thread aioria3077
if the call to the original web service, the change will dataFormat MESSAGE 
by PAYLOAD, The error is:

The PayLoad elements cannot fit with the message parts of the
BindingOperation. Please check the BindingOperation and PayLoadMessage. 


I make the first transformation successfully receiving the REQUEST as
dataFormat PAYLOAD, I realize that a change to MESSAGE in the original WS
call is where the transformation does not work, 

There is some problem the xslt with MESSAGE dataFormat being that before
sending the body convert STRING



--
View this message in context: 
http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5756757.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: please help with transformation of a response by xslt

2014-09-20 Thread Willem Jiang
If you invoke the backend service with PAYLOAD data formate message you need to 
setup the BindingOperation for it.

My suggestion if you want to use xslt to the transformation, you can just use 
MESSAGE data formate  to invoke the back end service. 

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On September 20, 2014 at 8:56:05 PM, aioria3077 (aioria3...@gmail.com) wrote:
 if the call to the original web service, the change will dataFormat MESSAGE
 by PAYLOAD, The error is:
  
 The PayLoad elements cannot fit with the message parts of the
 BindingOperation. Please check the BindingOperation and PayLoadMessage.
  
  
 I make the first transformation successfully receiving the REQUEST as
 dataFormat PAYLOAD, I realize that a change to MESSAGE in the original WS
 call is where the transformation does not work,
  
 There is some problem the xslt with MESSAGE dataFormat being that before
 sending the body convert STRING
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5756757.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: please help with transformation of a response by xslt

2014-09-19 Thread Henrique Viecili
After the xsl transformation, try to convert the body again to String.

Henrique Viecili

On 19 September 2014 10:16, aioria3077 aioria3...@gmail.com wrote:

 *have a original Web Services, a proxy which has a transformation because
 you
 need to add data authentication, the request works fine, can consume the
 service, but I need to transform the response to the expectations created
 my
 webService proxy, the transformation applied in the same way which the
 request is armed, but I get an error:*


 2014-09-18 17:27:46,714 | WARN | qtp1787857896-70 | PhaseInterceptorChain |
 ? ? | 164 - org.apache.cxf.cxf-api - 2.7.0.redhat-610379 | Interceptor for
 {http://www.ampersand.mx/FiestaRewardsServices;
 target=_blank
 http://www.ampersand.mx/FiestaRewardsServices}PointsExchangeFR2CPPortTypeService#{http://www.ampersand.mx/FiestaRewardsServices
 
 target=_blank
 http://www.ampersand.mx/FiestaRewardsServices}PointsExchangeFR2CPOp
 has thrown exception, unwinding now
 java.lang.ClassCastException: java.io.ByteArrayInputStream cannot be cast
 to
 javax.xml.transform.Source
 at

 org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:79)[162:org.apache.cxf.cxf-rt-core:2.7.0.redhat-610379]
 at

 org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:54)[162:org.apache.cxf.cxf-rt-core:2.7.0.redhat-610379]
 at

 org.apache.camel.component.cxf.HybridSourceDataBinding$1.write(HybridSourceDataBinding.java:100)[205:org.apache.camel.camel-cxf:2.12.0.redhat-610379]
 at

 org.apache.camel.component.cxf.HybridSourceDataBinding$1.write(HybridSourceDataBinding.java:81)[205:org.apache.camel.camel-cxf:2.12.0.redhat-610379]
 at

 org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:123)[164:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
 at

 org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)[164:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
 at

 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)[164:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
 at

 org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)[164:org.apache.cxf.cxf-api:2.7.0.redhat-610379]


 *this is my camel-context.xml*


 ?xml version=1.0 encoding=UTF-8?
 beans
 xmlns:spring-security=http://www.springframework.org/schema/security;
 xmlns=http://www.springframework.org/schema/beans;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:camel=http://camel.apache.org/schema/spring;
 xmlns:osgi=http://www.springframework.org/schema/osgi;
 xmlns:cxf=http://camel.apache.org/schema/cxf;
 xmlns:poin=http://www.ampersand.mx/PointsExchangeFR2CPReq;
 xsi:schemaLocation=
http://camel.apache.org/schema/spring/security

 http://camel.apache.org/schema/spring/security/camel-spring-security.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security.xsd
http://camel.apache.org/schema/security
 http://camel.apache.org/schema/security/camel-security.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf-2.8.3.xsd;


 bean id=cleanerProcessor
 class=mx.ampersand.processors.RequestCleanerProcessor /


 cxf:cxfEndpoint id=PointsExchangeFR2CPProxy
 address=/PointsExchangeFR2CPService

 serviceClass=mx.ampersand.fiestarewardsservices.PointsExchangeFR2CPPortType
 /cxf:cxfEndpoint


 cxf:cxfEndpoint id=ClubPremierEndpoint
 address=
 http://cr5w5cptest.clubpremier.com/Mercator.CRIS.WebService.TESTCRIS/MemberWebService.asmx
 
 wsdlURL=wsdl/MemberWebService.wsdl
 cxf:properties
 entry key=dataFormat value=MESSAGE /
 /cxf:properties
 /cxf:cxfEndpoint

 camelContext
 id=mx.ampersand.fiestarewardsservices.PointsExchangeFR2CP-Proxy
 xmlns=http://camel.apache.org/schema/spring;
 route id=proxy
 from

 uri=cxf:bean:PointsExchangeFR2CPProxy?dataFormat=PAYLOADamp;loggingFeatureEnabled=true
 /
 to uri=log:output?showAll=true /

 to uri=cleanerProcessor/

 convertBodyTo type=java.lang.String /

 to uri=xslt:xslt/ClubPremier/request.xslt /

 setHeader headerName=operationName
 constantCreateAccrualActivity/constant
 /setHeader
 

Re: please help with transformation of a response by xslt

2014-09-19 Thread aioria3077
*thanks for replying, really like right before calling xsl transformer, I
have this line*


* convertBodyTo type=java.lang.String /*
 to uri=xslt:xslt/ClubPremier/response.xslt /

will try to put it back then see what happens. 

any other suggestions?



--
View this message in context: 
http://camel.465427.n5.nabble.com/please-help-with-transformation-of-a-response-by-xslt-tp5756711p5756748.html
Sent from the Camel - Users mailing list archive at Nabble.com.


please help with transformation of a response by xslt

2014-09-18 Thread aioria3077
*have a original Web Services, a proxy which has a transformation because you
need to add data authentication, the request works fine, can consume the
service, but I need to transform the response to the expectations created my
webService proxy, the transformation applied in the same way which the
request is armed, but I get an error:*


2014-09-18 17:27:46,714 | WARN | qtp1787857896-70 | PhaseInterceptorChain |
? ? | 164 - org.apache.cxf.cxf-api - 2.7.0.redhat-610379 | Interceptor for
{http://www.ampersand.mx/FiestaRewardsServices;
target=_blankhttp://www.ampersand.mx/FiestaRewardsServices}PointsExchangeFR2CPPortTypeService#{http://www.ampersand.mx/FiestaRewardsServices;
target=_blankhttp://www.ampersand.mx/FiestaRewardsServices}PointsExchangeFR2CPOp
has thrown exception, unwinding now 
java.lang.ClassCastException: java.io.ByteArrayInputStream cannot be cast to
javax.xml.transform.Source 
at
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:79)[162:org.apache.cxf.cxf-rt-core:2.7.0.redhat-610379]
 
at
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:54)[162:org.apache.cxf.cxf-rt-core:2.7.0.redhat-610379]
 
at
org.apache.camel.component.cxf.HybridSourceDataBinding$1.write(HybridSourceDataBinding.java:100)[205:org.apache.camel.camel-cxf:2.12.0.redhat-610379]
 
at
org.apache.camel.component.cxf.HybridSourceDataBinding$1.write(HybridSourceDataBinding.java:81)[205:org.apache.camel.camel-cxf:2.12.0.redhat-610379]
 
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:123)[164:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
 
at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)[164:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
 
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)[164:org.apache.cxf.cxf-api:2.7.0.redhat-610379]
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)[164:org.apache.cxf.cxf-api:2.7.0.redhat-610379]


*this is my camel-context.xml*


?xml version=1.0 encoding=UTF-8?
beans
xmlns:spring-security=http://www.springframework.org/schema/security;
xmlns=http://www.springframework.org/schema/beans; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:camel=http://camel.apache.org/schema/spring;
xmlns:osgi=http://www.springframework.org/schema/osgi;
xmlns:cxf=http://camel.apache.org/schema/cxf;
xmlns:poin=http://www.ampersand.mx/PointsExchangeFR2CPReq;
xsi:schemaLocation=
   http://camel.apache.org/schema/spring/security
  
http://camel.apache.org/schema/spring/security/camel-spring-security.xsd
   http://www.springframework.org/schema/security
   http://www.springframework.org/schema/security/spring-security.xsd
   http://camel.apache.org/schema/security
http://camel.apache.org/schema/security/camel-security.xsd
   http://www.springframework.org/schema/beans 
   http://www.springframework.org/schema/beans/spring-beans.xsd
   http://www.springframework.org/schema/osgi 
   http://www.springframework.org/schema/osgi/spring-osgi.xsd
   http://camel.apache.org/schema/spring 
   http://camel.apache.org/schema/spring/camel-spring.xsd
   http://camel.apache.org/schema/cxf 
   http://camel.apache.org/schema/cxf/camel-cxf-2.8.3.xsd;


bean id=cleanerProcessor
class=mx.ampersand.processors.RequestCleanerProcessor /


cxf:cxfEndpoint id=PointsExchangeFR2CPProxy
address=/PointsExchangeFR2CPService
serviceClass=mx.ampersand.fiestarewardsservices.PointsExchangeFR2CPPortType
/cxf:cxfEndpoint


cxf:cxfEndpoint id=ClubPremierEndpoint
address=http://cr5w5cptest.clubpremier.com/Mercator.CRIS.WebService.TESTCRIS/MemberWebService.asmx;
wsdlURL=wsdl/MemberWebService.wsdl
cxf:properties
entry key=dataFormat value=MESSAGE /
/cxf:properties
/cxf:cxfEndpoint

camelContext
id=mx.ampersand.fiestarewardsservices.PointsExchangeFR2CP-Proxy
xmlns=http://camel.apache.org/schema/spring;
route id=proxy
from
uri=cxf:bean:PointsExchangeFR2CPProxy?dataFormat=PAYLOADamp;loggingFeatureEnabled=true
/
to uri=log:output?showAll=true /

to uri=cleanerProcessor/

convertBodyTo type=java.lang.String /

to uri=xslt:xslt/ClubPremier/request.xslt /

setHeader headerName=operationName
constantCreateAccrualActivity/constant
/setHeader
setHeader headerName=SOAPAction

constanthttp://skywards.com/Mercator.CRIS.WS/CreateAccrualActivity/constant
/setHeader