Hello,
I need to pass Token user & password in soap header for receiver SOAP. This is Idoc to SOAP interface.
Requirement is I need to convert whole IDOC XML to binary base 64 and mapp to single field in the receiver structure also need to send Token user/password in soap header.
I am planning to use below UDF in graphical mapping to convert IDOC XML to binary base 64 and mapp to single field then use xslt mapping to pass token user/password in soap header.
So in operation mapping it would first call xslt mapping and then graphical mapping. Will this design work in my case ? Please suggest.
UDF:
public String base64Encode(String str, Container container) throws StreamTransformationException
{
try{
byte[] bytesEncoded = Base64.encode(str.getBytes("utf-8"));
return new String(bytesEncoded );
} catch ( UnsupportedEncodingException e ) {
return "Error";
}
}
Regards