XMLsocket and java server
Hi
I would like to developp a client which connects on a java
server.
When i run my program on my developement computer, it works
(maybe because the server and the flex application are on the same
machine.)
But when i want to run the flex application from another
computer I can't manage to get connected...
First question : is it possible to connect flex appli to java
server through internet or network
Example
123.2.2.2:18000 this is the (false) ip on my javaserver (the
port 18000 is open)
and I want to connect to it with a flex application from
another computer.
Thank you for you help
Nicolas
Hi,
I discovered your topic too late so I made a duplicate topic
about socket and java server.
I spend quite a long time trying to solve this problem and I
don't have the solution !
It should be a common question so I guess the answer is so
easy than I can't see it !!
TechNote seams to say that you have to put the
crossdomain.xml file on the root of the (html) server and not on
the server where the flash file is.
The problem is that I don't have or need a web server as my
java server is doing the job. So I don't think it is the answer.
Did you find the answer ?
THX
Jean-Yves
Similar Messages
-
Data transfer between C client and Java server
Hello there
I am working on a project where I have to develop a Client based on C and Server based on Java. The client can connect to Java server and it then sends a integer/string to Java server. But.. Java server unable to receive that and throws an IOException.
I use write method to send the integer buffer to the socket.
int out_buffer = 0;
int *pbuf;
pbuf = &out_buffer;
if (write(acskfd, pbuf, 4)< 0){
syslog(LOG_ERR,"Write failed. %s(%d)", strerror(errno), errno);
printf("\tCLIENT:\tWrite failed\n");
exit(1);
In Java, i use DatainputStream and readnInt method to read the integer from the stream.
cl_sock = socket_out.accept();
DataInputStream sInput =new DataInputStream(cl_sock.getInputStream()) ;
int cmd = sInput.readInt();
Am I missing someting.. Any suggestions would be really really helpful.
Thanks
Ithaca
PS: I running both programs in the same machine.
In C part, I also use host to network byte order conversion (serv_addr.sin_port = htons(portno).I would suggest writing a Java client to perform the same tasks as the C client.
Then if the Java client does, or does not work this can help dteremine which end is at fault.
Are you flushing your data from the client? -
UDP DatagramPacket sent between C (client) and Java (server)
Hi,
I have a problem sending a struct from C to Java UDP server.
In the C (client) program, the struct is defined as
typedef strurct dataType_s {
char name[52];
char add[52];
long x;
long y;
} dataType;
dataType data;
strcpy(data.name, "sun");
strcpy(data.add, "com");
data.x = 100;
data.y = 50;
sendto(sock, (struct dataType*)&dataType, sizeof(dataType), (struct sockaddr*)&dest, sizeof(dest))
In the Java server side, I have the following code.
byte[] buffer = new Byte[1024];
DatagramPacket packet = new DatagramPacket(buffer, 1024);
udpSock.receive(buffer);
byte[] data = buffer.getData();
String name = new String(data, 0, 52);
String add = new String(data, 52, 52);
String _xx = new String(data, 104, 4);
String _yy = new String(data, 108, 4);
Byte x = new Byte(xx.getBytes());
long x = _x.longValue();
Byte y = new Byte(yy.getBytes());
long y = _y.longValue();
I am having problem to read the contents of x and y above. The string name and add received by the server
are correct. However, I receive garbage value
for x (long) and y (long). In fact, I get expection
that I cannot create Byte x and Byte y as shown
above. Any idea of how to send a mixture of types
from C/C++ to Java server?
Thanks a lot.
Kelvin ([email protected])sendto(sock, (struct dataType*)&dataType,
sizeof(dataType), (struct sockaddr*)&dest,
sizeof(dest))You have to check the alignment of your structs. You can't be sure that a long takes up four bytes. It can very well be 8 bytes or something else depending on your settings at compilation.
udpSock.receive(buffer);
byte[] data = buffer.getData();I suppose this is a typo, but of course you should use packet not buffer here.
>
Byte x = new Byte(xx.getBytes());
long x = _x.longValue();
Byte y = new Byte(yy.getBytes());
long y = _y.longValue();
in my opinion its easier to use a DataInputStream instead:
DataInputStream in = new DataInputStream(new ByteArrayInputStream(data));
int y = in.readInt();
Notice that a long in Java is 8 bytes. A C long corresponds to a Java int.
/Per-Arne -
IBM CPU virtualization and Java server
Hi everybody,
we are running several systems with double stack ABAP + Java (XI) or java only (EP) on IBM/AIX with pSeries with IBM JDK 1.4.2. Our platform allows to virualize the CPUs. We can, for example, having 4 physical CPUs available, let them appear as 8 CPUs for the applications. Of course the 8 CPUs then are having a speed reduced by 50%.
Now my question:
Which configuration will ensure the best system performance for Java applications like XI? "Many" CPUs with a lower speed or "less" CPUs with a higher speed?
Does anyone have experiences with this issue?
Thank you very much for your feedback!
Kind regards, JoachimJava and J2EE-Engines need a LOT of CPU cycles so I would subscribe to that view.
In our tests, CISC CPUs (Intel x86(_64) and Opteron) have proven to be a LOT faster than RISC CPUs (in our tests Itanium-2) so I would also go for few FAST CPUs.
Markus -
Aqualogic BPM and Java Server Faces
Hi, I want to know if you can control the workflow from a jsf application outside the BPM environment, if not some way to integrate JSF and the BPM flow.
i'll appreciate your help.Hi,
There are a couple of ways to interface with a BPM Process deployed in ALBPM from an external Java based application:
a) You can use PAPI (Process API) which is a Java API. You can write code to query instances and also process them through this API as far as they do not have Client components as part of the implementation (like forms). In the event that you have forms, you may need to use the WAPI or HTML API. You may also use PAPI-WS as an alternative for querying isntances.
b) You can query the instances using PAPI or PAPI-WS and then use WAPI or the HTML API for processing instances in interactive activities that may have interactive components as part of their implementation (an interactive activity implemented with a screenflow rendering BPM Object Presentations or a JSP).
Information about PAPI, can be found in the Enterprise distributions in the client/papi folder.
Information about the HTML API can be found in the Studio On Line Help. You can look by "HTML" and find useful links.
Hope this helps !
eduardoc. -
What's the relationship between JSP and Java?
hi,dear friends here.......^_^ I'm a graphic/web designer,
cause the needed of internet web design, I started to learn html and Java server page.But I never have experience of JAVA programs. It's kind of hard for me to know and use JSP now.Should i need to learn Java first? Or can anyone tell me what's the good way for me to
learn JSP?
I also want to learn how do make a web page as the first page of java.sun.com about "Industry News ".
Thanks !!grace from Taipei,TaiwanHi! JSPs allow Java code together with HTML in one document. The servlet engine "compiles" a JSP into a servlet prior to executing it. So, one must know Java prior to dealing with JSPs.
IMVHO, "Thinking In Java" by Bruce Eckel is a very good book for introduction to Java. You can download the electronic version at no charge from http://www.bruceeckel.com.
After you get a good handle on Java, "Professional Java Server Programming" (Wrox Press) can give you good information on servlets and JSPs, along with some other related topics.
Hope this helps!
Cheers! -
hi......All
let me explain my scenario.Client java proxy connect to the JMS Server and receive the Messages and send through the XI and Java Server Proxy send that messages to the multiple Queues based on that message ROUTE ID.now the SXMB-Moni showing successful flag but how can we monitor the java server proxy
with warm regards,
madhuhi
ref this
Re: Java Proxy Monitoring
Java Server Proxy
XI Configuration for Java Server Proxy -
Soap : java server / Vb client ?
what kind of problems can occur if i develop an application based on soap protocol with a VB client and java server ( apache server web) ?
Hi,
Have u found any solution..???
if yes please help me ..
am trying for an application which can communicate over net between
Solaris and Win NT. I am thinking of using SOAP for this communication.
Solaris is going to post SOAP envelops using Java and WinNT is going to
read these envelops using VB.
but i want this communication to be secure.
so, i would like to know
1. Is SOAP the right technology for this
2. Can SOAP envelops be made secure
3. Do u have any other solution for this
4. Can i send a entire file as an attachment/text with xml
5. PLEASE : Can u provide me with sample code
Kind regards
Sachin -
Error in the Socket Communication between Java Client and VC++ Server
In my application, using Java Client to do socket bi-communication with VC++ Server, which is done by somebody else.
The error is after the application properly running one or two days, the VC++ Server cannot receive the messages passed by java Client, but at Java client, everything is the same, although using CheckError() after every print(), there is no exception thrown.
The JVM is jdk1.3.1, platform is Win2k Server.
The outputstream is PrintWriter().
Please help me to settle down this problem. Thanks in advance.I read some thread in the forum, and found somebody had the similar problem with me. Just want to know how to settle this problem.
In the client/server program. Client is a JAVA program and Server a
VC++ program. The connection works, and the problem appears after some time. The Client sends a lots of requests to Serverm, the server seems receive nothing. But at the same time, the server is able to send messages to Client. The Client also can get the messages and handle them. Don't understand why there this problem and why it appears when it wants.
The client is a Win2k platorm with JDK1.3.1 and the server is also a Win2K platform with VC++ 6.0.
In the Client, using:
inputFromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));
outputToServer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);
Hope can get your help. -
Code to set and destroy session variables in Java Server Pages(JSP)
code to set and destroy session variables in Java Server Pages(JSP)
we have use following statement to set session variable
session.setAttribute("userClient",id);
we have use following statement to destroy session variable
session.setAttribute("userClient","");
and
the session.invalidate() is not working
Plz. solve this probemcode to set and destroy session variables in Java
Server Pages(JSP)
we have use following statement to set session
variable
session.setAttribute("userClient",id);
we have use following statement to destroy session
variable
session.setAttribute("userClient","");Perhaps if you tried using
session.setAttribute("userClient", null);
or
session.removeAttribute("userClient");
and
the session.invalidate() is not workingNot working how?
>
Plz. solve this probem -
Java for PI 7.1 EHP1 in Windows and SQL Server 2008
Hi Gurus
I try to install PI 7.1 EHP1 in Windows and SQL Server 2008. The questions is :
What version of java is the correct for this installation???
And where i can download it??
Thanks and advance!!!Hi Aaron,
The version for PI 7.1 is 1.5, instead of the 1.4.2 of 7.0/3.0.
Anyway, for VM settings, you should refer to SAP JVM, which
is used for the PI 7.11.
Hope it helps!
Regards,
Caio Cagnani -
Give me description about JAVA Proxy Runtime and JAVA Proxy Server
Give me description about JAVA Proxy Runtime and JAVA Proxy Server with some examples.
Hi,
Java proxy runtime :
Using the Java proxy runtime you can receive messages or send messages to the Integration Server.
This will help you
http://help.sap.com/saphelp_nw04/helpdata/en/64/7e5e3c754e476ee10000000a11405a/frameset.htm
Java proxy server :
The connection to the Integration Server by using the Java proxy runtime.
This will help you
http://help.sap.com/saphelp_nw04/helpdata/en/87/5305adc23540b8ac7bce08dbe96bd5/frameset.htm
Regards
Agasthuri Doss -
Which application server supports EJB 3 and Java EE 5?
Hi all,
I want to develop an application using EJB 3.
I was planning on using JBOSS 4.0.4 as application server, but I am not sure whether EJB 3 is fully supported.
Which application server supports EJB 3 and Java EE 5?
ThanksJust install it using the EJB3 profile in the installer. Don't use the "All" profile
and think EJB3 is included in it :) -
How to read a C structure with string and int with a java server using sock
I ve made a C agent returning some information and I want to get them with my java server. I ve settled communication with connected socket but I m only able to read strings.
I want to know how can I read strings and int with the same stream because they are sent at the same time:
C pgm sent structure :
char* chaine1;
char* chaine2;
int nb1;
int nb2;
I want to read this with my java stream I know readline methode to get the first two string but after two readline how should I do to get the two int values ?
Any idea would be a good help...
thanks.
Nicolas (France)Does the server sent the ints in little endian or big endian format?
The class java.io.DataInputStream (with the method readInt()) can be used to read ints as binary from the stream - see if you can use it. -
What to in SLD (Business and Technical sys)for Java server Proxy?
I am using java server proxy for communicating with XI.
I have HTTP as sender comm channel and XI as Receiver comm channel and this is the error i got in SXMB_MONI.
What to give in SLD for java Server proxy, i have given Web as Java.....is this what the error says.Help is highly appreciated.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_Folder_MM_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Während des Anwendungs-Mappings com/sap/xi/tf/_Folder_MM_ wurde eine com.sap.aii.utilxi.misc.api.BaseRuntimeException geworfen: Fatal Error: com.sap.engine.lib.xml.parser.Parser~.</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
=====================
ThanksHi,
Refer this configuration guide:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ac6de690-0201-0010-54ac-8923089dcc97
Refer these too:
Java Proxy Inside Story Part I
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
Java Proxy Inside Story Part II
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
Regards
suraj
Message was edited by: S.R.Suraj
Message was edited by: S.R.Suraj
Maybe you are looking for
-
Question: I am new to LR and have it set up on a Mac desktop and laptop. On the laptop, the Basic function under Develop simply disappeared. I am lost. Help.
-
Hi All, Could you please let me know once PO line item is deleted in which table this information will be stored. Appreciate early action
-
One site's ad page won't display
One site's home page displays fine but the ad page doesn't. Tried IE and ad page displayed
-
Maximum number of lines / text in a cell
I am compiling information in a spreadsheet. One column is for URLs. I'm entering multiple URLs (i.e. www.webiste.com) in the same cell. In order to go the next line (from within the same cell), I press "Option-Return" and type the next line of text
-
PSCS4: Owl Orphanage Message
I have just installed PSCS4. The first time or two it launched without a hitch. Now when I launch it I get two messages before it is apparently stable. The first message is: "Owl Orphanage: Photoshop.exe unable to locate command. This application fai