on 06-20-2012 11:39 PM
Hi,
I am trying making use of the "LookupService.getXmlPayload" method in one of the Java mapping to read the input xml message into a payload. This is not working as the parameter that is passed is of type "TransformationInput" and it seems that this method only works with "InputStream" argument .
Is there any way that I can overcome this error ?
I am in 7.1 and using the jar file "com.sap.xpi.ib.mapping.lib" .
Also , how to use the features of PI7.0 stream Transformations to be used in 7.1. ?
Thanks & Regards,
Prem
There is a change in java mapping between 7.0 and 7.1. You need to extend your class with AbstractTransformation. For details, Please see the links and modify accordingly
http://wiki.sdn.sap.com/wiki/display/XI/Sample+JAVA+Mapping+code+using+PI+7.1+API
http://wiki.sdn.sap.com/wiki/display/XI/Using+PI+7.1+API+for+Java+mapping
http://wiki.sdn.sap.com/wiki/display/XI/XI+libraries+for+development
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Couple of hints..
a) You need to extend Class AbstractTransformation. That means your method name should be
method transform(TransformationInput in, TransformationOutput out) as oppose to execute Method in earlier version
b) Assume your method as follows ....
public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException {
ie arg0.getInputPayload().getInputStream() -> InputStream
refer this link
http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/TransformationInput.html
Hope that helps.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.