[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;
                endif;
             enddo;
          endif;
          if name = 'soap:operation'
             and operationName='DatosPolizaImpresion';
             while HTTP_nextXmlAttr( attrs: x: aname: aval);
                if aname='soapAction';
                   soapAction = aval;
                endif;
             enddo;
          endif;
   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"
   transport="[1][1]http://schemas.xmlsoap.org/soap/http"/>
   <operation name="DatosPolizaImpresion">
   <soap:operation
   soapAction="[2][2]http://www.filenet.com/ns/fnpe/2004/12/po/%7E%7E1%09VWS
   ervice0%3ADEV%3AFileNet%091%0915248%0986%091263560605!ImprDocsPoliza!D
   atosPolizaPort!DatosPolizaImpresion!-2!11!12!0!0" style="document"/>
   <input>
   <soap:body use="literal"/>
   </input>
   </operation>
   </binding>

   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
   "DatospolizaImpresion".

   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

   Íñigo

References

   1. [3]http://schemas.xmlsoap.org/soap/http
   2. [4]http://www.filenet.com/ns/fnpe/2004/12/po/%7E%7E1%09VWService0%3ADEV%3
AFileNet%091%0915248%0986%091263560605!ImprDocsPoliza!DatosPolizaPort!DatosPoli
zaImpresion!-2!11!12!0!0



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
[5]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

References

   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:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------