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/02 09:30:44 UTC

Http header content-type

Hi,

I don't understand why if i don't put an attachement to my reply
SOAPMessage, the header http content-type for example, is not set ?

Here is my code in the onMessage method

MessageFactory msgFact = MessageFactory.newInstance(); reply = 
msgFact.createMessage(); SOAPPart soapPart = reply.getSOAPPart(); 
SOAPEnvelope envelope2 = soapPart.getEnvelope();
....
return reply;

To have some content-type set i had to add

AttachmentPart attachment = reply.createAttachmentPart();
attachment.setContent( "This is some text", "text/plain" );
reply.addAttachmentPart( attachment );

I donit understand why ? Is there any other solution ?

Thank you very much

Nico
Axis 1.4

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org