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 a tag "DefaultDB" no arquivo de configuração do Host (RM.host.Service.exe.config).

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

 

Aviso
iconfalse

Para baixar os arquivos da aplicação exemplo em ASP.Net, clique aqui.

 

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

 

Expandir
titleGetReportList
Informações
iconfalse

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

 

Deck of Cards
id.
Card
labelRequest
Bloco de código
languagexml
titleRequest
<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> 
Card
labelResponse
Bloco de código
languagexml
titleResponse
<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>
Expandir
titleGetReportMetadata:
Informações
iconfalse

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

Deck of Cards
id.
Card
labelRequest
Bloco de código
languagexml
titleRequest
<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>
Card
labelResponse
Bloco de código
languagexml
titleResponse
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">   <s:Body>     Body>
      <GetReportMetaDataResponse xmlns="http://www.totvs.com/">        >
         <GetReportMetaDataResult><![CDATA[<NewDataSet> <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>       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:>
            <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>
                <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>     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>     unique>
      <xs:unique name="Constraint2">       >
        <xs:selector xpath=".//pfdepend" />       >
        <xs:field xpath="CODCOLIGADA" />       >
        <xs:field xpath="CHAPA" />     >
      </xs:unique>     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>     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:keyref>
    </xs:element> element>
  </xs:schema><schema>
</NewDataSet>]]></GetReportMetaDataResult>     GetReportMetaDataResult>
      </GetReportMetaDataResponse>  GetReportMetaDataResponse>
   </s:Body><Body>
</s:Envelope>
Expandir
titleGetReportInfo
Informações
iconfalse

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.

Deck of Cards
id.
Card
labelRequest
Bloco de código
languagexml
titleRequest
<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>
Card
labelResponse
Bloco de código
languagexml
titleResponse
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetReportListResponse
<GetReportInfoResponse 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><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://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>
      </GetReportListResponse>RptFilterByTablePar>
    </s:Body>
</s:Envelope>
Expandir
titleGenerateReport
Informações
iconfalse

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.

Deck of Cards
id.
Card
labelRequest
Bloco de código
languagexml
titleRequest
<soapenv:Envelope xmlns:soapenvFiltersByTable>
    <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://schemaswww.xmlsoapw3.org/soap/envelope/2001/XMLSchema-instance" xmlns:tot="http://www.totvs.com.br/RM/">
   <soapenv:Header/>
<RptParameterReportPar>
    <soapenv:Body><Description>PARAM_COLIGADA</Description>
      <tot:GenerateReport><ParamName>PARAM_COLIGADA</ParamName>
         <!--Optional:-->
         <tot:codColigada>1</tot:codColigada>
         <!--Optional:-->
         <tot:id>306</tot:id>
         <!--Optional:--<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   <tot:filters><![CDATA[<?xml version="1.0" encoding="utf-16"?>
<ArrayOfRptFilterReportPar xmlns:ixmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">System.String</Data>
      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance" i:type="d4p1:int" xmlns="">4</UnityType>
      <AssemblyName xmlns:d4p1="http://www.totvsw3.com.brorg/RM2001/XMLSchema">
  <RptFilterReportPar>
    <BandName>RptReport</BandName> i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>
    <FiltersByTable></Type>
    <Value  <RptFilterByTablePar>xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string"></Value>
        <Filter>PFUNC.CHAPA &gt;= '00001' AND
PFUNC.CHAPA &lt;= '00010'
</Filter>
        <TableName>PFUNC</TableName><Visible>true</Visible>
  </RptParameterReportPar>
  <RptParameterReportPar>
    <Description>PARAM_TESTE</Description>
      </RptFilterByTablePar>
<ParamName>PARAM_TESTE</ParamName>
     </FiltersByTable>
    <MainFilter>true</MainFilter>
    <Value>(PFUNC.CHAPA &gt;= '00001' AND
PFUNC.CHAPA &lt;= '00010')</Value>
  </RptFilterReportPar>
</ArrayOfRptFilterReportPar>]]></tot:filters>
         <!--Optional:-->
 <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  <tot:parameters><![CDATA[<?xml version="1.0" encoding="utf-16"?>
<ArrayOfRptParameterReportPar xmlns:ixmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string" xmlns="">System.String</Data>
      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance" xmlnsi:type="http://www.totvs.com.br/RM/">
  <RptParameterReportPar>
    <Description>PARAM_COLIGADA</Description>d4p1:int" xmlns="">4</UnityType>
    <ParamName>PARAM_COLIGADA</ParamName>
  <AssemblyName  <Type xmlns:d3p1d4p1="http://schemaswww.datacontractw3.org/2004/07/System2001/XMLSchema" i:type="d4p1:string" xmlns:d3p2="-mscorlib">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>
Expandir
titleGenerateReport
Informações
iconfalse

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.

Deck of Cards
id.
Card
labelRequest
Bloco de código
languagexml
titleRequest
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:totb77a5c561934e089-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.w3totvs.org/2001com/XMLSchema" i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>
    </Type>">
   <soapenv:Header/>
   <soapenv:Body>
    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">1</Value>
 <tot:GenerateReport>
       <Visible>true</Visible>
  </RptParameterReportPar>!--Optional:-->
  <RptParameterReportPar>
       <Description>PARAM_TESTE</Description><tot:codColigada>1</tot:codColigada>
    <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<!--Optional:-->
         <tot:id>306</tot:id>
         <!--Optional:-->
         <tot:filters><![CDATA[<?xml version="1.0" encoding="utf-16"?>
<ArrayOfRptFilterReportPar xmlns:i="http://schemaswww.microsoftw3.comorg/2003/10/Serialization/">
      <Data xmlns:d4p12001/XMLSchema-instance" xmlns="http://www.w3totvs.com.orgbr/2001RM/XMLSchema" i:type="d4p1:string" xmlns="">System.String</Data>
>
  <RptFilterReportPar>
    <BandName>RptReport</BandName>
    <FiltersByTable>
      <RptFilterByTablePar>
        <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int" xmlns="">4</UnityType><Filter>PFUNC.CHAPA &gt;= '00001' AND
PFUNC.CHAPA &lt;= '00010'
</Filter>
      <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>  <TableName>PFUNC</TableName>
      </RptFilterByTablePar>
    </Type>FiltersByTable>
    <MainFilter>true</MainFilter>
  <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">1</Value>
    <Visible>true</Visible>  <Value>(PFUNC.CHAPA &gt;= '00001' AND
PFUNC.CHAPA &lt;= '00010')</Value>
  </RptParameterReportPar>RptFilterReportPar>
</ArrayOfRptParameterReportPar>ArrayOfRptFilterReportPar>]]></tot:parameters>filters>
         <!--Optional:-->
         <tot:fileName>Report.pdf</tot:fileName>: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>
  </tot:GenerateReport>
   </soapenv:Body>
</soapenv:Envelope>
Card
labelResponse
Bloco de código
languagexml
titleResponse
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">   <s:Body>      <GetReportInfoResponse xmlns="http://www.totvs.com/">         <GetReportInfoResult xmlns:a<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/Arrays"">
      <Data xmlns:id4p1="http://www.w3.org/2001/XMLSchema-instance">            <a:string><![CDATA[<?xml version="1.0" encoding="utf-16"?><ArrayOfRptFilterReportPar xmlns:ii:type="d4p1:string" xmlns="">System.String</Data>
      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance" xmlnsi:type="http://www.totvs.com.br/RM/">  <RptFilterReportPar>    <BandName>RptReport</BandName>    <FiltersByTable>      <RptFilterByTablePar>        <Filter>PFUNC.CHAPA &gt;= '00001' ANDPFUNC.CHAPA &lt;= '00010'</Filter>        <TableName>PFUNC</TableName>      </RptFilterByTablePar>    </FiltersByTable>    <MainFilter>true</MainFilter>    <Value>(PFUNC.CHAPA &gt;= '00001' ANDPFUNC.CHAPA &lt;= '00010')</Value>  </RptFilterReportPar></ArrayOfRptFilterReportPar>]]></a:string>            <a:string><![CDATA[<?xml version="1.0" encoding="utf-16"?><ArrayOfRptParameterReportPar xmlns:id4p1: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-instance" xmlnsi:type="httpd3p1:string">1<//www.totvs.com.br/RM/">  <RptParameterReportPar>    <Description>PARAM_COLIGADA</Description>    <ParamName>PARAM_COLIGADA</ParamName>   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/">
      <Data 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>System.String</Data>
      <UnityType xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string"></Value>    <Visible>true</Visible>  </RptParameterReportPar>  <RptParameterReportPar>    <Description>PARAM_TESTE</Description>    <ParamName>PARAM_TESTE</ParamName>    <Type xmlns:d3p1d4p1:int" xmlns="">4</UnityType>
      <AssemblyName xmlns:d4p1="http://schemaswww.datacontractw3.org/2004/07/System" xmlns:d3p2="-mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089-System-System.RuntimeType2001/XMLSchema" i:type="d3p2d4p1:RuntimeTypestring" 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/">      <Data xmlns:d4p1neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>
    </Type>
    <Value xmlns:d3p1="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:d4p1d3p1:string">1</Value>
    <Visible>true</Visible>
  </RptParameterReportPar>
</ArrayOfRptParameterReportPar>]]></tot:parameters>
         <!--Optional:-->
         <tot:fileName>Report.pdf</tot:fileName>
      </tot:GenerateReport>
   </soapenv:Body>
</soapenv:Envelope>
Card
labelResponse
Bloco de código
languagexml
titleResponse
<s:Envelope xmlns:s="http://wwwschemas.w3xmlsoap.org/soap/2001envelope/XMLSchema">
 i:type="d4p1:string" xmlns="">mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyName>    </Type>    <Value xmlns:d3p1  <s:Body>
      <GenerateReportResponse xmlns="http://www.w3totvs.org/2001com/XMLSchema" i:type="d3p1:string"></Value>    <Visible>true</Visible>  </RptParameterReportPar></ArrayOfRptParameterReportPar>]]></a:string>         </GetReportInfoResult>      </GetReportInfoResponse>  >
         <GenerateReportResult>33f3bc8a-2553-4ad2-a53f-a03b487844cf</GenerateReportResult>
      </GenerateReportResponse>
   </s:Body><Body>
</s:Envelope>
Expandir
titleGetGeneratedReportSize
Informações
iconfalse

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.

Deck of Cards
id.
Card
labelRequest
Bloco de código
languagexml
titleRequest
<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>
Card
labelResponse
Bloco de código
languagexml
titleResponse
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">  >
   <s:Body>     Body>
      <GetGeneratedReportSizeResponse xmlns="http://www.totvs.com/">        >
         <GetGeneratedReportSizeResult>45484</GetGeneratedReportSizeResult>     GetGeneratedReportSizeResult>
      </GetGeneratedReportSizeResponse><GetGeneratedReportSizeResponse>
   </s:Body><Body>
</s:Envelope>
Expandir
titleGetFileChunk
Informações
iconfalse

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

Deck of Cards
id.
Card
labelRequest
Bloco de código
languagexml
titleRequest
<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>
Card
labelResponse
Bloco de código
languagexml
titleResponse
<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>
Expandir
titleGenerateReportAsynchronous
Informações
iconfalse

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.

Deck of Cards
id.
Card
labelRequest
Bloco de código
languagexml
titleRequest
<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>
Card
labelResponse
Bloco de código
languagexml
titleResponse
<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>
Expandir
titleGetGeneratedReportStatus
Informações
iconfalse

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
Deck of Cards
id.
Card
labelRequest
Bloco de código
languagexml
titleRequest
<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>
Card
labelResponse
Bloco de código
languagexml
titleResponse
<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>

Aplicação de Teste:


        Para utilizar a aplicação de testes é necessário possuir o Microsoft Visual Studio.

  • Com o Visual Studio aberto: Clique nas opções FILE -> Open -> Web Site. Conforme exemplo abaixo:

             

  • Em seguida selecione a pasta descompactada e clique em "Open" conforme abaixo:

             

 

 

Bloco de código
languagexml
titleRequest
<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> 

 

<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>

<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>

Informações
iconfalse
Informações
iconfalse

Produto: Framework

Informações
iconfalse

Versão: 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:

Daniel Santos Campos

Douglas Maxwell de Oliveira

Fábio Augusto Amaral Melo Nunes

Karina Dos Santos Costa

Stella Gleyse Macedo Vilaca

Wesley Avelino De Carvalho

Informações
iconfalse

Download dos arquivos: wsReport