on 03-01-2016 5:30 PM
Hi All
We developed a scenario File to SOAP(connecting third party).
Third party provided wsdl and xsd files.
No Message mapping.
We developed a Java mapping to send input file as base64 encoded output file to one of the field in XSD file.
PI will pick the file and java mapping encode the input file to Base64 and SOAP request will be sent to third party.
Please provide your valuable inputs on below requirement :
"Message Id should be sent from PI for one of the field as this is unique for each file"
Regards
Anitha
Hi Anitha,
Can you please provide target XML structure.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anupam
The below is the expected structure at Target as per the wsdl provided by third party.
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Header/>
<SOAP:Body>
<ns0:sampleFile xmlns:ns0="TargetURL">
<ns0:fileID>16cd6da9-9911-11e5-81da-000005cad803</ns0:fileID>
<ns0:fileType>text</ns0:fileType>
<ns0:mimeType>text/plain</ns0:mimeType>
<ns0:fileName>xyz.txt</ns0:fileName>
<ns0:fileContent>zc84qoL7ATOyQjLGxgiQExdigSQ1tUuvT3pKRpSj1Y59PZ55PjQy5yvQMAGkCKzSNYjhhubT2MWobmXU9t040f/Rz6VldST9K/urFSCEvhvG6J3cGHFRUqgnK8VAA4n2SrymDH5bF4</ns0:fileContent>
</ns0:sampleFile>
</SOAP:Body>
</SOAP:Envelope>
We are able to generate this structure through Java mapping.
In field "fileContent" we are passing base64 encoded file.
Now my requirement is to pass dynamic message ID through field "fileID"
I would like insert the code for dynamic message ID in the same mapping
Regards
Anitha
Hi Anitha,
The following statement is good enough.
fileID=TransformationInput.getInputHeader().getMessageId();
You don't require the next line
String messageID= (String) fileID.get(StreamTransformationConstants.MESSAGE_ID);
unless you are using the field messageID somewhere else.
Regards
Charan
Hi Charan and Raghu
Thanks for your inputs.
I am facing issue when trying to export the java file as .jar file.Hence not able to test.
Please provide me the below library jar files if you have else guide me where can I get them.
import com.sap.aii.mapping.api.TransformationInput;
import com.sap.aii.mapping.api.TransformationOutput;
import java.io.*;
import javax.xml.bind.DatatypeConverter;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
Check the following links on how to get the jars for the Java mapping development.
https://wiki.scn.sap.com/wiki/display/XI/Where+to+get+the+libraries+for+XI+development
https://wiki.scn.sap.com/wiki/display/XI/XI+libraries+for+development
Regards
Charan
Thank you Raghu and Charan
The issue is resolved.Now I can able to get dynamic message ID for "fileID" field.
<ns0:fileID>C8CD9507DFD645CC2B10EB9FE8B76874</ns0:fileID>
Logic used in Java mapping :
InputHeader messageHeader = transformationInput.getInputHeader();
String messageId = messageHeader.getMessageId();
I am closing the thread.
kindly help if we can also achieve this by AF_Modules/DynamicConfigurationBean
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.