Skip to Content

Java Mapping doesn't work from the wsnavigator

Hi guys, I'm working on an interface that WS (Soap axis) <-> PI 7.31 <-> RFC. We use Java mapping in the mapping response, since our requirement indicates to capture the response of the RFC, to obtain the BP number. The structure of the response of the RFC is as follows(SXI_MONITOR):

<?xml version="1.0" encoding="UTF-8"?>
<rfc:ZBP_BUSINESS_PARTNER.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<PARTNER>99999999</PARTNER>
<RETURN>
<item>
<TYPE>S</TYPE>
<ID></ID>
<NUMBER>000</NUMBER>
<MESSAGE>Business Partner recuperado con éxito.</MESSAGE>
<LOG_NO></LOG_NO>
<LOG_MSG_NO>000000</LOG_MSG_NO>
<MESSAGE_V1></MESSAGE_V1>
<MESSAGE_V2></MESSAGE_V2>
<MESSAGE_V3></MESSAGE_V3>
<MESSAGE_V4></MESSAGE_V4>
<PARAMETER></PARAMETER>
<ROW>0</ROW>
<FIELD></FIELD>
<SYSTEM></SYSTEM>
</item>
</RETURN>
</rfc:ZBP_BUSINESS_PARTNER.Response>

The code of JM, to obtain is:

public String getBP(Document docIn) {
try {
Node node = docIn.getFirstChild();
NodeList list_ZBP_BUSINESS_PARTNER_response = node.getChildNodes(); 
Element PARTNER_response = (Element) list_ZBP_BUSINESS_PARTNER_response
.item(1); 
return PARTNER_response.getTextContent();
} catch (Exception e) {
getTrace().addInfo("Exception e: " + e.getMessage());
}
return "";
}

Then the code, invokes a store procedure, and performs a filter of the input XML.

The weird thing is that when we test in Operation Mapping, the mapping works ok, but when we do the test from the wsnavigator, we get an exception.

Connection IO Exception. Check nested exception for details. (Invalid SOAP Response. Runtime can not find return parameter <tagResponse>.).

I need help to move forward, thank you very much. If you require any additional information, I am available.

traces's NWA:

trace.png (104.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 21, 2017 at 07:52 PM

    The solution, 0 instead of 1.

    public String getBP(Document docIn) {
    try {
    Node node = docIn.getFirstChild();
    NodeList list_ZBP_BUSINESS_PARTNER_response = node.getChildNodes(); 
    Element PARTNER_response = (Element) list_ZBP_BUSINESS_PARTNER_response
    .item(0); 
    return PARTNER_response.getTextContent();
    } catch (Exception e) {
    getTrace().addInfo("Exception e: " + e.getMessage());
    }
    return "";
    }
    Add comment
    10|10000 characters needed characters exceeded