Tag: soap

如何从ios下面的输出中获取值?

我得到这个下面的输出同时击中肥皂服务,现在我想从下面的输出中获取所有的值。 如何得到这个? [{ "sms": "You have logged in successfully!", "userId": "13", "type": "1", "name": "Suhashini Kumari Singh" }]

SOAP请求使用NSURLSession Objective C或SWIFT

我如何使用NSURLSession执行SOAP请求? 请查找SOAP请求格式。 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pm="http://sampleurl.com/webservices/pm"> <soapenv:Header/> <soapenv:Body> <pm:start> <username>awdmmappadmin1</username> <password>password</password> <completedDate>2016-04-25T13:37:34.699Z</completedDate> <gameMinutes>2</gameMinutes> <gameMoves>14</gameMoves> <gameSeconds>33</gameSeconds> <gameTimeSec>153</gameTimeSec> <guestId>2016</guestId> </pm:start>

调用HTTPS Soap服务时出现NSURLConnection错误

我试图从Soap请求获取数据,但得到我的应用程序崩溃与此错误: 2016-02-08 11:12:11.524 Example[567:128898] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843) Response: nil fatal error: unexpectedly found nil while unwrapping an Optional value 我在plist中启用了安全设置,并成功调用其他服务。 注:该服务是在HTTPS上,我得到这个错误,因为这个? 这是否需要任何证书? 我第一次打电话给肥皂服务,也请指导我如何在服务中添加电子邮件参数:( https:// [IP]:9897 / JLIPolicyinfo.asmx?op = GetEmail_Poldetail ) 这里是我从这里得到的代码:( 使用SOAP的IOS Swift调用Web服务 ) let is_SoapMessage: String = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:cgs=\"http://www.cgsapi.com/\"><soapenv:Header/><soapenv:Body><cgs:GetSystemStatus/></soapenv:Body></soapenv:Envelope>" let is_URL: String = "https://58.27.241.203:9897/JLIPolicyinfo.asmx" let lobj_Request = NSMutableURLRequest(URL: NSURL(string: is_URL)!) […]

在Objective-C中执行一系列SOAP请求的更好方法

我使用以下hack-job代码来执行一系列从服务器下载数据以供在应用程序中使用的SOAP请求: 这个代码在按下“更新”button时被调用: – (IBAction) update { UIAlertView *errorView; if([[Reachability reachabilityForInternetConnection] currentReachabilityStatus] == NotReachable) { errorView = [[UIAlertView alloc] initWithTitle: @"Network Error" message: @"No Network connection availible!" delegate: self cancelButtonTitle: @"OK" otherButtonTitles: nil]; [errorView show]; } else { [appDelegate.categories removeAllObjects]; [appDelegate.currencies removeAllObjects]; [appDelegate.projects removeAllObjects]; HUD = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; HUD.labelText = @"Downloading.."; [self requestCategories]; } } […]

在Objective C(iOS应用程序)中请求WCF Web服务时收到SOAP错误

我正尝试从iOS应用程序调用Web服务。 我已经在WCF中开发了这个服务。 Web服务托pipe在使用BasicHTTPBindingconfiguration的IIS上。 我开发了一个简单的iOS应用程序,调用远程PC上托pipe的Web服务。 iOS应用程序工作正常,但SOAP服务似乎不理解我从iOS应用程序发送的请求。 这里是所有的细节,我得到的错误是在最后。 Web服务的WSDL是: <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="SLService" targetNamespace="http://tempuri.org/"> <wsdl:types> <xsd:schema targetNamespace="http://tempuri.org/Imports"> <xsd:import schemaLocation="http://10.211.55.4/TestService/SLService.svc?xsd=xsd0" namespace="http://tempuri.org/"/> <xsd:import schemaLocation="http://10.211.55.4/TestService/SLService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/> </xsd:schema> </wsdl:types> <wsdl:message name="ISLService_DoWork_InputMessage"> <wsdl:part name="parameters" element="tns:DoWork"/> </wsdl:message> <wsdl:message name="ISLService_DoWork_OutputMessage"> <wsdl:part name="parameters" element="tns:DoWorkResponse"/> </wsdl:message> <wsdl:portType name="ISLService"> <wsdl:operation name="DoWork"> <wsdl:input wsaw:Action="http://tempuri.org/ISLService/DoWork" message="tns:ISLService_DoWork_InputMessage"/> […]