cancel
Showing results for 
Search instead for 
Did you mean: 

Sending an empty idoc to IDOC adapter without an error

Former Member
0 Kudos

Hi,

I have an interface which I query a SOAP web service for new orders and then map the SOAP response to IDocs. The query job will be scheduled so sometimes the SOAP response will have an empty order list. As a result, the IDoc message will be empty too. The XML will look like this:

<_-AFS_-ORDERS05></_-AFS_-ORDERS05>

This will cause an error in the integration engine:

Error: Tag found instead of tag IDOC BEGIN=

which is a false alarm. Is there any way for PI not to trigger an error when the IDoc XML is empty?

Thanks in advance,

Kenny


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You cannot send an empty Idoc to an Idoc adapter without error, instead you can use a rule (to check if soap response is empty) to stop the message from getting processed beyond the receiver determination or interface determination as appropriate.

Kind Regards

Vishnu

Former Member
0 Kudos

Thanks for your reply. But I can't use conditions on the receiver determination in my case. The sender interface is an ABAP proxy. It contains all the parameters for the SOAP request. When the message gets to PI, I have a Java mapping that calls the SOAP web service and parse the response as IDoc. I did this because this is actually an Sync to Async scenario. I didn't want to use BPM so I decided to use Java mapping to execute the SOAP call. Therefore, by the time I make the SOAP request, the receiver determination is already done.

Any other ways to work around this?

Thanks,

Kenny

Former Member
0 Kudos

Hi,

There is a way, which is just like a simulation of a message bus.. instead of sending the mapped output to Idoc receiver during the first call, you can send it to a simulated message bus (a business component) which will contain both receiver & sender soap communication channels. The target url of receiver communication channel has to be built in such away that it calls the sender  comm. channel of your own PI system (= comm channels of the virtual message bus).

Now once the message enters the PI system for second time, the rules can be applied to route it to Idoc adapter or stop based on conditions without error.

Stage 1: Proxy-->PI (Java Mapping/ Soap response converted or unconverted to Idoc) --> Virtual Message Bus (Rcvr comm. channel target url is Sender comm channel of the Virtual msg bus calling your PI system )

Stage 2 : Virtual Msg bus --> Rcr Det --> Int. Det --> Mapping (if needed) --> Idoc adapter.

Kind Regards

Vishnu

Former Member
0 Kudos

Interesting. I will give it a try. Thanks!

Former Member
0 Kudos

Works out great. Thanks!

Answers (0)