问题
i intent to replace wcf service with some java service . how should i design my wcf service such that it's gets replaced or can be replaced with the java service later such that i dont have to do any work or very little work on the client i.e on my silver light application .
any idea's / suggestions?
P.S 1. that is the reason i am not using RIA services. 2.my wcf service should work like wcf data services work. it should allow me to do CRUD operations on my entities.
回答1:
Create java services using Apache CXF or Apache Axis. Deploy those services in Tomcat server. You can easily create client proxies for those services by using adding service reference in Silverlight Client application. Now you can consume the webservice from silverlight.
回答2:
The standard answer is this: use the BasicHttpBinding on the service. Don't add anything else to it. Most other stacks support BasicHttpBinding just fine.
Alternatively, use a WCF REST endpoint and standardize on consuming JSON. Then, your service can be PHP, Ruby, Java, or anything else.
来源:https://stackoverflow.com/questions/2663891/silverlight-4-with-java-service