Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
how to generate XML soap message
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
anj patnaik  
View profile  
 More options Feb 6, 1:45 pm
Newsgroups: comp.lang.tcl
From: anj patnaik <patn...@gmail.com>
Date: Mon, 6 Feb 2012 10:45:58 -0800 (PST)
Local: Mon, Feb 6 2012 1:45 pm
Subject: how to generate XML soap message
Hello,

I would like to be able to generate a XML message like the one below
dynamically, i,e from variables/list params. I briefly looked at
tclsoap and the basic example didn't work and still researching tclws.
The latter requires wsdl file parsing and the WSDL files I have are
quite complex and nested.

So, I was wondering about tdom, but the examples seem to be more DTD
oriented.

Any pointers appreciated! Thanks.

Here is a sample XML request that I need to be able generate from
variables.

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:v1="http://www.tmforum.org/mtop/fmw/xsd/hdr/v1"
xmlns:v11="http://www.tmforum.org/mtop/rtm/xsd/ar/v1"
xmlns:v12="http://www.tmforum.org/mtop/fmw/xsd/nam/v1"
xmlns:v13="http://www.tmforum.org/mtop/nra/xsd/com/v1"
xmlns:v14="http://www.tmforum.org/mtop/nra/xsd/prc/v1">
   <soapenv:Header>
      <v1:header>
         <v1:destinationURI>http://localhost:9006/mtosi/rtm/
AlarmRetrieval</v1:destinationURI>
         <v1:communicationStyle>RPC</v1:communicationStyle>
         <v1:activityName>getActiveAlarms</v1:activityName>
         <v1:msgName>GetActiveAlarmsRequest</v1:msgName>
         <v1:senderURI>http://localhost:9009</v1:senderURI>
         <v1:msgType>REQUEST</v1:msgType>
         <v1:communicationPattern>MultipleBatchResponse</
v1:communicationPattern>
         <v1:requestedBatchSize>1000</v1:requestedBatchSize>
      </v1:header>
   </soapenv:Header>
   <soapenv:Body>
      <v11:getActiveAlarmsRequest>
        <v11:filter>
            <v11:perceivedSeverityList>

                 <v13:perceivedSeverity>CLEARED</
v13:perceivedSeverity>
            </v11:perceivedSeverityList>
         </v11:filter>
      </v11:getActiveAlarmsRequest>
   </soapenv:Body>
</soapenv:Envelope>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aric Bills  
View profile  
 More options Feb 6, 2:33 pm
Newsgroups: comp.lang.tcl
From: Aric Bills <aric.bi...@gmail.com>
Date: Mon, 6 Feb 2012 11:33:30 -0800 (PST)
Local: Mon, Feb 6 2012 2:33 pm
Subject: Re: how to generate XML soap message
On Feb 6, 11:45 am, anj patnaik <patn...@gmail.com> wrote:

Example output is helpful. Can you also give the example input that's
supposed to produce it?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
anj patnaik  
View profile  
 More options Feb 6, 3:27 pm
Newsgroups: comp.lang.tcl
From: anj patnaik <patn...@gmail.com>
Date: Mon, 6 Feb 2012 12:27:25 -0800 (PST)
Local: Mon, Feb 6 2012 3:27 pm
Subject: Re: how to generate XML soap message

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Header>
      <header xmlns:ns13="http://www.tmforum.org/mtop/rtm/xsd/ar/v1"
xmlns:ns12="http://www.tmforum.org/mtop/nrb/xsd/lay/v1"
xmlns:ns11="http://www.tmforum.org/mtop/rtm/xsd/ac/v1"
xmlns:ns10="http://www.tmforum.org/mtop/fmw/xsd/msg/v1"
xmlns:ns9="http://www.tmforum.org/mtop/fmw/xsd/cornot/v1"
xmlns:ns8="http://www.tmforum.org/mtop/nra/xsd/com/v1"
xmlns:ns7="http://www.tmforum.org/mtop/nra/xsd/prc/v1"
xmlns:ns6="http://www.tmforum.org/mtop/nra/xsd/alm/v1"
xmlns:ns5="http://www.tmforum.org/mtop/fmw/xsd/nam/v1"
xmlns:ns4="http://www.tmforum.org/mtop/fmw/xsd/ei/v1"
xmlns:ns3="http://www.tmforum.org/mtop/fmw/xsd/cei/v1"
xmlns:ns2="http://www.tmforum.org/mtop/fmw/xsd/gen/v1" xmlns="http://
www.tmforum.org/mtop/fmw/xsd/hdr/v1">
         <activityName>getActiveAlarms</activityName>
         <msgName>getActiveAlarmsResponse</msgName>
         <msgType>RESPONSE</msgType>
         <senderURI>http://wcars057:9006/mtosi/rtm/AlarmRetrieval</
senderURI>
         <destinationURI>http://localhost:9009</destinationURI>
         <activityStatus>SUCCESS</activityStatus>
         <communicationPattern>MultipleBatchResponse</
communicationPattern>
         <communicationStyle>RPC</communicationStyle>
         <requestedBatchSize>2</requestedBatchSize>
         <batchSequenceEndOfReply>false</batchSequenceEndOfReply>
         <iteratorReferenceURI>http://wcars057:9006/mtosi/rtm/
AlarmRetrieval/32</iteratorReferenceURI>
         <timestamp>2012-02-06T03:15:59.783-00:05</timestamp>
      </header>
   </S:Header>
   <S:Body>
      <ns13:getActiveAlarmsResponse xmlns:ns13="http://www.tmforum.org/
mtop/rtm/xsd/ar/v1" xmlns:ns12="http://www.tmforum.org/mtop/nrb/xsd/
lay/v1" xmlns:ns11="http://www.tmforum.org/mtop/rtm/xsd/ac/v1"
xmlns:ns10="http://www.tmforum.org/mtop/fmw/xsd/msg/v1"
xmlns:ns9="http://www.tmforum.org/mtop/fmw/xsd/cornot/v1"
xmlns:ns8="http://www.tmforum.org/mtop/nra/xsd/com/v1"
xmlns:ns7="http://www.tmforum.org/mtop/nra/xsd/prc/v1"
xmlns:ns6="http://www.tmforum.org/mtop/nra/xsd/alm/v1"
xmlns:ns5="http://www.tmforum.org/mtop/fmw/xsd/nam/v1"
xmlns:ns4="http://www.tmforum.org/mtop/fmw/xsd/ei/v1"
xmlns:ns3="http://www.tmforum.org/mtop/fmw/xsd/cei/v1"
xmlns:ns2="http://www.tmforum.org/mtop/fmw/xsd/gen/v1" xmlns="http://
www.tmforum.org/mtop/fmw/xsd/hdr/v1">
         <ns6:alarm>
            <ns3:notificationId>1630</ns3:notificationId>
            <ns3:sourceTime>2012-01-30T10:19:59.633-00:05</
ns3:sourceTime>
            <ns4:objectType>AID</ns4:objectType>
            <ns4:objectName>
               <ns5:rdn>
                  <ns5:type>OS</ns5:type>
                  <ns5:value>Ciena</ns5:value>
               </ns5:rdn>
            </ns4:objectName>
            <ns4:osTime>2012-01-30T10:19:59.633-00:05</ns4:osTime>
            <ns6:isClearable>true</ns6:isClearable>
            <ns6:aliasNameList>
               <ns2:alias>
                  <ns2:aliasName>nativeSrcEntityId</ns2:aliasName>
                  <ns2:aliasValue>Mediation</ns2:aliasValue>
               </ns2:alias>
            </ns6:aliasNameList>
            <ns6:probableCause>
               <ns7:probableCause>VENDOR_EXT</ns7:probableCause>
            </ns6:probableCause>
            <ns6:additionalText>Communication Failed with
ESM_umsint01</ns6:additionalText>
            <ns6:perceivedSeverity>CLEARED</ns6:perceivedSeverity>
            <ns6:serviceAffecting>NON_SERVICE_AFFECTING</
ns6:serviceAffecting>
         </ns6:alarm>
         <ns6:alarm>
            <ns3:notificationId>1631</ns3:notificationId>
            <ns3:sourceTime>2012-01-30T10:22:26.993-00:05</
ns3:sourceTime>
            <ns4:objectType>AID</ns4:objectType>
            <ns4:objectName>
               <ns5:rdn>
                  <ns5:type>OS</ns5:type>
                  <ns5:value>Ciena</ns5:value>
               </ns5:rdn>
            </ns4:objectName>
            <ns4:osTime>2012-01-30T10:22:26.993-00:05</ns4:osTime>
            <ns6:isClearable>true</ns6:isClearable>
            <ns6:aliasNameList>
               <ns2:alias>
                  <ns2:aliasName>nativeSrcEntityId</ns2:aliasName>
                  <ns2:aliasValue>Synchronization Coordinator</
ns2:aliasValue>
               </ns2:alias>
            </ns6:aliasNameList>
            <ns6:probableCause extension="Loss Of Synchronization">
               <ns7:probableCause>VENDOR_EXT</ns7:probableCause>
            </ns6:probableCause>
            <ns6:nativeProbableCause>Loss Of Synchronization</
ns6:nativeProbableCause>
            <ns6:additionalText>Synchronization
Failure:ALPHA_3930_3:PSM</ns6:additionalText>
            <ns6:perceivedSeverity>CLEARED</ns6:perceivedSeverity>
            <ns6:serviceAffecting>NON_SERVICE_AFFECTING</
ns6:serviceAffecting>
         </ns6:alarm>
         <ns6:alarm>
            <ns3:notificationId>1632</ns3:notificationId>
            <ns3:sourceTime>2012-01-30T10:22:27.493-00:05</
ns3:sourceTime>
            <ns4:objectType>AID</ns4:objectType>
            <ns4:objectName>
               <ns5:rdn>
                  <ns5:type>OS</ns5:type>
                  <ns5:value>Ciena</ns5:value>
               </ns5:rdn>
            </ns4:objectName>
            <ns4:osTime>2012-01-30T10:22:27.493-00:05</ns4:osTime>
            <ns6:isClearable>true</ns6:isClearable>
            <ns6:aliasNameList>
               <ns2:alias>
                  <ns2:aliasName>nativeSrcEntityId</ns2:aliasName>
                  <ns2:aliasValue>Synchronization Coordinator</
ns2:aliasValue>
               </ns2:alias>
            </ns6:aliasNameList>
            <ns6:probableCause extension="Loss Of Synchronization">
               <ns7:probableCause>VENDOR_EXT</ns7:probableCause>
            </ns6:probableCause>
            <ns6:nativeProbableCause>Loss Of Synchronization</
ns6:nativeProbableCause>
            <ns6:additionalText>Synchronization Failure:5410:PSM</
ns6:additionalText>
            <ns6:perceivedSeverity>CLEARED</ns6:perceivedSeverity>
            <ns6:serviceAffecting>NON_SERVICE_AFFECTING</
ns6:serviceAffecting>
         </ns6:alarm>
      </ns13:getActiveAlarmsResponse>
   </S:Body>
</S:Envelope>

On Feb 6, 2:33 pm, Aric Bills <aric.bi...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexandre Ferrieux  
View profile  
 More options Feb 6, 3:43 pm
Newsgroups: comp.lang.tcl
From: Alexandre Ferrieux <alexandre.ferri...@gmail.com>
Date: Mon, 6 Feb 2012 12:43:19 -0800 (PST)
Local: Mon, Feb 6 2012 3:43 pm
Subject: Re: how to generate XML soap message
On Feb 6, 9:27 pm, anj patnaik <patn...@gmail.com> wrote:

When I see XML used this way, I am suddenly nostalgic of ASN.1...
(I know it is not your fault, and I have a precise idea of where the
dim-witted designers of SOAP belong ;-)

-Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
anj patnaik  
View profile  
 More options Feb 6, 3:26 pm
Newsgroups: comp.lang.tcl
From: anj patnaik <patn...@gmail.com>
Date: Mon, 6 Feb 2012 12:26:30 -0800 (PST)
Local: Mon, Feb 6 2012 3:26 pm
Subject: Re: how to generate XML soap message
You want the output and input, right?

Ok, I have attached the output when the input above has a
requestedBatchSize of 3.

Note that I am only interested in building input from vars/list. The
output will be probably be a dump of what's fetched from http::data.

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Header>
      <header xmlns:ns13="http://www.tmforum.org/mtop/rtm/xsd/ar/v1"
xmlns:ns12="http://www.tmforum.org/mtop/nrb/xsd/lay/v1"
xmlns:ns11="http://www.tmforum.org/mtop/rtm/xsd/ac/v1"
xmlns:ns10="http://www.tmforum.org/mtop/fmw/xsd/msg/v1"
xmlns:ns9="http://www.tmforum.org/mtop/fmw/xsd/cornot/v1"
xmlns:ns8="http://www.tmforum.org/mtop/nra/xsd/com/v1"
xmlns:ns7="http://www.tmforum.org/mtop/nra/xsd/prc/v1"
xmlns:ns6="http://www.tmforum.org/mtop/nra/xsd/alm/v1"
xmlns:ns5="http://www.tmforum.org/mtop/fmw/xsd/nam/v1"
xmlns:ns4="http://www.tmforum.org/mtop/fmw/xsd/ei/v1"
xmlns:ns3="http://www.tmforum.org/mtop/fmw/xsd/cei/v1"
xmlns:ns2="http://www.tmforum.org/mtop/fmw/xsd/gen/v1" xmlns="http://
www.tmforum.org/mtop/fmw/xsd/hdr/v1">
         <activityName>getActiveAlarms</activityName>
         <msgName>getActiveAlarmsResponse</msgName>
         <msgType>RESPONSE</msgType>
         <senderURI>http://wcars057:9006/mtosi/rtm/AlarmRetrieval</
senderURI>
         <destinationURI>http://localhost:9009</destinationURI>
         <activityStatus>SUCCESS</activityStatus>
         <communicationPattern>MultipleBatchResponse</
communicationPattern>
         <communicationStyle>RPC</communicationStyle>
         <requestedBatchSize>2</requestedBatchSize>
         <batchSequenceEndOfReply>false</batchSequenceEndOfReply>
         <iteratorReferenceURI>http://wcars057:9006/mtosi/rtm/
AlarmRetrieval/32</iteratorReferenceURI>
         <timestamp>2012-02-06T03:15:59.783-00:05</timestamp>
      </header>
   </S:Header>
   <S:Body>
      <ns13:getActiveAlarmsResponse xmlns:ns13="http://www.tmforum.org/
mtop/rtm/xsd/ar/v1" xmlns:ns12="http://www.tmforum.org/mtop/nrb/xsd/
lay/v1" xmlns:ns11="http://www.tmforum.org/mtop/rtm/xsd/ac/v1"
xmlns:ns10="http://www.tmforum.org/mtop/fmw/xsd/msg/v1"
xmlns:ns9="http://www.tmforum.org/mtop/fmw/xsd/cornot/v1"
xmlns:ns8="http://www.tmforum.org/mtop/nra/xsd/com/v1"
xmlns:ns7="http://www.tmforum.org/mtop/nra/xsd/prc/v1"
xmlns:ns6="http://www.tmforum.org/mtop/nra/xsd/alm/v1"
xmlns:ns5="http://www.tmforum.org/mtop/fmw/xsd/nam/v1"
xmlns:ns4="http://www.tmforum.org/mtop/fmw/xsd/ei/v1"
xmlns:ns3="http://www.tmforum.org/mtop/fmw/xsd/cei/v1"
xmlns:ns2="http://www.tmforum.org/mtop/fmw/xsd/gen/v1" xmlns="http://
www.tmforum.org/mtop/fmw/xsd/hdr/v1">
         <ns6:alarm>
            <ns3:notificationId>1630</ns3:notificationId>
            <ns3:sourceTime>2012-01-30T10:19:59.633-00:05</
ns3:sourceTime>
            <ns4:objectType>AID</ns4:objectType>
            <ns4:objectName>
               <ns5:rdn>
                  <ns5:type>OS</ns5:type>
                  <ns5:value>Ciena</ns5:value>
               </ns5:rdn>
            </ns4:objectName>
            <ns4:osTime>2012-01-30T10:19:59.633-00:05</ns4:osTime>
            <ns6:isClearable>true</ns6:isClearable>
            <ns6:aliasNameList>
               <ns2:alias>
                  <ns2:aliasName>nativeSrcEntityId</ns2:aliasName>
                  <ns2:aliasValue>Mediation</ns2:aliasValue>
               </ns2:alias>
            </ns6:aliasNameList>
            <ns6:probableCause>
               <ns7:probableCause>VENDOR_EXT</ns7:probableCause>
            </ns6:probableCause>
            <ns6:additionalText>Communication Failed with
ESM_umsint01</ns6:additionalText>
            <ns6:perceivedSeverity>CLEARED</ns6:perceivedSeverity>
            <ns6:serviceAffecting>NON_SERVICE_AFFECTING</
ns6:serviceAffecting>
         </ns6:alarm>
         <ns6:alarm>
            <ns3:notificationId>1631</ns3:notificationId>
            <ns3:sourceTime>2012-01-30T10:22:26.993-00:05</
ns3:sourceTime>
            <ns4:objectType>AID</ns4:objectType>
            <ns4:objectName>
               <ns5:rdn>
                  <ns5:type>OS</ns5:type>
                  <ns5:value>Ciena</ns5:value>
               </ns5:rdn>
            </ns4:objectName>
            <ns4:osTime>2012-01-30T10:22:26.993-00:05</ns4:osTime>
            <ns6:isClearable>true</ns6:isClearable>
            <ns6:aliasNameList>
               <ns2:alias>
                  <ns2:aliasName>nativeSrcEntityId</ns2:aliasName>
                  <ns2:aliasValue>Synchronization Coordinator</
ns2:aliasValue>
               </ns2:alias>
            </ns6:aliasNameList>
            <ns6:probableCause extension="Loss Of Synchronization">
               <ns7:probableCause>VENDOR_EXT</ns7:probableCause>
            </ns6:probableCause>
            <ns6:nativeProbableCause>Loss Of Synchronization</
ns6:nativeProbableCause>
            <ns6:additionalText>Synchronization
Failure:ALPHA_3930_3:PSM</ns6:additionalText>
            <ns6:perceivedSeverity>CLEARED</ns6:perceivedSeverity>
            <ns6:serviceAffecting>NON_SERVICE_AFFECTING</
ns6:serviceAffecting>
         </ns6:alarm>
         <ns6:alarm>
            <ns3:notificationId>1632</ns3:notificationId>
            <ns3:sourceTime>2012-01-30T10:22:27.493-00:05</
ns3:sourceTime>
            <ns4:objectType>AID</ns4:objectType>
            <ns4:objectName>
               <ns5:rdn>
                  <ns5:type>OS</ns5:type>
                  <ns5:value>Ciena</ns5:value>
               </ns5:rdn>
            </ns4:objectName>
            <ns4:osTime>2012-01-30T10:22:27.493-00:05</ns4:osTime>
            <ns6:isClearable>true</ns6:isClearable>
            <ns6:aliasNameList>
               <ns2:alias>
                  <ns2:aliasName>nativeSrcEntityId</ns2:aliasName>
                  <ns2:aliasValue>Synchronization Coordinator</
ns2:aliasValue>
               </ns2:alias>
            </ns6:aliasNameList>
            <ns6:probableCause extension="Loss Of Synchronization">
               <ns7:probableCause>VENDOR_EXT</ns7:probableCause>
            </ns6:probableCause>
            <ns6:nativeProbableCause>Loss Of Synchronization</
ns6:nativeProbableCause>
            <ns6:additionalText>Synchronization Failure:5410:PSM</
ns6:additionalText>
            <ns6:perceivedSeverity>CLEARED</ns6:perceivedSeverity>
            <ns6:serviceAffecting>NON_SERVICE_AFFECTING</
ns6:serviceAffecting>
         </ns6:alarm>
      </ns13:getActiveAlarmsResponse>
   </S:Body>
</S:Envelope>

On Feb 6, 2:33 pm, Aric Bills <aric.bi...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aric Bills  
View profile  
 More options Feb 6, 5:44 pm
Newsgroups: comp.lang.tcl
From: Aric Bills <aric.bi...@gmail.com>
Date: Mon, 6 Feb 2012 14:44:34 -0800 (PST)
Local: Mon, Feb 6 2012 5:44 pm
Subject: Re: how to generate XML soap message
On Feb 6, 1:26 pm, anj patnaik <patn...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
anj patnaik  
View profile  
 More options Feb 6, 7:07 pm
Newsgroups: comp.lang.tcl
From: anj patnaik <patn...@gmail.com>
Date: Mon, 6 Feb 2012 16:07:59 -0800 (PST)
Local: Mon, Feb 6 2012 7:07 pm
Subject: Re: how to generate XML soap message
I'd probably use a list or list of lists to denote the data to be set.

Something like this for the header:

set header { communicationStyle RPC activityName getActiveAlarms
msgType REQUEST ...}

set body {filter {perceivedSeverityList {CLEARED}}}

Note that since SOAP body params are many levels deep I probably need
a list of lists or something.

I am using Tcl 8.4.

THANKS.

On Feb 6, 5:44 pm, Aric Bills <aric.bi...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aric Bills  
View profile  
 More options Feb 7, 12:45 am
Newsgroups: comp.lang.tcl
From: Aric Bills <aric.bi...@gmail.com>
Date: Mon, 6 Feb 2012 21:45:09 -0800 (PST)
Local: Tues, Feb 7 2012 12:45 am
Subject: Re: how to generate XML soap message
OK, thanks for clarifying.

tdom does provide functionality for building a DOM tree from a list,
using [$doc appendFromList $list] or [$node appendFromList $list].
appendFromList expects a list with two or three items. If the first
list item is "#text", tdom creates a text node whose contents are the
second item in the list. Otherwise, the first item names the node to
be created, the second item is a list of attribute-value pairs, and
the third item is a list of children; each child should also be a two-
or three-item list. Here's a trivial example:

  package require tdom
  set booklist {
    {book {type fiction} {{#text {Gulliver's Travels}}}}
    {book {type nonfiction} {{#text {Tcl and the Tk Toolkit}}}}
  }
  set bookDocAsList [list books [list] $booklist]
  dom createDocumentNode bookdoc
  $bookdoc appendFromList $bookDocAsList

This will create a DOM tree corresponding to the following document:

  <books>
      <book type="fiction">Gulliver's Travels</book>
      <book type="nonfiction">Tcl and the Tk Toolkit</book>
  </books>

By the way, you can produce the corresponding XML document using

  $bookdoc asXML

In the case of your XML document from your original post, you could
create it like this (you'll have to remove the extra newlines inserted
by Google Groups):

  package require tdom
  dom createDocumentNode doc
  $doc appendFromList {soapenv:Envelope {xmlns:soapenv {http://
schemas.xmlsoap.org/soap/ envelope/} xmlns:v1 http://www.tmforum.org/mtop/fmw/xsd/hdr/v1
xmlns:v11 http://www.tmforum.org/mtop/rtm/xsd/ar/v1 xmlns:v12
http://www.tmforum.org/mtop/fmw/xsd/nam/v1 xmlns:v13
http://www.tmforum.org/mtop/nra/xsd/com/v1 xmlns:v14
http://www.tmforum.org/mtop/nra/xsd/prc/v1} {{soapenv:Header {}
{{v1:header {} {{v1:destinationURI {} {{{#text}
http://localhost:9006/mtosi/rtm/AlarmRetrieval}}}
{v1:communicationStyle {} {{{#text} RPC}}} {v1:activityName {}
{{{#text} getActiveAlarms}}} {v1:msgName {} {{{#text}
GetActiveAlarmsRequest}}} {v1:senderURI {} {{{#text} http://localhost:9009}}}
{v1:msgType {} {{{#text} REQUEST}}} {v1:communicationPattern {}
{{{#text} MultipleBatchResponse}}} {v1:requestedBatchSize {} {{{#text}
1000}}}}}}} {soapenv:Body {} {{v11:getActiveAlarmsRequest {}
{{v11:filter {} {{v11:perceivedSeverityList {} {{v13:perceivedSeverity
{} {{{#text} CLEARED}}}}}}}}}}}}}

Does that help?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gerald W. Lester  
View profile  
 More options Feb 7, 10:43 am
Newsgroups: comp.lang.tcl
From: "Gerald W. Lester" <Gerald.Les...@KnG-Consulting.net>
Date: Tue, 07 Feb 2012 09:43:14 -0600
Local: Tues, Feb 7 2012 10:43 am
Subject: Re: how to generate XML soap message
On 2/6/12 12:45 PM, anj patnaik wrote:

> Hello,

> I would like to be able to generate a XML message like the one below
> dynamically, i,e from variables/list params. I briefly looked at
> tclsoap and the basic example didn't work and still researching tclws.
> The latter requires wsdl file parsing and the WSDL files I have are
> quite complex and nested.

> So, I was wondering about tdom, but the examples seem to be more DTD
> oriented.

> Any pointers appreciated! Thanks.

> Here is a sample XML request that I need to be able generate from
> variables.

Anj,

tclws uses tdom to build an parse the XML.

You have the following options:

1) Take your several partial WSDLs and make them one full WSDL and use tclws
-- this requires that you be able to read and understand your WSDLs.

2) Generate/parse the the XML using a package such as tdom -- this requires
that you be able to read and understand your WSDLs.

3) Generate/parse the the XML by hand (using format, string functions and
commands) -- this requires that you be able to read and understand your WSDLs.

Note -- there is a common step that you can not skip.

--
+------------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC                        |
| Email: Gerald.Les...@kng-consulting.net                                |
+------------------------------------------------------------------------+


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
anj patnaik  
View profile  
 More options Feb 7, 11:42 am
Newsgroups: comp.lang.tcl
From: anj patnaik <patn...@gmail.com>
Date: Tue, 7 Feb 2012 08:42:15 -0800 (PST)
Local: Tues, Feb 7 2012 11:42 am
Subject: Re: how to generate XML soap message
Hi Gerald,

I already tried #1 and sent you several emails as tclws errored out
when parsing the combined wsdl file.

Thanks.

On Feb 7, 10:43 am, "Gerald W. Lester" <Gerald.Les...@KnG-


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gerald W. Lester  
View profile  
 More options Feb 7, 4:15 pm
Newsgroups: comp.lang.tcl
From: "Gerald W. Lester" <Gerald.Les...@KnG-Consulting.net>
Date: Tue, 07 Feb 2012 15:15:41 -0600
Local: Tues, Feb 7 2012 4:15 pm
Subject: Re: how to generate XML soap message
On 2/7/12 10:42 AM, anj patnaik wrote:

> Hi Gerald,

> I already tried #1 and sent you several emails as tclws errored out
> when parsing the combined wsdl file.

Anj,

You sent me two (2) emails after combining the WSDLs.

The first one you discovered your error (you were passing a file name to
::WS::ParseWsdl instead of the actual XML).

The second error was after you were passing the XML and the message
indicates it could not find a type -- not likely either it is missing or
there is an XML namespace/alias conflict from when you made the single WSDL.
  I said I would look at it but it would take a couple of days to get to it.

The problem here is that the WS you want to use is being presented in a
**VERY** non-standard way *AND* you do not understand the format and content
of a WSDL enough to correct the presentation.

Early on you stated that this was from a "standard body" -- but you have
never said which one or given any relevant URLs.

In short, you are looking for a silver bullet of a particular caliber.

--
+------------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC                        |
| Email: Gerald.Les...@kng-consulting.net                                |
+------------------------------------------------------------------------+


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gerald W. Lester  
View profile  
 More options Feb 7, 4:58 pm
Newsgroups: comp.lang.tcl
From: "Gerald W. Lester" <Gerald.Les...@KnG-Consulting.net>
Date: Tue, 07 Feb 2012 15:58:27 -0600
Local: Tues, Feb 7 2012 4:58 pm
Subject: Re: how to generate XML soap message
On 2/7/12 3:15 PM, Gerald W. Lester wrote:

Anj,

Went in looked at the combined WSDL you sent and the "associated" XSDs.

Your WSDL you have several lines that read:
    <wsdl:part name="mtopHeader" element="hdr:header"/>

However, you do not have hdr defined as a namespace alias in the WSDL.  You
do have hdr defined as a namespace alias in MessageDefinitions.xsd.

Also I noticed that you are doing imports of XSDs you did not send me, such
as LayerRates.xsd.

Lastly a lot of your XSD imports have relative paths such as:
    ../../../NetworkResourceAssurance/IIS/xsd/CommonTypes.xsd

This means that you really be having a base WSDL at a server with the tree
layout expected.  Luckly, TclWs can get around this via the use of:
   ::WS::Utils::SetOption includeDirectory $xdDirectory

All that being said, IMHO from the things you keep missing you are in over
your head.  You may want to bring in a consultant to help you get your job done.

--
+------------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC                        |
| Email: Gerald.Les...@kng-consulting.net                                |
+------------------------------------------------------------------------+


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »