axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Verstraete Nicolas" <>
Subject Http header content-type
Date Fri, 02 Mar 2007 08:30:44 GMT

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

Axis 1.4

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message