Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

Índice:


       

Índice
exclude.*ndice:

Introdução:


       O Web Service Reports Fornece serviços para gerar relatórios do TOTVS Reports de forma Síncrona e assíncrona. O modelo de autenticação utilizado é o Basic Authentication.

Como Funciona:


       Estão expostos no wsReports alguns serviços, onde para consumi-los é necessário enviar através de uma requisição um envelope SOAP, passando os parâmetros de cada serviço. 

       É necessário adicionar o parâmetro "DefaultDB" no arquivo de configuração do Host (RM.host.Service.exe.config).

           Ex: <add key="DefaultDB" value="CorporeRM" /> 

 

       Segue abaixo o detalhamento e exemplos de utilização dos serviços em envelope SOAP.

Informações
iconfalse
Deck of Cards
id.
Card
labelGetReportList:
  • GetReportList:

Retorna a lista de todos os relatórios de uma determinada coligada.

 

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetReportList>

         <!--Optional:-->

         <tot:codColigada>1</tot:codColigada>

      </tot:GetReportList>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

   <s:Body>

      <GetReportListResponse xmlns="http://www.totvs.com/">

         <GetReportListResult>0,TOTVS Educacional,306,Boletim,Boletim,06/10/2010 15:43:00,597e2978-351d-4629-a2fb-b57432cad210;,0,TOTVS Educacional,30,Contrato,Contrato,06/10/2010 15:43:00,71eff25f-0960-4ab7-bbc9-564044dde0fe;,0,TOTVS Gestão Financeira,312,Boleto Itaú.2.1,Cópia de Cópia de Boleto Itaú,08/04/2016 07:49:00,c9c51350-3cfa-410e-b818-224a013d0296;,0,TOTVS Inteligência de Negócios,316,filtrosNomeados,filtrosNomeados,11/04/2016 10:37:12,d19713e7-eda0-4bf1-8e92-140714240c16;,0,TOTVS Educacional,31,EDUREL002,Listagem de Alunos com foto,06/10/2010 15:43:00,b84b941c-54e5-43c1-996b-3e9eae05e902....... </GetReportListResult>

      </GetReportListResponse>

   </s:Body>

</s:Envelope>


Card
label2º Passo:

 

Card
label3º Passo:

 

Card
label4º Passo:

 

Card
label5º Passo:

 

Card
label6º Passo:

 

Card
label7º Passo:

 

Card
label8º Passo:

     

Card
label9º Passo:

 

Segue abaixo o detalhamento e exemplos de utilização dos serviços em envelope SOAP.

  • GetReportList:

Retorna a lista de todos os relatórios de uma determinada coligada.

 

 

  • GetReportMetadata:

Retorna a estrutura de um determinado relatório (utilizado apenas para conferencia).

Request:

<soapenv:Envelope xmlns:soapenv
GetReportMetadata
  • GetReportMetadata:

Retorna a estrutura de um determinado relatório (utilizado apenas para conferencia).

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetReportMetaData>

         <!--Optional:-->

         <tot:codColigada>1</tot:codColigada>

         <!--Optional:-->

         <tot:id>306</tot:id>

      </tot:GetReportMetaData>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:tot

>

   <s:Body>

      <GetReportMetaDataResponse xmlns="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetReportMetaData>

         <!--Optional:-->

         <tot:codColigada>1</tot:codColigada>

         <!--Optional:-->

         <tot:id>306</tot:id>

      </tot:GetReportMetaData>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

   <s:Body>

      <GetReportMetaDataResponse xmlns="http://www.totvs.com/">

         <GetReportMetaDataResult><![CDATA[<NewDataSet>

  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">

    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msdata:AutoRemoveRelations="True" msdata:EnforceConstraints="False">

      <xs:complexType>

        <xs:choice minOccurs="0" maxOccurs="unbounded">

          <xs:element name="PFUNC" msprop:_x0023__x0023_SQLFetch="00:00:00.0160016" msprop:DISPLAYNAME="Funcionários" msprop:ASSEMBLYFONTE="RM.Rpt.Lib.Server" msprop:CLASSEFONTE="RM.Rpt.Lib.RptRMProvider" msprop:_x0024_OriginTables="System.String[]" msprop:_x0040_SQL="SELECT * FROM PFUNC WHERE 0=1">

            <xs:complexType>

              <xs:sequence>

         <GetReportMetaDataResult><![CDATA[<NewDataSet>

  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">

    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msdata:AutoRemoveRelations="True" msdata:EnforceConstraints="False">

      <xs:complexType>

        <xs:choice minOccurs="0" maxOccurs="unbounded">

          <xs:element name="PFUNC" msprop:_x0023__x0023_SQLFetch="00:00:00.0160016" msprop:DISPLAYNAME="Funcionários" msprop:ASSEMBLYFONTE="RM.Rpt.Lib.Server" msprop:CLASSEFONTE="RM.Rpt.Lib.RptRMProvider" msprop:_x0024_OriginTables="System.String[]" msprop:_x0040_SQL="SELECT * FROM PFUNC WHERE 0=1">

            <xs:complexType>

              <xs:sequence>

                <xs:element name="CODCOLIGADA" msdata:Caption="Código Identificador da Coligada" msprop:_x0024_SecTableOrigin="PFUNC" msprop:_x0024_Origin="PFUNC.CODCOLIGADA" msprop:_x0024_SecField="CODCOLIGADA" type="xs:short" minOccurs="0" />

                <xs:element name="CHAPA" msdata:Caption="Chapa do Funcionário" msprop:_x0024_SecTableOrigin="PFUNC" msprop:_x0024_Origin="PFUNC.CHAPA" msprop:_x0024_SecField="CHAPA" type="xs:string" minOccurs="0" />

                <xs:element name="NROFICHAREG" msdata:Caption="Número da Ficha de Registro" msprop:_x0024_SecTableOrigin="PFUNC" msprop:_x0024_Origin="PFUNC.NROFICHAREG" msprop:_x0024_SecField="NROFICHAREG" type="xs:int" minOccurs="0" />

                <xs:element name="

CODCOLIGADA

CODRECEBIMENTO" msdata:Caption="Código

Identificador da Coligada

do Recebimento" msprop:_x0024_SecTableOrigin="PFUNC" msprop:_x0024_Origin="PFUNC.

CODCOLIGADA

CODRECEBIMENTO" msprop:_x0024_SecField="

CODCOLIGADA

CODRECEBIMENTO" type="xs:

short

string" minOccurs="0" />

               

      <xs:

element

unique name="

CHAPA" msdata:Caption="Chapa do Funcionário" msprop:_x0024_SecTableOrigin="PFUNC" msprop:_x0024_Origin="PFUNC.CHAPA" msprop:_x0024_SecField="CHAPA" type="xs:string" minOccurs="0" />

Constraint1">

        <xs:selector xpath=".//PFUNC" />

        <xs:field xpath="CODCOLIGADA" />

        <xs:field xpath="CHAPA" />

      </xs:unique>

      <xs:unique name="pfdepend_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">

        <xs:selector xpath=".//pfdepend" />

        <xs:field xpath="CODCOLIGADA" />

        <xs:field xpath="CHAPA" />

        <xs:field xpath="NRODEPEND" />

      </xs:unique>

      <xs:unique name="Constraint2">

        <xs:selector xpath=".//pfdepend" />

        <xs:field xpath="CODCOLIGADA" />

        <xs:field xpath="CHAPA" />

      </xs:unique>

      <xs:keyref name="PFUNC.pfdepend" refer="Constraint1" msprop:rel_CHILDFIELD="CODCOLIGADA,CHAPA" msprop:rel_MASTERFIELD="CODCOLIGADA,CHAPA">

        <xs:selector xpath=".//pfdepend" />

        <xs:

                <xs:element name="NROFICHAREG" msdata:Caption="Número da Ficha de Registro" msprop:_x0024_SecTableOrigin="PFUNC" msprop:_x0024_Origin="PFUNC.NROFICHAREG" msprop:_x0024_SecField="NROFICHAREG" type="xs:int" minOccurs="0" />

                <xs:element name="CODRECEBIMENTO" msdata:Caption="Código do Recebimento" msprop:_x0024_SecTableOrigin="PFUNC" msprop:_x0024_Origin="PFUNC.CODRECEBIMENTO" msprop:_x0024_SecField="CODRECEBIMENTO" type="xs:string" minOccurs="0" />

               

      <xs:unique name="Constraint1">

        <xs:selector xpath=".//PFUNC" />

        <xs:

field xpath="CODCOLIGADA" />

        <xs:field xpath="CHAPA" />

      </xs:

unique>

keyref>

      <xs:

unique

keyref name="pfdepend

_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true

.PFUNC" refer="Constraint2" msprop:rel_CHILDFIELD="CODCOLIGADA,CHAPA" msprop:rel_MASTERFIELD="CODCOLIGADA,CHAPA">

        <xs:selector xpath=".//

pfdepend

PFUNC" />

        <xs:field xpath="CODCOLIGADA" />

        <xs:field xpath="CHAPA" />

        <xs:field xpath="NRODEPEND" />

     

      </xs:keyref>

    </xs:

unique>

element>

  </xs:schema>

</NewDataSet>]]></GetReportMetaDataResult>

      </GetReportMetaDataResponse>

   </s:Body>

</s:Envelope>

Card
labelGetReportInfo
  • GetReportInfo:

Retorna as informações de filtro e parâmetros, caso o relatório possua. 

O retorno é um xml de duas estruturas serializadas. Elas devem ser utilizadas separadamente ao chamar o método de geração do relatório.

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetReportInfo>

         <!--Optional:-->

         <tot:codColigada>1</tot:codColigada>

         <!--Optional:-->

         <tot:idReport>306</tot:idReport>

      </tot:GetReportInfo>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s

      <xs:unique name="Constraint2">

        <xs:selector xpath=".//pfdepend" />

        <xs:field xpath="CODCOLIGADA" />

        <xs:field xpath="CHAPA" />

      </xs:unique>

      <xs:keyref name="PFUNC.pfdepend" refer="Constraint1" msprop:rel_CHILDFIELD="CODCOLIGADA,CHAPA" msprop:rel_MASTERFIELD="CODCOLIGADA,CHAPA">

        <xs:selector xpath=".//pfdepend" />

        <xs:field xpath="CODCOLIGADA" />

        <xs:field xpath="CHAPA" />

      </xs:keyref>

      <xs:keyref name="pfdepend.PFUNC" refer="Constraint2" msprop:rel_CHILDFIELD="CODCOLIGADA,CHAPA" msprop:rel_MASTERFIELD="CODCOLIGADA,CHAPA">

        <xs:selector xpath=".//PFUNC" />

        <xs:field xpath="CODCOLIGADA" />

        <xs:field xpath="CHAPA" />

      </xs:keyref>

    </xs:element>

  </xs:schema>

</NewDataSet>]]></GetReportMetaDataResult>

      </GetReportMetaDataResponse>

   </s:Body>

</s:Envelope>

 

  • GetReportInfo:

Retorna as informações de filtro e parâmetros, caso o relatório possua. 

O retorno é um xml de duas estruturas serializadas. Elas devem ser utilizadas separadamente ao chamar o método de geração do relatório.

Request:

<soapenv:Envelope xmlns:soapenv

="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:tot

>

   <s:Body>

      <GetReportInfoResponse xmlns="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetReportInfo>

         <!--Optional:-->

         <tot:codColigada>1</tot:codColigada>

         <!--Optional:-->

         <tot:idReport>306</tot:idReport>

      </tot:GetReportInfo>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s

         <GetReportInfoResult xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

            <a:string><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<ArrayOfRptFilterReportPar xmlns:i="http://

schemas

www.

xmlsoap

w3.org/

soap/envelope/">

   <s:Body>

      <GetReportInfoResponse xmlns="

2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/">

         <GetReportInfoResult xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

  <RptFilterReportPar>

    <BandName>RptReport</BandName>

    <FiltersByTable>

      <RptFilterByTablePar>

        <Filter>PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010'

</Filter>

        <TableName>PFUNC</TableName>

      </RptFilterByTablePar>

    </FiltersByTable>

    <MainFilter>true</MainFilter>

    <Value>(PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010'

)</Value>

  </RptFilterReportPar>

</ArrayOfRptFilterReportPar>]]></a:string>

            <a:string><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<ArrayOfRptFilterReportPar

<ArrayOfRptParameterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/">

 

<RptFilterReportPar>

<RptParameterReportPar>

   

<BandName>RptReport<

<Description>PARAM_COLIGADA</

BandName>

Description>

   

<FiltersByTable>

<ParamName>PARAM_COLIGADA</ParamName>

    <Type xmlns:d3p1="http://schemas.datacontract.org/2004/07/System" xmlns:d3p2="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType" i:type="d3p2:RuntimeType" xmlns:d3p3="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z

      <RptFilterByTablePar>

        <Filter>PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010'

</Filter>

        <TableName>PFUNC</TableName>

      </RptFilterByTablePar>

    </FiltersByTable>

    <MainFilter>true</MainFilter>

    <Value>(PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010'

)</Value>

  </RptFilterReportPar>

</ArrayOfRptFilterReportPar>]]></a:string>

            <a:string><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<ArrayOfRptParameterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns

="http://

www

schemas.

totvs

microsoft.com

.br/RM

/2003/10/Serialization/">

  <RptParameterReportPar>

    <Description>PARAM_COLIGADA</Description>

    <ParamName>PARAM_COLIGADA</ParamName>

    <Type xmlns:d3p1

      <Data xmlns:d4p1="http://

schemas

www.

datacontract

w3.org/

2004

2001/

07/System

XMLSchema"

xmlns

i:

d3p2

type="

-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType

d4p1:string" xmlns="">System.String</Data>

      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="

d3p2:RuntimeType" xmlns:d3p3="-mscorlib

d4p1:int" xmlns="">4</UnityType>

      <AssemblyName xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=

b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1

      <Data xmlns:d4p1

="http://www.w3.org/2001/XMLSchema" i:type="

d4p1

d3p1:string"

xmlns="">System.String</Data>

></Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

  <RptParameterReportPar>

    <Description>PARAM_TESTE</Description>

    <ParamName>PARAM_TESTE</ParamName>

    <Type xmlns:d3p1

      <UnityType xmlns:d4p1

="http://

www

schemas.

w3

datacontract.org/2004/

2001

07/

XMLSchema

System"

i

xmlns:

type

d3p2="

d4p1:int" xmlns="">4</UnityType>      <AssemblyName xmlns:d4p1="http://www.w3.org/2001/XMLSchema

-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType" i:type="

d4p1

d3p2:

string

RuntimeType" xmlns:d3p3="

">mscorlib

-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken

=b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1

=b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z="http://

www

schemas.

w3.org/2001/XMLSchema" i:type="d3p1:string"></Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

  <RptParameterReportPar>

    <Description>PARAM_TESTE</Description>

    <ParamName>PARAM_TESTE</ParamName>

    <Type xmlns:d3p1

microsoft.com/2003/10/Serialization/">

      <Data xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">System.String</Data>

      <UnityType xmlns:d4p1="http://

schemas

www.

datacontract

w3.org/

2004

2001/

07/System

XMLSchema"

xmlns

i:

d3p2="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType

type="d4p1:int" xmlns="">4</UnityType>

      <AssemblyName xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="

d3p2

d4p1:

RuntimeType

string" xmlns

:d3p3

="

-mscorlib

">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=

b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1="http://

      <Data xmlns:d4p1="http://

www.w3.org/2001/XMLSchema" i:type="

d4p1

      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int" xmlns="">4</UnityType>

      <AssemblyName xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string"></Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

</ArrayOfRptParameterReportPar>]]></a:string>

         </GetReportInfoResult>

      </GetReportInfoResponse>

   </s:Body>

</s:Envelope>

 

d3p1:string"

xmlns="">System.String</Data>

></Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

</ArrayOfRptParameterReportPar>]]></a:string>

         </GetReportInfoResult>

      </GetReportInfoResponse>

   </s:Body>

</s:Envelope>

Card
labelGenerateReport
  • GenerateReport:

Gera efetivamente o relatório e retorna o identificador a ser utilizado para fazer o download do relatório pelo método GetFileChunk.

Veja que os filtros e os parâmetros correspondem ao que o método GetReportInfo retornou e foi passado separadamente.

Os filtros e parâmetros podem ser alterados conforme destaque abaixo.

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GenerateReport>

         <!--Optional:-->

         <tot:codColigada>1</tot:codColigada>

         <!--Optional:-->

         <tot:id>306</tot:id>

         <!--Optional:-->

         <tot:filters><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<ArrayOfRptFilterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/">

  <RptFilterReportPar>

    <BandName>RptReport</BandName>

    <FiltersByTable>

      <RptFilterByTablePar>

        <Filter>PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010'

</Filter>

        <TableName>PFUNC</TableName>

      </RptFilterByTablePar>

    </FiltersByTable>

    <MainFilter>true</MainFilter>

    <Value>(PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010')</Value>

  </RptFilterReportPar>

</ArrayOfRptFilterReportPar>]]></tot:filters>

         <!--Optional:-->

         <tot:parameters><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<ArrayOfRptParameterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/">

  <RptParameterReportPar>

    <Description>PARAM_COLIGADA</Description>

    <ParamName>PARAM_COLIGADA</ParamName>

    <Type xmlns:d3p1="http://schemas.datacontract.org/2004/07/System" xmlns:d3p2="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType" i:type="d3p2:RuntimeType" xmlns:d3p3="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

      <Data xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">System.String</Data>

      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int" xmlns="">4</UnityType>

      <AssemblyName xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">1</Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

  <RptParameterReportPar>

    <Description>PARAM_TESTE</Description>

    <ParamName>PARAM_TESTE</ParamName>

    <Type xmlns:d3p1="http://schemas.datacontract.org/2004/07/System" xmlns:d3p2="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType" i:type="d3p2:RuntimeType" xmlns:d3p3="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

      <Data xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">System.String</Data>

      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int" xmlns="">4</UnityType>

      <AssemblyName xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">1</Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

</ArrayOfRptParameterReportPar>]]></tot:parameters>

         <!--Optional:-->

         <tot:fileName>Report.pdf</tot:fileName>

      </tot:GenerateReport>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

   <s:Body>

      <GenerateReportResponse xmlns="http://www.totvs.com/">

         <GenerateReportResult>33f3bc8a-2553-4ad2-a53f-a03b487844cf</GenerateReportResult>

      </GenerateReportResponse>

   </s:Body>

</s:Envelope>

Card
 
labelGetGeneratedReportSize
:
  • GetGeneratedReportSize:

Retorna o tamanho do relatório em bytes. Este resultado é utilizado para fazer o download parcial ou total do relatório pelo método GetFileChunk.

Request

:

:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetGeneratedReportSize>

         <!--Optional:-->

         <tot:guid>33f3bc8a-2553-4ad2-a53f-a03b487844cf</tot:guid>

      </tot:GetGeneratedReportSize>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

   <s:Body>

      <GetGeneratedReportSizeResponse xmlns="http://www.totvs.com/">

         <GetGeneratedReportSizeResult>45484</GetGeneratedReportSizeResult>

      </GetGeneratedReportSizeResponse>

   </s:Body>

</s:Envelope>

Card
labelGetFileChunk
  • GetFileChunk:

Retorna o relatório gerado em base 64 e no formato especificado no parâmetro filename do método GenerateReport.

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetFileChunk>

         <!--Optional:-->

         <tot:guid>33f3bc8a-2553-4ad2-a53f-a03b487844cf</tot:guid>

         <!--Optional:-->

         <tot:offset>0</tot:offset>

         <!--Optional:-->

         <tot:length>45484</tot:length>

      </tot:GetFileChunk>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

   <s:Body>

      <GetFileChunkResponse xmlns="http://www.totvs.com/">

                [CONTEUDO DO RELATÓRIO EM BASE 64]

                </GetFileChunkResult>

      </GetFileChunkResponse>

   </s:Body>

</s:Envelope>

Card
labelGenerateReportAsynchronous
  • GenerateReportAsynchronous:

Funciona da mesma forma que o GenerateReport, porém não aguarda a geração do relatório e retorna um identificador único a ser utilizado para consultar o status da geração.

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GenerateReportAsynchronous>

         <!--Optional:-->

         <tot:codColigada>1</tot:codColigada>

         <!--Optional:-->

         <tot:id>306</tot:id>

         <!--Optional:-->

         <tot:filters><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<ArrayOfRptFilterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/">

  <RptFilterReportPar>

    <BandName>RptReport</BandName>

    <FiltersByTable>

      <RptFilterByTablePar>

        <Filter>PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010'

</Filter>

        <TableName>PFUNC</TableName>

      </RptFilterByTablePar>

    </FiltersByTable>

    <MainFilter>true</MainFilter>

    <Value>(PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010'

)</Value>

  </RptFilterReportPar>

</ArrayOfRptFilterReportPar>]]></tot:filters>

         <!--Optional:-->

         <tot:parameters><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<ArrayOfRptParameterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/">

  <RptParameterReportPar>

    <Description>PARAM_COLIGADA</Description>

    <ParamName>PARAM_COLIGADA</ParamName>

    <Type xmlns:d3p1="http://schemas.datacontract.org/2004/07/System" xmlns:d3p2="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType" i:type="d3p2:RuntimeType" xmlns:d3p3="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

      <Data xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">System.String</Data>

      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int" xmlns="">4</UnityType>

      <AssemblyName xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">1</Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

  <RptParameterReportPar>

    <Description>PARAM_TESTE</Description>

    <ParamName>PARAM_TESTE</ParamName>

    <Type xmlns:d3p1="http://schemas.datacontract.org/2004/07/System" xmlns:d3p2="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType" i:type="d3p2:RuntimeType" xmlns:d3p3="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z

<soapenv:Envelope xmlns:soapenv

="http://schemas.

xmlsoap

microsoft.

org

com/2003/

soap

10/

envelope

Serialization/">

      <Data xmlns:

tot

d4p1="http://www.

totvs

w3.

com

org/2001/XMLSchema"

>

i:type="d4p1:string" xmlns="">System.String</Data>

      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int" xmlns="">4</UnityType>

      <AssemblyName xmlns:d4p1

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetGeneratedReportSize>

         <!--Optional:-->

         <tot:guid>33f3bc8a-2553-4ad2-a53f-a03b487844cf</tot:guid>

      </tot:GetGeneratedReportSize>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s

="http://

schemas

www.

xmlsoap

w3.org/

soap/envelope/">

   <s:Body>

      <GetGeneratedReportSizeResponse xmlns="http://www.totvs.com/">

         <GetGeneratedReportSizeResult>45484</GetGeneratedReportSizeResult>

      </GetGeneratedReportSizeResponse>

   </s:Body>

</s:Envelope>

 

  • GetFileChunk:

Retorna o relatório gerado em base 64 e no formato especificado no parâmetro filename do método GenerateReport.

Request:

<soapenv:Envelope xmlns:soapenv

2001/XMLSchema" i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1="http://

schemas

www.

xmlsoap

w3.org/

soap

2001/

envelope/

XMLSchema"

xmlns

i:

tot

type="

http

d3p1:

//www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetFileChunk>

         <!--Optional:-->

         <tot:guid>33f3bc8a-2553-4ad2-a53f-a03b487844cf</tot:guid>

         <!--Optional:-->

         <tot:offset>0</tot:offset>

string">1</Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

</ArrayOfRptParameterReportPar>]]></tot:parameters>

         <!--Optional:-->

         <tot:

length>45484<

fileName>Report.pdf</tot:

length>

fileName>

      </tot:

GetFileChunk>

GenerateReportAsynchronous>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

   <s:Body>

     

<GetFileChunkResponse

<GenerateReportAsynchronousResponse xmlns="http://www.totvs.com/">

                [CONTEUDO DO RELATÓRIO EM BASE 64]

                </GetFileChunkResult>

         <GenerateReportAsynchronousResult>ff3fe362-2433-42a1-bda6-44e6d811e578</GenerateReportAsynchronousResult>

      </

GetFileChunkResponse>

GenerateReportAsynchronousResponse>

   </s:Body>

</s:Envelope>

Card
labelGenerateReportAsynchronous

     

  • GenerateReportAsynchronous:

Funciona da mesma forma que o GenerateReport, porém não aguarda a geração do relatório e retorna um identificador único a ser utilizado para consultar o status da geração.

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GenerateReportAsynchronous>

         <!--Optional:-->

         <tot:codColigada>1</tot:codColigada>

         <!--Optional:-->

         <tot:id>306</tot:id>

         <!--Optional:-->

         <tot:filters><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<ArrayOfRptFilterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/">

  <RptFilterReportPar>

    <BandName>RptReport</BandName>

    <FiltersByTable>

      <RptFilterByTablePar>

        <Filter>PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010'

</Filter>

        <TableName>PFUNC</TableName>

      </RptFilterByTablePar>

    </FiltersByTable>

    <MainFilter>true</MainFilter>

    <Value>(PFUNC.CHAPA &gt;= '00001' AND

PFUNC.CHAPA &lt;= '00010'

)</Value>

  </RptFilterReportPar>

</ArrayOfRptFilterReportPar>]]></tot:filters>

         <!--Optional:-->

         <tot:parameters><![CDATA[<?xml version="1.0" encoding="utf-16"?>

<ArrayOfRptParameterReportPar xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.totvs.com.br/RM/">

  <RptParameterReportPar>

    <Description>PARAM_COLIGADA</Description>

    <ParamName>PARAM_COLIGADA</ParamName>

    <Type xmlns:d3p1="http://schemas.datacontract.org/2004/07/System" xmlns:d3p2="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType" i:type="d3p2:RuntimeType" xmlns:d3p3="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

      <Data xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">System.String</Data>

      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int" xmlns="">4</UnityType>

      <AssemblyName xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">1</Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

  <RptParameterReportPar>

    <Description>PARAM_TESTE</Description>

    <ParamName>PARAM_TESTE</ParamName>

    <Type xmlns:d3p1="http://schemas.datacontract.org/2004/07/System" xmlns:d3p2="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType" i:type="d3p2:RuntimeType" xmlns:d3p3="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.UnitySerializationHolder" z:FactoryType="d3p3:UnitySerializationHolder" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">

      <Data xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">System.String</Data>

      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int" xmlns="">4</UnityType>

      <AssemblyName xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>

    </Type>

    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">1</Value>

    <Visible>true</Visible>

  </RptParameterReportPar>

</ArrayOfRptParameterReportPar>]]></tot:parameters>

         <!--Optional:-->

         <tot:fileName>Report.pdf</tot:fileName>

      </tot:GenerateReportAsynchronous>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

   <s:Body>

      <GenerateReportAsynchronousResponse xmlns="http://www.totvs.com/">

         <GenerateReportAsynchronousResult>ff3fe362-2433-42a1-bda6-44e6d811e578</GenerateReportAsynchronousResult>

      </GenerateReportAsynchronousResponse>

   </s:Body>

</s:Envelope>

Card
 
labelGetGeneratedReportStatus
  • GetGeneratedReportStatus:

Utilizado para checar o status da geração do relatório que foi demandado a partir do método GenerateReportAsynchronous.

O retorno é um código de status, seguido de um GUID a ser utilizado para fazer o download do relatório pelo método GetFileChunk. Ex:

  • 0;Wait
  •  – Indica que o relatório está sendo gerado
  • 1;xxxxxxxxxxxxxxxxxxxxxxxxxxxxx - Indica que foi gerado, seguido do GUID para download
  • 2;Erro xxxxxxx
  •  – Indica que ocorreu um erro, seguido da mensagem de erro

 

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tot="http://www.totvs.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <tot:GetGeneratedReportStatus>

         <!--Optional:-->

         <tot:id>ff3fe362-2433-42a1-bda6-44e6d811e578</tot:id>

      </tot:GetGeneratedReportStatus>

   </soapenv:Body>

</soapenv:Envelope>

 

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

   <s:Body>

      <GetGeneratedReportStatusResponse xmlns="http://www.totvs.com/">

         <GetGeneratedReportStatusResult>1;24c5bc57-ffad-422e-8893-67a5c0256e76</GetGeneratedReportStatusResult>

      </GetGeneratedReportStatusResponse>

   </s:Body>

</s:Envelope>

 

 

Informações
iconfalse
Informações
iconfalse

Produto: Framework

Informações
iconfalse

Versão: 11.82.XX e 12.01.XX

Informações
iconfalse

Processo: Web Services Reports

Informações
iconfalse
Informações
iconfalse

Status: Finalizado

Informações
iconfalse

Data: 15/05/2016

Informações
iconfalse

Autores:

Douglas Maxwell de Oliveira

Fábio Augusto Amaral Melo Nunes

Karina Dos Santos Costa

Stella Gleyse Macedo Vilaca

Wesley Avelino De Carvalho

Daniel Santos Campos