cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2181
Views
0
Helpful
2
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

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.


Thanks in Advance

Subject: RE: Fail to generate the .net axl api 8.5
Replied by: Robert Rittenhouse on 08-11-2012 03:46:11 PM
I hope it's not too late but I just ran into this. I worked around it by doing this: http://developer.cisco.com/web/sxml/forums/-/message_boards/view_message/6194431#_19_message_6194431
 
Hope this helps!
Comments
matthewdw
Community Member

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:

    public partial class UpdateSoftKeySetReq : NameAndGUIDRequest

    {

        private UpdateSoftKeySetReqAddCallStates[] itemsField;

        private ItemsChoiceType24[] itemsElementNameField;

        /// <remarks/>

        [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)]

        [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")]

        public UpdateSoftKeySetReqAddCallStates[] Items

        {

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!

pfmathieu
Level 1
Level 1

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:

Quick Links