Reputation: 125
I have a SOAP service implemented with spring-ws 2.2.0 with a Castor 1.3.3 marshaller. In the WSDL file there is a base64Binary element:
<xs:element type="xs:base64Binary" xmlns:xs="http://www.w3.org/2001/XMLSchema" maxOccurs="1" minOccurs="1" name="bytes"/>
With a CXF client the bytes are encoded on one line:
JVBERi0xLjQKJcfsj6IKNzkxIDAgb2JqCjw8L0xpbmVhcml6ZWQgMS9MIDEwMDQ1NzM1L0hbIDEwMjcxMyA0MDBdL08gNzkzL0UgMTAyNzEzL04...
With 9Mb file, the request is worked in about 40 seconds.
With a SAP client the bytes are encoded with 76 char blocks:
JVBERi0xLjMNCiXi48/TDQolUlNUWFBERjMgUGFyYW1ldGVyczoNCjIgMCBvYmoNCjw8DQovRmls
dGVyIDMgMCBSDQovTGVuZ3RoIDQgMCBSDQo+Pg0Kc3RyZWFtDQp4nB1Su60YMQzjKByFo2gUjcIi
yBysM0MKjfD6FBfJBg5nCLL4E4DGff1+/W7Z8ze///yIKKIJEyGGgEBBQgktWIgwAgosqFCFLriQ
...
And Every LF is encoded with the proper xml entity 

JVBERi0xLjMNCiXi48/TDQolUlNUWFBERjMgUGFyYW1ldGVyczoNCjIgMCBvYmoNCjw8DQovRmls
dGVyIDMgMCBSDQovTGVuZ3RoIDQgMCBSDQo+Pg0Kc3RyZWFtDQp4nB1Su60YMQzjKByFo2gUjcIi
yBysM0MKjfD6FBfJBg5nCLL4E4DGff1+/W7Z8ze///yIKKIJEyGGgEBBQgktWIgwAgosqFCFLriQ

With a 3Mb file the request is worked in about 2 minutes and 40 seconds with the cpu at 100%.
Can the performance issue be related to the line breaks in the base64 stream? Could be a Castor, a spring-ws or a JDK issue?
Any advice?
Thanks
Upvotes: 3
Views: 282