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

Re: A great help for a dummy guy in this task....



Hello Mario,

The basic idea behind a web service and the way a web service works is 
something like this:

a) You create an XML document containing information ("input parameters")

b) You upload the XML to a program on an HTTP server.

c) (while you wait) the prgoram on the HTTP server extracts the 
parameters from the XML.

d) (while you wait) the program on the HTTP server does some sort of 
calculations or database lookups -- whatever business logic is needed.

e) (white you wait) the program on the HTTP server creates an XML 
document and returns it to your program.

f) Your program parses the returned XML to get back the response.


With that in mind, SOAP is the format of the XML that you 
upload/download to the web service.  The exact specifications of which 
SOAP messages should be sent at which times are coded in the WSDL (which 
is another XML document).  Most WSDLs also contain an XML "schema" which 
can be used to validate that the XML document is valid.

When you look at the code for EXAMPLE18, what you are seeing is a 
relatively simple RPG program that builds an XML message and calls the 
HTTPAPI routine to send it to a web server.  It also asks HTTPAPI to 
parse the XML as it comes back, and so the 'Incoming' subprocedure is 
called for each XML tag containing the parsed tag information.

To do the same thing for your own web service, I strongly recommend 
SoapUI.  SoapUI is a free (open source) program that you can download 
from http://soapui.org   (everything you need is in the free version)

In SoapUI, you tell it the pathname to your WSDL document.  It then 
builds the appropriate SOAP messages and shows them to you.  Lets you 
change them, copy/paste them, whatever you want to do.  You can even try 
sending them to the web service.

Once you've used SoapUI and understand what needs to be sent to the web 
service and what needs to be received back, you can copy/paste the XML 
from SOAPUI into your RPG program and code something similar to 
EXAMPLE18 that automates the entire process.

more detail about the SoapUI/HTTPAPI process can be found here:
http://systeminetwork.com/article/rpg-consuming-web-services-httpapi-and-soapui




Mario Rodrigues wrote:
>    Hi, everyone
> 
> 
>    I try for my one, put Example18 work like I want, but until now I
>    don't have success, and I appreciated a lot if anybody teach me how
>    can I put this work well.
> 
> 
>    This is my first time that I work with XML and WSDL structure.
> 
> 
>    I received this WSDL structure from a client, and I pretend used from
>    an RPG program, I only need known a feedback in this parms, for better
>    understand I put here these programs for help:
> 
> 
> 
>    <?xml version="1.0" encoding="utf-8"?>
> 
>    <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> 
>    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
> 
>    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> 
>    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
> 
>    xmlns:tns="http://AML.BPN.org/AMLFiltragemService/";
> 
>    xmlns:s="http://www.w3.org/2001/XMLSchema";
> 
>    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
> 
>    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
> 
>    targetNamespace="http://AML.BPN.org/AMLFiltragemService/";
> 
>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
> 
> 
>    <wsdl:types>
> 
>        <s:schema elementFormDefault="qualified"
>    targetNamespace="http://AML.BPN.org/AMLFiltragemService/";>
> 
>          <s:element name="ForceLoadSettings">
> 
>            <s:complexType />
> 
>          </s:element>
> 
>          <s:element name="ForceLoadSettingsResponse">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="1" maxOccurs="1"
>    name="ForceLoadSettingsResult" type="s:boolean" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="CancelaOperacao">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_transf"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="notas"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="utilizador"
>    type="s:string" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="CancelaOperacaoResponse">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="CancelaOperacaoResult" type="tns:AMLServiceResult" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:complexType name="AMLServiceResult">
> 
>            <s:sequence>
> 
>              <s:element minOccurs="1" maxOccurs="1" name="resultado"
>    type="s:int" />
> 
>              <s:element minOccurs="0" maxOccurs="1" name="mensagem_erro"
>    type="s:string" />
> 
>            </s:sequence>
> 
>          </s:complexType>
> 
>          <s:element name="AMLContextHeader" type="tns:AMLContextHeader"
>    />
> 
>          <s:complexType name="AMLContextHeader">
> 
>            <s:sequence>
> 
>              <s:element minOccurs="0" maxOccurs="1" name="sessionid"
>    type="s:string" />
> 
>            </s:sequence>
> 
>            <s:anyAttribute />
> 
>          </s:complexType>
> 
>          <s:element name="CancelaOperacaoTimestamp">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_transf"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="notas"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="utilizador"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="timestamp"
>    type="s:string" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="CancelaOperacaoTimestampResponse">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="CancelaOperacaoTimestampResult"
>    type="tns:AMLServiceResultTimestamp" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:complexType name="AMLServiceResultTimestamp">
> 
>            <s:sequence>
> 
>              <s:element minOccurs="1" maxOccurs="1" name="resultado"
>    type="s:int" />
> 
>              <s:element minOccurs="0" maxOccurs="1" name="mensagem_erro"
>    type="s:string" />
> 
>              <s:element minOccurs="0" maxOccurs="1" name="timestamp"
>    type="s:string" />
> 
>            </s:sequence>
> 
>          </s:complexType>
> 
>          <s:element name="ActualizaOperacao">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_transf"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo"
>    type="s:string" />
> 
>                <s:element minOccurs="1" maxOccurs="1" name="result_oper"
>    type="s:int" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="notas"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="utilizador"
>    type="s:string" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="ActualizaOperacaoResponse">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="ActualizaOperacaoResult" type="tns:AMLServiceResult" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="ActualizaOperacaoTimestamp">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_transf"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo"
>    type="s:string" />
> 
>                <s:element minOccurs="1" maxOccurs="1" name="result_oper"
>    type="s:int" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="notas"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="utilizador"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="timestamp"
>    type="s:string" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="ActualizaOperacaoTimestampResponse">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="ActualizaOperacaoTimestampResult"
>    type="tns:AMLServiceResultTimestamp" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="ValidaOperacao">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_transf"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="nome_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo_id_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="nome_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo_id_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="sentido"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="montante"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="moeda"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="tipo_conta_ord" type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="conta_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="tipo_conta_ben" type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="conta_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="pais_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="pais_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="codigo_banco_ord" type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="banco_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="codigo_banco_ben" type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="banco_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="dt_hora"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="utilizador"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="agencia"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="notas"
>    type="s:string" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="ValidaOperacaoResponse">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="ValidaOperacaoResult" type="tns:AMLServiceResult" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="ValidaOperacaoTimestamp">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_transf"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="nome_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo_id_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="nome_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="id_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="tipo_id_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="sentido"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="montante"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="moeda"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="tipo_conta_ord" type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="conta_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="tipo_conta_ben" type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="conta_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="pais_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="pais_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="codigo_banco_ord" type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="banco_ord"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="codigo_banco_ben" type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="banco_ben"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="dt_hora"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="utilizador"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="agencia"
>    type="s:string" />
> 
>                <s:element minOccurs="0" maxOccurs="1" name="notas"
>    type="s:string" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>          <s:element name="ValidaOperacaoTimestampResponse">
> 
>            <s:complexType>
> 
>              <s:sequence>
> 
>                <s:element minOccurs="0" maxOccurs="1"
>    name="ValidaOperacaoTimestampResult"
>    type="tns:AMLServiceResultTimestamp" />
> 
>              </s:sequence>
> 
>            </s:complexType>
> 
>          </s:element>
> 
>        </s:schema>
> 
>      </wsdl:types>
> 
> 
>    <wsdl:message name="ForceLoadSettingsSoapIn">
> 
>        <wsdl:part name="parameters" element="tns:ForceLoadSettings" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ForceLoadSettingsSoapOut">
> 
>        <wsdl:part name="parameters"
>    element="tns:ForceLoadSettingsResponse" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="CancelaOperacaoSoapIn">
> 
>        <wsdl:part name="parameters" element="tns:CancelaOperacao" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="CancelaOperacaoSoapOut">
> 
>        <wsdl:part name="parameters" element="tns:CancelaOperacaoResponse"
>    />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="CancelaOperacaoAMLContextHeader">
> 
>        <wsdl:part name="AMLContextHeader" element="tns:AMLContextHeader"
>    />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="CancelaOperacaoTimestampSoapIn">
> 
>        <wsdl:part name="parameters"
>    element="tns:CancelaOperacaoTimestamp" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="CancelaOperacaoTimestampSoapOut">
> 
>        <wsdl:part name="parameters"
>    element="tns:CancelaOperacaoTimestampResponse" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="CancelaOperacaoTimestampAMLContextHeader">
> 
>        <wsdl:part name="AMLContextHeader" element="tns:AMLContextHeader"
>    />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ActualizaOperacaoSoapIn">
> 
>        <wsdl:part name="parameters" element="tns:ActualizaOperacao" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ActualizaOperacaoSoapOut">
> 
>        <wsdl:part name="parameters"
>    element="tns:ActualizaOperacaoResponse" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ActualizaOperacaoAMLContextHeader">
> 
>        <wsdl:part name="AMLContextHeader" element="tns:AMLContextHeader"
>    />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ActualizaOperacaoTimestampSoapIn">
> 
>        <wsdl:part name="parameters"
>    element="tns:ActualizaOperacaoTimestamp" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ActualizaOperacaoTimestampSoapOut">
> 
>        <wsdl:part name="parameters"
>    element="tns:ActualizaOperacaoTimestampResponse" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ActualizaOperacaoTimestampAMLContextHeader">
> 
>        <wsdl:part name="AMLContextHeader" element="tns:AMLContextHeader"
>    />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ValidaOperacaoSoapIn">
> 
>        <wsdl:part name="parameters" element="tns:ValidaOperacao" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ValidaOperacaoSoapOut">
> 
>        <wsdl:part name="parameters" element="tns:ValidaOperacaoResponse"
>    />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ValidaOperacaoAMLContextHeader">
> 
>        <wsdl:part name="AMLContextHeader" element="tns:AMLContextHeader"
>    />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ValidaOperacaoTimestampSoapIn">
> 
>        <wsdl:part name="parameters" element="tns:ValidaOperacaoTimestamp"
>    />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ValidaOperacaoTimestampSoapOut">
> 
>        <wsdl:part name="parameters"
>    element="tns:ValidaOperacaoTimestampResponse" />
> 
>      </wsdl:message>
> 
>      <wsdl:message name="ValidaOperacaoTimestampAMLContextHeader">
> 
>        <wsdl:part name="AMLContextHeader" element="tns:AMLContextHeader"
>    />
> 
>      </wsdl:message>
> 
> 
>    <wsdl:portType name="AMLFiltragemServiceSoap">
> 
>        <wsdl:operation name="ForceLoadSettings">
> 
>          <wsdl:input message="tns:ForceLoadSettingsSoapIn" />
> 
>          <wsdl:output message="tns:ForceLoadSettingsSoapOut" />
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="CancelaOperacao">
> 
>          <wsdl:input message="tns:CancelaOperacaoSoapIn" />
> 
>          <wsdl:output message="tns:CancelaOperacaoSoapOut" />
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="CancelaOperacaoTimestamp">
> 
>          <wsdl:input message="tns:CancelaOperacaoTimestampSoapIn" />
> 
>          <wsdl:output message="tns:CancelaOperacaoTimestampSoapOut" />
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ActualizaOperacao">
> 
>          <wsdl:input message="tns:ActualizaOperacaoSoapIn" />
> 
>          <wsdl:output message="tns:ActualizaOperacaoSoapOut" />
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ActualizaOperacaoTimestamp">
> 
>          <wsdl:input message="tns:ActualizaOperacaoTimestampSoapIn" />
> 
>          <wsdl:output message="tns:ActualizaOperacaoTimestampSoapOut" />
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ValidaOperacao">
> 
>          <wsdl:input message="tns:ValidaOperacaoSoapIn" />
> 
>          <wsdl:output message="tns:ValidaOperacaoSoapOut" />
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ValidaOperacaoTimestamp">
> 
>          <wsdl:input message="tns:ValidaOperacaoTimestampSoapIn" />
> 
>          <wsdl:output message="tns:ValidaOperacaoTimestampSoapOut" />
> 
>        </wsdl:operation>
> 
>      </wsdl:portType>
> 
> 
>     <wsdl:binding name="AMLFiltragemServiceSoap"
>    type="tns:AMLFiltragemServiceSoap">
> 
>        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; />
> 
>        <wsdl:operation name="ForceLoadSettings">
> 
>          <soap:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ForceLoadSettings";
>    style="document" />
> 
>          <wsdl:input>
> 
>            <soap:body use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="CancelaOperacao">
> 
>          <soap:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/CancelaOperacao";
>    style="document" />
> 
>          <wsdl:input>
> 
>            <soap:body use="literal" />
> 
>            <soap:header message="tns:CancelaOperacaoAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="CancelaOperacaoTimestamp">
> 
>          <soap:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/CancelaOperacaoTime
>    stamp" style="document" />
> 
>          <wsdl:input>
> 
>            <soap:body use="literal" />
> 
>            <soap:header
>    message="tns:CancelaOperacaoTimestampAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ActualizaOperacao">
> 
>          <soap:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ActualizaOperacao";
>    style="document" />
> 
>          <wsdl:input>
> 
>            <soap:body use="literal" />
> 
>            <soap:header message="tns:ActualizaOperacaoAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ActualizaOperacaoTimestamp">
> 
>          <soap:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ActualizaOperacaoTi
>    mestamp" style="document" />
> 
>          <wsdl:input>
> 
>            <soap:body use="literal" />
> 
>            <soap:header
>    message="tns:ActualizaOperacaoTimestampAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ValidaOperacao">
> 
>          <soap:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ValidaOperacao";
>    style="document" />
> 
>          <wsdl:input>
> 
>            <soap:body use="literal" />
> 
>            <soap:header message="tns:ValidaOperacaoAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ValidaOperacaoTimestamp">
> 
>          <soap:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ValidaOperacaoTimes
>    tamp" style="document" />
> 
>          <wsdl:input>
> 
>            <soap:body use="literal" />
> 
>            <soap:header
>    message="tns:ValidaOperacaoTimestampAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>      </wsdl:binding>
> 
> 
>    <wsdl:binding name="AMLFiltragemServiceSoap12"
>    type="tns:AMLFiltragemServiceSoap">
> 
>        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http";
>    />
> 
>        <wsdl:operation name="ForceLoadSettings">
> 
>          <soap12:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ForceLoadSettings";
>    style="document" />
> 
>          <wsdl:input>
> 
>            <soap12:body use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap12:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="CancelaOperacao">
> 
>          <soap12:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/CancelaOperacao";
>    style="document" />
> 
>          <wsdl:input>
> 
>            <soap12:body use="literal" />
> 
>            <soap12:header message="tns:CancelaOperacaoAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap12:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="CancelaOperacaoTimestamp">
> 
>          <soap12:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/CancelaOperacaoTime
>    stamp" style="document" />
> 
>          <wsdl:input>
> 
>            <soap12:body use="literal" />
> 
>            <soap12:header
>    message="tns:CancelaOperacaoTimestampAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap12:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ActualizaOperacao">
> 
>          <soap12:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ActualizaOperacao";
>    style="document" />
> 
>          <wsdl:input>
> 
>            <soap12:body use="literal" />
> 
>            <soap12:header message="tns:ActualizaOperacaoAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap12:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ActualizaOperacaoTimestamp">
> 
>          <soap12:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ActualizaOperacaoTi
>    mestamp" style="document" />
> 
>          <wsdl:input>
> 
>            <soap12:body use="literal" />
> 
>            <soap12:header
>    message="tns:ActualizaOperacaoTimestampAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap12:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ValidaOperacao">
> 
>          <soap12:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ValidaOperacao";
>    style="document" />
> 
>          <wsdl:input>
> 
>            <soap12:body use="literal" />
> 
>            <soap12:header message="tns:ValidaOperacaoAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap12:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>        <wsdl:operation name="ValidaOperacaoTimestamp">
> 
>          <soap12:operation
>    soapAction="http://AML.BPN.org/AMLFiltragemService/ValidaOperacaoTimes
>    tamp" style="document" />
> 
>          <wsdl:input>
> 
>            <soap12:body use="literal" />
> 
>            <soap12:header
>    message="tns:ValidaOperacaoTimestampAMLContextHeader"
>    part="AMLContextHeader" use="literal" />
> 
>          </wsdl:input>
> 
>          <wsdl:output>
> 
>            <soap12:body use="literal" />
> 
>          </wsdl:output>
> 
>        </wsdl:operation>
> 
>      </wsdl:binding>
> 
> 
>      <wsdl:service name="AMLFiltragemService">
> 
>        <wsdl:port name="AMLFiltragemServiceSoap"
>    binding="tns:AMLFiltragemServiceSoap">
> 
>          <soap:address
>    location="http://localhost/AMLFiltragem/AMLFiltragemService.asmx"; />
> 
>        </wsdl:port>
> 
>        <wsdl:port name="AMLFiltragemServiceSoap12"
>    binding="tns:AMLFiltragemServiceSoap12">
> 
>          <soap12:address
>    location="http://localhost/AMLFiltragem/AMLFiltragemService.asmx"; />
> 
>        </wsdl:port>
> 
>      </wsdl:service>
> 
>    </wsdl:definitions>
> 
> 
>      FIELDS:
> 
> 
>    Campos de entrada:
> 
> 
>    <id_transf> Identificador único da transferência </id_trasnf>
>    string[15], Obrigatório
> 
>    <tipo>Tipo de transferência </tipo> string[6], Obrigatório
> 
>    Valores possíveis [TEIS, SWIFT, AT2]
> 
>    <nome_ben> Nome do beneficiário </nome_ben> string[128]
> 
>    <id_ben> Identificação do beneficiário </id_ben> string[30],
>    [Opcional]
> 
>    <tipo_id_ben> Tipo de documento de Identificação do beneficiário
>    </tipo_id_ben> string[30], [Opcional]
> 
>    <nome_ord> Nome do ordenante </nome_ord> string[128] , [Opcional]
> 
>    <id_ord> Identificação do ordenante </id_ord> string[30], [Opcional]
> 
>    <tipo_id_ord> Tipo de documento de Identificação do ordenante
>    </tipo_id_ord> string[30], [Opcional]
> 
>    <sentido> Sentido da transferência, entrada ou saída </sentido>
>    string[1], [Obrigatório]
> 
>     Valores possíveis  [E, S]
> 
>    <montante> Montante da transferência </montante> string[17],
>    [Opcional]
> 
>    Formato [XXXXXXXXXXXX,XXXX], casas decimais separadas por uma virgula
>    da parte inteira. Sem limite de casas decimais, desde que se cumpra o
>    tamanho do campo.
> 
>    <moeda> Moeda </moeda> string[3],  [Opcional]
> 
>    <tipo_conta_ord> tipo do número de conta do ordenante
>    </tipo_conta_ord> string[3] , [Opcional]
> 
>    Tipo de n.º da conta do Ordenante. Obrigatório se for especificado o
>    n.º de conta do ordenante.
> 
>     NIB = NIB, IBN = IBAN, INT = Interno, OUT = Outro.
> 
>    <conta_ord> Número de conta do ordenante </conta_ord> string[34] ,
>    [Opcional]
> 
>    <tipo_conta_ben> tipo do número de conta do beneficiário
>    </tipo_onta_ben> string[3] , [Opcional]
> 
>    Tipo de n.º da conta do Beneficiário. Obrigatório se for especificado
>    o n.º do ordenante.
> 
>    NIB = NIB, IBN = IBAN, INT = Interno, OUT = Outro.
> 
>    <conta_ben> Número de conta do beneficiário </conta_ben> string[34],
>    [Opcional]
> 
>    <pais_ord> País do ordenante </pais_ord> string[3], [Opcional]
> 
>    <pais_ben> País do beneficiário </pais_ben> string[3] , [Opcional]
> 
>    <codigo_banco_ord> Codigo do Banco do ordenante </codigo_banco_ord>
>    string[11],  [Opcional]
> 
>    <banco_ord> Banco do ordenante </banco_ord> string[40],  [Opcional]
> 
>    <codigo_banco_ben> Codigo do Banco do beneficiário </codigo_banco_ben>
>    string[11],  [Opcional]
> 
>    <banco_ben> Banco do beneficiário </banco_ben> string[40], [Opcional]
> 
>    <dt_hora> Data e hora da ordem </dt_hora> string[14],  [Opcional]
>    Formato [aaaammddhhmmss]
> 
>    <utilizador> Utilizador que introduziu a ordem </utilizador>
>    string[64], [Opcional]
> 
>    <agencia> Agência da ordem </agencia> string[32],  [Opcional]
> 
>    <notas> Notas </notas> string[256], [Opcional]
> 
> 
> 
>    Campos de Saída
> 
> 
>    <resultado> Resultado da operação </resultado> [int]
> 
>                    Valores possíveis:
> 
>                                   0: Operação pode continuar
> 
>                                   1: Operação ficou pendente para análise
>    posterior
> 
>                                   2: Impedir a realização da operação
> 
>                                   -1: Aconteceu um erro ao validar a
>    operação
> 
>    <mensagem_erro>Descritivo do erro no caso de existir </mensagem_erro>
>    string[128]
> 
> 
> 
>    With these information, first of all I don't know if I need anything
>    else, and like I say with these I starting made this in EXAMPLE18 for
>    call in future from my rpg pgm IS4055.
> 
> 
>          *  This is an example of calling a SOAP Web service w/HTTPAPI.
> 
>          *
> 
>          *  This sample calls the Currency Exchange Rate Web service
> 
>          *  provided by WebserviceX.net. For more info, search for it
> 
>          *  at   http://www.WebserviceX.net
> 
>          *
> 
>          *  To Compile (requires V5R1):
> 
>          *     CRTBNDRPG PGM(EXAMPLE18) SRCFILE(libhttp/QRPGLESRC)
> 
>          *
> 
>          *  To Run:
> 
>          *     CALL EXAMPLE18 PARM('USD' 'JPY' 12.00)
> 
>          *
> 
>          *  (This shows the value of USD 12.00 in Japanese currency.)
> 
>          *
> 
>         H DFTACTGRP(*NO) BNDDIR('HTTPAPI':'QC2LE')
> 
> 
>         D WSSINP          DS
> 
>         D   id_transf                   15A   const
> 
>         D   tipo                         6A   const
> 
>         D   nome_ben                   128A   const
> 
>         D   id_ben                      30A   const
> 
>         D   tipo_id_ben                 30A   const
> 
>         D   nome_ord                   128A   const
> 
>         D   id_ord                      30A   const
> 
>         D   tipo_id_ord                 30A   const
> 
>         D   sentido                      1A   const
> 
>         D   montante                    17A   const
> 
>         D   moeda                        3A   const
> 
>         D tipo_conta_ord                 3A   const
> 
>         D   conta_ord                   34A   const
> 
>         D tipo_conta_ben                 3A   const
> 
>         D   conta_ben                   34A   const
> 
>         D   pais_ord                     3A   const
> 
>         D   pais_ben                     3A   const
> 
>         Dcodigo_banco_or                11A   const
> 
>         D  banco_ord                    40A   const
> 
>         Dcodigo_banco_be                11A   const
> 
>         D  banco_ben                    40A   const
> 
>         D  dt_hora                      14A   const
> 
>         D  utilizador                   64A   const
> 
>         D  agencia                      32A   const
> 
>         D   notas                      256A   const
> 
>         D WSSOUT          DS
> 
>         D   resultado                    1s 0 value
> 
>         D   mensagem                   128A   const
> 
> 
>         D IN_OUT          PR                  ExtPgm('IS4050')
> 
>         D   p_entra                            likeds(wssinp)
> 
>         D IN_OUT          PI
> 
>         D   p_saida                            likeds(wssout)
> 
> 
>          /copy httpapi_h
> 
> 
>         D Incoming        PR
> 
>         D   rate                         8F
> 
>         D   depth                       10I 0 value
> 
>         D   name                      1024A   varying const
> 
>         D   path                     24576A   varying const
> 
>         D   value                    65535A   varying const
> 
>         D   attrs                         *   dim(32767)
> 
>         D                                     const options(*varsize)
> 
> 
>         D SOAP            s          32767A   varying
> 
>         D rc              s             10I 0
> 
>         D rate            s              8F
> 
>         D Result          s             12P 2
> 
> 
>          /free
> 
> 
>           if ( %parms < 3 );
> 
>              http_comp( 'Please pass parms. e.g. CALL EXAMPLE18 '
> 
>                       + 'PARM(USD JPY 12.00)');
> 
>              return;
> 
>           endif;
> 
> 
>           // Note:  http_debug(*ON/*OFF) can be used to turn debugging
> 
>           //        on and off.  When debugging is turned on, diagnostic
> 
>           //        info is written to an IFS file named
> 
>           //        /tmp/httpapi_debug.txt
> 
> 
>           http_debug(*ON);
> 
> 
>           // Note:  http_XmlStripCRLF(*ON/*OFF) controls whether or not
> 
>           //        the XML parser removes CR and LF characters from the
> 
>           //        Xml data that's passed to your 'Incoming' procedure.
> 
> 
>           http_XmlStripCRLF(*ON);
> 
> 
>           SOAP =
> 
>            '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'
> 
>           +'<SOAP:Envelope'
> 
>           +'    xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/";'
> 
>           +'    xmlns:tns="http://www.webserviceX.NET/";>'
> 
>           +'<SOAP:Body>'
> 
>           +'  <tns:ConversionRate>'
> 
>           +'      <tns:FromCurrency>'+ %trim(Country1)
>    +'</tns:FromCurrency>'
> 
>           +'      <tns:ToCurrency>'+ %trim(Country2) +
>    '</tns:ToCurrency>'
> 
>           +'  </tns:ConversionRate>'
> 
>           +'</SOAP:Body>'
> 
>           +'</SOAP:Envelope>';
> 
> 
>           http_debug(*ON);
> 
> 
>           rc = http_url_post_xml(
> 
>                      'http://www.webservicex.net/CurrencyConvertor.asmx'
> 
>                             : %addr(SOAP) + 2
> 
>                             : %len(SOAP)
> 
>                             : *NULL
> 
>                             : %paddr(Incoming)
> 
>                             : %addr(rate)
> 
>                             : HTTP_TIMEOUT
> 
>                             : HTTP_USERAGENT
> 
>                             : 'text/xml'
> 
>                             :
>    'http://www.webserviceX.NET/ConversionRate');
> 
> 
>           if (rc <> 1);
> 
>              http_crash();
> 
>           else;
> 
>              Result = %dech(Amount * rate: 12: 2);
> 
>              http_comp(%trim(Country1) + ' ' + %char(%dec(Amount:12:2))
> 
>                        + ' = ' + %trim(Country2) + ' '+ %char(Result));
> 
>           endif;
> 
> 
>           *inlr = *on;
> 
> 
>          /end-free
> 
> 
>         P Incoming        B
> 
>         D Incoming        PI
> 
>         D   rate                         8F
> 
>         D   depth                       10I 0 value
> 
>         D   name                      1024A   varying const
> 
>         D   path                     24576A   varying const
> 
>         D   value                    65535A   varying const
> 
>         D   attrs                         *   dim(32767)
> 
>         D                                     const options(*varsize)
> 
> 
>         D atof            PR             8F   extproc('atof')
> 
>         D   string                        *   value options(*string)
> 
> 
>          /free
> 
>              if (name = 'ConversionRateResult');
> 
>                 rate = atof(value);
> 
>              endif;
> 
>          /end-free
> 
>         P                 E
> 
> 
>    In conclusion I need help for teach me made a right modifications in
>    EXAMPLE18.
> 
> 
>    Many thanks in advanced.
> 
> 
> 
>    Mário Rodrigues
>    Analista/Programador
>    Promosoft Financial
>    [1]mario.rodrigues@xxxxxxxxxxxxx
>    Tel.: (+351) 211 107 100 Fax: (+351) 211 107 103
> 
>      _________________________________________________________________
> 
>    Disclaimer/Implicações legais
>    www.promosoft.com/disclaimer/e-mail
> 
> References
> 
>    1. mailto:mario.rodrigues@xxxxxxxxxxxxx
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> 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
-----------------------------------------------------------------------