aspose file tools*
The moose likes Web Services and the fly likes A problem with Attachment using saaj Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "A problem with Attachment using saaj " Watch "A problem with Attachment using saaj " New topic
Author

A problem with Attachment using saaj

mojo lai
Greenhorn

Joined: Sep 09, 2007
Posts: 19
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: 42648
    
  65
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.


Ping & DNS - my free Android networking tools app
mojo lai
Greenhorn

Joined: Sep 09, 2007
Posts: 19
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: 42648
    
  65
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A problem with Attachment using saaj