You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by petrica <pe...@cluemail.com> on 2007/08/06 07:07:14 UTC

MTOM sample generated WSDL with DataHandler on server

Hi

I have a question regarding of MTOM sample from CXF distribution. 
Is there other possibility to specify somewhere in POJO server classes a
type like 
<< element name="attachinfo" type="xsd:base64Binary"
xmime:expectedContentTypes="application/octet-stream" >> for DataHandler ?

I saw that when I deploy MTom sample without << mtom_xop.wsdl >> file the
server does not generate WSDL file with <<
xmime:expectedContentTypes="application/octet-stream" >> and thus on the
client side is generated a type byte[] instead <DataHandler>.

There is an annotation something like
@XmlMimeType("application/octet-stream") but where can I place it in Java
server classes ? ( i saw on generated client side that is in a MtomType type
generated ).

Is it a bug from CXF server libraries that doesn't know to generate
automatically a type for DataHandler without specified manually a WSDL file
?

Why in MTOM sample from CXF distribution is included a WSDL file when you
build client and server ? Why you don't let the server to generate this file
?


Any help or advice ?

Thanks in advance
Petrica
-- 
View this message in context: http://www.nabble.com/MTOM-sample-generated-WSDL-with-DataHandler-on-server-tf4210895.html#a11978257
Sent from the cxf-user mailing list archive at Nabble.com.


Re: MTOM sample generated WSDL with DataHandler on server

Posted by Daniel Kulp <dk...@apache.org>.
All of these questions are related......

This is a "gap" in the JAX-WS 2.0 spec that we currently implemented in 
that there isn't an "easy" way to do this.    The JAX-WS 2.1 spec (which 
we will be starting work on shortly) does address this by allowing use 
of the XmlMimeType annotations on the parameters and methods of the SEI 
interface.    Unfortunately, we don't support that yet.  (which is why 
the demo uses the wsdl)

The only way to make this work without wsdl right now is to hand write 
the "wrapper" classes where you could put the @XmlMimeType annotations 
and then use the @RequestWrapper/@ResponseWrapper annotations to point 
to those classes.    That's definitely not a very fun thing to do.


Dan


On Monday 06 August 2007 01:07, petrica wrote:
> I have a question regarding of MTOM sample from CXF distribution.
> Is there other possibility to specify somewhere in POJO server classes
> a type like
> << element name="attachinfo" type="xsd:base64Binary"
> xmime:expectedContentTypes="application/octet-stream" >> for
> DataHandler ?
>
> I saw that when I deploy MTom sample without << mtom_xop.wsdl >> file
> the server does not generate WSDL file with <<
> xmime:expectedContentTypes="application/octet-stream" >> and thus on
> the client side is generated a type byte[] instead <DataHandler>.
>
> There is an annotation something like
> @XmlMimeType("application/octet-stream") but where can I place it in
> Java server classes ? ( i saw on generated client side that is in a
> MtomType type generated ).
>
> Is it a bug from CXF server libraries that doesn't know to generate
> automatically a type for DataHandler without specified manually a WSDL
> file ?
>
> Why in MTOM sample from CXF distribution is included a WSDL file when
> you build client and server ? Why you don't let the server to generate
> this file ?
>
>
> Any help or advice ?
>
> Thanks in advance
> Petrica

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog