users@jax-rpc.java.net

RE: Re: jax-rpc with attachments help

From: Steve Pruitt <SPruitt_at_exstream.com>
Date: Sun, 29 Feb 2004 13:36:00 -0500

This is a nice solution. My implementation needs to reverse the roles. Instead of the client sending an attachment, my web service sends the attachment. My WSDL for the response looks like:

<wsdl:message name="composeRequest">
  <wsdl:part type="apachesoap:Element" name="inputMeta" />
</wsdl:message>
<wsdl:message name="composeResponse">
  <wsdl:part type="apachesoap:DataHandler" name="composedOutput" />
  <wsdl:part type="xsd:string" name="outputMeta" />
</wsdl:message>
:
:
<wsdl:operation name="compose">
  <wsdl:input message="intf:composeRequest" name="composeRequest" />
  <wsdl:output message="intf:composeResponse" name="composeResponse" />
</wsdl:operation>

Can I just adjust my service operation's signature to be:

public void compose(Element reportRequest, DataHolder composedOutput, DataHolder outputMeta);


Is this doable?


-S


Steve Pruitt wrote:
> I need to develop a service that returns two things: a binary
> attachment and a xml document that has meta information about the
> attachment. I cannot find any WS or SOAP books that have a
> meaningful example. There are tantalizing hints floating around on
> various forums. But, I can't find a good example for my needs. In
> addition to the attachment and xml return types, I want to use
> jax-rpc to maximize portability and implement my service as a
> stateless SessionBean.
>

I modified the code I got from Sameer Tyagi (Co-author
of Java Web Services Architecture) to make it work
under Java WSDP 1.3 tutorial build directory structure.
It contains code for sending an attachment as either
DataHandler or javax.xml.transform.Source object.

It can be obtained from (attachment.zip file)

http://www.javapassion.com/webservices/schedule.html#AssignmentHW5C

-Sang
-- 
----------------------------------------------------------------------
                       Sang Shin, sang.shin_at_sun.com
              http://www.javapassion.com/SangSchedule.html#Bio
                http://www.javapassion.com/SangSchedule.html
                   (Life is worth living... with Passion!)
----------------------------------------------------------------------
             Sun Tech Days             |     SunNetwork 2004 Shanghai
     Worldwide Developer Conference    |    Conference and Pavilion
     "Push Your Development Further!"  |     "Why not get connected?"
                                       |
          London, England              |        Shanghai, China
          Feb. 17th &18th, 2004        |      June 2nd & 3rd, 2004
                                       |
      For registration, go to          |   For more information, go to
   www.sun.com/developers/techdays     |   http://sunnetwork.sun.com/
_______________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net