문제

I have a an XSD schema which contains both xsd types and elements of that types.

Like this:

TargetNamespace: http://mycorp.com/ws
Type: PaymentType
Element: PaymentElement

I need to create a commonj.sdo.DataObject representing the PaymentElement. All I can do with the Tuscany API is create commonj.sdo.DataObject of type PaymentType, which is not suitable.

I created it like so:

DataFactory factory = scope.getDataFactory();
DataObject req = factory.create("http://mycorp.com/ws", "PaymentType");

How can I create commonj.sdo.DataObject elements?

도움이 되었습니까?

해결책

I managed to solve this. The trick was to create a subtype of element's type with name same as the element's name.

More info in my question in CXF mailing list. link

The solution is not so clean but allows a correct serialization etc.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top