I have a WCF Web Service that is hosted in a Windows Service. The WCF Web Service is to be used by a Java based frontend, which will make http calls and will receive a JSON response. The problem I am getting is whilst I can get the web service to run, if I type "mydomain.com/myservice/mymethod", I get bad request back.
The web service initially had mex set for service end points, and I tried the same again, but still no luck. I took mex off, but still no luck. All this was being set on the start of the windows service. The web service is only using BasicHttpBinding.
So, my question is this - "How do I can a web service method using basichttpbinding hosted in a window service through the browser in order for this to be used by a non .net client?"
Thanks
WCF uses SOAP as its primary native protocol for communication. If your client does not want to communicate using SOAP you can make your WCF service RESTFUL with ease. Have a look at the following:
WCF REST Services
Brand new services ideally should be implemented in WebAPI rather than RESTFUL WCF. Also have a look at
REST WCF vs. WebAPI
Related
I'm building a soap web service using Java for bank payment methods, and I'd like to know how can I use or consume this web service in another web application create with php as a e-commerce web site to use these methods for payment.
There are three method to consuming web service (Soap) using php client, please refer to the below link:
Consuming web service (Soap) using php client
I have inherited a .php based web service. I don't know anything abut php. I need to make changes to this web service. What I want to know is, is it possible to make a call to another web service from a php web service. In this case, I can develop the update as a java web service, and the php web service will call my new java web service if needed.
So this would look like the following.
client ---> PHPWS ---> JavaWS
the response will be returned to the PHPWS, and that will be returned to the client.
This way I make a very small change to PHPWS.
Thanks.
I have a web service that sends a name to a web service called sayHello(), and receives a String "Hello, name".
I want to change the point-to-point connection to something like this:
web service ---> Mule ESB ---> web service
I wonder how can I do that? I've searched for a long time but I didn't find useful document on this topic. Which endpoints should I use?
Thanks.
It depends on the type of webservice you need to expose and consume:
For exposing SOAP based webservices, you can use some strategies,
1) Proxying webservices with Protocol Bridging or WSProxyService
https://docs.mulesoft.com/mule-user-guide/v/3.7/proxying-web-services
2) Proxying webservices with CXF
https://docs.mulesoft.com/mule-user-guide/v/3.7/proxying-web-services-with-cxf
3) Building a webservice with CXF
https://docs.mulesoft.com/mule-user-guide/v/3.7/building-web-services-with-cxf
For exposing RESTful webservices, you should design a RAML and then use the APIKit component
http://raml.org/
https://docs.mulesoft.com/anypoint-platform-for-apis/apikit-tutorial
For consuming SOAP based webservices, you should use the Webservice Consumer component
https://docs.mulesoft.com/mule-user-guide/v/3.7/web-service-consumer
For consuming REST webservices, you should use the HTTP Request Connector :
https://docs.mulesoft.com/mule-user-guide/v/3.7/http-request-connector
So, if you want to expose a SOAP webservice (not a proxy service), that internally consumes a SOAP webservice, you can use:
HTTPListener->CXF->WebserviceConsumer
If you want to expose a webservice proxy you can use the ProtocolBridging or CXF strategy.
If you want to expose a REST webservice, that internally consumes a REST webservice, you can use:
HTTPListener->APIKit->HTTPRequest
And so on..
This describes a scenario that you are trying to fulfill https://docs.mulesoft.com/anypoint-platform-for-apis/proxying-your-api
I am new to web services and studing Jax-WS web services these days. I created a little web service and host it in tomcat server and created a java web service client for accessing the service as well. But I am having a little confusion in the web service client, because in the client we generate a stub for accessing the service.
Here is it using RMI for invoking the web service???
According to my knowledge tomcat is a web container and it is not supporting for RMI.
I searched this through the internet and I was unable to find the clear answer. Can anybody please simply explain me how does it happen.
If the tomcat is not supporting to RMI how does it invoke the web service. I have this confusion since it uses the stub that we generated using wsimport command.
thanks a lot
Here is it using RMI for invoking the web service???
Http. The web service client would create a http request (just like how a browser does when you request a url), convert your request object to an xml payload and invoke your service end point. Different vendors of JAX-WS may use different implementations, but it is usually some form of HttpURLConnection
HttpClient is a popular package to create Http connections from a java program.
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.
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.
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.