on 10-30-2015 6:36 PM
Hi Experts,
I had written the UDF to save the runtime created xml file on server. It was working 3-5 days back but now it is not working.
I had to store the timestamp from response and save it as a xml file to be used for next request sent to Target system.
Code for your reference,
public String StoreTimeStamp(String TimeStamp, Container container) throws StreamTransformationException{
try {
String FinalXML = "";
String FilesPath = "/usr/sap/tmp";
String StartString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:MT_GetPendingRequest_TimeStamp xmlns:ns0=\"urn:ariba.com:xi:AribaIntegration\"><TimeStamp>";
String EndString = "</TimeStamp></ns0:MT_GetPendingRequest_TimeStamp>";
FinalXML = FinalXML.concat(StartString);
FinalXML = FinalXML.concat(TimeStamp);
FinalXML = FinalXML.concat(EndString);
byte[] FinalBytes = FinalXML.getBytes();
try{
String FileName = "GetPendingRequestOrderConfirmation.xml";
File path = new File(FilesPath+FileName);
FileOutputStream fos = new FileOutputStream(path);
fos.write(FinalBytes);
}
catch(IOException IOE)
{
StreamTransformationException STE = new StreamTransformationException(IOE.getMessage(),IOE);
STE.setStackTrace(IOE.getStackTrace());
throw STE;
}
return TimeStamp;
}
catch(Exception e){
throw new RuntimeException("Exception : "+e);
}
}
Please let me know how can I troubleshoot/test or debug the UDF or any other suggestion.
Regards,
Nitin Patil
Hi Nitin,
Could be a folder permission problem, can you check this with your basis team?
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add traces in your code, wherever you think, something is going wrong, like below.
container.getTrace().addInfo("*** Debugging *** Entered UDF StoreTimeStamp to store timestamp");
Test your code either in OM or MM, using test tab to troubleshoot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.