Transfer of JPG Attachment through web method using BASE64 encoding
Hello!
I have an existing ABAP program which sends information (.txt file) by calling a web module. I need to change this program so that users can attach a .Jpg image. The image has to be sent along with the other information by calling the web module but the encoding has to be BASE64. Do anybody know how this is done ?
Annbjørg
Hi
Check this Blog
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/encodingBASE64in+ABAP
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/decodingBASE64in+ABAP
Regards
Pavan
Similar Messages
-
Transfer DMS attachment through Web Services
Hi Everyone,
Is it Possible to transfer DMS attachments to Third party system through Web Services. Could you please tell me the procedure or guide me with some examples.
Thanks
ShailajaHi
Check this Blog
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/encodingBASE64in+ABAP
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/decodingBASE64in+ABAP
Regards
Pavan -
Using either of the 4 examples shown below, to have a background image display inside about:blank worked in Firefox 3.x (using Stylish add-on), however since Firefox 4, only using the base64 encoded version of images works. Is there any way to fix this so I don't have to encode every image I wish to use? Encoding the image makes the stylish file absolutely huge, & a real pain to keep encoding whenever I want to change the image.
body:empty { background: url("resource:/res/images/OnFire.jpg")
body { background-image: url("resource:/res/images/OnFire.jpg")
body:empty { background:url("data:
body { background-image: url("data:
I've also previously disabled most of the add-ons, except for Status-4-Evar, Stylish, & Firebug, in an attempt to see if something else was interfering, but no change.
I can supply a copy of the previously working (FF 3.x) code to some of the about:blank styles if needed for testing purposes.Type '''about:addons'''<enter> in the address bar to open the '''Add-ons Manager.'''
Hot key; '''<Control>''(Mac:<Command>)'' <Shift> A)'''
On the left side of the page, select '''Plugins.'''
Is it listed here? Select '''Disable.''' -
SOAP Request for uploading attachment through Web Services
Hi,
Can someone help me in understanding how to form a SOAP request (Web Service) for uploading an attachment into OD?
The Web service PDF mentions about the getting attachment from OD (SOAP) but not uploading.
Please suggest.
Regards,
Sumeet K.The return message being in HTML escaped form is expected, however the truncated response is not.
Please contact support via support.oracle.com, and they will be able to advise appropriately. -
Flash Builder 4.5 SOAP call for images using Base64 Encoding
I am trying to load some image meta data in a flash builder mobile application by making a SOAP call to .Net service. I am able to test the web service successfully using a .Net console application. However when I make the call from flash builder mobile client I get a null result. What am I doing wrong? I am using SOAP 1.1 ByteArray didn't work for Flash builder. So converted the ByteArray to Base64 format and tried to obtain result that way. Both ways worked from a .Net Client but not working from Flash mobile.
Here is the code
<fx:Script>
<![CDATA[
import mx.graphics.ImageSnapshot;
import mx.graphics.codec.JPEGEncoder;
import mx.graphics.codec.PNGEncoder;
import mx.rpc.AsyncToken;
import mx.utils.Base64Encoder;
import services.exifimagemetadata1.ExifImageMetaData1;
import spark.components.Image;
public var metaData:ExifImageMetaData1 = new ExifImageMetaData1();
public var imageBytes:ByteArray = new ByteArray();
public var gpsData:String;
private function getBase64EncodedImage():String
var myEncoder:Base64Encoder = new Base64Encoder();
myEncoder.encodeBytes(getImageBytes());
var image64BitText:String = myEncoder.toString();
return image64BitText;
public function GetMetaDataFromExif():void{
var imageToken:AsyncToken = metaData.GetExifBase64Data(getBase64EncodedImage());
gpsData = imageToken.result.toString();
metaResult.text = gpsData;
protected function GetImageMetaDataFromExif(event:MouseEvent):void
GetMetaDataFromExif();
]]>
</fx:Script>
<s:layout>
<s:VerticalLayout>
</s:VerticalLayout>
</s:layout>
<s:HGroup>
<s:Image id="test" width="130" height="140" source="@Embed(source='assets/p1000106.jpg')"/>
</s:HGroup>
<s:HGroup>
<s:Label width="100" height="140" backgroundColor="Blue" click="GetImageMetaDataFromExif(event)">
<s:text/>
</s:Label>
</s:HGroup>
<s:HGroup>
<s:Label id="metaResult" width="200" height="140" backgroundColor="yellow"/>
</s:HGroup>Hello everyone -
Since I last posted an interesting update happened. I tested my Flex application again, it is calling a Jetty Server that returns a JSON object, in different BROWSERS. I disabled HTTPS for now, and the crossdomain.xml policy file is wide open for testing (ie. allowing every request to return data). So the app accessing the data using HTTP only. Browsers - IE, Opera, Firefox and Chrome. Each browser contained the SAME application, revision of the Flash Player (10.3.183.10 debugger for firefox, chrome, opera, safari PC; 11.0.1.129 consumer version in IE9,) take a look at the screen shot (safari not shown although the result was the same as IE and chrome)
Note that Opera and Firefox returned successful values (i.e. successful JSON objects) using the same code generated from the Data Services Wizard. Chrome, IE and, Safari failed with an Internal error. So I am left wondering - WHY? Is it something with the Flash Player? the Browsers? the Flex SDK? Any thoughts are appreciated. Again, the code is found in the original thread above. -
TRANSACTION LAUNCHER--CALLING CRM Z TRANSACTION THROUGH WEB UI
As per the requirement, we are trying to call CRM Z transaction through web UI. We have used the Object TSTC and created a replica of the object ZTSTC and used the method execute. Made the necessary config for navigation bar and Business role. We could see the link in the Navigation bar but the link could not call the transaction. Pls suggest.Do we need to take the object of the Transaction or copy TSTC and proceed. Thanks in advance.Points will be awarded
PLS FIND THE DETAILS TO PROVIDE THE INPUTS
Configure Transaction Launcher TO CALL T.CODE ZEGNM_IMG FROM CRM THROUGH WEB UI USING TRANSACTION LAUNCHER
USED THE OBJECT ZTSTC BY COPYING TSTC OBJECT AND BY RELEASING THE OBJECT WITH METHOD EXECUTE
PROVIDED THE T.CODE ZEGNM_IMG IN THE VALUE FIELD IN THE ABOVE SCREEN
CREATED THE DIRECT LINK ZEGNM_K
CREATED THE DIRECT LINK GROUP ZEGNM_K
ASSIGN THE DIRECT LINK TO THE DIRECT LINK GROUP
ASSIGN THE DIRECT LINK GROUP TO THE PROFILE TMFLEASING WITH POSITION 80
IN THE BUSINESS ROLE CUSTOMIZING MADE THE DIRECT LINK GROUP VISIBLE
AFTER MAKING THE ABOVE CONFIGURATION WE HAVE LAUNCHED THE WEB UI AND THE FOLLOWING ERROR IS SHOWING UP
PLS FOLLOW THE ABOVE SCREENSHOTS AND PLS PROVIDE YOUR INPUTS TO ACHIEVE THE OBJECTIVE OF LAUCHING THE Z CRM GUI TRANSACTIONS USING TRANSACTION LAUCHER
ALSO PLS FIND THE SCREENSHOT OF ITS
URL OF ITS USED
u201Chttp://crd.tmf.com:8003/sap/bc/bsp/sap/its/webgui?transaction=IC_LTX&okcode=ICEXECUTEu201D -
Hi All,
i required some sample code for encoding using BASE64 encoding.
can any one please help in doing the code for encoding a text.
Thanks in advance.There are quite a few examples of Base64 encoders and decoders on the web. I didn't see any written in Obj-C or coded with a Cocoa interface, but perhaps you might find one if you spend some time searching.
The example code you have is pure ANSI C, which means it can be added to any Xcode iPhone project as a separate file, wrapped into its own Obj-C class, or simply added to an existing class implementation. Since you only need to encode a short string, you'll only need the encode() and encodeblock() functions, along with the cb64[] array. encode() is expecting stdio FILE pointers for input and output, so you'll want to replace those parameters and the code which reads and writes from/to those streams with code that reads a C string (obtained from a NSString with UTF-8 encoding) and returns a NSData object.
If you're not a C programmer, you will need to get some help from one, but it should be an easy job. Of course you should review the MIT license to make sure you're in compliance. But the reason I selected this example for you is that it's so well documented, it will teach you everything you need to know to write your own code from scratch if you need to.
\- Ray
p.s.: Here's some Cocoa code I found for you: [http://www.cocoadev.com/index.pl?BaseSixtyFour] - R -
Upload and Attach file to Service Notificacion through Web Dynpro
Hi,
I need to upload and attach a file (Word, PDF, TXT ...) to Service Notificacion (TX - IW53) through Web Dynpro.
I have used the integration component "File Upload" to obtain the "fileName" atribute. Also, I have used the functions SO_OBJECT_UPLOAD, SO_INSERT_OBJECT and BINARY_RELATION_CREATE_COMMIT.
But have a problem, because the function SO_OBJECT_UPLOAD use the class "cl _ gui _ frontend _ services" and that clash with Web Dynpro.
My question is: how could I resolve that problem?
I look forward to your response.
ThanksIV_NAME Importing Type STRING
IV_CONTENT Importing Type STRING
IV_CONTENT_HEX Importing Type XSTRING
IS_LPORB Importing Type SIBFLPORB
IV_OBJTP Importing Type SO_OBJ_TP
RT_MESSAGES Returning Type BAPIRETTAB
method save.
data ls_message type bapiret2.
data:
filename type string,
filefullname type string,
mime_type type string,
size type i,
offset type i,
offset_old type i,
temp_len type i,
objname type string,
l_obj_type type so_obj_tp,
hex_null type x length 1 value '20',
l_document_title type so_text255,
file_ext type string,
lt_objcont type standard table of solisti1 initial size 6,
objcont like line of lt_objcont,
lt_ls_doc_change type standard table of sodocchgi1,
ls_doc_change like line of lt_ls_doc_change,
lt_data type soli_tab,
ls_data type soli,
lt_xdata type solix_tab,
ls_xdata type solix,
l_folder_id type sofdk,
ls_object_id type soodk,
l_object_id_fol type so_obj_id,
l_object_id type so_obj_id,
l_doc_info TYPE sofolenti1,
l_object_hd_change type sood1,
l_tab_size type int4,
l_retype type breltyp-reltype,
lt_urltab type standard table of sood-objdes.
get foler
l_folder_id = 'FOL29000000000004'.
call function 'SO_FOLDER_ROOT_ID_GET'
exporting
owner = sy-uname
region = 'B'
importing
folder_id = l_folder_id
tables
path_table =
if iv_objtp = gc_type_file.
size = xstrlen( iv_content_hex ).
get file name and extension
call method split_path
exporting
iv_path = iv_name
importing
E_PATH =
ev_filename = filename
E_PSERVER =
call method split_file_extension
exporting
iv_filename_with_ext = filename
importing
ev_filename = objname
ev_extension = file_ext.
ls_doc_change-obj_name = objname.
ls_doc_change-obj_descr = objname.
ls_doc_change-obj_langu = sy-langu.
ls_doc_change-sensitivty = 'F'.
ls_doc_change-doc_size = size.
offset = 0.
while offset <= size.
offset_old = offset.
offset = offset + 255.
if offset > size.
temp_len = xstrlen( iv_content_hex+offset_old ).
clear ls_xdata-line with hex_null in byte mode.
ls_xdata-line = iv_content_hex+offset_old(temp_len).
else.
ls_xdata-line = iv_content_hex+offset_old(255).
endif.
append ls_xdata to lt_xdata.
endwhile.
set object type relation type and other header info
l_retype = 'ATTA'.
l_obj_type = 'EXT'.
l_object_hd_change-objnam = ls_doc_change-obj_name.
l_object_hd_change-objdes = ls_doc_change-obj_descr.
l_object_hd_change-objsns = ls_doc_change-sensitivty.
l_object_hd_change-objla = ls_doc_change-obj_langu.
l_object_hd_change-objlen = ls_doc_change-doc_size.
l_object_hd_change-file_ext = file_ext.
prepare header
data lt_obj_header type standard table of solisti1.
data ls_header type solisti1.
concatenate '&SO_FILENAME=' filename into ls_header.
append ls_header to lt_obj_header.
clear ls_header.
ls_header = '&SO_FORMAT=BIN'.
append ls_header to lt_obj_header.
change hex data to text data
call function 'SO_SOLIXTAB_TO_SOLITAB'
exporting
ip_solixtab = lt_xdata
importing
ep_solitab = lt_data.
else.
for note
size = strlen( iv_content ).
objname = iv_name.
ls_doc_change-obj_descr = objname.
ls_doc_change-sensitivty = 'O'.
ls_doc_change-obj_langu = sy-langu.
put content into table
offset = 0.
if iv_objtp = gc_type_note.
it's a note
l_retype = 'NOTE'.
l_obj_type = 'RAW'.
l_object_hd_change-file_ext = 'TXT'.
read note content into table
while offset <= size.
offset_old = offset.
offset = offset + 255.
if offset > size.
temp_len = strlen( iv_content+offset_old ).
clear ls_data-line.
ls_data-line = iv_content+offset_old(temp_len).
else.
ls_data-line = iv_content+offset_old(255).
endif.
append ls_data to lt_data.
endwhile.
get title from content , if it's initial
if objname is initial.
read table lt_data index 1 into l_document_title.
while l_document_title+49 <> ' '.
shift l_document_title right.
endwhile.
shift l_document_title left deleting leading ' '.
ls_doc_change-obj_descr = l_document_title.
endif.
else.
it's url (not note)
l_retype = 'URL'.
l_obj_type = 'URL'.
if objname is initial.
split iv_content at '/' into table lt_urltab.
describe table lt_urltab lines l_tab_size.
read table lt_urltab index l_tab_size into ls_doc_change-obj_descr.
endif.
while offset <= size.
offset_old = offset.
offset = offset + 250.
if offset > size.
temp_len = strlen( iv_content+offset_old ).
clear ls_data-line.
ls_data-line = iv_content+offset_old(temp_len).
else.
ls_data-line = iv_content+offset_old(250).
endif.
concatenate '&KEY&' ls_data-line into ls_data-line.
append ls_data to lt_data.
endwhile.
endif.
ls_doc_change-doc_size = size.
l_object_hd_change-objnam = ls_doc_change-obj_name.
l_object_hd_change-objdes = ls_doc_change-obj_descr.
l_object_hd_change-objsns = ls_doc_change-sensitivty.
l_object_hd_change-objla = ls_doc_change-obj_langu.
l_object_hd_change-objlen = ls_doc_change-doc_size.
endif.
save object
call function 'SO_OBJECT_INSERT'
exporting
folder_id = l_folder_id
OBJECT_FL_CHANGE = OBJECT_FL_CHANGE
object_hd_change = l_object_hd_change
object_type = l_obj_type
ORIGINATOR_ID = OWNER_ID
OWNER = USER-USRNAM
importing
OBJECT_FL_DISPLAY = OBJECT_FL_DISPLAY
OBJECT_HD_DISPLAY = OBJECT_HD_DISPLAY
object_id = ls_object_id "l_doc_info-object_id
tables
objcont = lt_data
objhead = lt_obj_header
OBJPARA = OBJECT_PARA
OBJPARB = OBJECT_PARB
exceptions
component_not_available = 01
folder_not_exist = 06
folder_no_authorization = 05
object_type_not_exist = 17
operation_no_authorization = 21
parameter_error = 23
others = 1000.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into ls_message-message.
ls_message-type = sy-msgty.
ls_message-id = sy-msgid.
ls_message-number = sy-msgno.
ls_message-message_v1 = sy-msgv1.
ls_message-message_v2 = sy-msgv2.
ls_message-message_v3 = sy-msgv3.
ls_message-message_v4 = sy-msgv4.
append ls_message to rt_messages.
return.
endif.
create relation
data l_obj_rolea type borident.
data l_obj_roleb type borident.
MOVE-CORRESPONDING wd_this->ms_lporb to l_obj_rolea.
l_obj_rolea-objkey = is_lporb-instid.
l_obj_rolea-objtype = is_lporb-typeid.
l_obj_rolea-logsys = is_lporb-catid.
l_object_id_fol = l_folder_id.
l_object_id = ls_object_id.
concatenate l_object_id_fol l_object_id into l_obj_roleb-objkey respecting blanks.
l_obj_roleb-objtype = 'MESSAGE'.
clear l_obj_roleb-logsys.
call function 'BINARY_RELATION_CREATE'
exporting
obj_rolea = l_obj_rolea
obj_roleb = l_obj_roleb
relationtype = l_retype
exceptions
others = 1.
if sy-subrc = 0.
commit work and wait.
wd_this->MV_UPDATE_FLAG = 'X'.
else.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into ls_message-message.
ls_message-type = sy-msgty.
ls_message-id = sy-msgid.
ls_message-number = sy-msgno.
ls_message-message_v1 = sy-msgv1.
ls_message-message_v2 = sy-msgv2.
ls_message-message_v3 = sy-msgv3.
ls_message-message_v4 = sy-msgv4.
append ls_message to rt_messages.
return.
endif.
endmethod.
Edited by: Reyleene Hunt on May 26, 2009 10:05 AM -
I’m applying for jobs online through my iPad using the safari app. For
some reason when I try to attach my resume, which I have saved in
Pages, it does not give me an option to go to Pages. It only gives
my an option to choose a file from photos. Does it not have the
capability to choose a location other than photos??No. Safari does not have the option to attach files for uploading other than photos.
Look at iCab Mobile in the App Store. There are other browsers that may do this, but I'm pretty sure that iCab will fill the need.
iCab Mobile (Web Browser) on the App Store on iTunes
take a look at this.
http://www.icab-mobile.de/faq.html -
Using global in web method vis
I am using labview 8.6 . I have a problem in using Globals in my web method vis. If i directly read the data it works fine but if i use global it doesnt read data.
Hello Jawad,
Thanks for sharing your issue. There could be more than one reason why your global variables are not behaving as you would like them to. I would encourage you to read through the following online article to get started with troubleshooting: <http://digital.ni.com/public.nsf/allkb/4F3CC921B4179F9F86256A3B0045CE2D?OpenDocument>. Could you also share more about your application and what your ultimate goal is with the global variable?
If you are interested in web services, I would recommend reading the articles at the following links:
http://zone.ni.com/devzone/cda/tut/p/id/7350
http://zone.ni.com/reference/en-XX/help/371361E-01/lvhowto/build_web_service/
http://zone.ni.com/devzone/cda/tut/p/id/7747
If you have any questions about web services, please feel free to ask.
Regards,
Dan Richards
Dan Richards
Certified LabVIEW Developer -
Calling a web service from BPEL using java web methods
Hello everyone,
I have an application my BPEL process should connect to. The application which is a web service needs to be called using pre defined web methods defined in java from my bpel process using Jdev 10g. Any suggestions in how I can go about doing that? Please I really need helpHi there,
If you have defined already your partner links to the service you can use the BPEL API to invoke them from RMI. See this blog entry
http://technology.amis.nl/2006/06/08/oracle-bpel-pm-invoking-a-remote-bpel-service-from-java-using-rmi/
It'd be also good if you post the question on the bpel forum BPEL
Thanks,
JC -
Hi
In my scenario,we are sending plain request to web service using receiver sender adapter and PI will receive response as excel attachment. What are standard module required to achieve this and sequence? or checking Keep attachment box will help us to achieve this?
is it possible to receive excel sheet as attachment from receiver soap adapter ?
Thanks in AdvanceHi,
This issue might be due to the invalid .pem certificate file.
Make sure to include the beginning and end tags on each certificate.
The result should look like this:
-----BEGIN CERTIFICATE-----
(Your Primary SSL certificate: your_domain_name.crt)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Your Intermediate certificate: DigiCertCA.crt)
-----END CERTIFICATE-----
For more detailed information, you could refer to:
https://www.digicert.com/ssl-support/pem-ssl-creation.htm
Regards -
How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection
How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection.
I have a multiple rows on PDF form. All rows have 4 textfields. I want to submit the multiple rows data to a method defiened in webservice.
Unable to retrieve the data in multiple rows within webservice method.Hi Paul,
I'm now able to save the retrieved xml in a hidden text field and create dynamic table, and I'm able to fill this table from the XML, but the problem is that I could not find the correct way to loop on the xml, what I'm trying to say, the table will have number of rows with the data of the first row only, so can you tell me the right way to loop on the xml!
this is my code
TextField1.rawValue=xmlData.document.rawValue;
xfa.datasets.data.loadXML(TextField1.rawValue, true, false);
for(var i=0; i<count; i++)
xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Num").rawValue = xfa.datasets.data.record.num.value;
xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Name").rawValue = xfa.datasets.data.record.name.value;
Table1.Row1.instanceManager.addInstance(true);
Thanks
Hussam -
I am trying to publish a web site using my own domain. How do I transfer my host to mac from another server?
I've created a CNAME entry to redirect the domain to apple but the site is still not live! Can anyone help please?
Did you also do what is required in the .Mac account settings?
http://help.apple.com/mac2/1/help/member/pgs2/memfmsetgen367.html
Could you provide your urls? -
Xcelsius can't use transfer the default date to web service
Hi all visitors
i created one web service that use store procedure.
in my store has 2 parameters( shopcode,MonthYear),so in web method, i also create two parameters too(shopcode,MonthYear).
for xcelsius, i create one calender( for MonthYear param) and the default month is "April/2011 and the default of shopcode is "s01". when the dashboard load the the first time, it doesn't show any data to my listview. but if i input that parameters to the store procedure, the store will show 20 record. and in dashboard, after load i change the default shopcode "s01' to "s02", it will show the data of shop2 "s02" and i change from shop2 "s02" to shop1"s01",It will show 20 records the same with store.
The problem is when the dashboard load at the first time even the default shopcode and MonthYear are right, It can't show the data.
Anybody know about this? This i of WebService or Dashboard?Hi Chamnan Heng,
It seems your connection refreshes before those values (s01, date) are populating in the binded cells.
For this you can use a alternate method.
add a connection refresh button.
Set that button to refresh your web service connection.then,
(ii)Connection button`s properties>behaviour>Trigger behaviour check the "Refresh after components Are loaded "check box.
regards,
Sriramvijay.R
Maybe you are looking for
-
Outlook for Office 365 Home will not open
A Security screen pops up and I cannot get Outlook to open.
-
IPhone 3G screen goes white with thin black moving lines.
iPhone 3G screen goes white with thin black moving lines.What gives? HowieG1
-
Absolutely new to Solution Manager
hello, after some personal changes in SAP in our company, status is: r/3 has not been patched since jan/2006. therefore, i want to install solution manager. plan is to install ver 7.0 sp 15. download basket is blocked, dont know how to download all n
-
Unable to install Flash Player on OSX 10.8
I'm running OS X 10.8.5 and am trying to update the Flash Player (16.0 I think) in Safari 6.2. Every installer I've tried fails at the end with a "General Error" and no further information. Per the troubleshooting page, I uninstalled flash and tried
-
HT201210 CAN U APPLE TELL MW WHY I GET ERROR 1015 WHILE TRYING TO RESTORE MY IPHONE 3G
PLEASE I NEED HELP Why I cant restore iphone 3g I always get error 1015?? I need HELP RIGHT NOW