SAP PCO Socket Connection VS HyperTerminal
Hi All,
We're trying to process an IP Barcode Scanner message using PCo notifications. How should I configure the subscription item / notification so that the received message is captured as using the HyperTerminal software? Is there any documentation we should be aware of?
Many Thanks,
Paul Radulescu
Hi Steve,
We did our tests this morning. The source socket connection settings are below:
I also attached a small log (FScan_Gi.txt) around one scan, where the alert is being raised, and the message is being sent to the destination system dummy transaction which only writes the file in the MII Web space (i.e. FS_msg_03.xml)
My take on the multiple streams is that the scanner we used is a fixed industrial type one. The label being scanned contains multiple barcodes and the scanner scans all of them at once, delimiting the message with some CONTROL CHARACTERS, giving some headaches going forward.
If I define an XML query and read the message saves "as is" by the dummy transaction above, I get a nice, but firm message :
which comes from the control characters inserted by the scanner between the barcodes. PCo transmits the message as is, MII saves it as is, but when I try to open and process it .. I can't. Opening it in a transaction in workbench using the text-loader gives me a "prolog" error
Funny. I feel like I get the best out of it sometimes
Definitely I have to get rid of those control characters .. even by truncating the message. There are three barcodes being scanned, I presently need only the last one .. so my question is .. Can I use the expression editor and look for the message content after the "~" sign in the string over there (see FS_msg_03.xml) with something like stringpart('Fscan_GI', ~-location, length-of-the-string-after-~) I code below ?
I have to wait again for the scanner to be available next Tue and test this without copy-pasting the content in the Value box above, but are you envisioning any possible "prolog" errors in the PCo log this time?
Cheers,
Paul.
Similar Messages
-
MII and Plant Connectivity 2.2 Bi-directional Socket Connection
Hi,
I have to send a command to a serial device from within MII via a socket connection to be able to have a respons from the device. I know in Plant Connectivity a socket connector can be setup. But is it also possible to send a message from MII to the serial device over Plant Connectivity, because it seems that the socket can only be setup to trigger notifications based on received messages from sources (and not from destinations). I read this functionality was planned to be build into Plant Connectivity 2.2, but I can't figure out how to set it up?
kind regards,Hi Bram,
We can set up connection between PCO & MII through "UDC" connector. UDC connector is available in MII through
Data Services --> Data Servers --> New --> UDC and click on "OK" button.
You need to provide all PCO system details like server name, Port number etc and save the connection. Check the status of connectivity through Data Services --> Connection Status.
Go through the URL : http://help.sap.com/saphelp_mii121/helpdata/en/43/e80b59ad40719ae10000000a1553f6/frameset.htm
Navigate to Data Services --> SAP MII Workbench --> Query Template --> Tag Query
Upon successful connection, open SAP MII workbench (Data Services --> SAP MII Workbench) and create a new "Tag Query" template to pull details from PCO.
So far, we pulled information from PCO, manipulated those values in MII and send these values to ERP to create notification. Let us know business scenario on which you need to send back information to PCO from MII.
Thanks
Rajesh.S -
Backup message error -SAP system is running or SAP user is connected to dat
Hello ..
when the backup started i got this message error ..before starting the backup, the shell shutdown the sap system but below message was showed
BR0262I Enter database user name[/password]:
BR0055I Start of database backup: bedvugxg.aff 2010-08-08 05.31.48
BR0484I BRBACKUP log file: /oracle/AAA/sapbackup/bedvugxg.aff
BR0477I Oracle pfile /oracle/AAA/102_64/dbs/initAAA.ora created from spfile /oracle/AAA/102_64/dbs/spfileAAA.ora
BR0068E SAP system is running or SAP user is connected to database AAA - database cannot be shut down
BR1025I Please shut down SAP system first or use the 'offline_force' option
BR0056I End of database backup: bedvugxg.aff 2010-08-08 05.31.48
BR0280I BRBACKUP time stamp: 2010-08-08 05.31.49
BR0054I BRBACKUP terminated with errors
[Major] From: "OMNISAP" Time: 08/08/10 05:31:49
BRBACKUP /usr/sap/AAA/SYS/exe/run/brbackup -t offline -d util_file -c -m all -u hpbkup/******* returned 3
i am new on this, what should i review into the db?
Regards and thanks in advance
Dma.Hello Daniela,
you try to perform an offline backup (which is a very uncommon way nowadays) and your SAP system is not down.
This is also described in the official documentation:
http://help.sap.com/saphelp_sm32/helpdata/en/0d/d309664a0c11d182b80000e829fbfe/content.htm
offline: Database backup in offline mode, in other words, the database is shut down during backup. When you select this parameter, BRBACKUP checks that no SAP system users are connected to the database. If an SAP System is active, the database is not shut down and BRBACKUP terminates the process with an error message (message number BR0068E).
Regards
Stefan -
Socket connect slow in JDK 1.5?
We recently began testing our Java Swing application with JDK 1.5, and we noticed that socket.connect()
calls are taking several seconds to return, when before in 1.4 the calls returned immediately.
Here is some sample code:
Socket sock = new Socket();
InetSocketAddress sockAddr = new InetSocketAddress(inAddress, portNum);
sock.connect(sockAddr, 2000);
What could be wrong? I've debugged the code and verified inAddress is an IP address,
not a hostname.
-EricHere is the list of enhancements in JDK1.5.
http://java.sun.com/j2se/1.5.0/docs/guide/net/enhancements-1.5.0.html
I wonder if any of them are having some effect in the slow connection.
There are some network properties that you can tweak with. Did you try them?
Here is the list
http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html -
Is there any way to identify the particular socket connection is closed ?
Is there any way to identify the particular socket connection is closed or not ?
Any methods ???
How can the program knows the connection is lost or some thing ...
Is the socket throws some excpetions when there is no active connection ???
namancIf you get an IOException when you try to use the socket, the connection was obviously closed.
The correct way for an application to know if the socket was closed is:
1) the server sends a message indicating that the socket should be closed
2) the client closes the socket itself -
I suppose it is the problem with socket connection,Please help
Hi,
I'm trying to build a chat server in Java on Linux OS.I've created basically 2 classes in the client program.The first one shows the login window.When we enter the Login ID & password & click on the ok button,the data is sent to the server for verification.If the login is true,the second class is invoked,which displays the messenger window.This class again access the server
for collecting the IDs of the online persons.But this statement which reads from the server causes an exception in the program.If we invoke the second class independently(ie not from 1st class) then there is no problem & the required data is read from the server.Can anyone please help me in getting this program right.I'm working on a p4 machine with JDK1.4.
The Exceptions caused are given below
java.net.SocketException: Connection reset by peer: Connection reset by peer
at java.net.SocketInputStream.SocketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:119)
at java.io.InputStreamReader$CharsetFiller.readBytes(InputStreanReader.java :339)
at java.io.InputStreamReader$CharsetFiller.fill(InputStreamReader.java:374)
at java.io.InputStreamReader.read(InputStreamReader.java:511)
at java.io.BufferedReader.fill(BufferedReader.java:139)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at Login.LoginData(Login.java:330)
at Login.test(Login.java:155)
at Login$Buttonhandler.actionPerformed(Login.java:138)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1722)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:17775)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4141)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:253)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:261)
at java.awt.Component.processMouseEvent(Component.java:4906)
at java.awt.Component.processEvent(component.java:4732)
at java.awt.Container.processEvent(Container.java:1337)
at java.awt.component.dispatchEventImpl(Component.java:3476)
at java.awt.Container.dispatchEventImpl(Container.java:1399)
at java.awt.Component.dispatchEvent(Component.java:3343)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3302)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3014)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2967)
at java.awt.Container.dispatchEventImpl(Container.java:1373)
at java.awt.window.dispatchEventImpl(Window.java:1459)
at java.awt.Component.dispatchEvent(Component.java:3343)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:439)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
My program looks somewhat like this :
1st class definition:
public class Login extends Jframe// Login is the name of the first class;
Socket connection;
DataOutputStream outStream;
BufferedReader inStream;
Frame is set up here
public class Buttonhandler implements ActionListener
public void actionPerformed(ActionEvent e) {
String comm = e.getActionCommand();
if(comm.equals("ok")) {
check=LoginCheck(ID,paswd);
test();
public void test() //checks whether the login is true
if(check)
new Messenger(ID);// the second class is invoked
public boolean LoginCheck(String user,String passwd)
//Enter the Server's IP & port below
String destination="localhost";
int port=1234;
try
connection=new Socket(destination,port);
}catch (UnknownHostException ex){
error("Unknown host");
catch (IOException ex){
ex.printStackTrace ();
error("IO error creating socket ");
try{
inStream = new BufferedReader(new InputStreamReader(connection.getInputStream()));
outStream=new DataOutputStream(connection.getOutputStream());
}catch (IOException ex){
error("IO error getting streams");
ex.printStackTrace();
System.out.println("connected to "+destination+" at port "+port+".");
BufferedReader keyboardInput=new BufferedReader(new InputStreamReader(System.in));
String receive=new String();
try{
receive=inStream.readLine();
}catch(IOException ex){ error("Error reading from server");}
if(receive.equals("Logintrue"))
check=true;
else
check=false;
try{
inStream.close();
outStream.close();
connection.close();
}catch (IOException ex){
error("IO error closing socket");
return(check);
// second class is defined below
public class Messenger
Socket connect;
DataOutputStream outStr;
BufferedReader inStr;
public static void main(String args[])
{ Messenger mes = new Messenger(args[0]);}
Messenger(String strg)
CreateWindow();
setupEvents();
LoginData(strg);
fram.show();
void setupEvents()
fram.addWindowListener(new WindowHandler());
login.addActionListener(new MenuItemHandler());
quit.addActionListener(new MenuItemHandler());
button.addActionListener(new Buttonhandle());
public void LoginData(String name)
//Enter the Server's IP & port below
String dest="localhost";
int port=1234;
int r=0;
String str[]=new String[40];
try
connect=new Socket(dest,port);
}catch (UnknownHostException ex){
error("Unknown host");
catch (IOException ex){
ex.printStackTrace ();
error("IO error creating socket ");
try{
inStr = new BufferedReader(new InputStreamReader(connect.getInputStream()));
outStr=new DataOutputStream(connect.getOutputStream());
}catch (IOException ex){
error("IO error getting streams");
ex.printStackTrace();
String codeln=new String("\n");
try{
outStr.flush();
outStr.writeBytes("!@*&!@#$%^");//code for sending logged in users
outStr.writeBytes(codeln);
outStr.write(13);
outStr.flush();
String check="qkpltx";
String receive=new String();
try{
while((receive=inStr.readLine())!=null) //the statement that causes the exception
if(receive.equals(check))
break;
else
str[r]=receive;
r++;
}catch(IOException ex){ex.printStackTrace();error("Error reading from socket");}
catch(NullPointerException ex){ex.printStackTrace();}
} catch (IOException ex){ex.printStackTrace();
error("Error reading from keyboard or socket ");
try{
inStr.close();
outStr.close();
connect.close();
}catch (IOException ex){
error("IO error closing socket");
for(int l=0,k=1;l<r;l=l+2,k++)
if(!(str[l].equals(name)))
stud[k]=" "+str[l];
else
k--;
public class Buttonhandle implements ActionListener
public void actionPerformed(ActionEvent e) {
//chat with the selected user;
public class MenuItemHandler implements ActionListener
public void actionPerformed(ActionEvent e)
String cmd=e.getActionCommand();
if(cmd.equals("Disconnect"))
//Disconnect from the server
else if(cmd.equals("Change User"))
//Disconnect from the server & call the login window
else if(cmd.equals("View Connection Details"))
//show connection details;
public class WindowHandler extends WindowAdapter
public void windowClosing(WindowEvent e){
//Disconnect from server & then exit;
System.exit(0);}
I�ll be very thankful if anyone corrects the mistake for me.Please help.You're connecting to the server twice. After you've successfully logged in, pass the Socket to the Messenger class.
public class Messenger {
Socket connect;
public static void main(String args[]) {
Messenger mes = new Messenger(args[0]);
Messenger(Socket s, String strg) {
this.connect = s;
CreateWindow();
setupEvents();
LoginData(strg);
fram.show();
} -
Problem with socket connection
have my gps reciver connected to the usb port - i have a daemon gpsd running which makes data available on tcp port 2947 for querying. when i do telnet, it gives proper data.
but when i open a socket connection using java, it does not print anything as output. actually telnet asks for an escape charatcer so i am sending "r" initially to the server but still the program does not print anything as output.
here is my java code -
import java.io.*;
import java.net.Socket;
public class test2
public static void main(String[] args)
try
Socket s = new Socket("localhost",2947);
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
s.getOutputStream())),true);
out.println("r");
BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
String line;
while(true)
line = in.readLine();
System.out.println(line);
catch (Exception e)
or sometimes it even shows error as
Exception in thread "main" java.net.SocketException: Invalid argument or cannot assign requested address
at java.net.PlainSocketImpl.socketConnect(Native Method)
and this is the output which i get on telnet -
ot@localhost ~]# telnet localhost 2947
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
r
GPSD,R=1
$GPRMC,000212,V,18000.0000,N,00000.0000,W,0.0000,180.000,101102,,*1A
$GPGSA,A,1,,,,,,,,,,,,,,,,*32
$PGRME,400.00,0.00,0.00*7B
$GPRMC,000213,V,18000.0000,N,00000.0000,W,0.0000,180.000,101102,,*1B
$GPGSA,A,1,,,,,,,,,,,,,,,,*32
$PGRME,400.00,0.00,0.00*7B
$GPRMC,000214,V,18000.0000,N,00000.0000,W,0.0000,180.000,101102,,*1C
$GPGSA,A,1,,,,,,,,,,,,,,,,*32Actually the problem does not seem to be in the code because i tried some basic client server programs (without any gpsd etc in picture) and even they are not working in linux though they work perfectly in windows (on the same machine). In linux it shows exception
My socket programs dont work in linux it shows error -
ot@localhost winc]# java parser
Exception in thread "main" java.net.SocketException: Invalid argument or cannot assign requested address
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at parser.main(parser.java:10)
i have removed the firewall settings etc and it still doesnot work in linux
what could be the cause for this?
Sowmya -
Problem with socket connection through Java Embedding...
We are trying to create a simple socket connection to a socket server through BPEL PM using the Java Embedding component.
BPEL Process : Client makes an asynchronous request. Passes an input variable. The input variable is sent to the Server Program through a socket connection through the Java embedding component.
Server: We are running a simple Socket Server program from command prompt.
The code below works fine as long as we do not try to receive a response from the server (Commented Code).
If we uncomment the code and try to receive a response, it refuses to create an instance for the BPEL Process. And sometimes restarts the BPEL Server.
Client Code:
String msg="NONE";
try{
org.w3c.dom.Element input = (org.w3c.dom.Element) getVariableData("inputVariable","payload","/client:clientProcessRequest/client:input");
msg = input.getNodeValue();
Socket clientsoc=new Socket("ServerIP",1000);
PrintWriter out1=new PrintWriter(clientsoc.getOutputStream());
out1.write(msg);
out1.flush();
BufferedReader cin1=new BufferedReader(new InputStreamReader(clientsoc.getInputStream()));
msg=cin1.readLine();
setVariableData("outputVariable","payload","/client:result",new String(msg));
clientsoc.close();
catch(UnknownHostException e)
System.err.println("Don't know about host: dev.");
System.exit(1);
catch (IOException e)
System.err.println("Couldn't get I/O for "+ "the connection to: dev.");
System.exit(1);
}Repost
-
Problem with socket connection in midp 2.0
hello everyone.
I'm new one in j2me and I am learning socket connection in j2me. I'm using basic socket,datagram example wich is come with sun java wireless toolkit 2.5. for it i wrote small socket server program on c# and tested it example on my pc and its working fine. also socket server from another computer via internet working fine. But when i instal this socket example into my phone on nokia n78 (Also on nokia 5800) it's not working didn't connect to socket server.. On phone I'm using wi-fi internet. Can anybody help me with this problem? I hear it's need to modify manifest file and set appreciate pressions like this
MIDlet-Permissions: javax.microedition.io.Connector.socket,javax.microedition.io.Connector.file.write,javax.microedition.io.Connector.ssl,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http,javax.microedition.io.Connector.https
is it true?
can anybody suggest me how can i solve this problem?
where can I read full information about socket connection specifiecs in j2me?
Thanks.Maybe this can be helpful:
[http://download-llnw.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/index.html]
you can check there the Datagram interface anda DatagramConnection interface and learn a little about that.
If the client example runs fine in the wireless toolkit emulator, it should run the same way in your phone; i suggest to try to catch some exception that maybe is hapenning and display it on a Alert screen, this in the phone. -
How to make a socket connection timeout infinity in Servlet doPost method.
I want to redirect my System.out to a file on a remote server (running Apache Web Server and Apache Tomcat). For which I have created a file upload servlet.
The connection is established only once with the servlet and the System.out is redirected to it. Everything goes fine if i keep sending data every 10 second.
But it is required that the data can be sent to the servlet even after 1 or 2 days. The connection should remain open. I am getting java.net.SocketTimeoutException: Read timed out Exception as the socket timeout occurs.
Can anyone guide me how to change the default timeout of the socket connection in my servlet class.
Following is the coding to establish a connection with the Servlet.
URL servletURL = new URL(mURL.getProtocol(), mURL.getHost(), port, getFileUploadServletName() );
URLConnection mCon = servletURL.openConnection();
mCon.setDoInput(true);
mCon.setDoOutput(true);
mCon.setUseCaches(false);
mCon.setRequestProperty("Content-Type", "multipart/form-data");
In the Servlet Code I am just trying to read the input from the in that is the input stream.
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
BufferedInputStream in = new BufferedInputStream(req.getInputStream());
byte [] content = new byte[1024];
do
read = in.read(content, 0, content.length);
if (read > 0)
out.write(content, 0, read);
I have redirected the System.out to the required position.
System.setOut(........);
Can anyone guide me how to change the default timeout of the socket connection in my servlet class.I am aware of the setKeepAlive() method, but this can only used with the sockets. Here i am inside a servlet, have access to HTTPServletRequest and HTTPServletResponse and I don't know how to get access to the underlying sockets as the socket handling will be handled by the tomcat itself. If I am right there will be method in the apache tomcat 6.0.x to set this property. But till now I am not getting it.
-
Multiple clients on socket connection
Hi!
I understand that it is possible that multiple clients listen to one server (on the same port) and even write to it (then it should be a multi-threaded server).
But i would like to refuse connectios, if one client is connected. How can I do that?
In my case I have a (single threaded) server. Now one clients connects. The server waits to receive data from the client and answers, without ever closing the port. that works.
Now if I connect with a second client, the openicng of the socket in the second client works fine, although the server does not seem to notice the second client. Communication is not possible between the server and the second client, and the server doesn't answer to the first client anymore, although he receives data from it.
So, since the server does not seem to notice the second client (does not accept the connection) and I don't get an exception at the second client, what can I do?
Thank you for your help!
concerned Code (if you want to take a look at it):
CLIENT:
socket = new Socket(hostname, echo_port);
SERVER:
try
ServerSocket waitingsocket = new ServerSocket(echo_port);
try
socket= waitingsocket.accept();
System.out.println("Client connected");
ReaderThread reader = new ReaderThread( this, socket );
reader.start();
catch (Exception e)
READER:
public void run()
while (true)
try {
int bytesRead = inStream.read(inputBuffer,
0, inputBuffer.length);
readCallback.tcpUpdate(inputBuffer,bytesRead);
catch (Exception oops)
readCallback.tcpUpdate(null,-1);
Just to make sure this is clear: You can NOT have multiple clients on a given socket connection. You CAN have multiple clients connected to a particular port on a given server, but each client will be communicating with the server through a different of socket.
The usual approach here is to set up a listening ServerSocket on the desired port, call accept() on it, then process the communication from the returned Socket object. This is usually done by spawning a new thread and allowing it to handle the socket communication, while the ServerSocket loops around to another accept() for the next communication.
Here's an excellent intro to the concepts (the code is really ugly and poorly implemented, but it does a good job of explaining the overall concept). I used this as a starting point, and now (after a whole lot of development) have a pretty sweet extensible web server class that handles template expansion, etc... (I use this as a quick and dirty UI for some of my apps, instead of requiring the user to install a JSP container):
http://developer.java.sun.com/developer/technicalArticles/Networking/Webserver/
- K -
How can i reuse my existing socket connection
Hi,
this might sound basic, it probably is:
As part of my larger project, i have to send and recieve data to multiple socket connections.
The thing that happens is that everytime i send data, it seems that java is creating a new stream or something (code is multithreaded)
so as i send 4 items of data, a bit like a chat program sending 4 statements, it creates 4 different streams, instead of using the same stream. therefore when i close the connection, i get:
java.net.SocketException: Connection reset 4 times.
i know why.. its because i have added the:
Socket socket=new Socket(host, port);
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
PrintWriter out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
bit in the same method with the
out.println(THE DATA....);
out.flush();
The thing what i want to do is to create the connection one, and reuse the objects:
out, in and socket
to send / recieve the new data.
please help me guys,
thanksAll the threads would be able to get the same reference to....
class SocketWrapper {
private final Object readLock = new Object();
private final Object writeLock = new Object();
// client side
public SocketWrapper(String hostname, int port);
// server side.
public SocketWrapper(Socket);
// send data
public void send(Serializable object) throws IOException;
// receive data. synchronized(writeLock);
public Serializable getNext() throws IOException;
// create a new socket as required, throw IllegalState if server side. synchronized(readLock)
private void createNewSocket() throws IllegalStateException;
}The send autoconnects as required. It then send on message/packet/object.
The getNext autoconnects as required. It reads one message/packet/object and returns.
This allows multiple threads to access the same socket. It allows data to be sent while a thread is blocking on a read. (Thus two locks) -
How can i create a socket connection through an http proxy
i'm trying to make a socket connection send an email - i have code that works when you don't have to go through a proxy server but i can't make it pass the proxy server.
import java.net.*;
import java.io.*;
import java.util.*;
public class Mail
public String to_address = "[email protected]";
public String from_address = "[email protected]";
public String sendSub = "HeHeHe";
public String sendBody = "hehehe - it worked";
// This is created to allow data to be read in by the keyboard.
BufferedReader in = new BufferedReader(
new InputStreamReader(System.in));
private void Mail(String to_address, // recipient's addresses
String from_address, // sender's address
String sendSub, // subject
String sendBody) // Message
throws IOException, ProtocolException, UnknownHostException {
Socket socket; // creates a Socket named socket
PrintStream out; // stream to write to socket
String host = "imap.btopenworld.com"; // identification of the mail server host
// creates a new socket for connection to the mail server
// as well as two variables for the read and write streams
socket = new Socket(host, 25); // opens socket to host on port 25 (SMTP port)
out = new PrintStream(socket.getOutputStream());
// read the initial message
in.readLine();
// Dialog with the mail server
// send HELO to SMTP server HELO command is given by a connecting SMTP host
out.println( "HELO " + host );
out.flush() ;
in.readLine();
// Once we are connected to the mail server we start sending the email...
// send "from"
out.println( "MAIL FROM: " + from_address );
out.flush() ;
in.readLine();
// send "to"
out.println( "RCPT TO: " + to_address );
out.flush() ;
in.readLine();
// prepare the mailserver to receive the data
out.println( "DATA" );
out.flush() ;
in.readLine();
// Send actual email
out.println("From: " + from_address);
out.println("To: " + to_address);
out.println( "Subject: " + sendSub + "\n" );
out.flush() ;
out.println("");
out.println( sendBody ) ;
out.println(".") ; // standard to determine end-of-body
out.flush() ;
in.readLine();
//Quit and closes socket
out.println("QUIT");
out.flush();
in.close() ;
socket.close() ;
return ;
public static void main (String [] args) throws IOException
Mail themail = new Mail();
}i've tried that but it doesn't seem to do nething - this is how i implemented it...
import java.net.*;
import java.io.*;
import java.util.*;
public class Mail
public String to_address = "[email protected]";
public String from_address = "[email protected]";
public String sendSub = "HeHeHe";
public String sendBody = "hehehe - it worked";
// This is created to allow data to be read in by the keyboard.
BufferedReader in = new BufferedReader(
new InputStreamReader(System.in));
private void Mail(String to_address, // recipient's addresses
String from_address, // sender's address
String sendSub, // subject
String sendBody) // Message
throws IOException, ProtocolException, UnknownHostException {
Socket socket; // creates a Socket named socket
PrintStream out; // stream to write to socket
String host = "imap.btopenworld.com"; // identification of the mail server host
// creates a new socket for connection to the mail server
// as well as two variables for the read and write streams
socket = new Socket(host, 25); // opens socket to host on port 25 (SMTP port)
out = new PrintStream(socket.getOutputStream());
// read the initial message
in.readLine();
System.getProperties().put( "proxySet", "true" );
System.getProperties().put( "proxyHost", "144.124.16.28" );
System.getProperties().put( "proxyPort", "8080" );
// Dialog with the mail server
// send HELO to SMTP server HELO command is given by a connecting SMTP host
out.println( "HELO " + host );
out.flush() ;
in.readLine();
// Once we are connected to the mail server we start sending the email...
// send "from"
out.println( "MAIL FROM: " + from_address );
out.flush() ;
in.readLine();
// send "to"
out.println( "RCPT TO: " + to_address );
out.flush() ;
in.readLine();
// prepare the mailserver to receive the data
out.println( "DATA" );
out.flush() ;
in.readLine();
// Send actual email
out.println("From: " + from_address);
out.println("To: " + to_address);
out.println( "Subject: " + sendSub + "\n" );
out.flush() ;
out.println("");
out.println( sendBody ) ;
out.println(".") ; // standard to determine end-of-body
out.flush() ;
in.readLine();
//Quit and closes socket
out.println("QUIT");
out.flush();
in.close() ;
socket.close() ;
return ;
public static void main (String [] args) throws IOException
Mail themail = new Mail();
} -
Universe based on SAP HANA OLAP connection
Can I create universe based on SAP HANA OLAP connection ?
How can i access SAP HANA view which was created using OLAP connection in WEBI and Dashboard? It does not allow creating Universe on top of SAP HANA OLAP connection and give an error.
SAP BusinessObjects query and reporting applications can directly connect to OLAP SAP HANA connections. No universe is required, only a published OLAP SAP HANA connection.
ThanksOLAP connection are only meant for tools that make use of OLAP connectivity only like BEx ..and HANA analytic views and calculated views are also treated as OLAP cubes for them..
So these connection is only available with analysis product like Analysis Office (which is meant to be used with Bex or OLAP cubes ) and Design studio which is again mainly built around OLAP paradigm..
You can not create a universe or Webi on Olap connection on HANA as of now.. However it could be like exposed in a future release of BO which is not public yet... -
Authentication error when creating EPM Add-in connection with SAP BO Enterprise connection type
Hello, Experts,
I have a problem with creation of EPM Add-in connection when SAP BusinessObjects Enterprise connection type is selected.
An error message is "Error while communicating with the server. Framework message: Authorization failed."
Here are the steps that were implemented and how this issue was reproduced:
SAP BusinessObjects Planning and Consolidation 10.0 SP12 for Microsoft was installed and configured.
Integration between SAP BPC and SAP BusinessObjects BI 4.1 SP02 was implemented. SAP BO users can successfully connect to SAP BPC system.
EPM connector was successfully installed and deployed in SAP BusinessObjects BI server.
BPC ODBO 2.0 SP04 64BIT was installed in SAP BusinessObjects server.
EPM connection was successfully created in SAP BusinessObjects CMC.
EPM Add-in and BPC ODBO 2.0 SP04 32BIT was installed in another computer (let's call it CLIENT) which has MS Office 2007 32BIT installed.
From CLIENT computer we have launched Excel manually and successfully created BPC connection with Connection Type - Local.
Then we have logged into BI Launch Pad and launched New / EPM document (Excel). Excel has started.
In EPM Add-in we have pressed Logon.
In connection window selected SAP BusinessObjects Enterprise connection type.
An error "Error while communicating with the server. Framework message: Authorization failed." appears.
Before this error appears we are not getting any window where we could select EPM connection (created in CMC) nor the possibility to enter username or password.
Looking forward you valuable comments and suggestions.
Thank you in advance.
Donatas BudrysDear, Roberto,
Our user has Full Access to all BPC tasks and it is administrator in BI system.
Also we can successfully connect with the same user using Connection type "Local".
We had done some investigation and in the BPC SQL Server trace log we can catch the following message when an error occurs:
==============[System Error Tracing]==============
[System Name] : BPCXMLAService [Message Type] : ErrorMessage [Job Name] : ValidateUser [DateTime] : 04/23/2014 10:58:06 [UserId] : [Exception] DetailMsg : {System.Exception: Invalid user at SAP.BPC.Services.Webservice.XMLAService.XMLAService.ValidateUser()} ==============[System Error Tracing End ]==============
It is very interesting that after the EPM workbook is launched via BI Launch Pad till an error occurs we are NOT provided with possibility to enter any username and password. So the EPM add-in should use the same user which was logged into BI Launch Pad - in our case the user with administrative rights both in BI Launch Pad and BPC systems. Am I missing anything?
Looking forward your feedback.
Thank you in advance.
Best regards,
Donatas
Maybe you are looking for
-
IP over Thunderbolt on Mavericks
From the recent press release on Mavericks: A new self-configuring IP over Thunderbolt software feature in OS X Mavericks provides a fast link between Thunderbolt-enabled Macs. I can't find any further description of this in their website or a KB art
-
Recently I've encountered a few problems while working with Edge Animate. Firstly, I was importing SVG Files into Edge that I'd created in Illustrator. This was going fine until Edge stopped responding to my request of adding more SVG files. No error
-
After the recent updates to FF36.0.3 and 36.0.4, it takes Firefox 1.5 min to start on my PC with Win 7. I tried everything: new install and refresh, even safe mode doesn't make the slightest difference. Any ideas? George
-
WCS:- Not able to add user , Getting error while doing it.
I tried to add new user (user1) and assigned it to user defined group, which has some permitions .. but when logged with this user try to use a user define template (name: tempt- configure-> Access Point Template), I receives error: "Failed to contac
-
Help! converting two types of video into one format so I can edit
Right Folks, go easy because I'm a novice. I'm having major problems getting two different types of video to work together in final cut pro 7. I've recorded something with two different HD cameras and I'm totally aware I need to convert them to the s