public HttpBinding getHttpBinding() { if (httpBinding == null) { // create a new binding and use the options from this endpoint httpBinding = new DefaultHttpBinding(); httpBinding.setHeaderFilterStrategy(getHeaderFilterStrategy()); httpBinding.setTransferException(isTransferException()); if (getComponent() != null) { httpBinding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject()); } httpBinding.setEagerCheckContentAvailable(isEagerCheckContentAvailable()); httpBinding.setMapHttpMessageBody(isMapHttpMessageBody()); httpBinding.setMapHttpMessageHeaders(isMapHttpMessageHeaders()); httpBinding.setMapHttpMessageFormUrlEncodedBody(isMapHttpMessageFormUrlEncodedBody()); } return httpBinding; }
@Override public HttpBinding getHttpBinding() { // make sure we include servlet variant of the http binding if (this.binding == null) { // is attachment binding enabled? if (isAttachmentMultipartBinding()) { this.binding = new AttachmentHttpBinding(); } else { this.binding = new DefaultHttpBinding(); } this.binding.setFileNameExtWhitelist(getFileNameExtWhitelist()); this.binding.setTransferException(isTransferException()); if (getComponent() != null) { this.binding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject()); } this.binding.setHeaderFilterStrategy(getHeaderFilterStrategy()); this.binding.setEagerCheckContentAvailable(isEagerCheckContentAvailable()); this.binding.setMapHttpMessageBody(isMapHttpMessageBody()); this.binding.setMapHttpMessageHeaders(isMapHttpMessageHeaders()); this.binding.setMapHttpMessageFormUrlEncodedBody(isMapHttpMessageFormUrlEncodedBody()); } return this.binding; }