axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen" <andreas.veit...@gmail.com>
Subject Re: SOAPMessage with attachment problem
Date Mon, 01 Dec 2008 12:15:57 GMT
Chinmoy,

You can either build it from sources (using the Subversion repository
at [1]) or wait for the next build and pick up the JAR at [2]. I don't
know the exact build schedule, but a new build should be available
within 24 hrs. Also, be aware that axis2-saaj-api no longer exists,
but has been moved to Geronimo.

Andreas

[1] http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/
[2] http://people.apache.org/repo/m2-snapshot-repository/org/apache/axis2/axis2-saaj/SNAPSHOT/


On Mon, Dec 1, 2008 at 12:48, Chinmoy Chakraborty <cchinu@gmail.com> wrote:
> Hi Andreas,
>
> Thanks for reply. How do I get the fixed version? From where do I get latest
> jars?
>
> Chinmoy
>
> On Mon, Dec 1, 2008 at 4:59 PM, Andreas Veithen <andreas.veithen@gmail.com>
> wrote:
>>
>> Chinmoy,
>>
>> It is not writing MIME messages because the writeTo method was not
>> implemented correctly. This should now be fixed in trunk.
>>
>> Andreas
>>
>> On Mon, Dec 1, 2008 at 09:52, Chinmoy Chakraborty <cchinu@gmail.com>
>> wrote:
>> > Hi All,
>> >
>> > I am creating a SOAP message using axis2 soap-api and soap-impl. First I
>> > am
>> > creating the SOAPPart and then I am adding the attachmentpart.
>> >
>> > Now, when I do soapMessage.writeTo(OuputStream out), it only writes the
>> > soap
>> > envelop and not the MIME message. Could somebody please clarify why it
>> > is
>> > not writing the MIME message. Following is my code snippet....
>> >
>> >       soapMsg = MessageFactory.newInstance().createMessage();
>> >       //setting the namespace declaration.
>> >       SOAPPart sp = soapMsg.getSOAPPart();
>> >       SOAPEnvelope se = sp.getEnvelope();
>> >       soapMsg.setProperty(soapMsg.CHARACTER_SET_ENCODING,
>> > DEFAULT_ENCODING);
>> >       soapMsg.setProperty(soapMsg.WRITE_XML_DECLARATION, "true");
>> >
>> >      se.addChildElemet().......
>> >
>> >      then I am adding the attachments...like
>> >      addAttachments(attachmentList);
>> >
>> >
>> > private void addAttachments(List attachmentList) throws SOAPException,
>> > IOException {
>> >       if (attachmentList != null && attachmentList.size() > 0) {
>> >           Iterator attachmentit = attachmentList.iterator();
>> >           while (attachmentit.hasNext()) {
>> >               DataHandler dh = (DataHandler) attachmentit.next();
>> >               AttachmentPart ap = soapMsg.createAttachmentPart();
>> >               ap.setContentId(dh.getName());
>> >               Object content = dh.getContent();
>> >               ap.setContent(dh.getContent(), dh.getContentType());
>> >               soapMsg.addAttachmentPart(ap);
>> >           }
>> >       }
>> >   }
>> >
>> >
>> > Thanks,
>> > Chinmoy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>
>

---------------------------------------------------------------------
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