[ 
http://jira.codehaus.org/browse/XFIRE-855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88742
 ] 

Frank Grupe commented on XFIRE-855:
-----------------------------------

Hi Tomasz,

I don't have an XFire build environment, just working with the binaries, so I 
have attached a simple testcase containing the XSD for JAXB generation, the 
services.xml with the validation enabled and a simple WebService implementation.
I have tested the WebService with the Eclipse build-in WebService Explorer and 
when I pass an invalid SOAP Message e.g. with a missing parameter like:

<?xml version="1.0" encoding="UTF-8" ?> 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:q0="http://www.test.de"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <q0:Test />
 </soapenv:Body>
</soapenv:Envelope>

The service returns a fault missing the actual validation Exeption:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soap:Body>
  <soap:Fault>
   <faultcode>soap:Server</faultcode> 
   <faultstring>Could not unmarshall type.</faultstring> 
  </soap:Fault>
 </soap:Body>
</soap:Envelope>


Whereas I would expect something like this, which I only see in the server log. 
But the client side should see this detailed fault message to be able to 
correct it I think:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soap:Body>
  <soap:Fault>
   <faultcode>soap:Server</faultcode> 
   <faultstring>Could not unmarshall type.: org.xml.sax.SAXParseException: 
cvc-complex-type.2.4.b: The content of element 'q0:Test' is not complete. One 
of '{"":teststring}' is expected.</faultstring> 
  </soap:Fault>
 </soap:Body>
</soap:Envelope>

> Schema validation in JAXB does not return validation errors to the client #2
> ----------------------------------------------------------------------------
>
>                 Key: XFIRE-855
>                 URL: http://jira.codehaus.org/browse/XFIRE-855
>             Project: XFire
>          Issue Type: Improvement
>          Components: JAXB 2.0
>    Affects Versions: 1.2.4
>            Reporter: Frank Grupe
>         Assigned To: Tomasz Sztelak
>            Priority: Minor
>         Attachments: services.xml, TestWebService.java, TestWebService.xsd
>
>
> Hi,
> this Issue should be a reopen for XFIRE-771. Perhaps there has happend a 
> mistake when checking in the fix for that one?
> Because I get the same problem as described there in version 1.2.4: 
> Instead of information about the nested validation Exception there appears 
> only the "Unmarshal" Exception at the client side when a validation error 
> occurs:
> <soap:Fault>
> <faultcode>soap:Server</faultcode> 
> <faultstring>Could not unmarshall type.</faultstring> 
> </soap:Fault>
> I'd also prefer to see something like this instead, so that the caller can 
> react himself:
> <soap:Fault>
> <faultcode>soap:Server</faultcode> 
> <faultstring>org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid 
> content was found starting with element 'width'. One of '{"":length}' is 
> expected.</faultstring> 
> </soap:Fault>
> Could you please check what went wrong?
> Thanks,
> Frank

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to