[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to recover value of an Attribute, depending on another attribute

   Hi Íñigo,
   HTTPAPI will call your element handler separately for each XML tag.
   So you need to write code that checks for the operation tag, and saves
   the value of the name attribute to a static/global variable.
          if name = 'operation';
             while HTTP_nextXmlAttr( attrs: x: aname: aval);
                if aname='name';
                   operationName = aval;
          if name = 'soap:operation'
             and operationName='DatosPolizaImpresion';
             while HTTP_nextXmlAttr( attrs: x: aname: aval);
                if aname='soapAction';
                   soapAction = aval;
   Keep in mind that operationName and soapAction (in this example) must
   be fields that won't get reset with each call to the subprocedure...
   i.e. they need to be static, global, or parameters.
   On 5/18/2010 3:42 AM, Íñigo Redín wrote:

   Hi, all.

   This is my first question on this forum.

   First of all, congratulations for your work.

   I'm new on RPGIV and, of course, new using LIBHTTP.

   My question is about how is the correct method to get the value of one
   attribute, but, I want to recover that value, only if the value of
   another attribute (on its parent node) is equal to a parameter.

   I copy you part of the xml (really it is a wsdl).

   <binding name="DatosPolizaPortSoapBinding" type="tns:DatosPolizaPort">
   <documentation>Process SOAP binding</documentation>
   <soap:binding style="document"
   <operation name="DatosPolizaImpresion">
   atosPolizaPort!DatosPolizaImpresion!-2!11!12!0!0" style="document"/>
   <soap:body use="literal"/>

   What I want to do, is getting the value of the soapAction attribute,
   in soap:operation node, but just in case that attribute name
   ="DatosPolizaImpresion" on node operation has the value

   The program receives the operation name as parameter.

   And I'm trying to recover the soapAction for that operation name. That
   is, because, of course, the wsdl can contains various operations, but
   I want to get just the soapAction for one operation.

   Can you help me?

   Thanks a lot



   1. [3]http://schemas.xmlsoap.org/soap/http
   2. [4]http://www.filenet.com/ns/fnpe/2004/12/po/%7E%7E1%09VWService0%3ADEV%3

This is the FTPAPI mailing list.  To unsubscribe, please go to:


   1. http://schemas.xmlsoap.org/soap/http
   2. http://www.filenet.com/ns/fnpe/2004/12/po/%7E%7E1%09VWS
   3. http://schemas.xmlsoap.org/soap/http
   4. http://www.filenet.com/ns/fnpe/2004/12/po/%7E%7E1%09VWService0%3ADEV%3AFileNet%091%0915248%0986%091263560605!ImprDocsPoliza!DatosPolizaPort!DatosPolizaImpresion!-2!11!12!0!0
   5. http://www.scottklement.com/mailman/listinfo/ftpapi
This is the FTPAPI mailing list.  To unsubscribe, please go to: