Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Created by: Raykan Morgan on 18-11-2013 07:52:21 PM hi everybody,
I am trying to serialize a request to send XML API . My sample case is around GetSite. 1. Downloaded latest schema (8.0.0) 2. Created c# classes by using xsd /c fileName1 fileName2 ... where file names are related xsd files from schema. I think the problem is in these classess. The following is for the complex type getSite
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.webex.com/schemas/2002/06/service/site")] public partial class getSite : bodyContentType { }
.... 3. After I serialized this I get the following xml
When I submit this into the webex server this is the response:
<serv:reason> validation: unable to instantiate com.webex.xmlapi.service.binding.GetSite; java.lang.ClassNotFoundException: com.webex.xmlapi.service.binding.GetSite </serv:reason>
I think the bodyContent part should be something like this:
<bodyContent xsi:type="site:getSite">
To be able to get such an XML output what should I have in the class file? or if you have any other recommendation I am ready to hear.
Thanks in advance ...
Subject: RE: Using XmlSerializer Replied by: Nathan Morrow on 21-11-2013 05:54:01 PM Hello,
xmlns:site is already defined in the schema. XML API ignores new namespace definition in the XML request, aside from xmlns:xsi and xsi:type. xsi:type="site:getSite" would work, as would xsi:type="java:com.webex.xmlapi.service.binding.site.GetSite". I'm not familiar with c# XML generation from schema, but there should be a way to make it use the already defined namespace for the site service.
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: