users@jax-rpc.java.net

Re: Attachments and JAXRPC clients

From: Kevin Jones <kevinj_at_DEVELOP.COM>
Date: Fri, 03 Oct 2003 19:58:13 +0100

> >I was hoping to use a JAXRPC client directly to send the
> attachment a la
> >Axis, looks like I'll have to try a handler instead,
> >
> If you are starting from Java, then you can use a JAXRPC
> client directly.
>

Sorry, I'm being particularly thick today. Are you saying that if I have
an rpc/encoded WSDL doc and generate a Java client that I can add an
attachment, simply because the code will be generated from the WSDL?

I'm using doc/literal. What I was hoping to do is something like

EchoService_Impl es = new EchoService_Impl();

Echo_PortType_Stub e = (Echo_PortType_Stub) es.getEchoPort();

File file = new File(imageName);
URL url = new URL("file:///" + file.getAbsolutePath());
DataHandler dh = new DataHandler(url);

stub.addAttachment(dh);

I can do that in Axis (and I know that JAXRPC is not Axis :) ). I was
hoping for similar functionality in the RI,

Kevin Jones
Developmentor
www.develop.com

> -----Original Message-----
> From: Public discussion on JAX-RPC
> [mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM] On Behalf Of Arun Gupta
> Sent: 03 October 2003 19:53
> To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> Subject: Re: Attachments and JAXRPC clients
>
>
> See inline responses ...
>
> >>Chapter 7 in JAX-RPC 1.0 specification talks about the support of
> >>attachments. Specifically, table 7-1 defines the mapping of
> >>various mime
> >>types to Java types in RI. You can specify any of the supported Java
> >>types specified in table 7-1 in your interface, and the WSDL will be
> >>generated for you accordingly.
> >>
> >>
> >
> >>In JWSDP 1.2, attachments are only supported for rpc/enc WSDLs.
> >>
> >>
> >
> >So tied in with the above, if I use doc/lit in my WSDL and
> use the types
> >in 7.1 I still won't get attachment support?
> >
> That is correct.
>
> Thanks,
> -Arun
>
> >
> >Kevin Jones
> >Developmentor
> >www.develop.com
> >
> >
> >
> >>-----Original Message-----
> >>From: Public discussion on JAX-RPC
> >>[mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM] On Behalf Of Arun Gupta
> >>Sent: 03 October 2003 17:52
> >>To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> >>Subject: Re: Attachments and JAXRPC clients
> >>
> >>
> >>
> >>
> >>Thanks for your interest in JAX-RPC.
> >>
> >>Regards,
> >>-Arun
> >>
> >>Kevin Jones wrote:
> >>
> >>
> >>
> >>>Axis has the option to allow me to add an attachment through
> >>>
> >>>
> >>the client
> >>
> >>
> >>>side stub. Can I do this in the RI (I can't see any obvious way)?
> >>>
> >>>Thanks,
> >>>
> >>>Kevin Jones
> >>>Developmentor
> >>>www.develop.com
> >>>
> >>>
> >>>
> >>>
> >>--
> >>=============================================
> >>There is only one me, I must live myself!
> >>There is only one today, I must live itself!
> >>=============================================
> >>http://members.tripod.com/~apgupta/index.html
> >>=============================================
> >>
> >>
> >>
>
> --
> =============================================
> There is only one me, I must live myself!
> There is only one today, I must live itself!
> =============================================
> http://members.tripod.com/~apgupta/index.html
> =============================================
>