Problem while sending ByteArray from as3 client through netconnection call method to red5 server
Hi to all,
I'm trying to send from as3 client a ByteArray of more or less 3 MB using NetConnection's call method but I am unable to do it, cause I get a timeout on the server and the client get disconnected (I have also increased the timeout limit in red5.properties but nothing changed). If I try to send a smaller ByteArray I don't have problem, even if the trasfer is really slow.
Any solution?
thanks
put it in code tags so it's readable
CLIENT
public void sendLoginData(String data)
int c=0;
byte loginData[]=new byte[data.length()];
loginData=data.getBytes();
try
out.write(loginData);
System.out.println(client.isClosed());
// here i want 2 receive the 1 byte data whch i hv sent frm server's RUN() method
//following code is not working :( it gets hanged
while((c=in.read())!=-1)
System.out.print(c);
System.out.print("hi");
catch(Exception e)
System.out.println("Caught:" + e);
finally
out.close();
}SERVER
public void run()
boolean flag;
try
flag=verifyLoginData(ID); //this function verifies the login data by connecting to DB
System.out.println(flag);
if(flag==true)
//send login valid
bos.write(1);
bos.close();
else
//send login invalid
bos.write(0);
bos.close();
catch(Exception e)
System.out.println("caught " + e);
}
Similar Messages
-
Line Alignment Problem while sending Fax from SAP Script
Moderator message: please do not post the same question in different forums
Hi Experts,
While sending fax the horizontal lines are not displaying till the end of the page.
But in the print preview the lines are displying till the end.
If this is printed using local printer the lines are printing fine but the problem is with the fax.
Please provide me a solution for this.
Regards,
Rajesh.
Edited by: Matt on Nov 25, 2008 2:51 PMPuzzling.
I've seen where the printed output doesn't match the print preview but not a fax not matching a print.
Do you use SAPConnect or the older SAPComm method for faxing?
How do you produce the horizontal lines? BOX commands, ULINE, '-', etc.? -
Problem while sending mail from SAP
Hi ABAP gurus,
I tried to send mail from SAP. For this we configured SMTP Services using the transaction SCOT and all are Completed.
When I send a mail using SAPOffice it is Executing successfully and main is delivered to me.
When I tried in the program using the function module 'SO_NEW_DOCUMENT_SEND_API1' mail is not delivered to me but it is placed in SAPoffice outbox.The status of the mail says "SEND PROCESS STILL RUNNING". Even when i execute SAPconnect manually mail is not transmitted.
This is the transaction history of the mail.
Trans. history
18.02.2006 13:44:31 Document sent
13:44:31 Wait for communications service
After This stage Delivery attempt is not taking place.
This is the Code
****Document DATA
EMAIL_DATA-OBJ_NAME = 'MESSAGE'.
EMAIL_DATA-OBJ_DESCR = SUBJECT.
EMAIL_DATA-OBJ_LANGU = 'E'.
EMAIL_DATA-SENSITIVTY = 'P'.
EMAIL_DATA-OBJ_PRIO = '1'.
EMAIL_DATA-NO_CHANGE = 'X'.
EMAIL_DATA-PRIORITY = '1'.
***Receiver
EMAIL_SEND-RECEIVER = '[email protected]'.
EMAIL_SEND-REC_TYPE = 'U'.
EMAIL_SEND-EXPRESS = 'X'.
APPEND EMAIL_SEND.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = EMAIL_DATA
DOCUMENT_TYPE = 'RAW'
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL = SENT
NEW_OBJECT_ID = EMAIL_ID
TABLES
OBJECT_CONTENT = EMAIL_TEXT
RECEIVERS = EMAIL_SEND
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
Please Help me to solve this Problem.
Regards,
Viswanath Babu.P.DHi viswanath,
1. in scot, in smtp node,
2. press the internet button
3. In ADDRESS AREA,
type
*yahoo.com
*rediffmail.com
etc,etc.
4. Only when such domains are entered,
will sap send mail.
5. It will not send any mail to other domains.
6. Or simply enter *
regards,
amit m. -
Problem while sending the mail from sap
Hi experts,
I am facing some problem while sending mail from sap to external mail.
this is th code i am using but it is not working. plz check and tell me.
REPORT ZMAIL_DEMO.
data: maildata type sodocchgi1.
data: mailtxt type table of solisti1 with header line.
data: mailrec type table of somlrec90 with header line.
start-of-selection.
break-point.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test'.
maildata-obj_langu = sy-langu.
mailtxt-line = 'This is a test'.
append mailtxt.
mailrec-receiver = 'SOME MAIL ID'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'RAW'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc = 0. "( did not receive any mail) *
write : 'mail sent'.
endif.Hi,
Please check with the following code.
TABLES: KNA1.
data for send function
DATA DOC_DATA LIKE SODOCCHGI1.
DATA OBJECT_ID LIKE SOODK.
DATA OBJCONT LIKE SOLI OCCURS 10 WITH HEADER LINE.
DATA RECEIVER LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.
SELECT * FROM KNA1 WHERE ANRED LIKE 'C%'.
WRITE:/ KNA1-KUNNR, KNA1-ANRED.
send data internal table
CONCATENATE KNA1-KUNNR KNA1-ANRED
INTO OBJCONT-LINE SEPARATED BY SPACE.
APPEND OBJCONT.
ENDSELECT.
insert receiver (sap name)
REFRESH RECEIVER.
CLEAR RECEIVER.
MOVE: 'any_email'_ TO RECEIVER-RECEIVER, " SY-UNAME
'X' TO RECEIVER-EXPRESS,
'U' TO RECEIVER-REC_TYPE.
APPEND RECEIVER.
insert mail description
WRITE 'Sending a mail through abap'
TO DOC_DATA-OBJ_DESCR.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_DATA
IMPORTING
NEW_OBJECT_ID = OBJECT_ID
TABLES
OBJECT_CONTENT = OBJCONT
RECEIVERS = RECEIVER
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8. -
Can't send Notes through email and it used to work. The same problem of sending picture from iPhone message. Did the reset twice but still not working
Try a reset:
Hold the Sleep and Home button down for about 10 second until you see the Apple logo. -
Problem while sending FAX through PRINT_TEXT FM
Hi All,
I have a problem while sending a fax.
we are sending fax through the FM PRINT_TEXT.
Below is the FM we are passing paramenters.
CALL FUNCTION 'PRINT_TEXT'
EXPORTING
APPLICATION = 'TX'
DEVICE = 'TELEFAX'
DIALOG = SPACE
HEADER = fs_header
OPTIONS = fs_popt
IMPORTING
RESULT = fs_pres
TABLES
LINES = <b>int_fax</b>
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
UNKNOWN = 6
FORMAT = 7
TEXTFORMAT = 8
COMMUNICATION = 9
BAD_PAGEFORMAT_FOR_PRINT = 10
OTHERS = 11.
if sy-subrc ne 0.
p_flag = lit_x.
endif.
In INT_FAX internal table we have two fields one is tdformat second one is tdline
The lengh of the TDLINE is 132 char,Initially for all reocords we have only 108 char length,But according to user requirement we added one more field in taht
Now the lengh increased to 132 for each records.
When i checked in debugg mode the INT_FAX internal table have all 132 characters.
The problem is while checking in SOST trnasaction it is showing 108 characters in one line and remaining in second line,can you please help on this.
Thanks In advance
Sriman.may it be that in those cases where it doesnt work, that you got no fax number?
Since it works soemtimes, it seems there are no errors, but rather in some cases some important info is missing, fax number may be one of thsoe important info in a FAX scenario. -
Problem while sending the message using RWB
Dear All,
I am facing a problem while sending a message from RWB. I sent the message using Test Message in component monitoring, it says message sent but I am not able to see any message in sxi_monitor.
When I send the same message using the http client it successfully processed by XI and I can see the success message in sxi_monitor.
Please let me know if anyone has face similar kind of issue.
Thanks,
Alok
Edited by: Alok Raoka on May 26, 2008 5:08 PMDear All,
I am facing a problem while sending a message from RWB. I sent the message using Test Message in component monitoring, it says message sent but I am not able to see any message in sxi_monitor.
When I send the same message using the http client it successfully processed by XI and I can see the success message in sxi_monitor.
Please let me know if anyone has face similar kind of issue.
Thanks,
Alok
Edited by: Alok Raoka on May 26, 2008 5:08 PM -
Problem while sending IDOC to File Senario
Hi Experts
I am having problem while sending the Idoc from SAP R/3 to File
I have done all the setting in SAP as well in XI but while pushing IDOC
I am getting error in the transaction sm58 in SAP R/3
" <b>The service for the client 300(My SAP R/3 client) is not present in Integration
Directory</b>"
I can any one explain me what to done on this....all the connections are fine
Waiting for Response
Adv points and thanx
RakeshReason and Prerequisites
You send IDocs from system ABC to the exchange infrastructure (XI) of system XIZ, and error messages are issued in system ABC (Transaction SM58) for the IDOC_INBOUND_ASYNCHRONOUS function module.
This note proposes solutions for the following error messages:
a) No service for system SAPABC client 123 in the integration directory
b) Transaction IDX1: Port SAPABC, client 123, RFC destination
c) ::000
d) NO_EXEC_PERMISSION: "USER" "Business_System"
e) IDoc adapter inbound: Error error ...
Solution
a) Error message: No service for system SAPABC client 123 in the integration directory
Solution:
You send IDocs from system ABC to XI. In the control record of the IDoc, the SNDPOR field contains the value "SAPABC". The client of the sending system is determined by the MANDT field of the control record. The system ID and client are then used to determine a service without party of the type (business-system/business-service):
Business system
Activities in the System Landscape Directory (SLD)(Create technical system):
Create a technical system for system ABC in the SLD, and create the client for this. Do not forget to assign an "ALE logical system" (for example, "ABCCLNT123") to this technical system.
SLD (Business system):
You can now explicitly assign a business system to this client.
For more details, refer to the SLD documentation.
Activities in system ABC (self-registration in the SLD):
Alternatively, you can register the system in the SLD in system ABC with Transaction RZ70. You will find detailed information about the SLD registration of systems on the SAP Service Marketplace for the "Exchange Infrastructure" in the document "Exchange_Installation_Guide.pdf".
In system ABC, you can check your configuration with TransactionSLDCHECK.
Activities in Integration Directory (import business system from SLD):
You will find the business systems under Services Without Party in the Integration Services. In the Service menu, you will find the system identifiers, the client, and the corresponding ALE logical system under "Objects"->"Adapter-specific identifiers".
Use the Import/Update button to copy the data from the SLD, to create business systems, or to update their identifiers.
Business service
Activities in the Integration Builder directory:
You want to create a service without party that is not part of your system infrastructure and is therefore not maintained in the SLD.
In the Integration Builder directory, you will find the "Business-Services" under Services Without Party. In the Service menu, you will find the system identifiers, the client, and the corresponding ALE logical system under "Objects"->"Adapter-specific identifiers".
Activate the change list in Integration Directory.
In system ABC, you can restart the incorrect entry from Transaction SM58 .
b) Error message: Transaction IDX1: Port SAPABC, client 123, RFC destination
Solution:
The Integration Server tries to load the IDoc metadata from the sending system. The IDoc schemas from the Integration Repository cannot be used because they are release-dependent.
The sending system is determined by the value of the "SNDPOR" field from the IDoc control record (for example, "SAPABC").
Activities in the central XI system:
In Transaction IDX1, you can assign an RFC destination to the sending system (for example, "SAPABC"). This must be created beforehand in Transaction SM59.
Note that the IDoc metadata is cross-client data. In Transaction IDX1, only one entry must be maintained for each system. Only the lowest client is used by the runtime for Idoc metadata retrieval with RFC.
Ensure that only SAPABC and not "SAPABC_123" is entered in the port name.
c) Error message: "::000"
Solution:
This error occurs if the central XI system tries to load the IDoc metadata from the sending system by RFC.
There may be several different reasons for the failure of the metadata import, the error is not transferred in full by tRFC completely, and this results in the error message above.
User cannot log onto sending system
User/password/client is not correct or the user is logged due to too many failed logons.
Activities in sender system ABC:
Transaction SM21 contains entries for failed logons.
Activities in the central XI system:
Determine the sending port from the IDoc control record of the IDoc. If the ID of the sending system has the value "ABC", the value of the sending port is "SAPABC". You will find the RFC destination used for the "SAPABC" sending port with the lowest client in Transaction IDX1. In Transaction SM59, you will find the RFC destination containing the maintained logon data .
User does not have the required authorizations
Activities in the sender system ABC:
In Transaction SM21, you will find entries relating to authorization problems and more exact details.
Contact your system administrator and, if necessary, assign the user the required roles in user administration.
IDoctyp/Cimtyp cannot be loaded
Activities in sender system ABC:
In the sender system, you can check your IDoc types in Transaction WE30 (IDoc type editor) Take note not only of the errors, but also of the warnings.
The most common errors are:
- IDoc type or segments not released
- Segments that no longer exist are listed in the IDoc type
- Data elements that do not exist in the DDIC are assigned to fields
in the segment.
Contact your system administrator and correct these errors in the IDoc type.
d) Error message: NO_EXEC_PERMISSION: "User" "Business_System"
Solution:
You created a list of users in the directory who are authorized to use the "Business_System". The user in the error message is not on the list.
Alternatively, the same error is used if you have created a sender agreement with a channel of the IDoc type for the "Business_System" and the interface used. The user in the error message is not contained in the list of all authorized users defined there.
e) Error message: IDoc adapter inbound: Error error
Solution:
You send IDocs to the central XI system, where they are received by the IDoc adapter. The IDocs are converted into IDoc XML, and a corresponding XI message is generated and transferred to the XI Runtime Engine. The Engine tries to read its own business system from the "Exchange Profile". If the Exchange Profile is currently unavailable, the message is not processed and it is returned to the sending system with an error message.
Regard's
Prabhakar..... -
Problem while sending unicode (utf-8) xml to IE.
Hi,
I have encoding problem while sending utf-8 xml from servlet to IE (Client), where i am parsing the xml using Ajax.
In the log I can see proper special characters that are being sent from the servlet. but when same is seen in the client end,, it is showing ? symbols instead of special charcters.
This is the code that sends the xml from servlet.
ByteArrayOutputStream stream = new ByteArrayOutputStream(2000);
transformer.transform(new DOMSource(document), new StreamResult(new OutputStreamWriter(stream, "iso-8859-1")));
_response.setContentType("text/xml; charset=UTF-8");
_response.setHeader("Cache-Control", "no-cache");
_response.getWriter().println(new String(stream.toByteArray(), "UTF-8"));
In the log i can see :
<response status="success" value="1154081722531" hasNextPage="false" hasPreviousPage="false" ><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd �" mode="edit" column_en_US="asdasd �" column_de_DE="? xyz" column_fr_FR="" ></row></response>
But in the Client side I am able to see
<?xml version = '1.0' encoding = 'UTF-8'?>
<response status="success" value="1154082795061" hasNextPage="false" hasPreviousPage="false"><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd ?" mode="edit" column_en_US="asdasd ?" column_de_DE="? xyz" column_fr_FR=""/></response>
I am getting ? instead of �.
It will be greatful if somebody tell how to send utf xml from servlet, for ajax purpose.
Thanks,
Siva1This is the code that sends the xml from servlet.
ByteArrayOutputStream stream = new
ByteArrayOutputStream(2000);
transformer.transform(new DOMSource(document), new
StreamResult(new OutputStreamWriter(stream,
"iso-8859-1")));Here you produce XML that's encoded in ISO-8859-1. (!!!)
_response.setContentType("text/xml; charset=UTF-8");Here you tell the browser that it's encoded in UTF-8.
_response.getWriter().println(new String(stream.toByteArray(), "UTF-8"));Here you convert the XML to a String, assuming that it was encoded in UTF-8, which it wasn't.
Besides shooting yourself in the foot by choosing ISO-8859-1 for no good reason, you're also doing a lot of translating from bytes to chars and back again. Not only is that a waste of time, it introduces errors if you don't do it right. Try this instead:_response.setContentType("text/xml; charset=UTF-8");
_response.setHeader("Cache-Control", "no-cache");
_transformer.transform(new DOMSource(document_),
new StreamResult(_response.getOutputStream())); -
SharePoint 2013 code for the SharePoint Config database stored procedure dbo.proc_getObject has been changed from SharePoint 2010 with the difference of select with nolock.
I am seeing numerous Error 7886, Severity-20 errors nightly:
"A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated."
Here I have commented out "with (nolock)" to 'fix' the error and to align the store proc with SharePoint 2010 code :
ALTER PROCEDURE [dbo].[proc_getObject]
@Id uniqueidentifier,
@RequestGuid uniqueidentifier = NULL OUTPUT
AS
SET NOCOUNT ON
SELECT
Id,
ParentId,
ClassId,
Name,
Status,
Version,
Properties
FROM
Objects --with (nolock)
WHERE
Id = @Id
RETURN 0
How is this stored procedure called and for what use?
Why did Microsoft make this change to SharePoint 2013 - some performance gain through dirty reads at the cost of stability? Or what could be a reason for this to happen that can be fixed?GetObject retrieves any farm object that is selected (by ID). Changing this is obviously not supported, and NoLock was used to (help) prevent locks when performing a select query.
I've never seen this issue, and would guess it is unique to your environment given this is such a core piece of the SharePoint infrastructure.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Problem while selecting BELNR from BSEG
Hi Experts,
I have a report performance problem while fetching BELNR from BSEG table.
I have to print latest BELNR from BSEG where BUZID = M but at the time of execution of report, It is taking too much time (More that hour and sometimes it gets hanged).
I have also gone through the comments provided by experts for previous problems asked in this forum e.g. BSEG is a cluster table that is why data retrieval takes long time etc.
Can any one has any other idea or suggestion or any other way to solve this problem
Regards,
NeerajHi,
1) Try to create an index on BUZID field
2) Don't use SELECT/ENDSELECT statement. Instead of that extract all the concerned entries from BSEG into an internal table :
select belnr from bseg appending table itab where buzid = 'M'.
then do this :
sort itab by belnr.
describe itab lines n.
read table itab index n.
Please reward if helpful.
Regards,
Nicolas. -
Error while sending mail from SAP
Hello All,
Recently we are facing an error while sending mail from SAP. When we try to compose a message ,it is moving to a dump error RAISE_EXCEPTION.
The details from ST22,
Short text
Exception condition "FOLDER_NOT_EXIST" raised.
Error analysis
A RAISE statement in the program "SA
condition "FOLDER_NOT_EXIST".
Since the exception was not intercep
program, processing was terminated.
Kindly suggest..
Thank You,
Regards,
HasanHello Priyanka,
Actually, I performed the following two steps in order to solve the issue:
- In transaction SICF, the node for SAPConnect must be active. In our system, this node was in inactive state. Hence I activated it.
- Then In transaction SCOT-> Settings menu--> default domain should be 'xyz.com' if the email addresses in your company are maintained with a suffix xyz.com.
But for me the problem didnt get solved here..
The problem that i am facing now is that if in my user profile, I have the email address maintained, then i get an error saying 'Sender address rejected'. However, if i goto transaction SU01 and clear the email id, the mail is successfully sent to outer world.
You can try the above mentioned two steps using SICF and SCOT. If the problem does not get solved then try clearing the mail id in ur user profile.
Hope this helps. If you find an answer to the problem of the mail id getting cleared, then please let me know..
Regards,
Himanshu -
Need solution for the following sync error: "iTunes could not sync calendars to the iPad "iPad name" because an error occurred while sending data from the iPad"
I want to add that I deleted all the old back-ups and created a new back-up without any issues except sync problem.
-
I've been syncing my iPhone to my (non-apple) desktop for several months without difficulty.
Today I accepted the latest upgrade to my iPhone software.
Since it installed, it will not sync.
It gives the error message "iTunes could not sync calendars to the iPhone "Steve's iPhone" because an error occurred while sending data from the iPhone." After rebooting the desktop, the error repeats, and it's now in hour 2 of the continuing message "Syncing Steve's iPhone (Step 2 of 2) - Finishing sync"
Has anyone else run into this Undocumented Feature of the latest upgrade?
As bugs go, this is pretty serious for those of us who depend on syncing the iPhone and desktop for our business!
Thanks to anyone who can help!
Steve CallenderTried rebooting the phone, and now it works.
Guess there's 2 lessons here -
Boot again when installing new SW, even if the phone reboots itself during installation, and
Boot to see if that fixes a problem before posting it.
Steve -
Problem while loading data from ODS to infoobject
Hi guys,
I am facing problem while loading data from <b>ODS to infoobject</b>.
If I load data via PSA it works fine but
if I load data without PSA its giving error as Duplicate records.
Do u have any idea why it is so.
Thanks in advance
savioHi,
when you load the data via the PSA, what did you select? Serial or Paralel?
If you select serial most likely you don't have duplicates within the same datapackage and your load can go through.
Loading directly in the IObj will happen thefore if you have the same key in two different packages, the "duplicate records" will be raised; you can perhaps flag your IPack with the option "ignore duplicate records" as suggested...
hope this helps...
Olivier.
Maybe you are looking for
-
Best way to move iTunes to different user account
My wife and I share a computer and it has a separate user account for each of us. She got an iPod but set it up and synced it on my account instead of hers. That was not a problem until now. I got an iPhone and want to set it up and sync in my accoun
-
ITunes can't access a key?
Hi When I try to install iTunes on my computer, this message pops up: Error 1402.Could not open key: HKEYLOCALMACHINES\Software\Classes\.cdda\OpenWithProgids. Verify that you have sufficient access to that key. I don't know how to verify that I have
-
Error 80043ac1 - An external object raised an error. No Error Description
Hello, After installing Crystal Reports runtime XI R2, I've been having the error: Crystal Reports ActiveX Designer error 80043ac1 - An external object raised an error. No Error Description. This same runtime package have already been successfully i
-
Requirement gateway- management view
In the management view is it possible to customize the coverage % display. Example: I have 10 requiremets. I have covered for 5 requiremets. Management view says 50% since 5 more uncovered. But out of 5, there are 2 is non testable requirements. I ha
-
I installed Lightroom 5.6 (full version, not trial) on Mac, when starting I receive an error message "An error occurred while attempting to change modules". I tried removing it and reinstalling but the same error comes up. Anybody have any recommenda