ct = this.getContentTypeForMTOM(contentType); } else if (isDoingSWA()) { ct = this.getContentTypeForSwA(contentType); } else { ct = contentType;
public ContentType getContentType(ClientOptions options, ContentType contentType) throws Exception { if (contentType.getBaseType().equals(XMLMessage.Type.SWA.getContentType().getBaseType())) { OMOutputFormat outputFormat = new OMOutputFormat(); outputFormat.setMimeBoundary(options.getMimeBoundary()); outputFormat.setRootContentId(options.getRootContentId()); return new ContentType(outputFormat.getContentTypeForSwA(SOAP12Constants.SOAP_12_CONTENT_TYPE)); } else { return ContentTypeUtil.addCharset(contentType, options.getCharset()); } }
public ContentType getContentType(ClientOptions options, ContentType contentType) throws Exception { if (contentType.getBaseType().equals(XMLMessage.Type.SWA.getContentType().getBaseType())) { OMOutputFormat outputFormat = new OMOutputFormat(); outputFormat.setMimeBoundary(options.getMimeBoundary()); outputFormat.setRootContentId(options.getRootContentId()); return new ContentType(outputFormat.getContentTypeForSwA(SOAP12Constants.SOAP_12_CONTENT_TYPE)); } else { return ContentTypeUtil.addCharset(contentType, options.getCharset()); } }
public ContentType getContentType(ClientOptions options, ContentType contentType) throws Exception { if (contentType.getMediaType().equals(XMLMessage.Type.SWA.getContentType())) { OMOutputFormat outputFormat = new OMOutputFormat(); outputFormat.setMimeBoundary(options.getMimeBoundary()); outputFormat.setRootContentId(options.getRootContentId()); return new ContentType(outputFormat.getContentTypeForSwA(SOAP12Constants.SOAP_12_CONTENT_TYPE)); } else { return contentType.toBuilder().setParameter("charset", options.getCharset()).build(); } }