I made a web project in Java, using Java-WS. How can I invoke service methods through HTTP only. I don't want to generate (or worse write) any java web clients, and similar stuff. I'd just like to invoke the method with a HTTP request. And parse the result (manually) from response.
In .NET web services I invoke methods just with:
http://serviceUrl/serviceName.asmx/operationName?parametars=...
How to do the same thing in java + tomcat?
Edit: Let me rephrase my question. So this is what I have done so far:
I deploy the app on tomcat and it deploys fine. Now, what do I need to do to be able to invoke my WebMethods via HTTP?
Typing:
http://localhost:8084/MyService/MyMethod
doesn't work.
Sorry if this is a stupid question, but I'm not really a Java guru, I've been working mostly on .NET.
Multiple possibilities:
new URL(url).openConnection().getInputStream()
RestTemplate
Apache CXF has a 'plain http binding', but we recommend that people write JAX-RS services, instead. They are very, very, simple. However, the plain HTTP binding is there and supports GET.
I generate a RESTful Web Service in NetBeans by clicking on "Generate SOAP-over-HTTP Wrapper" in my service context menu. It generated successfully, compiles and deploys fine. But I still can't figure out how to make a HTTP invoke
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.