Created by: sujit pillai on 26-07-2012 01:05:29 AM Hi, I've tried create .net dll from the AXLAPI.wsdl and AXLSoap.xsd. by using wsdl and csc utility. While gnerating of dll made a following changes in the generated AXLAPIService.cs by wsdl utility.
/* public AXLAPIService() { this.Url = "https://CCMSERVERNAME:8443/axl/"; } */ add following Code to the AXLAPIService.cs and make dll out of it. public class BruteForcePolicy : System.Net.ICertificatePolicy { public bool CheckValidationResult(System.Net.ServicePoint sp, System.Security.Cryptography.X509Certificates.X509Certificate cert, System.Net.WebRequest request, int problem) { return true; } } public AXLAPIService(string ccmIp, string user, string password) { System.Net.ServicePointManager.CertificatePolicy = new BruteForcePolicy(); this.Url = "https://" + ccmIp + ":8443/axl/"; this.Credentials = new System.Net.NetworkCredential(user, password); } protected override System.Net.WebRequest GetWebRequest(Uri uri) { System.Net.HttpWebRequest request = base.GetWebRequest(uri) as System.Net.HttpWebRequest; request.ProtocolVersion = System.Net.HttpVersion.Version10; return request; }
When i use the gnerated dll in my VS2005 C# windows application it gives me following errors when i called any api.
Unable to generate a temporary class (result=1). error CS0030: Cannot convert type 'UpdateSoftKeySetReqAddCallStates' to 'UpdateSoftKeySetReqCallStates' error CS0030: Cannot convert type 'UpdateSoftKeySetReqAddCallStates' to 'UpdateSoftKeySetReqRemoveCallStates' error CS0029: Cannot implicitly convert type 'UpdateSoftKeySetReqRemoveCallStates' to 'UpdateSoftKeySetReqAddCallStates' error CS0029: Cannot implicitly convert type 'UpdateSoftKeySetReqCallStates' to 'UpdateSoftKeySetReqAddCallStates'
can anybody help me on this, any thing else to be change in AXLAPIService.cs before generating .dll. The same procedure is work with the 6.0 and 7.0 versions the problem is faced on 8.5 version. The helpme.txt provided is not sufficient. waiting for a reply it is Urgent.
The link at the bottom of the document appears to be dead. I found a solution to this for v8.5/8.6 generated code, for what it's worth. You have to comment out two lines:
[System.Xml.Serialization.XmlElementAttribute("addCallStates", typeof(UpdateSoftKeySetReqAddCallStates), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
//[System.Xml.Serialization.XmlElementAttribute("callStates", typeof(UpdateSoftKeySetReqCallStates), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
//[System.Xml.Serialization.XmlElementAttribute("removeCallStates", typeof(UpdateSoftKeySetReqRemoveCallStates), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
It looks like the code generation picked up some extraneous attributes that are supposed to be on the return, but aren't correct. Find the lines above (look for the declaration of "public partial class UpdateSoftKeySetReq") and kill the two extra "XmlElementAttribute" annotations, as shown above.
These changes allow the AXLAPIService class to compile and run--I have NOT tested actually doing anything with SoftKeys, which is apparently what this particular code is for, so it might break that functionality!
Were you able to find a solution to this issue? The above link to developer.cisco... doesn't work.
Thanks,
Getting Started
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: