cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP lookups in PI 7.31

Former Member
0 Kudos

Hi guys,

we are currently migrating from SAP PI 7.1 to SAP PI 7.31 (SP3).  For some mappings we are using SOAP lookups, and we are facing an issue when trying to implement them in 7.31.  At runtime, the system is getting an exception like this:

  • Error when calling an adapter by using the communication channel CC_SOAP_test_rcv (Party: , Service: TestComponent, Object ID: a23c06d27dfc3ee3b0c98d6f8b52df8d) XI AF API call failed. Module exception: 'com.sap.aii.af.service.cpa.CPAObjectNotFoundException: Couldn't retrieve outbound binding for the given P/S/A values: FP=;TP=;FS=Mapping;TS=TestComponent;AN=;ANS=; in the current context [Unknown]. '. Cause Exception: 'Couldn't retrieve outbound binding for the given P/S/A values: FP=;TP=;FS=Mapping;TS=TestComponent;AN=;ANS=; in the current context [Unknown]. '.

From that exception I understand it is like the system is looking for a angreement related to the channel being used for the lookup, but I never needed to create any agreement in previous versions, do you know if anything have changed in 7.31? is the same API being used?  we tried from both UDF and Java mapping with the same results.  Graphical RFC or JDBC lookups are working fine.

This is a simple code we are using for testing it:


AbstractTrace trace = container.getTrace();

String conversionRate = "";

try {

      SystemAccessor accessor = LookupService.getSystemAccessor(channel);

      InputStream inputStream = new ByteArrayInputStream(SOAPxml.getBytes());

      XmlPayload payload = LookupService.getXmlPayload(inputStream);

      Payload SOAPOutPayload = null;

      /* SOAP call

      SOAPOutPayload = accessor.call(payload);

      /* Parse the SOAPPayload to get the SOAP Response back.

      InputStream inp = SOAPOutPayload.getContent();

      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

      /* Create DOM structure from input XML */

      DocumentBuilder builder = factory.newDocumentBuilder();

      Document document = builder.parse(inp);

      /* ConversionRate is available in the TAG ConversionRateResult in the Response XML */

      NodeList list = document.getElementsByTagName("ConversionRateResult");

      Node node = list.item(0);

      if (node != null) {           node = node.getFirstChild();

           if (node != null) {                conversionRate = node.getNodeValue();

           }

      } } catch (Exception e)    {

      trace.addWarning("Error" + e);

  }

return conversionRate;

Many thanks for any clue that you can give me.

Nicolas

Accepted Solutions (1)

Accepted Solutions (1)

asdasd_asdasd
Active Participant
0 Kudos

Check this:

1-Create a SI(dummy but necessary) ,example "SI_IS_Token"

2-See code below:

public static string invoke_wsaa(string businessService_WSAA, string channel_WSAA, string cms, AbstractTrace trace)

    {

        SystemAccessor accessor;

        bytearrayoutputstream out;

        string loginTicketResponse;

        accessor = null;

        out = null;

        loginTicketResponse = null;

        try

        {

            com.sap.aii.mapping.lookup.Channel channel = null;

            channel = LookupService.getChannel(businessService_WSAA, channel_WSAA);

            accessor = LookupService.getSystemAccessor(channel);

            string SOAPxml = (new StringBuilder("<loginCms xmlns:m=\"http://wsaa.view.sua.dvadac.desein.afip.gov\"><in0>")).append(cms).append("</in0></loginCms>").toString();

            inputstream inputStream = new bytearrayinputstream(SOAPxml.getBytes());

            trace.addInfo(SOAPxml);

            com.sap.aii.mapping.lookup.XmlPayload payload = LookupService.getXmlPayload(inputStream);

            Payload SOAPOutPayload = null;

            accessor.setOperationName("SI_IS_Token");

            accessor.setOperationNamespace("http://sap.com/xi/CNT-LOC/AR_ElectronicInvoiceMTXCAService");

            SOAPOutPayload = accessor.call(payload);

            inputstream loginCmsResponse = SOAPOutPayload.getContent();

            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

            DocumentBuilder builder = factory.newDocumentBuilder();

            document document = builder.parse(loginCmsResponse);

            NodeList nl = document.getElementsByTagName("ns1:loginCmsReturn");

...

3-Create a receiver agreement in ID

4-fingers crossed and test it

Best regards !

Former Member
0 Kudos

works perfect, thanks!

sos groso, sabelo!

asdasd_asdasd
Active Participant
0 Kudos

I just remember who had the answer!. "falmon es groso" .

The million dollar question is "why this happens?"...

nageshwar_reddy
Contributor
0 Kudos

Did you consider raising an OSS message? It looks like an issue with the specific release. 

SAP API documentation does not indicate any change in the behavior of these calls:

LookupService

SystemAccessor

Thanks

Former Member
0 Kudos

Hi Reddy,

I did raise a OSS message, but it was just a waste of time.  I mostly copy-pasted the message here + the details of my system, but the guy handling the message was lost, he took 3 days only for requesting access to the system an so... as it saw it was going to nowhere and already made it work I closed it.

nageshwar_reddy
Contributor
0 Kudos

Thanks for the update Nicolas..

kenny_scott
Contributor
0 Kudos

Hi,

for future reference check the newly released note -

1737850 SOAP Lookup Failure

Regards

Kenny

Former Member
0 Kudos

Hi Kenny,

many thanks for this input.  I can see the note so far includes the patch for 7.30, I guess the one for 7.31 will be included as well, any clue?  Anyway I will keep an eye on the note and come back to it in a couple of days so I can give it a try.

Thanks again.

kenny_scott
Contributor
0 Kudos

Hi Nicolas,

FYI,

   another note wass released for 7.31, i.e.,

 

1774542 - SOAP Lookup fails which executing a mapping scenario

Regards

Kenny

Former Member
0 Kudos

Hi Kenny,

do you know what the status of this note is? I just tried to open it and get the message that the note is currently reworked or that it is for internal use only.

We are facing the problem with the SOAP-Lookup in a Java-Mapping since applying the new patches. The Receiver Agreement is already there, so this cannot be the problem. The scenario worked for months...

Best Regards

Harald

Answers (0)