I wrote a program(TrySend1) to test attachment with saaj
TrySend1 call the servlet(TryReceive1) and TryReceive1 return a
soap message with attachment to it .
but In TrySend1 program , it can't see any attachment at all .
why ???
(p.s.I am sure that I add the attachment to the soap message response. because msg.countAttachments() return 1 )
following is my code
TrySend1
TryReceive1
[ October 13, 2007: Message edited by: mojo lai ] [ October 13, 2007: Message edited by: mojo lai ]
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
In cases like these it's useful to examine the SOAP that gets sent over the wire. Either a tool like tcpmon (comes with Axis) can show it, or you could save the server response to a file before sending it, and examine its contents.
I think I have examined the SOAP that gets sent over the wire
by using System.out.println(msg.countAttachments())
am I wrong ?? thank you.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
That just tells you that the SOAP stack thinks that there is an attachment. What you need to find out is whether there is an attachment in the SOAP that is sent.