on 08-11-2014 6:46 AM
I have a file to webservice scenario in which all fileds that are input to the webservice are string so I map them from the source side after applyign graphical functions.. but one field in target side has a data type base64Binary
Is this same as byte? or this is base64ecoding?
Also can you please let me know I can accomplish the mapping usign UDF?
when I do a return inputstring.getBytes() , its throwing an error
Regards,
Tej
HI Ravi,
Is this same as byte? or this is base64ecoding?
This represents an encoding of a binary file, but the representation is in base64. With base64 you can get text or binary data but the algorithm is the same. It is base64encoding
Also can you please let me know I can accomplish the mapping usign UDF?
I think that you want to take the file a converting it in base64 and to set a XML tag with this value.
You can use a java mapping to do this. You use the file adapter to take the file and later in the java mapping you do the base64 conversion:
1. To read a file and to deal with it in java mapping: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56...
2. Conversion to base64 of an inputstream: How do you convert an InputStream to a base64 string in Scala? - Stack Overflow
3. Finally, you take this result and string and you converts the target XML manually.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Inaki....
My requirement is follows...file to webservice
one field in the target side called DATA (WS) , is to be mapped to one field in from the source side CONTENT (FILE)....
but the data type in the target field is of type "base64Binary" (WS), whereas the data type of the field CONTENT(FILE) is string..
the rest of the fields in the target side are mapped one to one with the fields from the source side.. its all string.. except for the field DATA
Hello Experts,
need help with Strign to byte in udf .. pls let em know
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi EXperts,
Any help on this?
Converting one field of input from string to byte stream?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can convert the base64Binary into string as below:
byte[] encodedString = Base64.encodeBase64(strInput.getBytes());
return (encodedString.toString());
Thanks,
Kanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.