on 10-16-2010 11:05 AM
Bom dia pessoal,
nós estamos implementando a versão 2.0 para a NFE no projeto e o cenário de envio de xml para o cliente não está funcionando corretamente.
Para configurar este cenário utilizei o documento "Using SAP PI Lookup API and Dynamic Configuration in SAP GRC NFE Outbound B2B Interface for Dynamic E-mail Determination".
O problema que tenho é que o campo procNFeStr fica vazio na sxi_moni. Somente o campo de CNPJ é preenchido.
Segue xml de exemplo:
Para este campo, procNFeStr, estou usando, a seguinte função Java no message mapping conforme o documento mencionado acima.
InputStream in = new ByteArrayInputStream(xml.getBytes("utf-8"));
// Parse the xml
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(in);
Node node = (Node) doc.getElementsByTagName("infNFe").item(0);
if (node.hasAttributes() && !node.getAttributes().getNamedItem("Id").equals("")) {
String subject = node.getAttributes().getNamedItem("Id").getNodeValue();
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
"http://sap.com/xi/XI/System/Mail", "THeaderSUBJECT");
conf.put(key, subject);
} else {
trace.addWarning("Dynamic Subject failed: empty or missing NF-e Id!");
}
} catch (Exception e) {
trace.addWarning("Dynamic Subject failed: " + e);
}
return xml;
Vocês sabem a causa do campo procNFeStr estar em branco?
Abs,
Sérgio Salomã
O mapping está finalizando com sucesso?
Aparentemente está parando.
Substitui os "trace.addWarning()" por algo do tipo "throw new RuntimeException ()" e vê se para o mapping.
Se tiver parando, analise o erro.
Abs,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.