Q:

requested data getting null in soap web service from ios

I am trying to insert data into the SQL server database through SOAP XML  Web service from IOS using Swift code, but it is get only Id value which is auto generate in database ,but i cant insert my data into table because it will get null values which i have passed in Soap message. 
My Code in swift 
<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
  <soap:Body>
     <CreateUserDetail xmlns='http://tempuri.org/'>
        <userdetail>
           <UserDetail>
              <Id>1</Id>
              <Username xsi:type='xs:string'>username</Username>
              <Password xsi:type='xs:string'>password</Password>
           </UserDetail>
       </userdetail>
    </CreateUserDetail>
 </soap:Body>
</soap:Envelope>

A:

I have surfing many of blog and sites and finally I got solution for it here is a soap message with solution
my new soap message is written below

<SOAP-ENV:Envelope xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:tns='http://tempuri.org/' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Header/>
     <SOAP-ENV:Body>
         <tns:CreateUserDetail>
            <tns:userdetail>
                <tns:Id xmlns:tns='http://schemas.datacontract.org/2004/07/WcfService1'>1</tns:Id>
                <tns:Username xmlns:tns='http://schemas.datacontract.org/2004/07/WcfService1'>String</tns:Username>
                <tns:Password xmlns:tns='http://schemas.datacontract.org/2004/07/WcfService1'>String</tns:Password>
           </tns:userdetail>
       </tns:CreateUserDetail>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

you have to just replace xmlns:tns='your target namespace' which i have write in id,username,password element 
hope it will help someone

