<< Fare clic per visualizzazione il sommario >> Percorso: API di piattaforma > Altri servizi > Soap > XmlToDictionary |
Service
Method
XmlToDictionary
Description
Converts an xml string (usually returned by a SOAP invocation) to a Dictionary.
Input |
|||
Name |
Description |
Type |
Optional |
xml |
Xml to convert in a Dictionary |
String |
|
wsdlUrl |
Url of the service WSDL (ex.: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL"); see remarks |
String |
|
wsdlStream |
A reference of an attachment containing WSDL: it is needed only if the wsdlUrl is null or empty; see remarks |
Reference |
|
operationName |
Operation name (ex.: "ConversionRate") |
String |
|
headerBody |
True to have the 'Header' and 'Body' entries at the first level of the returned dictionary, false to have the header and body fields returned at the first level of the returned dictionary. (Defaults to the false) |
Boolean |
|
fieldToReturn |
Name of the root field to return (optional) (ex.: "ConversionRateResult"): if the type of the field to return is a Dataset(string, object), its Key/Value pairs will be put in the returned Dictionary; if the type of the field to return is NOT a Dictionary(string, object), the returned Dictionary will contain a Key/Value pair with the name and value of the specified field; |
String |
|
fieldsToDiscard |
A list containing the names of fields to discard from the resulting Dataset (at any level); a null or empty list implies that all fields (from the root field) are returned. |
List |
|
valuesIfNull |
A Key/Value pair collection containing values to assign to the specified fields if their returned value is null. Ex.: if valuesIfNull contains "first_name", "" "trim_user", false the returned Dictionary will have any field named "first_name" (at any level) valued with "" instead of null, and any field named "trim_user" (at any level) valued with false instead of null. |
Dataset |
|
Output |
|||
Name |
Description |
Type |
Optional |
returnValue |
A dataset containing the fields in the input xml. Fields defined of type "base64Binary" in the WSDL will be returned as Stream values. |
Dataset |
|
Remarks
WSDL: it is taken (in order of priority) from the wsdlUrl or from the wsdlStream parameter; the wsdlUrl parameter can contain the url to download the wsdl from the service (ex.: "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL") or a file url to download it from the file system (ex.: "C:\CurrencyConvertor\CurrencyConvertorWsdl.xml" or "file:///C:/CurrencyConvertor/CurrencyConvertorWsdl.xml" or "file://loaclhost/C:/CurrencyConvertor/CurrencyConvertorWsdl.xml").
Definition of complex structures for parameters: usually each element of a parameter's structure has a key (the element name) and a value; if an element type must be declared, it can be prefixed to the element name, between "_" characters (for example "_string_Recipient" or "_int_ResponseCode"); two special types can be specified: "Dictionary" and "DictionaryList" (for example "_Dictionary_Fields" or "_DictionaryList_Elements"); if a class name must be specified, it can be inserted between "(" and ")" characters (for example "_(ArrayValue)_RejectedRecipients" or "_DictionaryList(Fields)_Elements").