简体   繁体   中英

linking wsapps schema to another XML schema

I want to create an XML schema by linking 2 or 3 wsapps schemas. I tried by importing the wsapps schema(for eg: employees.xsd) in the XSD reference of the new schema I was creating. then I created a schema fragment and created attributes by adding complextype->model group in tree tab of the schema fragment,changed the model group to type sequence and added a reference to element. In the reference to element properties I selected the WS-Apps schema(for eg: employees.xsd).

But when I tried to save it I am getting below error :

org.apache.xmlbeans.XmlException: error: src-resolve.a: Could not find element 'employees'. Do you mean to refer to the element named employees@ http://schemas.cordys.com/EmployeeWsAppsPackage ?

But despite throwing error it saves the document but you cannot use the document in Xforms or if you open the instance tab in the schemafragment it throws the above error again.

the idea was to create a single schema fragment that links to multiple ws-apps schemas.the advantage is that if the dbschema changes we can reload the wsapps schema and it will reflect in xform.From the xform we plan to trigger a bpm which will handle the updates to these tables.

can anybody point out what is going wrong here.

Ok. I was able to solve this, I think its a bug in cordys.

In text tab of the schema fragment, you can see a line like below:

<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" ref="employees" />

change this by including the correct namespace of the XSD reference used. You should also prefix the refered element with the correct namespace.

 <xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:emp="http://schemas.cordys.com/EmployeeWsAppsPackage" ref="emp:employees" />

In the error cordys is actually asking this but instead of a confirm dialogue, it is throwing an error dialogue. So you cannot allow the system to make this correction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM