cancel
Showing results for 
Search instead for 
Did you mean: 

Web service with attachment error

Dimitri
Active Contributor
0 Kudos

All,

Using a web service, I want to get a document out of a database.

The request is going fine and the response message, with the attachment, leaves the database correctly.

When I check my scenario on SAP PO, I see an error:

Transmitting the message using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException:

Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException:

Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_<response message mapping name>_;

Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Unexpected value <null> for node <node name>

In the receiver SOAP adapter, Keep Attachments is ticked.

On Operation Mapping level, Read Attachments is also ticked.

Any idea what could be wrong here?

Thanks a lot

Dimitri

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Dimitri

Can you share what is the logic in the response mapping? Is there any UDF - if yes can you share the logic?

Rgds

Eng Swee

Dimitri
Active Contributor
0 Kudos

Hi Eng,

The response mapping does not contain any kinky stuff. Just straight forward.

PS: I would like to stick to the regular SOAP adapter, not the SOAP AXIS adapter.

Kind regards,

Dimitri

engswee
Active Contributor
0 Kudos

Ok, a few of things.

1. Does the main payload for the response matches the schema for the response mapping?

2. What are you expecting to do with the attachments? If you set "Read Attachments" in the OM, it indicates that you intend to have some Java mapping or UDF to access the attachments on the response message.

3. Do you actually see the attachment available in the Message Monitor?

Dimitri
Active Contributor
0 Kudos

Hi Eng,

  1. What is the quickest and easiest way to find that out?
  2. There is no need to access the attachment (PDF document). We need to send the PDF back to the SAP system. It is needed there. Nothing to do with it on SAP PO.
  3. I only see the request message in the message monitor

Kind regards,

Dimitri

engswee
Active Contributor
0 Kudos

What are you using on the sender side, proxy?

Dimitri
Active Contributor
0 Kudos

Yes, an ABAP proxy

engswee
Active Contributor
0 Kudos

3. If you can't see the response message in Message Monitor, I'd suggest that you add MessageLoggerBean as a module in the receiver channel. Add it after the standard module so that it logs the response

1. Once you are able to see the response, you can compare the payload against the definition in ESR

2. If you have a response mapping, I don't think the attachment automatically transfers to the target payload - I can't remember exactly on this and I don't have an attachment scenario to confirm this right now. I'd suggest you try the removing "Read attachments" and see if you still get the error

Dimitri
Active Contributor
0 Kudos

I tried several things, but I do not see any response message in the monitoring.

In the meantime, I checked with the receiving application and those guys tell me they actually are sending back the response message. Strange...

iaki_vila
Active Contributor
0 Kudos

Hi Dimiti,

Could test it externally to PI?, have you ask if the attachment is sent with a particular technology like MTOM?

Regards.

Former Member
0 Kudos

Try using XPI_INSPECTOR to trace the payload.Use "Full Dump" under HTTP Provider.

Dimitri
Active Contributor
0 Kudos

The receiving application is using MTOM

iaki_vila
Active Contributor
0 Kudos

Hi Dimitri,

Time ago i couldn't do the SOAP receiver adapter works correctly with MTOM attachments and i had to do the configuration with SOAP-AXIS adapter that i previously pointed out.

If you have the AXIS libraries installed you can try with my example.

Regards.

Dimitri
Active Contributor
0 Kudos

Our response message mapping does not do anything. Just passing through data.

For that reason, I left it out the operation mapping.

Now, I see the maindocument and the PDF attachment in the message monitor on the SAP ERP system.

Next question is: how to get that PDF out of it using ABAP code, but that's a question I do not need to answer

All suggestions, I will pass to the ABAP team.

Thanks guys for the support!

Dimitri

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Dimitri,

I think the problem is the id reference to the attachment is lost in the SOAP manifest as this thread explains

I haven't clear if the solution in the thread could help you, may be i would try with the SOAP AXIS adapter.

For example, with MTOM attachments, i did the next:

Regards.