Performance error with line breaks in base64 data with Spring-ws and Castor

I have a SOAP service implemented since spring-ws 2.2.0 with Castor 1.3.3 token. There is a base64Binary element in the WSDL file:

<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 a single line:

JVBERi0xLjQKJcfsj6IKNzkxIDAgb2JqCjw8L0xpbmVhcml6ZWQgMS9MIDEwMDQ1NzM1L0hbIDEwMjcxMyA0MDBdL08gNzkzL0UgMTAyNzEzL04...

      

With a 9 MB file, the request is processed in about 40 seconds .

With the SAP client, bytes are encoded with 76 char blocks:

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

      

And each LF is encoded with proper xml object &#xA;

JVBERi0xLjMNCiXi48/TDQolUlNUWFBERjMgUGFyYW1ldGVyczoNCjIgMCBvYmoNCjw8DQovRmls&#xA;dGVyIDMgMCBSDQovTGVuZ3RoIDQgMCBSDQo+Pg0Kc3RyZWFtDQp4nB1Su60YMQzjKByFo2gUjcIi&#xA;yBysM0MKjfD6FBfJBg5nCLL4E4DGff1+/W7Z8ze///yIKKIJEyGGgEBBQgktWIgwAgosqFCFLriQ&#xA;

      

With a 3 MB file, the request is processed in about 2 minutes and 40 seconds with the processor at 100%.

Could the performance issue be related to line breaks in the base64 stream? Maybe Castor, spring-ws or JDK issue?

Any advice?

thank

+3


source to share





All Articles