09.12.2012 Views

webMethods Developer User's Guide - Software AG Documentation

webMethods Developer User's Guide - Software AG Documentation

webMethods Developer User's Guide - Software AG Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

10. Performing Data Validation<br />

If you want to customize the content type by changing the constraining facets<br />

applied to the type, see “Customizing a String Content Type” on page 264.<br />

Note: A content type corresponds to a simple type from an XML Schema<br />

definition. All of the choices in the Content type list correspond to simple types<br />

defined in XML Schema Part 2: Datatypes.<br />

e If the selected variable is an Object or Object list, for the Java wrapper type property,<br />

select the Java class for the variable contents. If you do not want to apply a Java<br />

class or if the Java class is not listed, select UNKNOWN.<br />

For more information about supported Java classes for Objects and Object lists,<br />

see “Java Classes for Objects” on page 421.<br />

3 Repeat this procedure for each variable to which you want to apply constraints in the<br />

IS document type, specification, service input, or service output.<br />

4 On the File menu, click Save.<br />

Considerations for Object Constraints<br />

Constraints for Object and Object list variables correspond to Java classes, whereas<br />

constraints for String variables correspond to simple types in XML schemas. When you<br />

apply constraints to Objects and perform validation, the data is validated as being of the<br />

specified Java class. For details on the Java classes you can apply to an Object or Object<br />

list, see “Java Classes for Objects” on page 421.<br />

A constrained Object is validated when one of the following occur:<br />

� A service runs with the Validate input or Validate output check box selected on the<br />

Input/Output tab.<br />

� A service runs via the INVOKE step in a flow service with the Validate input or Validate<br />

output properties set on the INVOKE step.<br />

� The pub.schema:validate service runs.<br />

� A document is published. When this occurs, the contents of the document are<br />

validated against the specified document type. For details, see the Publish-Subscribe<br />

<strong>Developer</strong>’s <strong>Guide</strong>.<br />

� During testing, when you enter values for a constrained Object or Object list in the<br />

Input dialog box.<br />

� When you assign a value to an Object or Object list variable on the Pipeline tab using<br />

the Set Value modifier.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 263

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!