[
http://jira.jboss.com/jira/browse/JBESB-1528?page=com.atlassian.jira.plug...
]
Jiri Pechanec commented on JBESB-1528:
--------------------------------------
Hi,
these are my results. This is the message before it comes to SOAPProcessor
08:15:17,961 INFO [STDOUT] [<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:ns1='http://org.jboss.ws/xop/doclit'><dataHandler
content-type='application/octet-stream'>UEsDBBQAAAAIAMBEQTjYe1ZigAEAAPECAAAJABUAYnVpbGQueG1sVVQJAANYzKJHytyiR1V4BAD0
AfQBbVLLasMwEDwnX7ERgULA0g84gT4hl5aeegyyvG7VypIryUlDyL93LTtpHCrwQWJmdmbWeePd
J6oIVta4ZK+tVl8hSh83OywC+q1WuKmjqxmUWMnWxCUrsTFuz6CQAUvtl4yz1XQyneQlBuV1E7Wz
K5hOJvODtJEPE3g34ZhejbbIAzbSy+g8veXikkqYTm2WZbCuG+cjxA9M0+DWRihabUro4ZxzyDJi
5LpHVtpQDM6FcrYSHSdLeP5TGyY6m0Anp4TveAr9fQ6dhQaVrrTKZAhYF0ZjoGwwnGTpZYve6xIt
VN7Vydqg5qp0CySalEFbGDvozY7k7qUxWEKxT9xzt70kB3hw9iaCIhRQ19Sj2c9mSWasc5da6TT+
Fndq5wzcSQ/09SUlV+KfHXGCsDMpHdIk+0s2PwxLPwoCCY/BtV5hEG+Pd9n6+UkQMFW9GvHzbmKg
itLvciWy1bi7wieOtsq0JQ5LWizEolvgCCIG3YuInWR/zUVfIjWViyHgavoLUEsDBBQAAAAIAIs8
QTgiKFGMfgAAAEEBAAAOABUAZGVwbG95bWVudC54bWxVVAkAA+W9okcu16JHVXgEAPQB9AG90E0O
AiEMBeC9p/AAyuwnMHfwBASGt0CljLRo5vbiX9jo1i5fvual1UefmcF+H7Cc85pAMm22bXQLQIGn
p1CNjJ0Yzm55ZHr4sB9L6lLjfGJxRVQASyQnMdPIKNc4wxwqKnbkEkyX9gb/BjZJTvavTba0O9dX
Sy/Vw9dX3Q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hOrK2vjNhV81wPRzdD91lzS1TaVEpK8TPEbpRlSJEgnTB6UKD
k0lLnq2RkcjMOBpE17iVuc6epRpcdgS+w8Hm3iGoefgGsN4ooKrJUXyy5SfV3tTehhiGEkDmdDWa
KU4TmKtu1d7jQtrLczuMPIB756ztVEfleZhmV0XvlBnQei6PFW9vHJxCwfR5MZ9IBSWxjGrtBrNe
SFpSH8Tru2h+tIZs+UPllIkjo1MnAHEUXJm1S+Em6b0x3pySZkt4/fPx6BjZDcjVLzS04ZDFjFJR
ykW1emvAbxp2cVJIwLdPlaXLFvIRK/XWe46uElqYqkcf8gLfhR/dXz08KAlToKU6kRyH2mtQb3io
5mHwD0qxDaaT0+r4j/pbQ/7b9p6d7bJgYFlH5jSNj+CtA2FdDmbuYLYC4upoFmRrHwbN33Sv8xtQ
SwECFwMUAAAACADAREE42HtWYoABAADxAgAACQANAAAAAAABAAAApIEAAAAAYnVpbGQueG1sVVQF
AANYzKJHVXgAAFBLAQIXAxQAAAAIAIs8QTgiKFGMfgAAAEEBAAAOAA0AAAAAAAEAAACkgbwBAABk
ZXBsb3ltZW50LnhtbFVUBQAD5b2iR1V4AABQSwECFwMUAAAACACLPEE45ZbQafsAAABGAwAAFQAN
AAAAAAABAAAApIF7AgAAamJtLXF1ZXVlLXNlcnZpY2UueG1sVVQFAAPlvaJHVXgAAFBLAQIXAxQA
AAAIAIs8QThtw9dT6AIAAD8IAAANAA0AAAAAAAEAAACkgb4DAABqYm9zcy1lc2IueG1sVVQFAAPl
vaJHVXgAAFBLBQYAAAAABAAEACUBAADmBgAAAAA=</dataHandler></ns1:echoData></env:Body></env:Envelope>].
This is the message how it looks after SOAPProcessor
08:15:18,350 INFO [STDOUT] [<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:ns1="http://org.jboss.ws/xop/doclit"><dataHandler><xop:Include
xmlns:xop="http://www.w3.org/2004/08/xop/include"
href="cid:dataHandler-598e6fff-a401-4b61-a466-9fb39bb36a35@ws.jboss.org"/></dataHandler></ns1:echoDataResponse></env:Body></env:Envelope>].
And this is client error - apparently due to missing attachment
[testng] org.jboss.ws.WSException: Failed to inline XOP data
[testng] at
org.jboss.ws.extensions.xop.XOPContext.replaceXOPInclude(XOPContext.java:341)
[testng] at
org.jboss.ws.extensions.xop.XOPContext.inlineXOPData(XOPContext.java:177)
[testng] at
org.jboss.ws.core.soap.XMLContent.expandContainerChildren(XMLContent.java:335)
[testng] at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:106)
[testng] at
org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
[testng] at
org.jboss.ws.core.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:501)
[testng] at
org.jboss.ws.core.soap.SOAPContentElement.getChildNodes(SOAPContentElement.java:452)
[testng] at
org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.MTOMProtocolHandler.scanNodes(MTOMProtocolHandler.java:90)
[testng] at
org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.MTOMProtocolHandler.verifyXOPPackage(MTOMProtocolHandler.java:64)
[testng] at
org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.MTOMProtocolHandler.handleInbound(MTOMProtocolHandler.java:53)
[testng] at
org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
[testng] at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
[testng] at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
[testng] at
org.jboss.ws.core.jaxws.client.ClientImpl.callResponseHandlerChain(ClientImpl.java:168)
[testng] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:374)
[testng] at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
[testng] at
org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
[testng] at
org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
[testng] at $Proxy16.echoData(Unknown Source)
[testng] at
org.jboss.soa.esb.samples.quickstart.webservice_mtom.WSAttachmentTest.testWSAttachmentDataHandler(WSAttachmentTest.java:72)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[testng] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[testng] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[testng] at java.lang.reflect.Method.invoke(Method.java:585)
[testng] at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
[testng] at
org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:36)
[testng] at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
[testng] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
[testng] at java.util.concurrent.FutureTask.run(FutureTask.java:123)
[testng] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
[testng] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
[testng] at java.lang.Thread.run(Thread.java:595)
[testng] Caused by: org.jboss.ws.WSException: Cannot find attachment part for:
<dataHandler-598e6fff-a401-4b61-a466-9fb39bb36a35(a)ws.jboss.org>
[testng] at
org.jboss.ws.extensions.xop.XOPContext.getAttachmentByCID(XOPContext.java:388)
[testng] at
org.jboss.ws.extensions.xop.XOPContext.replaceXOPInclude(XOPContext.java:329)
[testng] ... 31 more
[testng] 08:15:18,409 ERROR
[TestNGInvoker-testWSAttachmentDataHandler()][SOAPFaultHelperJAXWS] SOAP request
exception
[testng] javax.xml.ws.WebServiceException: org.jboss.ws.WSException: Failed to inline
XOP data
[testng] at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.processHandlerFailure(HandlerChainExecutor.java:276)
[testng] at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:155)
[testng] at
org.jboss.ws.core.jaxws.client.ClientImpl.callResponseHandlerChain(ClientImpl.java:168)
[testng] at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:374)
[testng] at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
[testng] at
org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
[testng] at
org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
[testng] at $Proxy16.echoData(Unknown Source)
[testng] at
org.jboss.soa.esb.samples.quickstart.webservice_mtom.WSAttachmentTest.testWSAttachmentDataHandler(WSAttachmentTest.java:72)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[testng] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[testng] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[testng] at java.lang.reflect.Method.invoke(Method.java:585)
[testng] at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
[testng] at
org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:36)
[testng] at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
[testng] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
[testng] at java.util.concurrent.FutureTask.run(FutureTask.java:123)
[testng] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
[testng] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
[testng] at java.lang.Thread.run(Thread.java:595)
[testng] Caused by: org.jboss.ws.WSException: Failed to inline XOP data
[testng] at
org.jboss.ws.extensions.xop.XOPContext.replaceXOPInclude(XOPContext.java:341)
[testng] at
org.jboss.ws.extensions.xop.XOPContext.inlineXOPData(XOPContext.java:177)
[testng] at
org.jboss.ws.core.soap.XMLContent.expandContainerChildren(XMLContent.java:335)
[testng] at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:106)
[testng] at
org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
[testng] at
org.jboss.ws.core.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:501)
[testng] at
org.jboss.ws.core.soap.SOAPContentElement.getChildNodes(SOAPContentElement.java:452)
[testng] at
org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.MTOMProtocolHandler.scanNodes(MTOMProtocolHandler.java:90)
[testng] at
org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.MTOMProtocolHandler.verifyXOPPackage(MTOMProtocolHandler.java:64)
[testng] at
org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.MTOMProtocolHandler.handleInbound(MTOMProtocolHandler.java:53)
[testng] at
org.jboss.ws.core.jaxws.handler.GenericHandler.handleMessage(GenericHandler.java:55)
[testng] at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:295)
[testng] at
org.jboss.ws.core.jaxws.handler.HandlerChainExecutor.handleMessage(HandlerChainExecutor.java:140)
[testng] ... 19 more
[testng] Caused by: org.jboss.ws.WSException: Cannot find attachment part for:
<dataHandler-598e6fff-a401-4b61-a466-9fb39bb36a35(a)ws.jboss.org>
[testng] at
org.jboss.ws.extensions.xop.XOPContext.getAttachmentByCID(XOPContext.java:388)
[testng] at
org.jboss.ws.extensions.xop.XOPContext.replaceXOPInclude(XOPContext.java:329)
[testng] ... 31 more
The corresponding messages after SOAPProcess invocation for Image and Source data are
08:26:47,395 INFO [STDOUT] [<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:ns1="http://org.jboss.ws/xop/doclit"><data>iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAEElEQVR42mNgGCxAgGHoAAAL9gARoZF+PgAAAABJRU5ErkJggg==</data></ns1:echoImageResponse></env:Body></env:Envelope>].
and
08:26:50,200 INFO [STDOUT] [<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:ns1="http://org.jboss.ws/xop/doclit"><data>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bWVzc2FnZT5PdXRwdXQ8L21lc3NhZ2U+</data></ns1:echoSourceResponse></env:Body></env:Envelope>].
How can I force it to use inline instead of attachment in case of DataHandler? Or is it
matter of data size?
WS attachments does not work for non-image binary data
------------------------------------------------------
Key: JBESB-1528
URL:
http://jira.jboss.com/jira/browse/JBESB-1528
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Web Services
Affects Versions: 4.2.1
Reporter: Jiri Pechanec
Assignee: Kevin Conner
Fix For: 4.4
Attachments: wsa.tgz
In the JBossWS docs there is a list of supported MIME types together with appropriate
java data types
http://jbws.dyndns.org/mediawiki/index.php?title=User_Guide#Attachments
java.awt.Image and javax.xml.transform.Source works but javax.activation.DataHandler that
can be used to transfer any binary data does not.
Attached is test app and TestNG test that can be convereted into standalone client in two
minutes
If call is done against WS itself then it works, if it send via ESB facade, the
attachment is not added.
Can it be related to JBESB-1479 ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira