@ Action ( name = "Validate" , outputs = { @ Output ( RETURN_CODE ) , @ Output ( RESULT_TEXT ) , @ Output ( RETURN_RESULT ) , @ Output ( ERROR_MESSAGE ) } , responses = { @ Response ( text = ResponseNames . SUCCESS , field = RETURN_CODE , value = SUCCESS , matchType = COMPARE_EQUAL ) , @ Response ( text = ResponseNames . FAILURE , field = RETURN_CODE , value = FAILURE , matchType = COMPARE_EQUAL , isDefault = true , isOnFail = true ) } ) public Map < String , String > execute ( @ Param ( value = XML_DOCUMENT , required = true ) String xmlDocument , @ Param ( value = XML_DOCUMENT_SOURCE ) String xmlDocumentSource , @ Param ( value = XSD_DOCUMENT ) String xsdDocument , @ Param ( value = XSD_DOCUMENT_SOURCE ) String xsdDocumentSource , @ Param ( value = USERNAME ) String username , @ Param ( value = PASSWORD , encrypted = true ) String password , @ Param ( value = TRUST_ALL_ROOTS ) String trustAllRoots , @ Param ( value = KEYSTORE ) String keystore , @ Param ( value = KEYSTORE_PASSWORD , encrypted = true ) String keystorePassword , @ Param ( value = TRUST_KEYSTORE ) String trustKeystore , @ Param ( value = TRUST_PASSWORD , encrypted = true ) String trustPassword , @ Param ( value = X_509_HOSTNAME_VERIFIER ) String x509HostnameVerifier , @ Param ( value = PROXY_HOST ) String proxyHost , @ Param ( value = PROXY_PORT ) String proxyPort , @ Param ( value = PROXY_USERNAME ) String proxyUsername , @ Param ( value = PROXY_PASSWORD , encrypted = true ) String proxyPassword , @ Param ( value = SECURE_PROCESSING ) String secureProcessing ) { final CommonInputs inputs = new CommonInputs . CommonInputsBuilder ( ) . withXmlDocument ( xmlDocument ) . withXmlDocumentSource ( xmlDocumentSource ) . withUsername ( username ) . withPassword ( password ) . withTrustAllRoots ( trustAllRoots ) . withKeystore ( keystore ) . withKeystorePassword ( keystorePassword ) . withTrustKeystore ( trustKeystore ) . withTrustPassword ( trustPassword ) . withX509HostnameVerifier ( x509HostnameVerifier ) . withProxyHost ( proxyHost ) . withProxyPort ( proxyPort ) . withProxyUsername ( proxyUsername ) . withProxyPassword ( proxyPassword ) . withSecureProcessing ( secureProcessing ) . build ( ) ; final CustomInputs customInputs = new CustomInputs . CustomInputsBuilder ( ) . withXsdDocument ( xsdDocument ) . withXsdDocumentSource ( xsdDocumentSource ) . build ( ) ; return new ValidateService ( ) . execute ( inputs , customInputs ) ; }
Service to validate an XML document . Input must be given for either xmlDocument or for xmlLocation . The xsdLocation input is optional but if specified then the XML document will be validated against the XSD schema .