Reputation: 1338
I'm a bit puzzled and I believe I might missing some configuration, or perhaps should try something other than CXF
Using CXF in Java I have to use all these Holder objects, while the guys using .Net are not required to use Holders at all.
I thought that generating a WSDL had the same result for everybody, as the code generated is equivalent to the WSDL signature.
A more specific example (annotations removed):
while in .net they see
public loginResponse loginRequest(loginRequest loginRequest1) { }
I see on CXF
public void loginRequest(
java.lang.String language,
java.lang.String application,
java.lang.Boolean userid,
javax.xml.ws.Holder<java.lang.String> session,
javax.xml.ws.Holder<java.lang.String> userinfo);
Is this internally solved in visual studio or am I missing something in CXF?
Upvotes: 0
Views: 1658
Reputation: 14607
This is per JAX-WS spec. Each language or specification dictates how WSDL is mapped to their particular language. In the case of CXF, the JAX-WS spec dictates that a method is either "bare" (would look like "LogginResponse logingRequest(LoginRequest in)" or completely unwrapped where the response object is also unwrapped an mapped onto parameters which is what you are getting. There isn't the semi unwrapped thing that the .NET does that unwraps params but not the response.
You can use the bare mode by passing -bareMethods param to the wsdl2java command line (assuming a recent version of CXF)
Upvotes: 1