I looked more closely at the JAX-RPC 1.1 spec as you suggested. In an effort to 
be compliant, I changed my return type to be MimeMultipart instead of 
DataHandler. In my server-side method, I add a client requested file (specified 
by the client as a String file name) to the MimeMultipart object. This is 
essentially what my code looks like:

    MimeMultipart result = null ;
    File file = new File( a_Filename ) ;

    try {
        result = new MimeMultipart() ;
        MimeBodyPart mbp = new MimeBodyPart() ;
        mbp.setDataHandler( new DataHandler( new FileDataSource( file ) ) ) ;
        result.addBodyPart( mbp ) ;
    } catch ( Exception e ) {
    }

    return result ;

This code generates the same error as before when I simply returned a 
DataHandler (it can't find the SOAP attachment, even though it is there). I 
also tried to manually set my own content id on the MimeBodyPart, but that 
didn't help, because the client can't locate the SOAP attachment.

I'm getting frustrated in my effort to make this work. I'd love to see a 
working example of this (returning an attached file). The JBoss WS test suite 
is not much help, because the examples show how to pass in MimeMultipart 
arguments, and not return them. Also, it uses the Axis java2wsdl, instead of 
wscompile. I was first using java2wsdl, but that seemed to create its own set 
of problems. From reading this forum, it appeared that people felt that 
wscompile was the better way to go. 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3866341#3866341

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3866341


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to