Hello everyone
We have the following problem when using Synapse 1.2 together with one
of our webservices (that uses binary data quite a lot). The situation is
as follows:
The webservice runs on a tomcat 6.0 server, synapse runs behind an
apache web server (which functions as a proxy). The application and the
webservice-server use Java-stubs generated by ws-import from the wsdl
provided by synapse. The webservice uses MTOM to reduce the size of the
soap-(1.1)-messages.
Using direct communication between the application and the webservice,
everything works fine. However, if the requests are handled by Synapse,
then the binary data is removed from the packages sent by the webservice
server.
In this case, the soap messages contain a reference to the attached
binary data (...<data><Include xmlns="http://www.w3.org/2004/08/xop/include"
href="cid:[email protected]"/></data>...).
The data-element usually contains the binary data (the corresponding
part of the wsdl is
<xs:element name="data" type="xs:base64Binary" minOccurs="0"/>).
Now, usually (i.e. when communicating directly with the webservice), the
next mime-part of the soap message looks something like this:
--uuid:f909b078-1cd9-4723-8d5f-8140621526c8
Content-Id: <[EMAIL PROTECTED]>
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
[much binary data]
--uuid:f909b078-1cd9-4723-8d5f-8140621526c8--
Which is fine.
However, if the message is routed through Synapse, the second mime part
is simply missing, but the message still contains the reference to this
part. I've no idea what causes this behaviour.
The parameter "enableMTOM" in the axis2.xml configuration file is set to
true. The endpoint adress is configured with the optin optimize="mtom".
The funny thing is that it works as long as logging is set to full in
the outSequence of the corresponding target in the configuration file of
Synapse.
This causes the binary data to be inlined into the SOAP-xml-structure
(base64 encoded) which allows the client to use the data.
(...<data>oIPff8dO0+S75EKvdLp0a4+p5ef4...</data>...) As this increases
the size of the transmitted data and also reduces performance (and
produces rather large log files), this is somewhat not desirable.
We have absolutely no idea what could be wrong. We tried different
configurations, without logging, with logging, disabled
mtom-optimizations, used different client libraries etc. Nothing helped.
Can anyone help? I'm lost :-/
Thanks
Markus