XmlUtils

Inclusion code:

Service Deployment
Port NameLocationProtocolInterfaces
XmlUtils documentation:
XmlUtils--XmlUtilsInterface

List of Available Interfaces

XmlUtilsInterface

Interface documentation:

Operation NameInput TypeOutput TypeFaults
xmlToValueXMLToValueRequestundefinedIOException( IOExceptionType )
transformXMLTransformationRequeststringTransformerException( JavaExceptionType )
valueToXmlValueToXmlRequeststringIOException( IOExceptionType ) IllegalArgumentException( string )

Operation Description

xmlToValue

Operation documentation: Transforms the base value in XML format (data types string, raw) into a Jolie value

      The XML root node will be discarded, the rest gets converted recursively

Invocation template:

xmlToValue@XmlUtils( request )( response )

Request type

Type: XMLToValueRequest

type XMLToValueRequest: any {
    .options?: void {
        .skipMixedText?: bool
        .charset?: string
        .includeAttributes?: bool
        .schemaLanguage?: string
        .includeRoot?: bool
        .schemaUrl?: string
    }
    .isXmlStore?: bool
}

XMLToValueRequest : any

  • options : void
    • skipMixedText : bool
    • charset : string
    • includeAttributes : bool
    • schemaLanguage : string
    • includeRoot : bool
    • schemaUrl : string
  • isXmlStore : bool

Response type

Type: undefined

undefined : any

Possible faults thrown

Fault IOException with type IOExceptionType

Fault-handling install template:

install ( IOException => /* error-handling code */ )
type IOExceptionType: JavaExceptionType

transform

Operation documentation:

Invocation template:

transform@XmlUtils( request )( response )

Request type

Type: XMLTransformationRequest

type XMLTransformationRequest: void {
    .source: string
    .xslt: string
}

XMLTransformationRequest : void

  • source : string
  • xslt : string

Response type

Type: string

string : string

Possible faults thrown

Fault TransformerException with type JavaExceptionType

Fault-handling install template:

install ( TransformerException => /* error-handling code */ )
type JavaExceptionType: string {
    .stackTrace: string
}

valueToXml

Operation documentation: Transforms the value contained within the root node into an xml string.

      The base value of ValueToXmlRequest.root will be discarded, the rest gets converted recursively

Invocation template:

valueToXml@XmlUtils( request )( response )

Request type

Type: ValueToXmlRequest

type ValueToXmlRequest: void {
    .omitXmlDeclaration?: bool
    .indent?: bool
    .plain?: bool
    .root: undefined
    .rootNodeName?: string
    .isXmlStore?: bool
    .applySchema?: void {
        .schema: string
        .doctypeSystem?: string
        .encoding?: string
    }
}

ValueToXmlRequest : void

  • omitXmlDeclaration : bool
  • indent : bool
  • plain : bool
  • root : any
  • rootNodeName : string
  • isXmlStore : bool
  • applySchema : void
    • schema : string
    • doctypeSystem : string
    • encoding : string

Response type

Type: string

string : string

Possible faults thrown

Fault IOException with type IOExceptionType

Fault-handling install template:

install ( IOException => /* error-handling code */ )
type IOExceptionType: JavaExceptionType

Fault IllegalArgumentException with type string

Fault-handling install template:

install ( IllegalArgumentException => /* error-handling code */ )

Subtypes

JavaExceptionType

type JavaExceptionType: string { .stackTrace: string }