[
https://issues.apache.org/jira/browse/CXF-5773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp resolved CXF-5773.
------------------------------
Resolution: Workaround
Assignee: Daniel Kulp
Fix Version/s: Invalid
This is not something we can fix as JAXB does not provide methods to be able to
resolve this directly. HOWEVER, if you generated the object model from the
schema using a jaxb binding file that forces the generation of types for the
simple types (instead of mapping to String), then this works as JAXB has the
information it needs.
{code:xml}
<jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" wsdlLocation="">
<jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema">
<jaxb:globalBindings mapSimpleTypeDef="true">
</jaxb:globalBindings>
</jaxws:bindings>
</jaxws:bindings>
{code}
> Request Validation failed for Request with SimpleType parts
> -----------------------------------------------------------
>
> Key: CXF-5773
> URL: https://issues.apache.org/jira/browse/CXF-5773
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.7.11, 3.0, 3.0.1
> Environment: Environment:
> CXF 3.0.0
> JDK 1.7.0_45
> Tomcat 7.0
> Eclipse Version: Kepler Service Release 1
> Web Service (Server) generated with wsdl2java OR with the JEE-Eclipse Web
> Service Wizard
> Reporter: Matthew Bond
> Assignee: Daniel Kulp
> Fix For: Invalid
>
>
> Webservice request validation fails when using CXF Schema Validation
> (cxf-beans.xml: ... <entry key="schema-validation-enabled" value="true" /> )
> Only happens for the parts of the operation that are simpleType. Parts which
> are complexTypes work fine.
> Response is
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <soap:Fault>
> <faultcode>soap:Client</faultcode>
> <faultstring>Unmarshalling Error: unrecognized type name:
> {http://paper.bitapp.de/page}MySimpleType. Did you mean
> {http://paper.bitapp.de/page}StatusCodeTyp?</faultstring>
> </soap:Fault>
> </soap:Body>
> </soap:Envelope>
> Reproducible with:
> Sample Minimal WSDL:
> https://github.com/mattbond/PaperTest2/blob/master/WebContent/wsdl/paper2.wsdl
> Sample Eclipse Project on GitHub: https://github.com/mattbond/PaperTest2.git
> Request, Responses (with and without validation) and console Logs available
> here: https://github.com/mattbond/PaperTest2/tree/master/Request
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)