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

soap with attachment question ?

anas alsarairah
Greenhorn

Joined: Sep 27, 2007
Posts: 28
hello all

i have a case where i want to acces a soap message attachment from withen the web service method and not using saop message handler ... so how can i do that please ...

best regads
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 519
    
    2

Is usage of SAAJ library, not feasible in your case ?


Regards
KumarRaja

anas alsarairah
Greenhorn

Joined: Sep 27, 2007
Posts: 28
hello

first thanks for your reply . and please allow me to give you more details in the following

i have created a web service client that uses SAAJ Api to send a soap messasge along with an attachment , now on the service side i want to get the attachment sent throught the client from the web service method and not from withen the JAX-WS handler of the web service , as you know i need to have access to the soap message in order to get the attachments indented in the soap message .

example of what i would like to do

@WebService
public void serviceMethod(){

// get the soap attachment and store it on the file system
// then store somthing in the database and so on
}


i hope its clear now

thanks in advance
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 519
    
    2

Hi Anas,

I'm not sure, if there is any built in mechanism in JAX-WS run time to handle attachments, but I know, SAAJ is basically meant for that purpose and it is an external jar to JAX-WS built in run time. Yes, had it been handlers, then we can get a handle of SOAPMessage. But not sure, how we can get an access to SOAPMessage in your scenario. I actually had this question, but never had a chance to explore into this. I hope, some one would be able to assist us.
anas alsarairah
Greenhorn

Joined: Sep 27, 2007
Posts: 28
hello

i have found some pages talking about @WebServiceProvider which as they say can solve my case .... do you know anything about that

thanks
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 519
    
    2

anas alsarairah wrote:hello

i have found some pages talking about @WebServiceProvider which as they say can solve my case .... do you know anything about that

thanks


Ok, @WebServiceProvider would let you access the XMMessages directly.

Yes you can implement Provider<SOAPMessage> and can access the SOAPMessage as such directly. You an use example for this hopefully
 
Don't get me started about those stupid light bulbs.
 
subject: soap with attachment question ?