Hello, I'm trying to parse a wsdl document (DOM). I'm using Xerces-C 2.7.
<?xml version="1.0" encoding="UTF-8"?> <!-- September 1, 2004 --> <wsdl:definitions name="parlayx_call_notification_interface" targetNamespace="http://www.csapi.org/wsdl/parlayx/call_notification/v2_ 0/interface" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:parlayx_call_notification="http://www.csapi.org/wsdl/parlayx/call_ notification/v2_0/interface" xmlns:parlayx_common_faults="http://www.csapi.org/wsdl/parlayx/common/v2 _0/faults" xmlns:parlayx_call_notification_xsd="http://www.csapi.org/schema/parlayx /call_notification/v2_0" xmlns:parlayx_common_xsd="http://www.csapi.org/schema/parlayx/common/v2_ 0" xmlns:parlayx_call_notification_local_xsd="http://www.csapi.org/schema/p arlayx/call_notification/v2_0/local"> <wsdl:import namespace="http://www.csapi.org/wsdl/parlayx/common/v2_0/faults" location="parlayx_common_faults_2_0.wsdl"/> <wsdl:types> <xsd:schema elementFormDefault="qualified" targetNamespace="http://www.csapi.org/schema/parlayx/call_notification/v 2_0/local"> <xsd:import namespace="http://www.csapi.org/schema/parlayx/call_notification/v2_0" schemaLocation="parlayx_call_notification_types_2_0.xsd"/> <xsd:import namespace="http://www.csapi.org/schema/parlayx/common/v2_0" schemaLocation="parlayx_common_types_2_0.xsd"/> <xsd:element name="handleBusy" type="parlayx_call_notification_local_xsd:handleBusy"/> <xsd:complexType name="handleBusy"> . . . In the document, I have a reference to a schema element: <wsdl:part name="parameters" element="parlayx_call_notification_local_xsd:handleBusy"/> (of course this is only an example, and the wsdl:part can reference any schema element, even within another imported schema file) I want to understand the type of "parlayx_call_notification_local_xsd:handleBusy" in order to send it in a SOAP request. Since I don't have a direct API to understand what does "parlayx_call_notification_local_xsd:handleBusy" mean (what type, is it a complex type etc.), I was thinking of doing the following: 1. Start parsing the wsdl <wsdl:types> element: 2. In case of <xsd:schema> element I will write the element into an DOMInputSource 3. Use the DomBuilder:: loadGrammar API in order to load the schema grammar (I noticed that the recursive include of schema using xsd:import is already handled internally). 4. get the actual namespace for parlayx_call_notification_local_xsd (is there an API for that or I should maintain the namespace mapping of the document myself???) 5. Get the SchemaGrammar object using DomBuilder::getGrammar API and using the namespace from (4). 6. Get all elements in SchemaGrammar using SchemaGrammar ::getElemEnumerator() and find the SchemaElementDecl object of the required element 'handleBusy' by iterating over the enumerator. My question: Is this the correct way of doing that? Is there another API that I missed that I can give it the element name "parlayx_call_notification_local_xsd:handleBusy" and I will get back the SchemaElementDecl object? Thank you, Ori.
