Creating Schema with XSD/WSDL
BusinessWorks Plug-in Development Kit can parse the input, output, and fault schema from an XSD or a WSDL file.
- Procedure
- In the Define Activities, Process Starters and Signal-In dialog box, select XSD/WSDL from the Resource schema type list.
- Click Browse to locate a predefined XSD or a WSDL file.
- Select a predefined element that you want to use as the input, output, or fault schema. If you want to define multiple faults, you have to add the fault element one by one.
The XSD schema in the selected XSD or WSDL file must conform to the following rules:
- Contains a namespace.
- Does not contain an
include
element. - If the XSD schema uses the
import
element, ensure theschemaLocation
element is also used and the value of theschemaLocation
element is the relative path of the imported schema. - The value of the
elementFormatDefault
attribute is unqualified.
Use the following XSD file as an example:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <schema xmlns:tns="http://www.tibco.com/namespaces/tnt/plugins/example" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.tibco.com/namespaces/tnt/plugins/example"> <element name="YourInput" type="tns:YourInputType"/> <complexType name="YourInputType"> <sequence> <element maxOccurs="1" minOccurs="0" name="YourName" type="string"/> </sequence> </complexType> <element name="YourOutput" type="tns:YourOutputType"/> <complexType name="YourOutputType"> <sequence> <element maxOccurs="1" minOccurs="0" name="Output" type="string"/> </sequence> </complexType> <element name="PluginException" type="tns:PluginExceptionType"/> <complexType name="PluginExceptionType"> <sequence> <element maxOccurs="1" minOccurs="0" name="PluginfileExceptionMessage" type="string"/> </sequence> </complexType> <element name="InputFileException" type="tns:InputFileExceptionType"/> <complexType name="InputFileExceptionType"> <sequence> <element maxOccurs="1" minOccurs="1" name="fileInfo" type="tns:fileInfoType"> </element> </sequence> </complexType> <complexType name="fileInfoType"> <sequence> <element maxOccurs="1" minOccurs="1" name="fullName" type="string"> </element> <element maxOccurs="1" minOccurs="1" name="fileName" type="string"> </element> <element maxOccurs="1" minOccurs="1" name="location" type="string"> </element> <element maxOccurs="1" minOccurs="0" name="configuredFileName" type="string"> </element> <element maxOccurs="1" minOccurs="1" name="type" type="string"> </element> <element maxOccurs="1" minOccurs="1" name="readProtected" type="boolean"> </element> <element maxOccurs="1" minOccurs="1" name="writeProtected" type="boolean"> </element> <element maxOccurs="1" minOccurs="1" name="size" type="long"> </element> <element maxOccurs="1" minOccurs="1" name="lastModified" type="string"/> </sequence> </complexType> </schema>
When adding and configuring activities in the Define Activities, Process Starters and Signal-In dialog box, use the example XSD file to configure the activity schema:
- Select the
YourInput
element as the activity input. - Select the
YourOutput
element as the output. - Select the
InputFileException
element as one fault. - Select the
PluginException
element as another fault.
After generating the activity, click the Input, Output, and Fault tabs accordingly to check the schema:
The following example is the generated input schema based on the selected XSD file:
The following example is the generated output schema based on the selected XSD file:
The following example is the generated fault schema based on the selected XSD file: