WCF dual communication with java client - java

I have to find a way to connect a WCF service to a Java client. I can not change the code of the WCF service and it only offers NetTcpBinding or wsDualHttpBinding
One work-around would be to create a C# communication channel to manage the communication between the service and the client. However I have no experience with C# and I'm sure this will take a long time.
What would be the best way to deal with this? Are there any available communication channels and offer this already?
Thank you in advance!

The problem you have is neither of the bindings offered support non-wcf clients.
I can't see any way you can communicate with this service without as you say put an intermediary service in between.
The perfect candidate for this is WCF Routing protocol bridging - which is exactly what it sounds like - translation of one protocol to another. In this case you are not going between protocols but WCF bindings.
Your solution would have to use basicHttpBinding which ships with WCF and exposes services over soap 1.1.

Related

What application protocol does JMS use?

I've learned a respectable amount about networking protocols in Grad School and in professional experience and sent HTTP requests programmatically using AJAX and such.
The project on which I work professionally uses JMS to communicate and I'm curious about how it works.
When using REST (for instance) one makes an HTTP request with parameters in either the URI or the message header in order to invoke a service and further describe its needs.
A mentor of mine at work and I were discussing how JMS works and I'm struggling to understand at an application level how messages are actually sent. As far as I understand JMS in general (I realize there are many implementations of JMS) it is a specification for how to format data being sent.
Is the message itself still sent via HTTP(S)? Could it be SMTP?
Without going excruciatingly deep I would like to understand how one would, at a code level, send a JMS message from one service to another?
Am I even thinking about this correctly?
Can it be done any number of different ways?
Is there a convention that's used in the industry?
If someone could shed some light on JMS for me I would appreciate it.
Thanks!
JMS is not a protocol, it's an API specification. It's not something like TCP or HTTP protocol. Simply put the JMS specification defines signature of messaging APIs. How the APIs are internally implemented and what protocols they use to communicate with the messaging provider is vendor specific.
The vendor specific JMS implementations know how to communicate with their own messaging provider, but not with any other vendors messaging providers. For example IBM's MQ JMS implementation uses it's own protocol to communicate with IBM MQ Queue Manager, similarly Oracle JMS, Active MQ implementations with their own messaging provider.
Hope this helped.

How does a Swing client communicate with a Java EE backend?

I want to develop a Swing client application that will use a Java EE 6 backend. How does the Swing client communicate with the server? Do I have to make a web service that the communication go through or are there other ways?
There are other ways also in addition to web services.
One very common approach is RMI or Remote Method Invocation. It is a native extension of the Java platform that allows server-side objects to be directly accessible inside client-side code.
If you have no experience with RMI then take a look at the official Java Remote Method Invocation Tutorial
I think this might be a very useful document for you, complete with diagrams to demonstrate the architecture and communication modal.
There are to many communication types:
sockets gives to you the max communication speed.
a little communication overhead, you can use XML / SOAP
(plain)webservices too : fastest to implement. a HTTP GET, POST
RMI: I think is deprecated, but others are using. If you want only with Java backend from Java, you can use it
Yes, you can either create a web service (SOAP or RESTful), but since your client is a java application you can use jndi lookup to call EJB3 beans, it will work through rmi or soap, depending or your configuration. Something like here.

Best way to manage asynchronous / push communication with web clients on a Spring based Java server

I need to push events to web clients in a cross-browser manner (iPhone, iPad, Android, IE/FF/Chrome/etc.) from a Spring based Java server. I am using backbone.js on the client side.
To my best knowledge, I can either go with a Web socket only approach, or I can use something like socket.io.
What is the best practice for this issue, and which platform/frameworks should I use?
Thanks
Looks like you're interested in an AJAX Push engine. ICEPush (same group that makes ICEFaces) provides these capabilities, and works with a variety of server- and client-side frameworks. There is also APE.
You can have a look at Lightstreamer.
My company is currently using it to push real time financial data from a web server.
I suppose Grizzly or Netty may fit your needs. Don't have a real experience in that scope, unfortunately.
I'd recommend socket.io as you mentioned in your question, if you're doing browser based eventing from a remote host. Socket.io handles all the connection keep-alives and reconnections directly from javascript and has facilities for channeling messages to specific sessions (users). The real advantage comes from the two-way communication of WebSockets without all the boilerplate code of maintaining the connection.
You will need to do some digging for a java implementation thoughConsider running the server directly from V8.

Question about Jini API

I am trying to learn about the Jini API in java, but can't get my head around how the server and client interact, and am constantly seeing things being referred to as "smart proxies". What are smart proxies? And how does the client and server interact ?
Thanks.
Jini is based on Java RMI, so clients and servers communicate with each other just as they do in RMI: request/response using RMI protocol on the wire.
As for the "smart proxies", the Jini compiler uses a proxy factory to generate implementation code for your interface that includes an API for sending and receiving meta data about services. This is the magic that makes it possible for a client to send out a request for a certain kind of service on the network (e.g. "I'd like a color laser plotter") and select from the responses to find the best match possible.

PubSub between Java and .Net

Is there a good free service bus for .Net that allows subscriptions from Java clients?
I'm working with NServiceBus and I like the fluent API and the simplicity, but it doesn't support Java clients or WCF integration for web-service based connections.
Thanks!
NServiceBus has builtin WCF support for receiving incoming commands. See the WcfIntegration sample that comes with the NSB download.
NServiceBus is a great tool for pub-sub and is very easy to configure:
http://docs.particular.net/nservicebus/messaging/publish-subscribe/

Categories

Resources