This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A problem with Attachment using saaj

 
mojo lai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
mojo lai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic