简体   繁体   中英

Cannot implicitly convert type string to string[] in c# soap call

I am very much perplexed by the error, "Cannot implicitly convert type string to string[]" in a soap call I am attempting to create. I am using VS2015 in C#. Looking at the code:

ServiceReference1.ServiceClient client = new ServiceReference1.ServiceClient();
ServiceReference1.Request req = new ServiceReference1.Request();
req.requestID = "validRequestIDString"; // I get the error here 

If I am using Bear SoapUI I have no issues sending the same requestID and getting a valid response.

I am guessing that the error is telling me that the response is an array and not a single string but I know that is incorrect.

Any direction would be helpful. Thank you

怎么样:

request.requestID = new String[] { "validRequestIDString" };

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM