[
https://issues.apache.org/jira/browse/CXF-5765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthew Bond updated CXF-5765:
------------------------------
Description:
Webservice response validation fails when using CXF Schema Validation
(cxf-beans.xml: ... <entry key="schema-validation-enabled" value="true" /> )
Response is
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Marshalling Error: UndeclaredPrefix: Cannot resolve
'ns1:StatusCodeTyp' as a QName: the prefix 'ns1' is not declared.</faultstring>
</soap:Fault>
Reproducible with:
Sample Minimal WSDL:
https://github.com/mattbond/PaperTest1/blob/master/WebContent/wsdl/paper.wsdl
Sample Eclipse Project on GitHub: https://github.com/mattbond/PaperTest1.git
Request, Responses (with and without validation) and console Logs available
here:
https://github.com/mattbond/PaperTest1/tree/master/Request
Environment:
CXF 3.0.0
JDK 1.7.0_45
Tomcat 7.0
Eclipse Version: Kepler Service Release 1
was:
Webservice response is invalid according to the CXF Schema Validation
(cxf-beans.xml: <jaxws:properties><entry key="schema-validation-enabled"
value="true" /></jaxws:properties>)
WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="pageService" targetNamespace="http://paper.bitapp.de/page"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://paper.bitapp.de/page"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://paper.bitapp.de/page"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="StatusCodeTyp">
<sequence>
<element name="Code" type="int"/>
<element name="Message"
type="normalizedString"/>
</sequence>
</complexType>
</schema>
</types>
<message name="PingRequest">
<part name="Status" type="tns:StatusCodeTyp">
</part>
</message>
<message name="PingResponse">
<part name="Status" type="tns:StatusCodeTyp">
</part>
</message>
<portType name="pageServicePortType">
<operation name="Ping">
<input message="tns:PingRequest">
</input>
<output message="tns:PingResponse">
</output>
</operation>
</portType>
<binding name="pageServiceBinding" type="tns:pageServicePortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="Ping">
<soap:operation soapAction="Ping" style="rpc"/>
<input>
<soap:body use="literal" namespace="http://paper.bitapp.de/page"/>
</input>
<output>
<soap:body use="literal" namespace="http://paper.bitapp.de/page"/>
</output>
</operation>
</binding>
<service name="pageService">
<port name="pageServicePort" binding="tns:pageServiceBinding">
<soap:address
location="http://localhost:8080/PaperTest1/services/pageServicePort"/>
</port>
</service>
</definitions>
> Response is invalid
> -------------------
>
> Key: CXF-5765
> URL: https://issues.apache.org/jira/browse/CXF-5765
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.7.11, 3.0.0
> Environment: Web Service (Server) generated with wsdl2java OR with
> the JEE-Eclipse Web Service Wizard
> Reporter: Matthew Bond
>
> Webservice response validation fails when using CXF Schema Validation
> (cxf-beans.xml: ... <entry key="schema-validation-enabled" value="true" /> )
> Response is
> <soap:Fault>
> <faultcode>soap:Server</faultcode>
> <faultstring>Marshalling Error: UndeclaredPrefix: Cannot resolve
> 'ns1:StatusCodeTyp' as a QName: the prefix 'ns1' is not
> declared.</faultstring>
> </soap:Fault>
> Reproducible with:
> Sample Minimal WSDL:
> https://github.com/mattbond/PaperTest1/blob/master/WebContent/wsdl/paper.wsdl
> Sample Eclipse Project on GitHub: https://github.com/mattbond/PaperTest1.git
> Request, Responses (with and without validation) and console Logs available
> here:
> https://github.com/mattbond/PaperTest1/tree/master/Request
> Environment:
> CXF 3.0.0
> JDK 1.7.0_45
> Tomcat 7.0
> Eclipse Version: Kepler Service Release 1
--
This message was sent by Atlassian JIRA
(v6.2#6252)