You can add the prefix when you create the element
xmlDoc.createElement(namespaceURI, namespacePrefix+":"+elementName)
or something to that effect
to generate a skeletal SOAP message I do something like:
request = new XmlDocument()
SOAPEnvelope = request.CreateElement(SOAP.EnvelopeURI,
SOAP.EnvelopePrefix + ":Envelope")
SOAPEnvelope.SetAttribute(SOAP.EnvelopeUri, "encodingStyle",
SOAP.EncodingURI)
SOAPEnvelope.SetAttribute("xmlns:"+SOAP.SchemaDataPrefix,
SOAP.SchemaDataURI)
SOAPEnvelope.SetAttribute("xmlns:"+SOAP.SchemaPrefix, SOAP.SchemaURI)
SOAPEnvelope.SetAttribute("xmlns:"+SOAP.EncodingPrefix,
SOAP.EncodingURI)
request.AppendChild(SOAPEnvelope)
SOAPBody = request.CreateElement(SOAP.EnvelopeURI,
SOAP.EnvelopePrefix+":Body")
SOAPEnvelope.AppendChild(SOAPBody)
I have filed some feature requests that would make some of the more
complicated response parsing a bit easier.
http://support.realsoftware.com/feedback/viewreport.php?
reportid=loyzpoik
http://support.realsoftware.com/feedback/viewreport.php?
reportid=xmyllfrh
http://support.realsoftware.com/feedback/viewreport.php?
reportid=divrgrou
These handle the task of namespace/prefix discovery. With these
features added, then perhaps RB could add support to their SOAP
classes for more complex / custom SOAP types.
http://support.realsoftware.com/feedback/viewreport.php?
reportid=hfrlqkub
-jason
On Feb 16, 2006, at 8:04 AM, Alexander Cohen wrote:
HI, how can i set the prefix for an XMLNode? I want to create a
node that looks like this: <SOAP-ENV:Envelope>. If i set the name
to 'SOAP-ENV:Envelope', i get an XmlException, if i try and set the
name to 'Envelope' and the prefix to 'SOAP-ENV', i get a compiler
error saying i can't assign to the prefix property. So how do i get
this right?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>