cancel
Showing results for 
Search instead for 
Did you mean: 

LookupService.getXmlPayload in PI7.1

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos
Former Member
0 Kudos

The error is because that I have extended with AbstractTransformation in 7.1 .

Since LookupService.getXmlPayload can only be used with "InputStream" argument ; I am unable to make use of the same method in 7.1 .

Is there a way to fix this ?

baskar_gopalakrishnan2
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

arg0.getInputPayload().getInputStream()  helped to get the payload

Thank you

Answers (0)