Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I always get the error “cannot implicitly convert type ‘string’ to test web services type’ after using this code
Quote:
ServicePointManager.SecurityProtocol = (SecurityProtocolType)30;

TestServices.ZWebServiceClient testClients = new TestServices.ZWebServiceClient();
TestServices.processZMF processes = new TestServices.process();
TestServices.processResponse processResponses = new TestServices.processResponse();


testClients = new TestServices.ZWebServiceClient();

processes = new TestServices.process();
processResponses = new TestServices.processResponse();

processes.ZRequest = "XML File";
processResponses.ZResponse = testClients.process("752ce6861badcaa88d7", processes);
//just to see the response
string hhjj = processResponses.ZResponse.ToString();


What I have tried:

I have tried to change the xml file into a string but no luck
Posted
Updated 21-Aug-20 21:12pm

1 solution

We can't help you: We have no idea what a ZWebServiceClient is, or where you got it from.
You will need to go back to the source, and ask them: but the error message is very explicit:
C#
processResponses.ZResponse = testClients.process("752ce6861badcaa88d7", processes);
process returns a string, not a TestServices.processResponse.ZResponse and there is no cast operator defined.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900