axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Verstraete Nicolas" <Nicolas.Verstra...@atosorigin.com>
Subject Http header content-type
Date Fri, 02 Mar 2007 08:30:44 GMT
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


Mime
View raw message