Xcode SWIFT中的SOAP导入一个目标C类
嗨,我要用Swift在xCode上编写我的应用程序,在我在Android上的Web服务SOAP出现问题之前,我做了一些搜索,它们涉及很多主题,但我的Web服务很特别,看看Android上我做了什么:Xcode SWIFT中的SOAP导入一个目标C类,xcode,swift,web-services,soap,Xcode,Swift,Web Services,Soap,嗨,我要用Swift在xCode上编写我的应用程序,在我在Android上的Web服务SOAP出现问题之前,我做了一些搜索,它们涉及很多主题,但我的Web服务很特别,看看Android上我做了什么: SSLConnection.allowAllSSL(); SoapObject request = new SoapObject(NAMESPACE, "SendLead"); request.addProperty("xml", xml); SoapSeriali
SSLConnection.allowAllSSL();
SoapObject request = new SoapObject(NAMESPACE, "SendLead");
request.addProperty("xml", xml);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportBasicAuth httpTransport = new HttpTransportBasicAuth(URL, getResources().getString(R.string.login), getResources().getString(R.string.mdp));
httpTransport.debug = true;
httpTransport.call(SOAP_ACTION, envelope);
SoapObject result = (SoapObject) envelope.bodyIn;
Log.i(TAG, "Result Celsius: " + result);
SoapObject SendLeadReturn = (SoapObject) result.getProperty("SendLeadReturn");
String code = SendLeadReturn.getPropertyAsString("code");
所以我有很多限制:
- httpsURL
- 我必须保持登录才能使用wsdl的其他功能(HttpTransportBasicAuth)
- 我发送和接收xml字符串