on 08-02-2016 7:37 PM
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
Hi Bhavana,
for adding the soap header user id and password, you can the AddSOAPHeaderBean. Please check the below blog
for base 64 conversion check the below links
Java Code for Base 64 Encoding | SCN
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Harish,
Thank you for your reply on this.
Adding Token user and password in soap header with "AddSOAPHeaderBean" looks promising to achieve my requirement. Thanks for that.
And regarding converting whole Idoc xml into binary base64 and put it in one field can't be achieved by simple UDF that i mentioned above? I am just exploring options only.
My receiver SOAP structure is as below. I have to convert whole idoc xml into binary base64 and put it in "argBytConteudo" field.
Thanks
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.