zap_api/
soap.rs

1/* Zed Attack Proxy (ZAP) and its related class files.
2 *
3 * ZAP is an HTTP/HTTPS proxy for assessing web application security.
4 *
5 * Copyright 2019 the ZAP development team
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20use super::ZapApiError;
21use super::ZapService;
22use serde_json::Value;
23use std::collections::HashMap;
24
25/**
26 * This file was automatically generated.
27 */
28/**
29 * Import a WSDL definition from local file.
30 * <p>
31 * This component is optional and therefore the API will only work if it is installed
32*/
33pub fn import_file(service: &ZapService, file: String) -> Result<Value, ZapApiError> {
34    let mut params = HashMap::new();
35    params.insert("file".to_string(), file);
36    super::call(service, "soap", "action", "importFile", params)
37}
38
39/**
40 * Import a WSDL definition from a URL.
41 * <p>
42 * This component is optional and therefore the API will only work if it is installed
43*/
44pub fn import_url(service: &ZapService, url: String) -> Result<Value, ZapApiError> {
45    let mut params = HashMap::new();
46    params.insert("url".to_string(), url);
47    super::call(service, "soap", "action", "importUrl", params)
48}