Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Objetivo

Esse método tem como objetivo realizar a declaração de uma Operação de Transporte.


Info
titleObservações Importantes



Método

Abaixo, segue método - 'DeclaracaoOperacaoTransporte'.

Code Block
languagexml
themeRDark
firstline1
titleDeclararOperacaoTransporteRequest
linenumberstrue
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tms="http://tmsfrete.v2.targetmp.com.br">
   <soapenv:Header/>
   <soapenv:Body>
      <tms:DeclararOperacaoTransporte>
         <tms:auth>
            <tms:Usuario>?</tms:Usuario>
            <tms:Senha>?</tms:Senha>
            <tms:Token>?</tms:Token>
         </tms:auth>
         <tms:declaracao>
            <tms:IdOperacaoTransporte>?</tms:IdOperacaoTransporte>
         </tms:declaracao>
      </tms:DeclararOperacaoTransporte>
   </soapenv:Body>
</soapenv:Envelope>


Declarar Operação Transporte

Abaixo, segue exemplo do método Declarar Operação Transporte.

Code Block
languagexml
themeRDark
firstline1
titleDeclararOperacaoTransporteRequest
linenumberstrue
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tms="http://tmsfrete.v2.targetmp.com.br" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header/>
   <soapenv:Body>
      <tms:DeclararOperacaoTransporte>
         <tms:auth>
            <tms:Usuario>tms.exemplo</tms:Usuario>
            <tms:Senha>v0hXPrwerKblaBs=</tms:Senha>
            <tms:Token i:nil="true" />
         </tms:auth>
         <tms:declaracao>
            <tms:IdOperacaoTransporte>136280</tms:IdOperacaoTransporte>
         </tms:declaracao>
      </tms:DeclararOperacaoTransporte>
   </soapenv:Body>
</soapenv:Envelope>

Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tmsfrete.v2.targetmp.com.br/FreteTMSService/DeclararOperacaoTransporteResponse</Action>
  </s:Header>
  <s:Body>
    <DeclararOperacaoTransporteResponse xmlns="http://tmsfrete.v2.targetmp.com.br">
      <DeclararOperacaoTransporteResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Erro i:nil="true" />
        <IdOperacaoTransporte>136280</IdOperacaoTransporte>
        <DataHoraRegistro>2018-08-30T09:35:56</DataHoraRegistro>
        <NumeroCIOT>188000061610</NumeroCIOT>
        <ProtocoloCIOT>6019</ProtocoloCIOT>
        <DispensadoPelaANTT>false</DispensadoPelaANTT>
        <ObservacoesANTT />
        <IdCompraValePedagio i:nil="true" />
        <ModoCompraValePedagio>4</ModoCompraValePedagio>
        <IdsParcelasOperacaoTransporte xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:int>210272</d5p1:int>
          <d5p1:int>210273</d5p1:int>
        </IdsParcelasOperacaoTransporte>
      </DeclararOperacaoTransporteResult>
    </DeclararOperacaoTransporteResponse>
  </s:Body>
</s:Envelope>