Ould Nadif

Ranch Hand
+ Follow
since Jan 21, 2004
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ould Nadif

It is easy.
I can't solve it From Windows directly. The solution is to pass through DOS : piece of cake

ould nadif
15 years ago
Hi,

Here is an example of code using JMS API.It is easy. You can find a lot of code through internet that are more complet.

I coud test it successfully with a client Linux with JNDI. But I don't know how to test it with a client windows because Windows doesn't accept a .bindings file generated by JMSAdmin tools from Linux.
How to solve it ?




public static final String INITIAL_CONTEXT_FACTORY = "com.sun.jndi.fscontext.RefFSContextFactory";
public static final String PROVIDER_URL = "file:/var/mqm";
public static final String SECU = "none";

public static final String QUEUE_CONNECTION_FACTORY = "DEVQCF";
public static final String QUEUE = "MYQUEUE";



Hashtable env;
InitialContext context;
QueueConnectionFactory qcf = null;
QueueConnection connection;
Queue queue;

env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY);
env.put(Context.PROVIDER_URL, PROVIDER_URL);
//env.put(Context.SECURITY_AUTHENTICATION,SECU);



boolean useJNDI = false;
try {

if( useJNDI ) {
System.out.println("useJNDI");
context = new InitialContext(env);
qcf = (javax.jms.QueueConnectionFactory) context.lookup (QUEUE_CONNECTION_FACTORY);
}

//Groupe mqs
connection = qcf.createQueueConnection("usre","password");
System.out.println("connection reussie1");
connection.start();
System.out.println("connection reussie2");
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
queue = session.createQueue("FMD_RCV");

//Envoie de message
MessageProducer sender = session.createProducer(queue);

sender.close();
session.close();
connection.close();
15 years ago
I am a newbie on MQseries.
I am programming a client JMS that run on windows side . And the server MQSeries is on the Linux OS.
From the Linux I used JMSAdmin to create my administrated object ( QManager, Myqueue, myQCF etc...). A file .bindings is generated on the /var/mqm/.bindings.

How to use that file .bindings side client (ie JMS on windows ) in order to communicate the client and the server.

Thanks

here my code


Hashtable env;
InitialContext context;
QueueConnectionFactory qcf;
QueueConnection connection;
Queue queue;

env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY);
env.put(Context.PROVIDER_URL, PROVIDER_URL);
env.put(Context.SECURITY_AUTHENTICATION,SECU);

try {


context = new InitialContext(env);
qcf = (javax.jms.QueueConnectionFactory)context.lookup(QUEUE_CONNECTION_FACTORY);
connection = qcf.createQueueConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
queue = session.createQueue("MYQUEUE");
MessageProducer sender = session.createProducer(queue);
TextMessage mess = session.createTextMessage("test MQSeries ould nadif");
sender.send(mess);
session.close();
connection.close();


//...
}
catch (javax.naming.NamingException ne) {
ne.printStackTrace();
}
catch (javax.jms.JMSException jms) {
jms.printStackTrace();
}
}
15 years ago
Hello all,

I developped a CMP with JBoss and I don't know how to map my table CLIENT to my bean entity client.

Thank you for your help


ould nadif
Hi all,

I am looking for a solution in Java server side(J2EE or related) to distribut mp3 data to my clients.

So here is my future architecture:
purpose:
-encode wav data to mp3 server side : What API in java i can use?
-If there was a lot of clients (ie 1000000 clients ) who connect to my server, there will be 1000000 encodage (wav-mp3), it might require a lot of resourses to perform a such charges.I am sure my server will crash down.

What kind of technologies (Servlet, EJB, webservices or any API etc....) I can use to do that?

Thank you in advance

ould nadif
Thank you for your help.

I know how to implement RateControl with J2ME API.
But my problem is that I don't have Emulator to test it.

ould
17 years ago
Hi all,

I created a player from a buffer(wav):
...
ByteArrayInputStream isb = new ByteArrayInputStream(Buffer);
player = Manager.createPlayer(isb, "audio/mpeg");
....
..

Normaly when you do (player.start()) the song start playing at the start(time = 0).

Is it possible to start the song at the date t (t different of 0)?

Thank you in advance for your help.


ould
17 years ago
Hi all,

I am looking for a emulator J2ME that enables my application to process RateConrol. I have a Sonyericsson's emulator.

TempoControl tc = (TempoControl) p.getControl("TempoControl");
PitchControl pc = (PitchControl) p.getControl("PitchControl");
RateControl rc = (RateControl)p.getControl("RateControl");

All return null, even when JP-7(for Sonyericsson's handset)is announced to support RateControl and Pitch control. I tried it with a wav (x-wav) and mp3 (mpeg) player.

Has anyone managed to run successfully RateControl with any Emulator?

Thank you in advance for your help.

ould
17 years ago
Thank you very much to everybody for your help.
Your different advise has been very usefull.

ould nadif
17 years ago
Hi all,

The media is in the XML document. I was talking about streaming XML. Seeing that the media is in the XML document as a xsi:type="xsd:base64Binary. I think it is the same as media content.

Here is what I found out on the axis web site :
http://ws.apache.org/xmlrpc/faq.html#streaming_mode

How do I enable streaming mode?
Set the property "enabledForExtensions". Note, that enabling the streaming mode doesn't mean, that all responses are served in streaming mode. It depends on the clients:

If a client sends a content-length header, then the server assumes, that the client is a traditional XML-RPC application and doesn't support the vendor extensions from Apache XML-RPC. Consequently, the server assumes, that it needs to set the content-length header itself and disables the streaming mode for that particular request.
However, if the client doesn't send a content-length header, then the server assumes that it will be able to accept any standard HTTP/1.1 request and enable the streaming mode. Streaming mode means, in particular, that the response will not contain a content-length header.


What does it mean streaming mode ?

Thank you in advance for your help.

Ould Nadif
17 years ago
Thank you for your help. But I find out on the google that ther is JSR 173: Streaming API for XML. for details: http://jcp.org/en/jsr/detail?id=173
What is its aim. Does it do streaming.

Here is that i found on the internet :

The goal of this API is to develop APIs and conventions that support processing XML as a stream. The specification will address three main areas:

Develop APIs and conventions that allow a user to programmatically pull parse events from an XML input stream.
Develop APIs that allow a user to write events to an XML output stream.
Develop a set of objects and interfaces that encapsulate the information contained in an XML stream.
The specification should be easy to use, efficient, and not require a grammar. It should include support for namespaces, and associated XML constructs. The specification will make reasonable efforts to define APIs that are "pluggable".


Non-goals of this specification include:

Specifying a validation API. Validation will be done in the layer above the streaming parser. This does not preclude passing validation parameters to an underlying parser.
Specific dependence on an XML grammar.
Support for applications that transform or edit a DTD.


I assure you i am still confused although i read all these articles.

ould nadif
17 years ago
Hi all,

Is it possible to make Streaming with webservices using apache Axis(I prefer) or others engine else.

I have a video/audio file that I would like to brodcast to several client as a webservice.

Thank in advance for your help

ould nadif
17 years ago
Hi,

Thank you.
I read it yesterday and i found it very interesting and usefull, it responds my question.

ould nadif
17 years ago
Hi all,

I developped a webService with Apache axis. It works fine.
Is it possible to implement a sytem of security (key, certifcat) in order to protect use of my differents methods. For example I would like one client "A" use my method getHello and others "B","C" etc can't use my method.

I don't know anything about security with webservice if there is on exists.

Can you help me in sharing your experience with me.

Thanks in advance.

ould nadif
17 years ago
Hi all,

I am looking for a API to decode data coded in base 64 associatde with ksoap.

Here is my code to get data using ksoap


String endpointURL = "http://localhost:8080/axis/MyHelloWorldWS.jws";
//Web Service
// Create SOAP object.This will contain your webservice request
SoapObject rpc = new SoapObject("", "compose");;
//Now, lets make SOAP envelope
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.bodyOut = rpc;
new MarshalBase64().register(envelope);
// Making webservice call
HttpTransport http = new HttpTransport(endpointURL);
http.debug = true;
http.call(null, envelope);
Object Resp = envelope.getResult();
.....
......
Here I want to decode the data.....


ould nadif
17 years ago