# In ios platform SOAP API call gives error Response with status: 0 for URL: null

**URL:** <https://forum.ionicframework.com/t/in-ios-platform-soap-api-call-gives-error-response-with-status-0-for-url-null/127189>\
**Category:** ionic-v3\
**Created:** [April 7, 2018, 6:28am UTC](https://forum.ionicframework.com/t/in-ios-platform-soap-api-call-gives-error-response-with-status-0-for-url-null/127189 "2018-04-07T06:28:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![demokumar](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@demokumar](https://forum.ionicframework.com/u/demokumar)\
**Post date:** [April 7, 2018, 6:28am UTC](https://forum.ionicframework.com/t/in-ios-platform-soap-api-call-gives-error-response-with-status-0-for-url-null/127189/1 "2018-04-07T06:28:37Z")

</div>

in ios platform i call sop web services but it gives error like Response with status: 0 for URL: null

anyone know how to fix this ??  
this is my code :  
var soapRequest =  
’\<?xml version="1.0" encoding="utf-8"?\>   
\<soap:Envelope xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)”   
xmlns:xsd=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)”   
xmlns:soap=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)”\>   
soap:Body  
  
’ + this.MobileNo + ’   
’ + this.Password + ’   
  
\</soap:Body\>   
\</soap:Envelope\>’;  
var headers = new Headers();  
headers.append(‘Content-Type’, ‘text/xml’);  
headers.append(‘Access-Control-Allow-Method’, ‘POST’);  
headers.append(‘Access-Control-Allow-Headers’, ‘X-Custom-Header’);  
headers.append(‘Access-Control-Allow-Origin’, ‘’);  
this.http.post(this.global.wsUrl + ‘UserLogin’, soapRequest, { headers: headers })

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:41pm UTC](https://forum.ionicframework.com/t/in-ios-platform-soap-api-call-gives-error-response-with-status-0-for-url-null/127189/2 "2021-07-19T21:41:23Z")

</div>

Closed on July 19, 2021, 9:41pm UTC


