-
1. Re: JBossWS CXF DataHandler Inputstream empty
ckulenk Oct 7, 2013 4:12 AM (in response to slbanal)Hi,
we have a similar problem at the moment (currently investigating). Maybe it is related to this bug: https://issues.apache.org/jira/browse/CXF-4551
Kind regards,
Christian
-
2. Re: JBossWS CXF DataHandler Inputstream empty
mgorgon Aug 23, 2016 5:32 AM (in response to ckulenk)Hi,
This bug still exists - verified at CXF 3.1.7. -
3. Re: JBossWS CXF DataHandler Inputstream empty
jim.ma Aug 23, 2016 10:55 PM (in response to mgorgon)There are some tests are added for this issue [CXF-4551] MTOM + SchemaValidation results in empty input stream from data handler - ASF JIRA in cxf and one of them is
systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java. I saw this is in cxf 3.1.7 too: https://github.com/apache/cxf/blob/cxf-3.1.7/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java#L122
Can you please explain it more about the bug you met ? Is it the same issue with the CXF-4551?
-
4. Re: JBossWS CXF DataHandler Inputstream empty
mgorgon Aug 24, 2016 11:42 AM (in response to jim.ma)It seems like these tests checks XOP with schema validation at client side, but not at the endpoint side, nor content of stream at endpoint side is tested.
Here are few details:
- webservice is exposed via spring in tomcat,
- MTOM is enabled at endpoint by @MTOM(enabled = true)
- schema validation enabled at endpoint by @SchemaValidation(type = SchemaValidationType.BOTH)
- service build with wsdl first
- jaxws21 frontent (no Holders)
- logging interceptors and WS-Security doesn't make difrerence.
Just open cxf/EchoService.java at cxf-3.1.7 · apache/cxf · GitHub and add @SchemaValidation(type = SchemaValidationType.BOTH) annotation and run cxf/MtomServerTest.java at cxf-3.1.7 · apache/cxf · GitHub
testMtomRequest will fail with:
java.lang.AssertionError: expected:<27364> but was:<0>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at org.apache.cxf.systest.mtom.MtomServerTest.testMtomRequest(MtomServerTest.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)