You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "jmi (JIRA)" <ji...@apache.org> on 2008/04/27 00:52:55 UTC
[jira] Created: (CXF-1551) validation against XML schema - leads to
invalid soap response
validation against XML schema - leads to invalid soap response
--------------------------------------------------------------
Key: CXF-1551
URL: https://issues.apache.org/jira/browse/CXF-1551
Project: CXF
Issue Type: Bug
Components: JAXB Databinding
Affects Versions: 2.1
Reporter: jmi
when XML schema validation is enabled, and mandatory element is missing (probably the same for any other error) in CXF-generated response, then response is invalid in some cases.
E.g. such response is generated from modified wsdl_first sample:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><sayHiResponse xmlns="http://apache.org/hello_world_soap_http/types"><responseType>Executing operation sayHi1</responseType><responseType2><responseType>THIS IS IMPORTANT .. VERY LONG TEXT ..SOMETHING WILL BE flushed probably and that's why cannot be removed later when fault should replace content ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................<soap:Fault><faultcode>soap:Server</faultcode><faultstring>Marshalli
ng Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'responseType2'. One of '{"http://apache.org/hello_world_soap_http/types":responseType}' is expected.</faultstring></soap:Fault></soap:Body></soap:Envelope>
in attachment you can find modified sample I used to show the bug in simple enough project. Just do "ant server" and then invoke sayHi from soapUi or other tool, You should see response listed above.
Dans comment from mailing list:
Basically, fixing this will require breaking the streaming. Most likely,
if validation is turned on, we'll need to buffer the message to a cached
stream, and if that doesn't result in a error, then flush the buffer to
the real output stream. That will be a little bit slower, but would fix
this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-1551) validation against XML schema - leads to
invalid soap response
Posted by "jmi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jmi updated CXF-1551:
---------------------
Component/s: (was: JAXB Databinding)
Description:
when XML schema validation is enabled, and mandatory element is missing (probably the same for any other error) in CXF-generated response, then response is invalid in some cases.
E.g. such response is generated from modified wsdl_first sample:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><sayHiResponse xmlns="http://apache.org/hello_world_soap_http/types"><responseType>Executing operation sayHi1</responseType><responseType2><responseType>THIS IS IMPORTANT .. VERY LONG TEXT ..SOMETHING WILL BE flushed probably and that's why cannot be removed later when fault should replace content ........................................................................................................................................................................................................................................................ ................................................................................................................................................................................................... ................................................................................................................................................................................................... .................................................................................................................................................................................. .................................................................................................................... ........................................................................................................................................................................................................................................................ .......................................................................................................................................................................................... ....................................................................................................................... .......................................................................................................................... .............................................................................................................................................................................................. ............................................................................................................................................. ............................................................................................................................................................................................................................... ....................................................................................................................................................................................................................................................................................................................................................................................................................................................... ................................................................................................................................................ .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... .............................................. ........................................................... ............................................................................................... ........................................................................................................................... .................................<soap:Fault><faultcode>soap:Server</faultcode><faultstring>Marshalli
ng Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'responseType2'. One of '{"http://apache.org/hello_world_soap_http/types":responseType}' is expected.</faultstring></soap:Fault></soap:Body></soap:Envelope>
in attachment you can find modified sample I used to show the bug in simple enough project. Just do "ant server" and then invoke sayHi from soapUi or other tool, You should see response listed above.
Dans comment from mailing list:
Basically, fixing this will require breaking the streaming. Most likely,
if validation is turned on, we'll need to buffer the message to a cached
stream, and if that doesn't result in a error, then flush the buffer to
the real output stream. That will be a little bit slower, but would fix
this issue.
was:
when XML schema validation is enabled, and mandatory element is missing (probably the same for any other error) in CXF-generated response, then response is invalid in some cases.
E.g. such response is generated from modified wsdl_first sample:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><sayHiResponse xmlns="http://apache.org/hello_world_soap_http/types"><responseType>Executing operation sayHi1</responseType><responseType2><responseType>THIS IS IMPORTANT .. VERY LONG TEXT ..SOMETHING WILL BE flushed probably and that's why cannot be removed later when fault should replace content ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................<soap:Fault><faultcode>soap:Server</faultcode><faultstring>Marshalli
ng Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'responseType2'. One of '{"http://apache.org/hello_world_soap_http/types":responseType}' is expected.</faultstring></soap:Fault></soap:Body></soap:Envelope>
in attachment you can find modified sample I used to show the bug in simple enough project. Just do "ant server" and then invoke sayHi from soapUi or other tool, You should see response listed above.
Dans comment from mailing list:
Basically, fixing this will require breaking the streaming. Most likely,
if validation is turned on, we'll need to buffer the message to a cached
stream, and if that doesn't result in a error, then flush the buffer to
the real output stream. That will be a little bit slower, but would fix
this issue.
changed component, because this is probably more general problem in handling exceptions during writing response.
> validation against XML schema - leads to invalid soap response
> --------------------------------------------------------------
>
> Key: CXF-1551
> URL: https://issues.apache.org/jira/browse/CXF-1551
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1
> Reporter: jmi
> Attachments: wsdl_first.rar
>
>
> when XML schema validation is enabled, and mandatory element is missing (probably the same for any other error) in CXF-generated response, then response is invalid in some cases.
> E.g. such response is generated from modified wsdl_first sample:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><sayHiResponse xmlns="http://apache.org/hello_world_soap_http/types"><responseType>Executing operation sayHi1</responseType><responseType2><responseType>THIS IS IMPORTANT .. VERY LONG TEXT ..SOMETHING WILL BE flushed probably and that's why cannot be removed later when fault should replace content ........................................................................................................................................................................................................................................................ ................................................................................................................................................................................................... ................................................................................................................................................................................................... .................................................................................................................................................................................. .................................................................................................................... ........................................................................................................................................................................................................................................................ .......................................................................................................................................................................................... ....................................................................................................................... .......................................................................................................................... .............................................................................................................................................................................................. ............................................................................................................................................. ............................................................................................................................................................................................................................... ....................................................................................................................................................................................................................................................................................................................................................................................................................................................... ................................................................................................................................................ .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... .............................................. ........................................................... ............................................................................................... ........................................................................................................................... .................................<soap:Fault><faultcode>soap:Server</faultcode><faultstring>Marshalli
> ng Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'responseType2'. One of '{"http://apache.org/hello_world_soap_http/types":responseType}' is expected.</faultstring></soap:Fault></soap:Body></soap:Envelope>
> in attachment you can find modified sample I used to show the bug in simple enough project. Just do "ant server" and then invoke sayHi from soapUi or other tool, You should see response listed above.
> Dans comment from mailing list:
> Basically, fixing this will require breaking the streaming. Most likely,
> if validation is turned on, we'll need to buffer the message to a cached
> stream, and if that doesn't result in a error, then flush the buffer to
> the real output stream. That will be a little bit slower, but would fix
> this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-1551) validation against XML schema - leads
to invalid soap response
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-1551.
------------------------------
Resolution: Fixed
Fix Version/s: 2.0.7
2.1.1
Resolved on trunk and new snapshot deployed. I'd appreciate a couple folks double checking it doesn't break things and actually works.
> validation against XML schema - leads to invalid soap response
> --------------------------------------------------------------
>
> Key: CXF-1551
> URL: https://issues.apache.org/jira/browse/CXF-1551
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1
> Reporter: jmi
> Assignee: Daniel Kulp
> Fix For: 2.1.1, 2.0.7
>
> Attachments: wsdl_first.rar
>
>
> when XML schema validation is enabled, and mandatory element is missing (probably the same for any other error) in CXF-generated response, then response is invalid in some cases.
> E.g. such response is generated from modified wsdl_first sample:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><sayHiResponse xmlns="http://apache.org/hello_world_soap_http/types"><responseType>Executing operation sayHi1</responseType><responseType2><responseType>THIS IS IMPORTANT .. VERY LONG TEXT ..SOMETHING WILL BE flushed probably and that's why cannot be removed later when fault should replace content ........................................................................................................................................................................................................................................................ ................................................................................................................................................................................................... ................................................................................................................................................................................................... .................................................................................................................................................................................. .................................................................................................................... ........................................................................................................................................................................................................................................................ .......................................................................................................................................................................................... ....................................................................................................................... .......................................................................................................................... .............................................................................................................................................................................................. ............................................................................................................................................. ............................................................................................................................................................................................................................... ....................................................................................................................................................................................................................................................................................................................................................................................................................................................... ................................................................................................................................................ .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... .............................................. ........................................................... ............................................................................................... ........................................................................................................................... .................................<soap:Fault><faultcode>soap:Server</faultcode><faultstring>Marshalli
> ng Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'responseType2'. One of '{"http://apache.org/hello_world_soap_http/types":responseType}' is expected.</faultstring></soap:Fault></soap:Body></soap:Envelope>
> in attachment you can find modified sample I used to show the bug in simple enough project. Just do "ant server" and then invoke sayHi from soapUi or other tool, You should see response listed above.
> Dans comment from mailing list:
> Basically, fixing this will require breaking the streaming. Most likely,
> if validation is turned on, we'll need to buffer the message to a cached
> stream, and if that doesn't result in a error, then flush the buffer to
> the real output stream. That will be a little bit slower, but would fix
> this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-1551) validation against XML schema - leads to
invalid soap response
Posted by "jmi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jmi updated CXF-1551:
---------------------
Attachment: wsdl_first.rar
sample which shows the bug
> validation against XML schema - leads to invalid soap response
> --------------------------------------------------------------
>
> Key: CXF-1551
> URL: https://issues.apache.org/jira/browse/CXF-1551
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.1
> Reporter: jmi
> Attachments: wsdl_first.rar
>
>
> when XML schema validation is enabled, and mandatory element is missing (probably the same for any other error) in CXF-generated response, then response is invalid in some cases.
> E.g. such response is generated from modified wsdl_first sample:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><sayHiResponse xmlns="http://apache.org/hello_world_soap_http/types"><responseType>Executing operation sayHi1</responseType><responseType2><responseType>THIS IS IMPORTANT .. VERY LONG TEXT ..SOMETHING WILL BE flushed probably and that's why cannot be removed later when fault should replace content ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................<soap:Fault><faultcode>soap:Server</faultcode><faultstring>Marshalli
> ng Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'responseType2'. One of '{"http://apache.org/hello_world_soap_http/types":responseType}' is expected.</faultstring></soap:Fault></soap:Body></soap:Envelope>
> in attachment you can find modified sample I used to show the bug in simple enough project. Just do "ant server" and then invoke sayHi from soapUi or other tool, You should see response listed above.
> Dans comment from mailing list:
> Basically, fixing this will require breaking the streaming. Most likely,
> if validation is turned on, we'll need to buffer the message to a cached
> stream, and if that doesn't result in a error, then flush the buffer to
> the real output stream. That will be a little bit slower, but would fix
> this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CXF-1551) validation against XML schema - leads
to invalid soap response
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp reassigned CXF-1551:
--------------------------------
Assignee: Daniel Kulp
> validation against XML schema - leads to invalid soap response
> --------------------------------------------------------------
>
> Key: CXF-1551
> URL: https://issues.apache.org/jira/browse/CXF-1551
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1
> Reporter: jmi
> Assignee: Daniel Kulp
> Attachments: wsdl_first.rar
>
>
> when XML schema validation is enabled, and mandatory element is missing (probably the same for any other error) in CXF-generated response, then response is invalid in some cases.
> E.g. such response is generated from modified wsdl_first sample:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><sayHiResponse xmlns="http://apache.org/hello_world_soap_http/types"><responseType>Executing operation sayHi1</responseType><responseType2><responseType>THIS IS IMPORTANT .. VERY LONG TEXT ..SOMETHING WILL BE flushed probably and that's why cannot be removed later when fault should replace content ........................................................................................................................................................................................................................................................ ................................................................................................................................................................................................... ................................................................................................................................................................................................... .................................................................................................................................................................................. .................................................................................................................... ........................................................................................................................................................................................................................................................ .......................................................................................................................................................................................... ....................................................................................................................... .......................................................................................................................... .............................................................................................................................................................................................. ............................................................................................................................................. ............................................................................................................................................................................................................................... ....................................................................................................................................................................................................................................................................................................................................................................................................................................................... ................................................................................................................................................ .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... .............................................. ........................................................... ............................................................................................... ........................................................................................................................... .................................<soap:Fault><faultcode>soap:Server</faultcode><faultstring>Marshalli
> ng Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'responseType2'. One of '{"http://apache.org/hello_world_soap_http/types":responseType}' is expected.</faultstring></soap:Fault></soap:Body></soap:Envelope>
> in attachment you can find modified sample I used to show the bug in simple enough project. Just do "ant server" and then invoke sayHi from soapUi or other tool, You should see response listed above.
> Dans comment from mailing list:
> Basically, fixing this will require breaking the streaming. Most likely,
> if validation is turned on, we'll need to buffer the message to a cached
> stream, and if that doesn't result in a error, then flush the buffer to
> the real output stream. That will be a little bit slower, but would fix
> this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.