Skip to content

Instantly share code, notes, and snippets.

@edgars
Created December 1, 2017 04:19
Show Gist options
  • Save edgars/5f658e54949f28f2a94e2205dd3972a6 to your computer and use it in GitHub Desktop.
Save edgars/5f658e54949f28f2a94e2205dd3972a6 to your computer and use it in GitHub Desktop.
resource consultacep (http:Request req, http:Response res, string cep) {
xml soapRequest = xml `<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">
<soapenv:Header/>
<soapenv:Body>
<cli:consultaCEP>
<cep>{{cep}}</cep>
</cli:consultaCEP>
</soapenv:Body>
</soapenv:Envelope>`;
req.setXmlPayload(soapRequest);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment