You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Balana, Vishal" <Vi...@fmr.com.INVALID> on 2015/03/24 19:36:31 UTC

Schema Validation on input doesn't work

Hi All,

Any help would do wonders!

We have CXF SOAP service using wsdl-first approach.
Schema validation works fine if do not add wsse optional explicit header.
As soon as wsse header added to our wsdl CXF stops validating input requests.

We are using CXF 2.7.3.
Service is deployed on tomcat 7.0.55.

What needs to be done to make it working?

Thanks,
Vishal


RE: Schema Validation on input doesn't work

Posted by "Balana, Vishal" <Vi...@fmr.com.INVALID>.
I tried 2.7.15 and now I am able to see WARNING message during server start up:

Failed to parse WSDL
javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema): faultCode=PARSER_ERROR: Problem parsing 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd'.: java.net.ConnectException: Connection timed out

I looked at CXF Defect for it and it has been closed due to not Reproducible, no solution?
 https://issues.apache.org/jira/browse/CXF-1505

Anybody able to get rid of it yet?

Thanks,
Vishal

-----Original Message-----
From: jasonmpell@gmail.com [mailto:jasonmpell@gmail.com] On Behalf Of Jason Pell
Sent: Tuesday, March 24, 2015 3:55 PM
To: dev@cxf.apache.org
Subject: RE: Schema Validation on input doesn't work

Can you try this on 2.7.15 or 3.0.4?

I don't know why your issue is occurring but a more up to date cxf might
have already fixed it.

Would be good to know
On 25/03/2015 6:17 AM, "Balana, Vishal" <Vi...@fmr.com.invalid>
wrote:

> I am giving example below about how I have added wsse header to wsdl:
>
> <wsdl:definitions name = "ABC"
>   targetNamespace= "XXX"
>  xmlns:sec="http://schemas.xmlsoap.org/ws/2003/06/secext">
>
> <wsdl:types>
>     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="XYZ">
>         <xsd:import namespace="
> http://schemas.xmlsoap.org/ws/2003/06/secext"
>                         schemaLocation="/ws_security.xsd" />
>   </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="Req">
>        <wsdl:part name="KeyVal" element="sec:UsernameToken" />
>        <wsdl:part name="RequestBody" element="tns:zzz " />
>   </wsdl:message>
>
> <wsdl:message name="Resp">
>         <wsdl:part name="ResponseBody" element="tns:yyy " />
>   </wsdl:message>
>
> <wsdl:portType name="RRR">
>         <wsdl:operation name="AAA">
>                 <wsdl:input message="tns:zzz" />
>                 <wsdl:output message=" tns:yyy " />
>         </wsdl:operation>
> </wsdl:portType>
>
> <wsdl:binding name="Binding" type=" RRR">
>         <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="AAA">
>                 <soap:operation
>                 soapAction="" />
>                 <wsdl:input>
>                         <soap:header use="literal" part="KeyVal"
> message="tns:zzz " />
>                         <soap:body   use="literal" parts="RequestBody" />
>                  </wsdl:input>
>                 <wsdl:output>
>                         <soap:body use="literal" parts="ResponseBody" />
>                 </wsdl:output>
>        </wsdl:operation>
>   </wsdl:binding>
>
> <wsdl:service name="Service">
>         <wsdl:port binding="tns: Binding" name=" RRR">
>             <soap:address location="http://localhost:8080/ " />
>         </wsdl:port>
>    </wsdl:service>
>
> </wsdl:definitions>
>
> My AppContext.xml has following:
>
> <jaxws:endpoint id="Service"  implementor="com.service.SOAPService"
> address="/myService" >
>             <jaxws:properties>
>                 <entry key="schema-validation-enabled" value="true"/>
>            </jaxws:properties>
>  </jaxws:endpoint>
>
> And also wants to remind what I said earlier, Schema validation on input
> works perfectly fine when wsse header is removed from WSDL.
>
>
> Thanks,
> Vishal
> -----Original Message-----
> From: Mohana Rao S V [mailto:mohanaraosv@gmail.com]
> Sent: Tuesday, March 24, 2015 2:45 PM
> To: dev@cxf.apache.org
> Subject: RE: Schema Validation on input doesn't work
>
> Hi Vishal,
>
>   Could you please share details how are trying to achieve the wsse header
> share the configuration and wsdl.
>
> Thanks,
> Mohan.
>
> -----Original Message-----
> From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID]
> Sent: Wednesday, March 25, 2015 12:07 AM
> To: dev@cxf.apache.org
> Subject: Schema Validation on input doesn't work
>
> Hi All,
>
> Any help would do wonders!
>
> We have CXF SOAP service using wsdl-first approach.
> Schema validation works fine if do not add wsse optional explicit header.
> As soon as wsse header added to our wsdl CXF stops validating input
> requests.
>
> We are using CXF 2.7.3.
> Service is deployed on tomcat 7.0.55.
>
> What needs to be done to make it working?
>
> Thanks,
> Vishal
>
>
>

RE: Schema Validation on input doesn't work

Posted by "Balana, Vishal" <Vi...@fmr.com.INVALID>.
Any thoughts on following issue?

Regards,
Vishal

-----Original Message-----
From: Balana, Vishal 
Sent: Wednesday, March 25, 2015 10:54 AM
To: dev@cxf.apache.org
Subject: RE: Schema Validation on input doesn't work

I tried 2.7.15 and now I am able to see WARNING message during server start up:

Failed to parse WSDL
javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema): faultCode=PARSER_ERROR: Problem parsing 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd'.: java.net.ConnectException: Connection timed out

I looked at CXF Defect for it and it has been closed due to not Reproducible, no solution?
 https://issues.apache.org/jira/browse/CXF-1505

Anybody able to get rid of it yet?

Thanks,
Vishal

-----Original Message-----
From: jasonmpell@gmail.com [mailto:jasonmpell@gmail.com] On Behalf Of Jason Pell
Sent: Tuesday, March 24, 2015 3:55 PM
To: dev@cxf.apache.org
Subject: RE: Schema Validation on input doesn't work

Can you try this on 2.7.15 or 3.0.4?

I don't know why your issue is occurring but a more up to date cxf might
have already fixed it.

Would be good to know
On 25/03/2015 6:17 AM, "Balana, Vishal" <Vi...@fmr.com.invalid>
wrote:

> I am giving example below about how I have added wsse header to wsdl:
>
> <wsdl:definitions name = "ABC"
>   targetNamespace= "XXX"
>  xmlns:sec="http://schemas.xmlsoap.org/ws/2003/06/secext">
>
> <wsdl:types>
>     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="XYZ">
>         <xsd:import namespace="
> http://schemas.xmlsoap.org/ws/2003/06/secext"
>                         schemaLocation="/ws_security.xsd" />
>   </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="Req">
>        <wsdl:part name="KeyVal" element="sec:UsernameToken" />
>        <wsdl:part name="RequestBody" element="tns:zzz " />
>   </wsdl:message>
>
> <wsdl:message name="Resp">
>         <wsdl:part name="ResponseBody" element="tns:yyy " />
>   </wsdl:message>
>
> <wsdl:portType name="RRR">
>         <wsdl:operation name="AAA">
>                 <wsdl:input message="tns:zzz" />
>                 <wsdl:output message=" tns:yyy " />
>         </wsdl:operation>
> </wsdl:portType>
>
> <wsdl:binding name="Binding" type=" RRR">
>         <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="AAA">
>                 <soap:operation
>                 soapAction="" />
>                 <wsdl:input>
>                         <soap:header use="literal" part="KeyVal"
> message="tns:zzz " />
>                         <soap:body   use="literal" parts="RequestBody" />
>                  </wsdl:input>
>                 <wsdl:output>
>                         <soap:body use="literal" parts="ResponseBody" />
>                 </wsdl:output>
>        </wsdl:operation>
>   </wsdl:binding>
>
> <wsdl:service name="Service">
>         <wsdl:port binding="tns: Binding" name=" RRR">
>             <soap:address location="http://localhost:8080/ " />
>         </wsdl:port>
>    </wsdl:service>
>
> </wsdl:definitions>
>
> My AppContext.xml has following:
>
> <jaxws:endpoint id="Service"  implementor="com.service.SOAPService"
> address="/myService" >
>             <jaxws:properties>
>                 <entry key="schema-validation-enabled" value="true"/>
>            </jaxws:properties>
>  </jaxws:endpoint>
>
> And also wants to remind what I said earlier, Schema validation on input
> works perfectly fine when wsse header is removed from WSDL.
>
>
> Thanks,
> Vishal
> -----Original Message-----
> From: Mohana Rao S V [mailto:mohanaraosv@gmail.com]
> Sent: Tuesday, March 24, 2015 2:45 PM
> To: dev@cxf.apache.org
> Subject: RE: Schema Validation on input doesn't work
>
> Hi Vishal,
>
>   Could you please share details how are trying to achieve the wsse header
> share the configuration and wsdl.
>
> Thanks,
> Mohan.
>
> -----Original Message-----
> From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID]
> Sent: Wednesday, March 25, 2015 12:07 AM
> To: dev@cxf.apache.org
> Subject: Schema Validation on input doesn't work
>
> Hi All,
>
> Any help would do wonders!
>
> We have CXF SOAP service using wsdl-first approach.
> Schema validation works fine if do not add wsse optional explicit header.
> As soon as wsse header added to our wsdl CXF stops validating input
> requests.
>
> We are using CXF 2.7.3.
> Service is deployed on tomcat 7.0.55.
>
> What needs to be done to make it working?
>
> Thanks,
> Vishal
>
>
>

RE: Schema Validation on input doesn't work

Posted by "Balana, Vishal" <Vi...@fmr.com.INVALID>.
Yes, I do have similar entry.

Regards,
Vishal

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Friday, March 27, 2015 2:16 PM
To: dev@cxf.apache.org
Subject: Re: Schema Validation on input doesn't work


> On Mar 27, 2015, at 2:09 PM, Balana, Vishal <Vi...@fmr.com.INVALID> wrote:
> 
> Thanks Daniel !
> 
> I have been trying catalog since 2 days now and the file(jax-ws-catalog.xml) which I have placed under META-INF doesn't have any impact.
> Is there any way I could test catalog files effect on codegen plugin?

Something like:
                               <wsdlOption>
                                    <wsdl>${basedir}/src/test/resources/wsdl_systest/soap_fault.wsdl</wsdl>
                                    <catalog>${basedir}/src/test/resources/wsdl_systest/catalog.xml</catalog>
                                </wsdlOption>

should do it.

Dan


> 
> Regards,
> Vishal
> 
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org] 
> Sent: Friday, March 27, 2015 2:05 PM
> To: dev@cxf.apache.org
> Subject: Re: Schema Validation on input doesn't work
> 
> 
>> On Mar 27, 2015, at 12:42 PM, Balana, Vishal <Vi...@fmr.com.INVALID> wrote:
>> 
>> How to pass Proxy Host and Port to wsdl2java(cxf-codegen-plugin) ?
> 
> 
> The normal system properties SHOULD be picked up:
> 
> http.proxyHost
> http.proxyPort
> 
> That said, you’d like be better off downloading any schemas that are unavailable, sticking them in your jar, and creating a catalog for it.
> 
> /META-INF/jax-ws-catalog.xml:
> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
>    <rewriteSystem systemIdStartString="http://www.w3.org/TR/xmldsig-core" rewritePrefix="classpath:/schemas["/>
> </catalog>
> 
> or similar.
> 
> Dan
> 
> 
>> 
>> Regards,
>> Vishal
>> 
>> -----Original Message-----
>> From: Balana, Vishal 
>> Sent: Friday, March 27, 2015 10:12 AM
>> To: 'dev@cxf.apache.org'
>> Subject: RE: Schema Validation on input doesn't work
>> 
>> Any thoughts on following issue?
>> 
>> Regards,
>> Vishal
>> 
>> -----Original Message-----
>> From: Balana, Vishal 
>> Sent: Wednesday, March 25, 2015 10:54 AM
>> To: dev@cxf.apache.org
>> Subject: RE: Schema Validation on input doesn't work
>> 
>> I tried 2.7.15 and now I am able to see WARNING message during server start up:
>> 
>> Failed to parse WSDL
>> javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema): faultCode=PARSER_ERROR: Problem parsing 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd'.: java.net.ConnectException: Connection timed out
>> 
>> I looked at CXF Defect for it and it has been closed due to not Reproducible, no solution?
>> https://issues.apache.org/jira/browse/CXF-1505
>> 
>> Anybody able to get rid of it yet?
>> 
>> Thanks,
>> Vishal
>> 
>> -----Original Message-----
>> From: jasonmpell@gmail.com [mailto:jasonmpell@gmail.com] On Behalf Of Jason Pell
>> Sent: Tuesday, March 24, 2015 3:55 PM
>> To: dev@cxf.apache.org
>> Subject: RE: Schema Validation on input doesn't work
>> 
>> Can you try this on 2.7.15 or 3.0.4?
>> 
>> I don't know why your issue is occurring but a more up to date cxf might
>> have already fixed it.
>> 
>> Would be good to know
>> On 25/03/2015 6:17 AM, "Balana, Vishal" <Vi...@fmr.com.invalid>
>> wrote:
>> 
>>> I am giving example below about how I have added wsse header to wsdl:
>>> 
>>> <wsdl:definitions name = "ABC"
>>> targetNamespace= "XXX"
>>> xmlns:sec="http://schemas.xmlsoap.org/ws/2003/06/secext">
>>> 
>>> <wsdl:types>
>>>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>> targetNamespace="XYZ">
>>>       <xsd:import namespace="
>>> http://schemas.xmlsoap.org/ws/2003/06/secext"
>>>                       schemaLocation="/ws_security.xsd" />
>>> </xsd:schema>
>>> </wsdl:types>
>>> 
>>> <wsdl:message name="Req">
>>>      <wsdl:part name="KeyVal" element="sec:UsernameToken" />
>>>      <wsdl:part name="RequestBody" element="tns:zzz " />
>>> </wsdl:message>
>>> 
>>> <wsdl:message name="Resp">
>>>       <wsdl:part name="ResponseBody" element="tns:yyy " />
>>> </wsdl:message>
>>> 
>>> <wsdl:portType name="RRR">
>>>       <wsdl:operation name="AAA">
>>>               <wsdl:input message="tns:zzz" />
>>>               <wsdl:output message=" tns:yyy " />
>>>       </wsdl:operation>
>>> </wsdl:portType>
>>> 
>>> <wsdl:binding name="Binding" type=" RRR">
>>>       <soap:binding style="document" transport="
>>> http://schemas.xmlsoap.org/soap/http" />
>>>       <wsdl:operation name="AAA">
>>>               <soap:operation
>>>               soapAction="" />
>>>               <wsdl:input>
>>>                       <soap:header use="literal" part="KeyVal"
>>> message="tns:zzz " />
>>>                       <soap:body   use="literal" parts="RequestBody" />
>>>                </wsdl:input>
>>>               <wsdl:output>
>>>                       <soap:body use="literal" parts="ResponseBody" />
>>>               </wsdl:output>
>>>      </wsdl:operation>
>>> </wsdl:binding>
>>> 
>>> <wsdl:service name="Service">
>>>       <wsdl:port binding="tns: Binding" name=" RRR">
>>>           <soap:address location="http://localhost:8080/ " />
>>>       </wsdl:port>
>>>  </wsdl:service>
>>> 
>>> </wsdl:definitions>
>>> 
>>> My AppContext.xml has following:
>>> 
>>> <jaxws:endpoint id="Service"  implementor="com.service.SOAPService"
>>> address="/myService" >
>>>           <jaxws:properties>
>>>               <entry key="schema-validation-enabled" value="true"/>
>>>          </jaxws:properties>
>>> </jaxws:endpoint>
>>> 
>>> And also wants to remind what I said earlier, Schema validation on input
>>> works perfectly fine when wsse header is removed from WSDL.
>>> 
>>> 
>>> Thanks,
>>> Vishal
>>> -----Original Message-----
>>> From: Mohana Rao S V [mailto:mohanaraosv@gmail.com]
>>> Sent: Tuesday, March 24, 2015 2:45 PM
>>> To: dev@cxf.apache.org
>>> Subject: RE: Schema Validation on input doesn't work
>>> 
>>> Hi Vishal,
>>> 
>>> Could you please share details how are trying to achieve the wsse header
>>> share the configuration and wsdl.
>>> 
>>> Thanks,
>>> Mohan.
>>> 
>>> -----Original Message-----
>>> From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID]
>>> Sent: Wednesday, March 25, 2015 12:07 AM
>>> To: dev@cxf.apache.org
>>> Subject: Schema Validation on input doesn't work
>>> 
>>> Hi All,
>>> 
>>> Any help would do wonders!
>>> 
>>> We have CXF SOAP service using wsdl-first approach.
>>> Schema validation works fine if do not add wsse optional explicit header.
>>> As soon as wsse header added to our wsdl CXF stops validating input
>>> requests.
>>> 
>>> We are using CXF 2.7.3.
>>> Service is deployed on tomcat 7.0.55.
>>> 
>>> What needs to be done to make it working?
>>> 
>>> Thanks,
>>> Vishal
>>> 
>>> 
>>> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Schema Validation on input doesn't work

Posted by Daniel Kulp <dk...@apache.org>.
> On Mar 27, 2015, at 2:09 PM, Balana, Vishal <Vi...@fmr.com.INVALID> wrote:
> 
> Thanks Daniel !
> 
> I have been trying catalog since 2 days now and the file(jax-ws-catalog.xml) which I have placed under META-INF doesn't have any impact.
> Is there any way I could test catalog files effect on codegen plugin?

Something like:
                               <wsdlOption>
                                    <wsdl>${basedir}/src/test/resources/wsdl_systest/soap_fault.wsdl</wsdl>
                                    <catalog>${basedir}/src/test/resources/wsdl_systest/catalog.xml</catalog>
                                </wsdlOption>

should do it.

Dan


> 
> Regards,
> Vishal
> 
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org] 
> Sent: Friday, March 27, 2015 2:05 PM
> To: dev@cxf.apache.org
> Subject: Re: Schema Validation on input doesn't work
> 
> 
>> On Mar 27, 2015, at 12:42 PM, Balana, Vishal <Vi...@fmr.com.INVALID> wrote:
>> 
>> How to pass Proxy Host and Port to wsdl2java(cxf-codegen-plugin) ?
> 
> 
> The normal system properties SHOULD be picked up:
> 
> http.proxyHost
> http.proxyPort
> 
> That said, you’d like be better off downloading any schemas that are unavailable, sticking them in your jar, and creating a catalog for it.
> 
> /META-INF/jax-ws-catalog.xml:
> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
>    <rewriteSystem systemIdStartString="http://www.w3.org/TR/xmldsig-core" rewritePrefix="classpath:/schemas["/>
> </catalog>
> 
> or similar.
> 
> Dan
> 
> 
>> 
>> Regards,
>> Vishal
>> 
>> -----Original Message-----
>> From: Balana, Vishal 
>> Sent: Friday, March 27, 2015 10:12 AM
>> To: 'dev@cxf.apache.org'
>> Subject: RE: Schema Validation on input doesn't work
>> 
>> Any thoughts on following issue?
>> 
>> Regards,
>> Vishal
>> 
>> -----Original Message-----
>> From: Balana, Vishal 
>> Sent: Wednesday, March 25, 2015 10:54 AM
>> To: dev@cxf.apache.org
>> Subject: RE: Schema Validation on input doesn't work
>> 
>> I tried 2.7.15 and now I am able to see WARNING message during server start up:
>> 
>> Failed to parse WSDL
>> javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema): faultCode=PARSER_ERROR: Problem parsing 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd'.: java.net.ConnectException: Connection timed out
>> 
>> I looked at CXF Defect for it and it has been closed due to not Reproducible, no solution?
>> https://issues.apache.org/jira/browse/CXF-1505
>> 
>> Anybody able to get rid of it yet?
>> 
>> Thanks,
>> Vishal
>> 
>> -----Original Message-----
>> From: jasonmpell@gmail.com [mailto:jasonmpell@gmail.com] On Behalf Of Jason Pell
>> Sent: Tuesday, March 24, 2015 3:55 PM
>> To: dev@cxf.apache.org
>> Subject: RE: Schema Validation on input doesn't work
>> 
>> Can you try this on 2.7.15 or 3.0.4?
>> 
>> I don't know why your issue is occurring but a more up to date cxf might
>> have already fixed it.
>> 
>> Would be good to know
>> On 25/03/2015 6:17 AM, "Balana, Vishal" <Vi...@fmr.com.invalid>
>> wrote:
>> 
>>> I am giving example below about how I have added wsse header to wsdl:
>>> 
>>> <wsdl:definitions name = "ABC"
>>> targetNamespace= "XXX"
>>> xmlns:sec="http://schemas.xmlsoap.org/ws/2003/06/secext">
>>> 
>>> <wsdl:types>
>>>   <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>> targetNamespace="XYZ">
>>>       <xsd:import namespace="
>>> http://schemas.xmlsoap.org/ws/2003/06/secext"
>>>                       schemaLocation="/ws_security.xsd" />
>>> </xsd:schema>
>>> </wsdl:types>
>>> 
>>> <wsdl:message name="Req">
>>>      <wsdl:part name="KeyVal" element="sec:UsernameToken" />
>>>      <wsdl:part name="RequestBody" element="tns:zzz " />
>>> </wsdl:message>
>>> 
>>> <wsdl:message name="Resp">
>>>       <wsdl:part name="ResponseBody" element="tns:yyy " />
>>> </wsdl:message>
>>> 
>>> <wsdl:portType name="RRR">
>>>       <wsdl:operation name="AAA">
>>>               <wsdl:input message="tns:zzz" />
>>>               <wsdl:output message=" tns:yyy " />
>>>       </wsdl:operation>
>>> </wsdl:portType>
>>> 
>>> <wsdl:binding name="Binding" type=" RRR">
>>>       <soap:binding style="document" transport="
>>> http://schemas.xmlsoap.org/soap/http" />
>>>       <wsdl:operation name="AAA">
>>>               <soap:operation
>>>               soapAction="" />
>>>               <wsdl:input>
>>>                       <soap:header use="literal" part="KeyVal"
>>> message="tns:zzz " />
>>>                       <soap:body   use="literal" parts="RequestBody" />
>>>                </wsdl:input>
>>>               <wsdl:output>
>>>                       <soap:body use="literal" parts="ResponseBody" />
>>>               </wsdl:output>
>>>      </wsdl:operation>
>>> </wsdl:binding>
>>> 
>>> <wsdl:service name="Service">
>>>       <wsdl:port binding="tns: Binding" name=" RRR">
>>>           <soap:address location="http://localhost:8080/ " />
>>>       </wsdl:port>
>>>  </wsdl:service>
>>> 
>>> </wsdl:definitions>
>>> 
>>> My AppContext.xml has following:
>>> 
>>> <jaxws:endpoint id="Service"  implementor="com.service.SOAPService"
>>> address="/myService" >
>>>           <jaxws:properties>
>>>               <entry key="schema-validation-enabled" value="true"/>
>>>          </jaxws:properties>
>>> </jaxws:endpoint>
>>> 
>>> And also wants to remind what I said earlier, Schema validation on input
>>> works perfectly fine when wsse header is removed from WSDL.
>>> 
>>> 
>>> Thanks,
>>> Vishal
>>> -----Original Message-----
>>> From: Mohana Rao S V [mailto:mohanaraosv@gmail.com]
>>> Sent: Tuesday, March 24, 2015 2:45 PM
>>> To: dev@cxf.apache.org
>>> Subject: RE: Schema Validation on input doesn't work
>>> 
>>> Hi Vishal,
>>> 
>>> Could you please share details how are trying to achieve the wsse header
>>> share the configuration and wsdl.
>>> 
>>> Thanks,
>>> Mohan.
>>> 
>>> -----Original Message-----
>>> From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID]
>>> Sent: Wednesday, March 25, 2015 12:07 AM
>>> To: dev@cxf.apache.org
>>> Subject: Schema Validation on input doesn't work
>>> 
>>> Hi All,
>>> 
>>> Any help would do wonders!
>>> 
>>> We have CXF SOAP service using wsdl-first approach.
>>> Schema validation works fine if do not add wsse optional explicit header.
>>> As soon as wsse header added to our wsdl CXF stops validating input
>>> requests.
>>> 
>>> We are using CXF 2.7.3.
>>> Service is deployed on tomcat 7.0.55.
>>> 
>>> What needs to be done to make it working?
>>> 
>>> Thanks,
>>> Vishal
>>> 
>>> 
>>> 
> 
> -- 
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


RE: Schema Validation on input doesn't work

Posted by "Balana, Vishal" <Vi...@fmr.com.INVALID>.
Thanks Daniel !

I have been trying catalog since 2 days now and the file(jax-ws-catalog.xml) which I have placed under META-INF doesn't have any impact.
Is there any way I could test catalog files effect on codegen plugin?

Regards,
Vishal


-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Friday, March 27, 2015 2:05 PM
To: dev@cxf.apache.org
Subject: Re: Schema Validation on input doesn't work


> On Mar 27, 2015, at 12:42 PM, Balana, Vishal <Vi...@fmr.com.INVALID> wrote:
> 
> How to pass Proxy Host and Port to wsdl2java(cxf-codegen-plugin) ?


The normal system properties SHOULD be picked up:

http.proxyHost
http.proxyPort

That said, you’d like be better off downloading any schemas that are unavailable, sticking them in your jar, and creating a catalog for it.

/META-INF/jax-ws-catalog.xml:
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <rewriteSystem systemIdStartString="http://www.w3.org/TR/xmldsig-core" rewritePrefix="classpath:/schemas["/>
</catalog>

or similar.

Dan


> 
> Regards,
> Vishal
> 
> -----Original Message-----
> From: Balana, Vishal 
> Sent: Friday, March 27, 2015 10:12 AM
> To: 'dev@cxf.apache.org'
> Subject: RE: Schema Validation on input doesn't work
> 
> Any thoughts on following issue?
> 
> Regards,
> Vishal
> 
> -----Original Message-----
> From: Balana, Vishal 
> Sent: Wednesday, March 25, 2015 10:54 AM
> To: dev@cxf.apache.org
> Subject: RE: Schema Validation on input doesn't work
> 
> I tried 2.7.15 and now I am able to see WARNING message during server start up:
> 
> Failed to parse WSDL
> javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema): faultCode=PARSER_ERROR: Problem parsing 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd'.: java.net.ConnectException: Connection timed out
> 
> I looked at CXF Defect for it and it has been closed due to not Reproducible, no solution?
> https://issues.apache.org/jira/browse/CXF-1505
> 
> Anybody able to get rid of it yet?
> 
> Thanks,
> Vishal
> 
> -----Original Message-----
> From: jasonmpell@gmail.com [mailto:jasonmpell@gmail.com] On Behalf Of Jason Pell
> Sent: Tuesday, March 24, 2015 3:55 PM
> To: dev@cxf.apache.org
> Subject: RE: Schema Validation on input doesn't work
> 
> Can you try this on 2.7.15 or 3.0.4?
> 
> I don't know why your issue is occurring but a more up to date cxf might
> have already fixed it.
> 
> Would be good to know
> On 25/03/2015 6:17 AM, "Balana, Vishal" <Vi...@fmr.com.invalid>
> wrote:
> 
>> I am giving example below about how I have added wsse header to wsdl:
>> 
>> <wsdl:definitions name = "ABC"
>>  targetNamespace= "XXX"
>> xmlns:sec="http://schemas.xmlsoap.org/ws/2003/06/secext">
>> 
>> <wsdl:types>
>>    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> targetNamespace="XYZ">
>>        <xsd:import namespace="
>> http://schemas.xmlsoap.org/ws/2003/06/secext"
>>                        schemaLocation="/ws_security.xsd" />
>>  </xsd:schema>
>> </wsdl:types>
>> 
>> <wsdl:message name="Req">
>>       <wsdl:part name="KeyVal" element="sec:UsernameToken" />
>>       <wsdl:part name="RequestBody" element="tns:zzz " />
>>  </wsdl:message>
>> 
>> <wsdl:message name="Resp">
>>        <wsdl:part name="ResponseBody" element="tns:yyy " />
>>  </wsdl:message>
>> 
>> <wsdl:portType name="RRR">
>>        <wsdl:operation name="AAA">
>>                <wsdl:input message="tns:zzz" />
>>                <wsdl:output message=" tns:yyy " />
>>        </wsdl:operation>
>> </wsdl:portType>
>> 
>> <wsdl:binding name="Binding" type=" RRR">
>>        <soap:binding style="document" transport="
>> http://schemas.xmlsoap.org/soap/http" />
>>        <wsdl:operation name="AAA">
>>                <soap:operation
>>                soapAction="" />
>>                <wsdl:input>
>>                        <soap:header use="literal" part="KeyVal"
>> message="tns:zzz " />
>>                        <soap:body   use="literal" parts="RequestBody" />
>>                 </wsdl:input>
>>                <wsdl:output>
>>                        <soap:body use="literal" parts="ResponseBody" />
>>                </wsdl:output>
>>       </wsdl:operation>
>>  </wsdl:binding>
>> 
>> <wsdl:service name="Service">
>>        <wsdl:port binding="tns: Binding" name=" RRR">
>>            <soap:address location="http://localhost:8080/ " />
>>        </wsdl:port>
>>   </wsdl:service>
>> 
>> </wsdl:definitions>
>> 
>> My AppContext.xml has following:
>> 
>> <jaxws:endpoint id="Service"  implementor="com.service.SOAPService"
>> address="/myService" >
>>            <jaxws:properties>
>>                <entry key="schema-validation-enabled" value="true"/>
>>           </jaxws:properties>
>> </jaxws:endpoint>
>> 
>> And also wants to remind what I said earlier, Schema validation on input
>> works perfectly fine when wsse header is removed from WSDL.
>> 
>> 
>> Thanks,
>> Vishal
>> -----Original Message-----
>> From: Mohana Rao S V [mailto:mohanaraosv@gmail.com]
>> Sent: Tuesday, March 24, 2015 2:45 PM
>> To: dev@cxf.apache.org
>> Subject: RE: Schema Validation on input doesn't work
>> 
>> Hi Vishal,
>> 
>>  Could you please share details how are trying to achieve the wsse header
>> share the configuration and wsdl.
>> 
>> Thanks,
>> Mohan.
>> 
>> -----Original Message-----
>> From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID]
>> Sent: Wednesday, March 25, 2015 12:07 AM
>> To: dev@cxf.apache.org
>> Subject: Schema Validation on input doesn't work
>> 
>> Hi All,
>> 
>> Any help would do wonders!
>> 
>> We have CXF SOAP service using wsdl-first approach.
>> Schema validation works fine if do not add wsse optional explicit header.
>> As soon as wsse header added to our wsdl CXF stops validating input
>> requests.
>> 
>> We are using CXF 2.7.3.
>> Service is deployed on tomcat 7.0.55.
>> 
>> What needs to be done to make it working?
>> 
>> Thanks,
>> Vishal
>> 
>> 
>> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Schema Validation on input doesn't work

Posted by Daniel Kulp <dk...@apache.org>.
> On Mar 27, 2015, at 12:42 PM, Balana, Vishal <Vi...@fmr.com.INVALID> wrote:
> 
> How to pass Proxy Host and Port to wsdl2java(cxf-codegen-plugin) ?


The normal system properties SHOULD be picked up:

http.proxyHost
http.proxyPort

That said, you’d like be better off downloading any schemas that are unavailable, sticking them in your jar, and creating a catalog for it.

/META-INF/jax-ws-catalog.xml:
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <rewriteSystem systemIdStartString="http://www.w3.org/TR/xmldsig-core" rewritePrefix="classpath:/schemas["/>
</catalog>

or similar.

Dan


> 
> Regards,
> Vishal
> 
> -----Original Message-----
> From: Balana, Vishal 
> Sent: Friday, March 27, 2015 10:12 AM
> To: 'dev@cxf.apache.org'
> Subject: RE: Schema Validation on input doesn't work
> 
> Any thoughts on following issue?
> 
> Regards,
> Vishal
> 
> -----Original Message-----
> From: Balana, Vishal 
> Sent: Wednesday, March 25, 2015 10:54 AM
> To: dev@cxf.apache.org
> Subject: RE: Schema Validation on input doesn't work
> 
> I tried 2.7.15 and now I am able to see WARNING message during server start up:
> 
> Failed to parse WSDL
> javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema): faultCode=PARSER_ERROR: Problem parsing 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd'.: java.net.ConnectException: Connection timed out
> 
> I looked at CXF Defect for it and it has been closed due to not Reproducible, no solution?
> https://issues.apache.org/jira/browse/CXF-1505
> 
> Anybody able to get rid of it yet?
> 
> Thanks,
> Vishal
> 
> -----Original Message-----
> From: jasonmpell@gmail.com [mailto:jasonmpell@gmail.com] On Behalf Of Jason Pell
> Sent: Tuesday, March 24, 2015 3:55 PM
> To: dev@cxf.apache.org
> Subject: RE: Schema Validation on input doesn't work
> 
> Can you try this on 2.7.15 or 3.0.4?
> 
> I don't know why your issue is occurring but a more up to date cxf might
> have already fixed it.
> 
> Would be good to know
> On 25/03/2015 6:17 AM, "Balana, Vishal" <Vi...@fmr.com.invalid>
> wrote:
> 
>> I am giving example below about how I have added wsse header to wsdl:
>> 
>> <wsdl:definitions name = "ABC"
>>  targetNamespace= "XXX"
>> xmlns:sec="http://schemas.xmlsoap.org/ws/2003/06/secext">
>> 
>> <wsdl:types>
>>    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> targetNamespace="XYZ">
>>        <xsd:import namespace="
>> http://schemas.xmlsoap.org/ws/2003/06/secext"
>>                        schemaLocation="/ws_security.xsd" />
>>  </xsd:schema>
>> </wsdl:types>
>> 
>> <wsdl:message name="Req">
>>       <wsdl:part name="KeyVal" element="sec:UsernameToken" />
>>       <wsdl:part name="RequestBody" element="tns:zzz " />
>>  </wsdl:message>
>> 
>> <wsdl:message name="Resp">
>>        <wsdl:part name="ResponseBody" element="tns:yyy " />
>>  </wsdl:message>
>> 
>> <wsdl:portType name="RRR">
>>        <wsdl:operation name="AAA">
>>                <wsdl:input message="tns:zzz" />
>>                <wsdl:output message=" tns:yyy " />
>>        </wsdl:operation>
>> </wsdl:portType>
>> 
>> <wsdl:binding name="Binding" type=" RRR">
>>        <soap:binding style="document" transport="
>> http://schemas.xmlsoap.org/soap/http" />
>>        <wsdl:operation name="AAA">
>>                <soap:operation
>>                soapAction="" />
>>                <wsdl:input>
>>                        <soap:header use="literal" part="KeyVal"
>> message="tns:zzz " />
>>                        <soap:body   use="literal" parts="RequestBody" />
>>                 </wsdl:input>
>>                <wsdl:output>
>>                        <soap:body use="literal" parts="ResponseBody" />
>>                </wsdl:output>
>>       </wsdl:operation>
>>  </wsdl:binding>
>> 
>> <wsdl:service name="Service">
>>        <wsdl:port binding="tns: Binding" name=" RRR">
>>            <soap:address location="http://localhost:8080/ " />
>>        </wsdl:port>
>>   </wsdl:service>
>> 
>> </wsdl:definitions>
>> 
>> My AppContext.xml has following:
>> 
>> <jaxws:endpoint id="Service"  implementor="com.service.SOAPService"
>> address="/myService" >
>>            <jaxws:properties>
>>                <entry key="schema-validation-enabled" value="true"/>
>>           </jaxws:properties>
>> </jaxws:endpoint>
>> 
>> And also wants to remind what I said earlier, Schema validation on input
>> works perfectly fine when wsse header is removed from WSDL.
>> 
>> 
>> Thanks,
>> Vishal
>> -----Original Message-----
>> From: Mohana Rao S V [mailto:mohanaraosv@gmail.com]
>> Sent: Tuesday, March 24, 2015 2:45 PM
>> To: dev@cxf.apache.org
>> Subject: RE: Schema Validation on input doesn't work
>> 
>> Hi Vishal,
>> 
>>  Could you please share details how are trying to achieve the wsse header
>> share the configuration and wsdl.
>> 
>> Thanks,
>> Mohan.
>> 
>> -----Original Message-----
>> From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID]
>> Sent: Wednesday, March 25, 2015 12:07 AM
>> To: dev@cxf.apache.org
>> Subject: Schema Validation on input doesn't work
>> 
>> Hi All,
>> 
>> Any help would do wonders!
>> 
>> We have CXF SOAP service using wsdl-first approach.
>> Schema validation works fine if do not add wsse optional explicit header.
>> As soon as wsse header added to our wsdl CXF stops validating input
>> requests.
>> 
>> We are using CXF 2.7.3.
>> Service is deployed on tomcat 7.0.55.
>> 
>> What needs to be done to make it working?
>> 
>> Thanks,
>> Vishal
>> 
>> 
>> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


RE: Schema Validation on input doesn't work

Posted by "Balana, Vishal" <Vi...@fmr.com.INVALID>.
How to pass Proxy Host and Port to wsdl2java(cxf-codegen-plugin) ?

Regards,
Vishal

-----Original Message-----
From: Balana, Vishal 
Sent: Friday, March 27, 2015 10:12 AM
To: 'dev@cxf.apache.org'
Subject: RE: Schema Validation on input doesn't work

Any thoughts on following issue?

Regards,
Vishal

-----Original Message-----
From: Balana, Vishal 
Sent: Wednesday, March 25, 2015 10:54 AM
To: dev@cxf.apache.org
Subject: RE: Schema Validation on input doesn't work

I tried 2.7.15 and now I am able to see WARNING message during server start up:

Failed to parse WSDL
javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema): faultCode=PARSER_ERROR: Problem parsing 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd'.: java.net.ConnectException: Connection timed out

I looked at CXF Defect for it and it has been closed due to not Reproducible, no solution?
 https://issues.apache.org/jira/browse/CXF-1505

Anybody able to get rid of it yet?

Thanks,
Vishal

-----Original Message-----
From: jasonmpell@gmail.com [mailto:jasonmpell@gmail.com] On Behalf Of Jason Pell
Sent: Tuesday, March 24, 2015 3:55 PM
To: dev@cxf.apache.org
Subject: RE: Schema Validation on input doesn't work

Can you try this on 2.7.15 or 3.0.4?

I don't know why your issue is occurring but a more up to date cxf might
have already fixed it.

Would be good to know
On 25/03/2015 6:17 AM, "Balana, Vishal" <Vi...@fmr.com.invalid>
wrote:

> I am giving example below about how I have added wsse header to wsdl:
>
> <wsdl:definitions name = "ABC"
>   targetNamespace= "XXX"
>  xmlns:sec="http://schemas.xmlsoap.org/ws/2003/06/secext">
>
> <wsdl:types>
>     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="XYZ">
>         <xsd:import namespace="
> http://schemas.xmlsoap.org/ws/2003/06/secext"
>                         schemaLocation="/ws_security.xsd" />
>   </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="Req">
>        <wsdl:part name="KeyVal" element="sec:UsernameToken" />
>        <wsdl:part name="RequestBody" element="tns:zzz " />
>   </wsdl:message>
>
> <wsdl:message name="Resp">
>         <wsdl:part name="ResponseBody" element="tns:yyy " />
>   </wsdl:message>
>
> <wsdl:portType name="RRR">
>         <wsdl:operation name="AAA">
>                 <wsdl:input message="tns:zzz" />
>                 <wsdl:output message=" tns:yyy " />
>         </wsdl:operation>
> </wsdl:portType>
>
> <wsdl:binding name="Binding" type=" RRR">
>         <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="AAA">
>                 <soap:operation
>                 soapAction="" />
>                 <wsdl:input>
>                         <soap:header use="literal" part="KeyVal"
> message="tns:zzz " />
>                         <soap:body   use="literal" parts="RequestBody" />
>                  </wsdl:input>
>                 <wsdl:output>
>                         <soap:body use="literal" parts="ResponseBody" />
>                 </wsdl:output>
>        </wsdl:operation>
>   </wsdl:binding>
>
> <wsdl:service name="Service">
>         <wsdl:port binding="tns: Binding" name=" RRR">
>             <soap:address location="http://localhost:8080/ " />
>         </wsdl:port>
>    </wsdl:service>
>
> </wsdl:definitions>
>
> My AppContext.xml has following:
>
> <jaxws:endpoint id="Service"  implementor="com.service.SOAPService"
> address="/myService" >
>             <jaxws:properties>
>                 <entry key="schema-validation-enabled" value="true"/>
>            </jaxws:properties>
>  </jaxws:endpoint>
>
> And also wants to remind what I said earlier, Schema validation on input
> works perfectly fine when wsse header is removed from WSDL.
>
>
> Thanks,
> Vishal
> -----Original Message-----
> From: Mohana Rao S V [mailto:mohanaraosv@gmail.com]
> Sent: Tuesday, March 24, 2015 2:45 PM
> To: dev@cxf.apache.org
> Subject: RE: Schema Validation on input doesn't work
>
> Hi Vishal,
>
>   Could you please share details how are trying to achieve the wsse header
> share the configuration and wsdl.
>
> Thanks,
> Mohan.
>
> -----Original Message-----
> From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID]
> Sent: Wednesday, March 25, 2015 12:07 AM
> To: dev@cxf.apache.org
> Subject: Schema Validation on input doesn't work
>
> Hi All,
>
> Any help would do wonders!
>
> We have CXF SOAP service using wsdl-first approach.
> Schema validation works fine if do not add wsse optional explicit header.
> As soon as wsse header added to our wsdl CXF stops validating input
> requests.
>
> We are using CXF 2.7.3.
> Service is deployed on tomcat 7.0.55.
>
> What needs to be done to make it working?
>
> Thanks,
> Vishal
>
>
>

RE: Schema Validation on input doesn't work

Posted by Jason Pell <ja...@pellcorp.com>.
Can you try this on 2.7.15 or 3.0.4?

I don't know why your issue is occurring but a more up to date cxf might
have already fixed it.

Would be good to know
On 25/03/2015 6:17 AM, "Balana, Vishal" <Vi...@fmr.com.invalid>
wrote:

> I am giving example below about how I have added wsse header to wsdl:
>
> <wsdl:definitions name = "ABC"
>   targetNamespace= "XXX"
>  xmlns:sec="http://schemas.xmlsoap.org/ws/2003/06/secext">
>
> <wsdl:types>
>     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="XYZ">
>         <xsd:import namespace="
> http://schemas.xmlsoap.org/ws/2003/06/secext"
>                         schemaLocation="/ws_security.xsd" />
>   </xsd:schema>
> </wsdl:types>
>
> <wsdl:message name="Req">
>        <wsdl:part name="KeyVal" element="sec:UsernameToken" />
>        <wsdl:part name="RequestBody" element="tns:zzz " />
>   </wsdl:message>
>
> <wsdl:message name="Resp">
>         <wsdl:part name="ResponseBody" element="tns:yyy " />
>   </wsdl:message>
>
> <wsdl:portType name="RRR">
>         <wsdl:operation name="AAA">
>                 <wsdl:input message="tns:zzz" />
>                 <wsdl:output message=" tns:yyy " />
>         </wsdl:operation>
> </wsdl:portType>
>
> <wsdl:binding name="Binding" type=" RRR">
>         <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http" />
>         <wsdl:operation name="AAA">
>                 <soap:operation
>                 soapAction="" />
>                 <wsdl:input>
>                         <soap:header use="literal" part="KeyVal"
> message="tns:zzz " />
>                         <soap:body   use="literal" parts="RequestBody" />
>                  </wsdl:input>
>                 <wsdl:output>
>                         <soap:body use="literal" parts="ResponseBody" />
>                 </wsdl:output>
>        </wsdl:operation>
>   </wsdl:binding>
>
> <wsdl:service name="Service">
>         <wsdl:port binding="tns: Binding" name=" RRR">
>             <soap:address location="http://localhost:8080/ " />
>         </wsdl:port>
>    </wsdl:service>
>
> </wsdl:definitions>
>
> My AppContext.xml has following:
>
> <jaxws:endpoint id="Service"  implementor="com.service.SOAPService"
> address="/myService" >
>             <jaxws:properties>
>                 <entry key="schema-validation-enabled" value="true"/>
>            </jaxws:properties>
>  </jaxws:endpoint>
>
> And also wants to remind what I said earlier, Schema validation on input
> works perfectly fine when wsse header is removed from WSDL.
>
>
> Thanks,
> Vishal
> -----Original Message-----
> From: Mohana Rao S V [mailto:mohanaraosv@gmail.com]
> Sent: Tuesday, March 24, 2015 2:45 PM
> To: dev@cxf.apache.org
> Subject: RE: Schema Validation on input doesn't work
>
> Hi Vishal,
>
>   Could you please share details how are trying to achieve the wsse header
> share the configuration and wsdl.
>
> Thanks,
> Mohan.
>
> -----Original Message-----
> From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID]
> Sent: Wednesday, March 25, 2015 12:07 AM
> To: dev@cxf.apache.org
> Subject: Schema Validation on input doesn't work
>
> Hi All,
>
> Any help would do wonders!
>
> We have CXF SOAP service using wsdl-first approach.
> Schema validation works fine if do not add wsse optional explicit header.
> As soon as wsse header added to our wsdl CXF stops validating input
> requests.
>
> We are using CXF 2.7.3.
> Service is deployed on tomcat 7.0.55.
>
> What needs to be done to make it working?
>
> Thanks,
> Vishal
>
>
>

RE: Schema Validation on input doesn't work

Posted by "Balana, Vishal" <Vi...@fmr.com.INVALID>.
I am giving example below about how I have added wsse header to wsdl:

<wsdl:definitions name = "ABC"
  targetNamespace= "XXX"
 xmlns:sec="http://schemas.xmlsoap.org/ws/2003/06/secext">

<wsdl:types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="XYZ">    
	<xsd:import namespace="http://schemas.xmlsoap.org/ws/2003/06/secext"
    			schemaLocation="/ws_security.xsd" />
  </xsd:schema>
</wsdl:types>

<wsdl:message name="Req">
       <wsdl:part name="KeyVal" element="sec:UsernameToken" /> 
       <wsdl:part name="RequestBody" element="tns:zzz " />
  </wsdl:message>

<wsdl:message name="Resp">
        <wsdl:part name="ResponseBody" element="tns:yyy " />
  </wsdl:message>

<wsdl:portType name="RRR">
  	<wsdl:operation name="AAA">
        	<wsdl:input message="tns:zzz" />
          	<wsdl:output message=" tns:yyy " />          	
        </wsdl:operation>        
</wsdl:portType>

<wsdl:binding name="Binding" type=" RRR">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="AAA"> 
        	<soap:operation
  		soapAction="" />       
            	<wsdl:input>                	
                 	<soap:header use="literal" part="KeyVal"  message="tns:zzz " />                	 
                	<soap:body   use="literal" parts="RequestBody" />
           	 </wsdl:input>
            	<wsdl:output>
                	<soap:body use="literal" parts="ResponseBody" />
            	</wsdl:output>            	
       </wsdl:operation>
  </wsdl:binding>

<wsdl:service name="Service">
        <wsdl:port binding="tns: Binding" name=" RRR">
            <soap:address location="http://localhost:8080/ " />
        </wsdl:port>
   </wsdl:service>
      
</wsdl:definitions>

My AppContext.xml has following:

<jaxws:endpoint id="Service"  implementor="com.service.SOAPService" address="/myService" > 
	    <jaxws:properties>
	       	<entry key="schema-validation-enabled" value="true"/>
	   </jaxws:properties>
 </jaxws:endpoint>

And also wants to remind what I said earlier, Schema validation on input works perfectly fine when wsse header is removed from WSDL.


Thanks,
Vishal
-----Original Message-----
From: Mohana Rao S V [mailto:mohanaraosv@gmail.com] 
Sent: Tuesday, March 24, 2015 2:45 PM
To: dev@cxf.apache.org
Subject: RE: Schema Validation on input doesn't work

Hi Vishal,

  Could you please share details how are trying to achieve the wsse header
share the configuration and wsdl.

Thanks,
Mohan.

-----Original Message-----
From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID] 
Sent: Wednesday, March 25, 2015 12:07 AM
To: dev@cxf.apache.org
Subject: Schema Validation on input doesn't work

Hi All,

Any help would do wonders!

We have CXF SOAP service using wsdl-first approach.
Schema validation works fine if do not add wsse optional explicit header.
As soon as wsse header added to our wsdl CXF stops validating input
requests.

We are using CXF 2.7.3.
Service is deployed on tomcat 7.0.55.

What needs to be done to make it working?

Thanks,
Vishal



RE: Schema Validation on input doesn't work

Posted by Mohana Rao S V <mo...@gmail.com>.
Hi Vishal,

  Could you please share details how are trying to achieve the wsse header
share the configuration and wsdl.

Thanks,
Mohan.

-----Original Message-----
From: Balana, Vishal [mailto:Vishal.Balana@fmr.com.INVALID] 
Sent: Wednesday, March 25, 2015 12:07 AM
To: dev@cxf.apache.org
Subject: Schema Validation on input doesn't work

Hi All,

Any help would do wonders!

We have CXF SOAP service using wsdl-first approach.
Schema validation works fine if do not add wsse optional explicit header.
As soon as wsse header added to our wsdl CXF stops validating input
requests.

We are using CXF 2.7.3.
Service is deployed on tomcat 7.0.55.

What needs to be done to make it working?

Thanks,
Vishal