Pular para o conteúdo
#94489
airoosp
Participante

    Boa tarde,

    Na package Soap_api não fiz alteração, segue abaixo a function.

    create or replace function lista_cartoes_ws
    (
    proxy_server IN VARCHAR2,
    web_service IN VARCHAR2,
    web_service_param IN VARCHAR2
    )

    RETURN VARCHAR2

    AS

    req soap_api.t_request; –utl_http.req;
    resp soap_api.t_response;
    a varchar2(3000);
    a1 varchar2(3000);
    a2 varchar2(3000);

    http_request utl_http.req;

    BEGIN

    utl_http.set_persistent_conn_support(TRUE);
    
    req := soap_api.new_request(p_method => 'listaCartoesVagos', p_namespace => 'xmlns="UsuariosCartoes"');
    
    soap_api.add_parameter(p_name => '_token',p_request => req,p_type => 'xsd:string',p_value => '123');
    
    soap_api.add_parameter(p_request => req, p_name => 'codEmpresa',p_type => 'xsd:string', p_value => web_service_param);
    
    resp := soap_api.invoke(p_request => req, p_url => web_service, p_action => '');
    
    a:= soap_api.get_return_value(p_response => resp, p_name => 'msg', p_namespace => 'xmlns="http://services.mdc.com.br"');
    a1:= soap_api.get_return_value(p_response => resp, p_name => 'status', p_namespace => 'xmlns="http://services.mdc.com.br"');
    a2:= soap_api.get_return_value(p_response => resp, p_name => 'listaCartoes', p_namespace => 'xmlns="http://services.mdc.com.br"');
    

    — return a||’ – ‘||a1||’ – ‘||a2;

    return a2;
    

    END;

    Obrigado.

    Airton

    plugins premium WordPress