You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Verstraete Nicolas <Ni...@atosorigin.com> on 2007/03/15 16:08:40 UTC

[axis1.4] header content-type SOAP response

hi
always for my pb of no header content-type in soap response ... is there
somebody who could explain to me why i have no content-type if i have no
attachment.
i tried to analyse source code of axis and i saw that content-type is
set only if attachment.
 
 public void saveChanges() throws SOAPException {
        headers.removeHeader("Content-Length");
        if (mAttachments != null && 0 <
mAttachments.getAttachmentCount()) {
            try {
 
headers.setHeader("Content-Type",mAttachments.getContentType());
            } catch (AxisFault af){
                log.error(Messages.getMessage("exception00"), af);
            }
        }
        saveRequired = false;
        try {
            /* Fix for Bug 16418 - Start from scratch */ 
            mSOAPPart.saveChanges();
        } catch (AxisFault axisFault) {
            log.error(Messages.getMessage("exception00"), axisFault);
        }
    }
 
can somebody tell me why ?