On Oct 9, 2006, at 6:12 PM, Raymond Feng wrote:

Hi,

Please see my comments below.

Thanks,
Raymond

----- Original Message ----- From: "Li Shen" <[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Sunday, October 08, 2006 6:54 PM
Subject: Can JAXB/XMLBeans work with axis binding now


Hi,

I noticed that in the helloworldws sample, now only SDO gets used. If I want
to use JAXB/XMLBeans instead of SDO, what shall I do then?


It's simple, just declare a component reference wired to the composite reference with the ws (axis2) binding. For the interface of your component reference, annotate it with @DataType (name="org.apache.xmlbeans.XmlObject") or @DataType (name="javax.xml.bind.JAXBElement").
This reminded me to pick up the discussion of where we specify the data binding. I think this only should be specified when using Java as an IDL really. I know Jeremy is going to add that we should allow this to be specified in the implementation for people that cast from a strongly typed parameter to a loosely typed one (e.g. DataObject) so I'm going to pre-empt him ;-) I'm pretty sure people agree this is bad programming practice/design so the question is whether we accommodate them. While we may "support" this in terms of it works, we should never advertise it in practice. Anyway, this sounds like we should spin this discussion into a separate thread so Raymond, maybe you want to pick it back up in another email?

For example,

@Remotable
@DataType(name="javax.xml.bind.JAXBElement")
public interface JAXBInterface {
  Address getAddress(Customer);
}

@Remotable
@DataType(name="org.apache.xmlbeans.XmlObject")
public interface XMLBeansInterface {
  Address getAddress(Customer);
}

To be honest, I haven't had a chance to perform the integration test for JAXB and XMLBeans. But I would be glad to help you if you run into any issues.

Li, I think it would be great if we can get some of the JAXB and XMLBeans stuff working.

Basically, I know I may need to register the SCDL of JAXB/XMLBeans to my
Tuscany runtime, and replace some configurations such as
@DataType(name="commonj.sdo.DataObject") and <dbsdo/> in helloworldws with
JAXB/XMLBeans specific stuff. Is that correct? How will <dbjaxb/> and
<dbxmlbeans/>look like? The same as SDO? Also, looks like for now there is still no SCDL available for JAXB/XMLBeans, do you guys have any plan to add
them?


The SCDL extension dbsdo is used to import the model for SDO which requires a type system. For JAXB and XMLBeans, it may not be required. If you see any requirements for such extensions, please post this list.

I have a feeling it may be required for XBeans. Li, do you know offhand how custom types are loaded in XBeans (and the JAXB RI for that matter)?

Jim

Thanks,
Li


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to