D 2012-11-04T18:33:29.761 L Using\sOptions P 15a493c7b66027cd93227ef6870d867e6c942cd9 U gerald W 6383
Contents
OverviewThe Webservices Client and Server packages make use of the following options:
The attributes can be retrieved and set using ::WS::Utils::SetOption. Loading the Webservices Utilities PackageTo load the webservices server package, do: package require WS::Utils This command will only load the utilities the first time it is used, so it causes no ill effects to put this in each file using the utilties. UseNS - put namespaces on field tagsThe UseNS option, if set to a "true" value, will put a namespace alias on all field tags. The default value, "1", is for this option to be turned on. StrictMode - WSDL processing modeThe StrictMode option determines what happens when an error is detected in parsing a WSDL. The legal values are:
If the StrictMode is set to debug or warning, a message is logged using the ::log package at that level and the error is then ignored. If the StrictMode is set to any value other than debug or warning, a message is logged using the ::log package at the error level and exception is generated. The default value is error. A major use of this is to ignore namespace imports in a WDSL that do not actually import any definitions. parseInAttr - parse attributes on inbound tagsThe parseInAttr option, if set to a "true" value, will convert all attributes of inbound field tags to dictionary entries for that tag. The key will be the attribute name and the value will be the value of the attribute. The value of the tag will have an key of the null string (i.e. {}). The default value, "0", is for this option to be turned off. useTypeNs - use type's namespace prefix as prefix of elementsThe useTypeNs option, if set to a "true" value, will use the prefix of the type's namespace instead of the prefix of the element's namespace. The default value, "0", is for this option to be turned off. nsOnChangeOnly - only put namespace prefix when namespaces changeThe nsOnChangeOnly option, if set to a "true" value, will only place namespace prefixes when the namespaces change. The default value, "0", is for this option to be turned off. suppressNS - do not put a given namespace prefix.The suppressNS option, if set, will cause the given namespace to never be used as a prefix (i.e. tags that would normally have had the given prefix will not have any prefix). The default value, "{}", is for this option to be turned off. genOutAttr - generate attributes on outbound tagsThe genOutAttr option, if set to a "true" value, will convert all dictionary keys of the entry for a given field tag to attribute value pairs of the tag in the outbound XML. The key will be the attribute name and the value will be the value of the attribute. The value of the tag will have a key of the null string (i.e. {}). The default value, "0", is for this option to be turned off. Access RoutineProcedure Name : ::WS::Utils::SetOption Description : Retrieve or set an option Arguments : option - name of the option value - value of the option (optional) Returns : The value of the option Side-Effects : None Exception Conditions :None Pre-requisite Conditions : None Z 6a53bb22afd6e68f1e9172b39da5a1f5 |