On Mon, Mar 26, 2012 at 9:26 PM, Paulo "JCranky" Siqueira
<paulo.s...@gmail.com> wrote:
> How can I declare the test body without having to have to write it in a
> single line?
NfeStatusServicoNF2Result is a mixed, so it recognizes plain text and
XML elements.
All you have to do is avoid end line at the top level:
val sampleBody =
<nfeStatusServicoNF2Result
xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><retConsStatServ
versao="2.00" xmlns="http://www.portalfiscal.inf.br/nfe">
<tpAmb>2</tpAmb>
<verAplic>SP_NFE_PL_006j</verAplic>
<cStat>252</cStat>
<xMotivo>Rejeição: Ambiente informado diverge do Ambiente de
recebimento</xMotivo>
<cUF>35</cUF>
<dhRecbto>2012-03-26T17:19:13</dhRecbto>
</retConsStatServ></nfeStatusServicoNF2Result>
-eugene
Oh I see, the problem is that the line break inside de result tag is found before the ret tag then... And the same is valid for the closing tag. Makes sense :-)
Thanks!!
[]s,
Paulo "JCranky" Siqueira
http://jcranky.com