Re: cxf-core 3.1.7 Validation issue with camel

2016-09-23 Thread Willem Jiang
You need to use the [1] instead of the generic camel endpoint 
to setup the schemaLocations for validation.

http://camel.apache.org/cxf.html#CXF-ConfiguretheCXFendpointswithSpring 
--  
Willem Jiang


Blog: http://willemjiang.blogspot.com (English)  
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On September 23, 2016 at 12:16:21 PM, sari.reach (sari.re...@gmail.com) wrote:
> Any update on this Willem?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-issue-with-camel-tp5787728p5787946.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: cxf-core 3.1.7 Validation issue with camel

2016-09-22 Thread sari.reach
Any update on this Willem?



--
View this message in context: 
http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-issue-with-camel-tp5787728p5787946.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: cxf-core 3.1.7 Validation issue with camel

2016-09-20 Thread sari.reach
Hi,

Please find the entire camel-config.xml. 
Schema information is inside the resource folder(in classpath). For this
scenario, request validation is working fine and only response validation is
creating an issue



http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:camel="http://camel.apache.org/schema/spring";
xmlns:cxf="http://camel.apache.org/schema/cxf";
xsi:schemaLocation="http://www.springframework.org/schema/beans 
   
http://www.springframework.org/schema/beans/spring-beans.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.xsd";>


http://camel.apache.org/schema/spring";>












--
View this message in context: 
http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-issue-with-camel-tp5787728p5787798.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: cxf-core 3.1.7 Validation issue with camel

2016-09-20 Thread Willem Jiang
I think you you need to specify the schemaLocation from the spring 
configuration file to let the CXF Endpoint knows about.
Please check the example here[1]

[1]http://camel.apache.org/cxf.html#CXF-ConfiguretheCXFendpointswithSpring

--  
Willem Jiang


Blog: http://willemjiang.blogspot.com (English)  
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On September 20, 2016 at 2:49:38 PM, sari.reach (sari.re...@gmail.com) wrote:
> Please find the camel route below. Please let me know if you need additional
> information. I am pasting the exception trace as well.
>  
>  
>  
> >  
> uri="cxf:/HotelBookPort?wsdlURL=hotel/hotelbook.wsdl&dataFormat=PAYLOAD&properties.schema-validation-enabled=true"
>   
> />
>  
>  
> > loggingLevel="INFO"/>
>  
>  
>  
>  
> Exception Trace:
>  
> org.apache.cxf.interceptor.Fault: Could not generate the XML stream caused
> by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
> element 'ATT_CheckRS'..
> at
> org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:99)
>   
> at
> org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:54)
>   
> at
> org.apache.camel.component.cxf.HybridSourceDataBinding$1.write(HybridSourceDataBinding.java:100)
>   
> at
> org.apache.camel.component.cxf.HybridSourceDataBinding$1.write(HybridSourceDataBinding.java:81)
>   
> at
> org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:137)
>   
> at
> org.apache.cxf.wsdl.interceptors.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
>   
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>   
> at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:83)
>   
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>   
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>   
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
>   
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
>   
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
>   
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
>   
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
>   
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293)
>   
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:212)
>   
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268)
>   
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-issue-with-camel-tp5787728p5787746.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: cxf-core 3.1.7 Validation issue with camel

2016-09-19 Thread sari.reach
Please find the camel route below. Please let me know if you need additional
information. I am pasting the exception trace as well.


http://camel.apache.org/schema/spring";>








Exception Trace:

org.apache.cxf.interceptor.Fault: Could not generate the XML stream 
caused
by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
element 'ATT_CheckRS'..
at
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:99)
at
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:54)
at
org.apache.camel.component.cxf.HybridSourceDataBinding$1.write(HybridSourceDataBinding.java:100)
at
org.apache.camel.component.cxf.HybridSourceDataBinding$1.write(HybridSourceDataBinding.java:81)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:137)
at
org.apache.cxf.wsdl.interceptors.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:83)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:212)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268)



--
View this message in context: 
http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-issue-with-camel-tp5787728p5787746.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: cxf-core 3.1.7 Validation issue with camel

2016-09-19 Thread Willem Jiang
Can you show us the camel route?
It looks like you are trying to send a XML message to the CXF server.
We need to find out where the exception is thrown.

--  
Willem Jiang


Blog: http://willemjiang.blogspot.com (English)  
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On September 20, 2016 at 3:26:38 AM, sari.reach (sari.re...@gmail.com) wrote:
> cxf-core 3.1.7 is not validating the xml with xsd at appropriate location
>  
> Exception says: Could not generate the XML stream caused by:
> org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
> element 'ATT_CheckRS'..
>  
> Sample code is as below
>  
> import org.apache.camel.Exchange;
> import org.apache.camel.Message;
> import org.apache.camel.Processor;
>  
> public class TestProcess implements Processor {
>  
> public void process(Exchange exchange) throws Exception {
> Message message = exchange.getOut();
>  
> message.setBody( bindMessage());
> exchange.setOut(message);
> //java.lang.System.out.println("MIP of Http Endpoint is " +
> message);
> java.lang.System.out.println("NEW MIP of Http Endpoint is " +
> exchange.getPattern());
>  
> }
>  
>  
> private String bindMessage(){
> return "> TimeStamp=\"2016-03-08T07:01:30.175Z\" Version=\"1.003\"
> TransactionIdentifier=\"\" PrimaryLangID=\"ENG\"
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\";
> xmlns=\"http://www.travel.org/ABC/2003/05\";>"
> +""
> +""
> +""
> +""
> +""
> +""
> +"> Status=\"\" Type=\"4\"/>"
> +""
> +"";
>  
>  
>  
> }
> }
>  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-issue-with-camel-tp5787728.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: cxf-core 3.1.7 Validation issue with camel

2016-09-19 Thread sari.reach
Please accept this request

On Mon, Sep 19, 2016 at 11:01 PM, sari.reach [via Camel] <
ml-node+s465427n5787728...@n5.nabble.com> wrote:

> cxf-core 3.1.7 is not validating the xml with xsd at appropriate location
>
> Exception says:  Could not generate the XML stream caused by:
> org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
> element 'ATT_CheckRS'..
>
> Sample code is as below
>
> import org.apache.camel.Exchange;
> import org.apache.camel.Message;
> import org.apache.camel.Processor;
>
> public class TestProcess implements Processor {
>
>public void process(Exchange exchange) throws Exception {
>   Message message =  exchange.getOut();
>
>   message.setBody( bindMessage());
>   exchange.setOut(message);
>   //java.lang.System.out.println("MIP of Http Endpoint is " +
> message);
>   java.lang.System.out.println("NEW MIP of Http Endpoint is "
> + exchange.getPattern());
>
>}
>
>
>private String bindMessage(){
>   return" TimeStamp=\"2016-03-08T07:01:30.175Z\"
> Version=\"1.003\" TransactionIdentifier=\"\" PrimaryLangID=\"ENG\"
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"; xmlns=\"
> http://www.travel.org/ABC/2003/05\";>"
> +""
> +""
> +""
> +""
> +""
> +""
> +" Status=\"\" Type=\"4\"/>"
> +""
> +"";
>
>
>
>}
> }
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-
> issue-with-camel-tp5787728.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-issue-with-camel-tp5787728p5787729.html
Sent from the Camel - Users mailing list archive at Nabble.com.