You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by PriteshPostings <pr...@gmail.com> on 2016/04/01 23:13:31 UTC

The BARE CXF web service invokes no parameter operation/method for GET request from web browsers.

I am not sure if this is a feature or bug introduced in version 2.7.1 (or
greater) but below is the behavior I noticed when GET request is sent to the
BARE CXF web service using web browsers.

Code Snippets:


@WebService
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface HelloWorld 
{
	@WebMethod(action = "/sayHi")
	@WebResult(name = "strResponse", partName = "strResponse")
	public String sayHi();

	@WebMethod(action = "/sayHiToUser")
	@WebResult(name = "strResponse", partName = "strResponse")
	String sayHiToUser(@WebParam(name="user") String user);
}

@WebService
public class HelloWorldImpl implements HelloWorld 
{
	@Override
	public String sayHi()
	{
		return "Hi there...";
	}

	@Override
	public String sayHiToUser(String user) 
	{
		return "Hi " + user;
	}
}

<jaxws:endpoint
	id="helloWorld"
	implementor="com.cxf.service.HelloWorldImpl"
	address="http://127.0.0.1:8080/HelloWorld" 
	endpointName="e:HelloWorld"
	xmlns:e="http://service.jaxws.cxf.apache.org/endpoint">
</jaxws:endpoint>
	
Environment/Configs:


• Java 1.6  
• Spring 3.0.0  
• CXF 2.7.0 / 2.7.1  
• CXF web service starts within embedded Jetty using spring context

Detailed Explanation:


CXF Version 2.7.0:  

When I access this web service using web browser with URL
"http://127.0.0.1:8080/HelloWorld" (No ?wsdl at the end), I am getting "No
such operation" response back in the web browser for both BARE & WRAPPED
ParameterStyle which is the expected behavior.  
  
CXF Version 2.7.1 (or greater):  

*/ParameterStyle WRAPPED:/* When I access this web service using web browser
with URL "http://127.0.0.1:8080/HelloWorld" (No ?wsdl at the end), I am
getting "No binding operation info while invoking unknown method with params
unknown." response back in the web browser which is the expected behavior.  
*/ParameterStyle BARE:/* When I access this web service using web browser
with URL "http://127.0.0.1:8080/HelloWorld" (No ?wsdl at the end), I am
getting "Hi there..." response back in the web browser. It calls sayHi()
operation/method but there is no SOAPAction specified in the GET request
header. This is NOT the expected response. I was expecting the same response
as ParameterStyle WRAPPED.

Results:


CXF Version: 2.7.0  

• URL: "http://127.0.0.1:8080/HelloWorld" (Using web browser and no ?wsdl at
the end)  
• ParameterStyle: BARE / Response: No such operation  
• ParameterStyle: WRAPPED / Response: No such operation  
• Expected Result? *YES *

CXF Version: 2.7.1 (or greater)  

• URL: "http://127.0.0.1:8080/HelloWorld" (Using web browser and no ?wsdl at
the end)  
• ParameterStyle: BARE / Response: Hi there... / Called sayHi()  
• ParameterStyle: WRAPPED / Response: No binding operation info while
invoking unknown method with params unknown.  
• Expected Result? *NO*. BARE should return the same result as WRAPPED  



--
View this message in context: http://cxf.547215.n5.nabble.com/The-BARE-CXF-web-service-invokes-no-parameter-operation-method-for-GET-request-from-web-browsers-tp5767530.html
Sent from the cxf-user mailing list archive at Nabble.com.