on 2014 Feb 13 5:43 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
68 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.