cancel
Showing results for 
Search instead for 
Did you mean: 

Sync SOAP to Proxy with BPM

Former Member
0 Kudos

Hi Experts,

I'm trying to create a BPM (in PI 7.1) which validates (by JAVA class) the XML message received and sends to R/3 an error message in case the request message isn't valid or an transformation of the request message in the other case.

The response message is either determined by a transformation mapping (when the XML is not valid) or by the R/3 after receiving and validating the contents of the request message.

I do this a lot with asynchronous scenarios but it's the first time I'm trying with sync interfaces and unfortunally I'm not managing to implement this.

Is this possible? Is there any better way of doing this without BPM? Do you need more information?

Thank you all in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

>>sends to R/3 an error message in case the request message isn't valid or an transformation of the request message in the other case.

It seems that u want to make sync call successful in PI even if the message is not valid and notify the sender about the error?

IMO, u are complicating ur req and so just enable XML validation, and let that sync transaction be failed in PI.

Thanks

Amit Srivastava

Former Member
0 Kudos


Hi Amit,

Thank you so much for your answer and I agree with you and with Hareesh on that the best solution would be the one that both of you suggested, but delivering that error message to R/3 it's mandatory in this process...

Thanks

Former Member
0 Kudos

Hello,

Hmm....OK

If that's the case, then check below approach.

First of all create one intermediate structure something like:

Mt_Intermdeaite

     Source Request Structure (coming from SOAP)

          ......

          ......

     Error Details

So in ur Java mapping code, do ur XML validation if validation is successful then output entire source xml under "Source Request Structure" node and do ur request mapping between "Source Request Structure" and Proxy, but in case there are any validation errors then populate intermdediate structure with both request as well as Error details node and then send the same to Proxy.

So this way u can avoid using BPM, but certainly u have to do more java coding.

Thanks

Amit Srivastava

former_member184720
Active Contributor
0 Kudos

Hi Sandra - If your requirement is just to validate with the xml againist the XSD then you can make use of the XML validation option as explined in the below blog.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83...

You can configure the alerts so that whenever something fails the users will get notified about the failed message.

 

Validating the XML documents is a new feature introduced in SAP NetWeaver Process Integration 7.1. The validation can be performed at two different locations - Integration Server or the Adapter Engine. Validations can be done in both synchronous and asynchronous operations.

In the synchronous scenario or using an adapter that can handle synchronous messages (e.g. HTTP and SOAP adapters), when a validation error occurs, the error message will be returned to the sender. In the case of asynchronous scenarios (e.g. file adapter), the error message will be logged to the SXI_MONITOR when the validation is done in the Integration Server or to the Runtime Workbench (RWB) when the validation is done in the Adapter Engine. In both cases, the messaging will be terminated with error.

Former Member
0 Kudos

Hi Hareesh,

Thank you for your quick answer but unfortunally I don't think that will do because - in case of XML validation error - I have to send an error message with some information of the request message and the error itself to the R/3 and I can't do that with alerts... or can I?

Thanks

former_member184720
Active Contributor
0 Kudos

Hi Sandra - If it is a synch interface, then as explained in the document

In the synchronous scenario or using an adapter that can handle synchronous messages (e.g. HTTP and SOAP adapters), when a validation error occurs, the error message will be returned to the sender

However there is no out-of-box solution available to attach the payload along with the alert information.(in PI 7.3 CBMA we have it) but have a look at the below approach if it interests you..

http://scn.sap.com/docs/DOC-33036

http://stackoverflow.com/questions/6815579/validating-xml-against-xsd