开发者

Writing input for .NET web services

I am new to iPhone web services. I need to get data from .NET web server. For that my soap message is:

NSString *xml = [NSString stringWithFormat:@"<MortgageGetLoanOfficerInfo><PhoneNumber>919703661366</PhoneNumber></MortgageGetLoanOfficerInfo>"];

    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"
    "<GenericAndroidMethod xmlns=\"Mortgage\">\n"
    "<methodName>MortgageGetLoanOfficerInfo</methodName>"
    "<xmlParam>%@</xmlParam>"
    "<开发者_运维百科/GenericAndroidMethod>\n"
    "</soap:Body>\n"
    "</soap:Envelope>\n",xml
    ];

But I did not get a response.

When checking in charles web debugging proxy, it will show like this.

But I need to pass <MortgageGetLoanOfficerInfo><PhoneNumber>919703661366</PhoneNumber></MortgageGetLoanOfficerInfo> as a single string. How can I do this? Please help me.


I resolve My problem By using CDDATA.

<xmlParam><![CDATA[<MortgageGetLoanOfficerInfo><PhoneNumber>919703661366</PhoneNumber></MortgageGetLoanOfficerInfo>]]></xmlParam>


There are many ways to successfully make SOAP calls:

How to access SOAP services from iPhone

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜