0

IPad アプリケーションから .Net Soap Webservice にブール値を送信しようとしています。送信方法がわかりませんでした。true, @"true", 1. を試しましたが、うまくいきませんでした。誰もそれを試したことがありますか?ヒントを教えてください

これが私のコードです。question1、question2、question3、question4、question5、および question6 はブール値です。

NSString *soapMessage = [NSString stringWithFormat:
                         @"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
                         "<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/\">\n"
                         "<soap:Body>\n"
                         "<SendData xmlns=\"http://tempuri.org/\">\n"
                         "<containerId>%@</containerId>"
                         "<date_>%@</date_>"
                         "<image1>%@</image1>"
                         "<image2>%@</image2>"
                         "<image3>%@</image3>"
                         "<question1>%@</question1>"
                         "<question2>%@</question2>"
                         "<question3>%@</question3>"
                         "<question4>%@</question4>"
                         "<question5>%@</question5>"
                         "<question6>%@</question6>"
                         "<notes>%@</notes>"
                         "<transDate>%@</transDate>"
                         "<userId>%@</userId>"
                         "<macId>%@</macId>"
                         "<sFileId>%@</sFileId>"                             
                         "</SendData>"
                         "</soap:Body>\n"
                         "</soap:Envelope>\n", @"999", @"2013-09-09", @"" ,@"" ,@"" ,@""  ,@"" , @"" , @"" , @"" , @"1", @"notes", @"2013-09-09", @"123", @"mymacid", @"sfileid"];
4

2 に答える 2

1
BOOL someBool = YES; //or NO
NSString *stringBool = someBool?@"true":@"false";

その後stringBool、あなたのstringWithFormat

于 2013-05-24T07:05:45.873 に答える
0

SoapUIを使用して値を入力してみてください。それをダウンロードして、ブール値を試してください。

于 2013-05-24T07:05:32.207 に答える