[jboss-user] [JBossWS] - JBoss WS-Eventing vs JMS-Topic

2009-08-18 Thread sbutt
Hi there,
I'm planning to implement a data-mining/analysis application (using 
WS-Eventing framework), which would get some data from a number of third party 
providers and analyse it.

I'm assuming my analysis application would be an Event Consumer (sink) 
WS-Client, which would subscribe to Event Producer(source), responsible for 
third party data providers? Do you think my understanding is correct at this 
stage?

Actually, my scenario is that I have a number of clients to whom we're sending 
some requests and in return getting some response. So in nut-shell what i'm 
looking for is a kind of analysis application, through which I can monitor what 
was sent to which client and what I got in response(success, error, warning etc 
etc). 

So do you think that with the help of WS-Eventing framework I can take care of 
the above scenario?

Secondly, I have also read about JMS-Notification framework similarly based 
upon Producer-Subscriber design pattern. So can anybody suggest, which one is 
more robust and beneficial over the other?

One good reason I can think about WS-Eventing framework is that the 
communication is going to be in the form of SOAP, so Event-Consumer endpoint 
can be implemented in any language be it php, c#, asp etc etc. 

In-case of JMS-Notification, it is going to be Java dependent. Is this 
assumption true and what other reasons there can be to give preference to 
WS-Eventing over JMS-Notification?

Thanks. 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4250117#4250117

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4250117
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: JBoss WS-Eventing vs JMS-Topic

2009-08-18 Thread sbutt
Sorry for the type in my previous message, from JMS-Notification i meant 
JMS-Topic framework.


sbutt wrote : Hi there,
  | I'm planning to implement a data-mining/analysis application 
(using WS-Eventing framework), which would get some data from a number of third 
party providers and analyse it.
  | 
  | I'm assuming my analysis application would be an Event Consumer (sink) 
WS-Client, which would subscribe to Event Producer(source), responsible for 
third party data providers? Do you think my understanding is correct at this 
stage?
  | 
  | Actually, my scenario is that I have a number of clients to whom we're 
sending some requests and in return getting some response. So in nut-shell what 
i'm looking for is a kind of analysis application, through which I can monitor 
what was sent to which client and what I got in response(success, error, 
warning etc etc). 
  | 
  | So do you think that with the help of WS-Eventing framework I can take care 
of the above scenario?
  | 
  | Secondly, I have also read about JMS-Notification framework similarly based 
upon Producer-Subscriber design pattern. So can anybody suggest, which one is 
more robust and beneficial over the other?
  | 
  | One good reason I can think about WS-Eventing framework is that the 
communication is going to be in the form of SOAP, so Event-Consumer endpoint 
can be implemented in any language be it php, c#, asp etc etc. 
  | 
  | In-case of JMS-Notification, it is going to be Java dependent. Is this 
assumption true and what other reasons there can be to give preference to 
WS-Eventing over JMS-Notification?
  | 
  | Thanks. 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4250120#4250120

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4250120
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - Re: sending Soap message with timeout

2009-07-15 Thread sbutt
Thanks for your reply but i solved that problem using Jboss ESB's internal HTTP 
router class: org.jboss.soa.esb.actions.routing.http.HttpRouter

One can send soap messages with it as well, and set connection/socket Timeouts 
(http properties) etc as well.

Thanks.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4243839#4243839

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4243839
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossWS] - sending Soap message with timeout

2009-07-02 Thread sbutt
Hi Folks,
I have implemented a basic soap client (javax.xml.soap.*). 


  | 
  | public Message processSOAPRequest(Message message) {
  | try {
  |   MessageFactory msgFactory = MessageFactory.newInstance();
  |   SOAPMessage soap = msgFactory.createMessage();
  |   SOAPPart soapPart = soap.getSOAPPart();
  | 
  |   byte[] buffer = ((String) message.getBody().get()).getBytes();
  |   ByteArrayInputStream stream = new ByteArrayInputStream(buffer);
  |   StreamSource source = new StreamSource(stream);
  |   soapPart.setContent(source);
  |   String action = config.getAttribute(SOAP_ACTION);
  |   if (action != null) {
  | MimeHeaders headers = soap.getMimeHeaders();
  | headers.addHeader(SOAPAction, action);
  |   }
  | 
  |   /
  | 
  |   SOAPMessage reply = sendSOAPMessage(soap);
  | 
  |   /
  | 
  |   ByteArrayOutputStream out = new ByteArrayOutputStream();
  |   reply.writeTo(out);
  |   String soapMessage = new String(out.toByteArray());
  |   message.getBody().add(soapMessage);
  | 
  | } catch (SOAPException e) {
  |   logger.error(SOAPException :  + e);
  | 
  | } catch (IOException e) {
  |   logger.error(IOException :  + e);
  | }
  | 
  | return message;
  | 
  |   }
  | 
  | 
  |  private SOAPMessage sendSOAPMessage(SOAPMessage soap) {
  | SOAPConnection connection = null;
  | SOAPMessage reply = null;
  | try {
  |   SOAPConnectionFactory soapConnFactory = SOAPConnectionFactory
  |   .newInstance();
  |   connection = soapConnFactory.createConnection();
  |   String destination = config.getAttribute(URL_ENDPOINT);
  | 
  |   reply = connection.call(soap, destination);
  |   
  |   
  |   
  | } catch (Exception e) {
  |   logger.error(e);
  | } finally {
  |   try {
  | if (connection != null) {
  |   connection.close();
  | }
  |   } catch (SOAPException e) {
  | logger.error(e);
  |   }
  | }
  | 
  | return reply;
  |   }
  | 
  | 

The input message is JBossEsb message, which I convert to soap message and then 
send it using SOAPConnection, which works fine. 

The problem with SOAPConnection class is that it does not provide 
setTimeout(..) method. I read some where that there is another class 
SOAPConnectionImpl (by axis), which extends SOAPConnection and has this 
setTimeout method.

I have tried to convert my existing implementation to SOAPConnectionImpl but i 
always get a classcast exceptions.

Could somebody help me in suggesting a solution to this problem? My main 
concern is to include timeout feature that is my WS consumer/client should 
timeout after a certain period if the server does not reply. 

Any other soap message sending implementation with timeout feature are also 
good.

I have included 

  | dependency
  | groupIdaxis/groupId
  | artifactIdaxis/artifactId
  | version1.4/version
  | /dependency
  | 

maven dependencies for axis.

Awaiting replies.

Thanks.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4241472#4241472

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4241472
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user