{
  "factory": {
    "id": "wsdl-based-soap-service",
    "type": "entaxy.runtime.service",
    "description": "",
    "isAbstract": true,
    "parent": "abstract-service-soap",
    "label": "service,soap",
    "category": ""
  },
  "entaxy.runtime.service": {},
  "fields": {
    "serviceFullName": {
      "displayName": "Service Full Name",
      "type": "String",
      "group": "main",
      "required": true,
      "@TYPEINFO": {
        "type": "list",
        "source": {
          "property": "schemaUrl",
          "sourceType": "resource",
          "path": "#metadata#.wsdl.services",
          "type": "property"
        },
        "dependsOn": ["schemaUrl"]
      }
    },
    "port": {
      "displayName": "Port",
      "type": "String",
      "group": "main",
      "required": true,
      "@TYPEINFO": {
        "type": "list",
        "source": {
          "property": "schemaUrl",
          "sourceType": "resource",
          "path": "#metadata#.wsdl.${serviceFullName}.ports",
          "type": "property"
        },
        "dependsOn": ["schemaUrl", "serviceFullName"]
      }
    },
    "enableAuthorization": {
      "displayName": "Enable Authorization",
      "type": "boolean",
      "required": true,
      "group": "main",
      "defaultValue": true
    },    
    "dataFormat": {
      "displayName": "Data Format",
      "type": "String",
      "required": true,
      "group": "main",
      "@TYPEINFO": {
        "type": "enum",
        "values": [
          "PAYLOAD",
          "RAW",
          "MESSAGE",
          "CXF_MESSAGE",
          "POJO"
        ]
      },
      "defaultValue": "PAYLOAD"
    },
    "mtomEnabled": {
      "displayName": "MTOM Enabled",
      "type": "Boolean",
      "required": true,
      "group": "main",
      "defaultValue": false
    },
    "schemaValidationEnabled": {
      "displayName": "Schema Validation Enabled",
      "type": "Boolean",
      "required": true,
      "group": "main",
      "defaultValue": false
    },
    "_serviceMetadata": {
      "type": "Map",
      "required": true,
      "isHidden": true,
      "defaultValue": {
        "@RESOURCE_META": {
          "url": {
            "@CALCULATED": {
              "lazy": false,
              "expression": "${properties.schemaUrl}"
            }
          },
          "path": {
            "@CALCULATED": {
              "lazy": false,
              "expression": "wsdl.\u0027${properties.serviceFullName}\u0027"
            }
          }
        }
      }
    },
    "serviceName": {
      "type": "String",
      "group": "main",
      "required": true,
      "isHidden": true,
      "defaultValue": {
        "@CALCULATED": {
          "lazy": false,
          "expression": "${properties._serviceMetadata.serviceName}"
        }
      }
    },
    "serviceNamespace": {
      "type": "String",
      "group": "main",
      "required": true,
      "isHidden": true,
      "defaultValue": {
        "@CALCULATED": {
          "lazy": false,
          "expression": "${properties._serviceMetadata.serviceNamespace}"
        }
      }
    },
    "operationRouter": {
      "displayName": "Operation Router",
      "type": "xml:route",
      "required": true,
      "group": "main",
      "@RESOURCE": {
        "_provider": "entaxy-file-internal",
        "endType": "String",
        "format": "base64",
        "preprocess": [
          {
            "processor": "xslt",
            "source": "entaxy-file-internal:routes-common/service-commons.xslt",
            "parameters": {
              "serviceId": {
                "@CALCULATED": {
                  "expression": "${#OWNER#.objectId}",
                  "lazy": false
                }
              }
            }
          },
          {
            "processor": "xslt",
            "source": "entaxy-file-internal:routes-common/soap-operation-router.xslt",
            "parameters": {
              "serviceId": {
                "@CALCULATED": {
                  "expression": "${#OWNER#.objectId}",
                  "lazy": false
                }
              }
            }
          },
          {
            "processor": "xslt",
            "source": "entaxy-file-internal:routes-common/common-components.xslt",
            "parameters": {
              "serviceId": {
                "@CALCULATED": {
                  "expression": "${#OWNER#.objectId}",
                  "lazy": false
                }
              }
            }
          }
        ]
      },
      "defaultValue": {
        "@RESOURCE": {
          "provider": "service-resources",
          "location": {
            "@CALCULATED": {
              "lazy": false,
              "expression": "${#OWNER#.properties._serviceMetadata.serviceResourcesRoot}/${#OWNER#.properties.port}/operationRouterProtected.xml"
            }
          },
          "endType": "String",
          "format": "base64"
        }
      },
      "@TYPEINFO": {
        "type": "resource",
        "location": "${serviceResourcesRoot}/${port}/operationRouterProtected.xml",
        "serviceResourcesRoot": {
          "property": "schemaUrl",
          "sourceType": "resource",
          "path": "#metadata#.wsdl.${serviceFullName}.serviceResourcesRoot",
          "type": "property"
        },
        "dependsOn": ["schemaUrl", "serviceFullName", "port"]
      },
      "config": {
        "scope": "public"
      }
    },
    "@IMPORT": [
      {
        "sourceFactoryId": "service-components",
        "location": "outputs.schemaResourceBasedService.fields",
        "prefix": ""
      }
    ]
  },
  "outputs": {
  	"init": {
  		"fields": {
	        "schemaUrl": {
	        	"displayName": "WSDL schema",
	        	"group": "main",
			    "@TYPEINFO": {
			        "filter": "*.wsdl"
			    }
	        },
  			"serviceFullName": {},
  			"port": {},
  			"enableAuthorization": {},
	        "dataFormat": {},
	        "mtomEnabled": {},
	        "schemaValidationEnabled": {},
	        "operationRouter": {},
	        "_serviceMetadata": {},
	        "serviceName": {},
	        "serviceNamespace": {},
	        "displayServiceSchema": {
	          "group": "main"
	        }
  		}
  	}
  }
}