You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Zubin Sethna <zs...@technisyst.com.au> on 2008/05/06 09:28:03 UTC

WSDL

Hi all

 

Any ideas on how to support parsing of wsdl messages? I've played with
things and I'm able to parse the .wsdl file itself. This is easy to do
once you have the associated schema (.xsd) file. However, if I now build
wsdl messages how can I validate them? Is there a way to make Xerces-C
understand WSDL definitions?

Thanks

Zubin


Re: WSDL

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Zubin,

Zubin Sethna <zs...@technisyst.com.au> writes:

> Is there a way to make Xerces-C understand WSDL definitions?

Xerces-C++ does not support WSDL so you will have to create your
own parser (perhaps based on DOM). WSDL can also include XML
Schema fragments either verbatim or by referencing an external
.xsd file. The external case is fairly easy to handle. The
verbatim inclusion is tricky unless you don't mind re-serializing
and then re-parsing the schema fragment. It may also be possible
to get under the hood and use the Xerces-C++ internal mechanisms
to "parse out" the schema part directly from the WSDL DOM document.
To start, see the XSDDOMParser and TraverseSchema classes as well
as how they are used in the IGXMLScanner (you can try to follow
the loadGrammar call stack).

Once you have the schema grammar, you can use it to validate XML
documents (presumably bodies of SOAP messages).

Boris

-- 
Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde