Отправка параметра в запросе SOAP с использованием alamofire 4 и swift - PullRequest
0 голосов
/ 11 июля 2019

Я новичок в swift и alamofire, и мне нужно работать с SOAP.В настоящее время я использую расширение alamofire для мыла под названием alamofiresoap для отправки запроса, но я не могу отправить параметр в запросе soap.Я хотел бы спросить, если кто-нибудь знает, как отправить параметр на запрос мыла?Ниже приведена функция

    func Sendrequest() {
     AlamofireSoap.soapRequest("http://www.dneonline.com/calculator.asmx", soapmethod: "Add", soapparameters: ["intA" : "1", "intB" : "2" ], namespace: "http://tempuri.org").responseString { response in
            print("Request: \(String(describing: response.request))")   // original url request
            print("Response: \(String(describing: response.response))") // http url response
            print("Result: \(response.value)")
    }
  }
}

Это выход, где параметр не обнаружен

<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><AddResponse xmlns=\"http://tempuri.org/\"><AddResult>0</AddResult></AddResponse></soap:Body></soap:Envelope>"
...