Wednesday, 4 September 2013

java code generated from wsdl contains BARE and wrapped part

java code generated from wsdl contains BARE and wrapped part

I have problem with java code generated from wsdl for my web service. I
use maven plugin org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.3. Result
of the code generation web service interface contains both Bare and
wrapped parts.
Bare style method as follows:
@WebMethod(action = "http://example.com/PersoStationWS/validate")
@WebResult(name = "pmStatusCheckResponse", targetNamespace =
"http://example.com/PersoStationWS/", partName = "validateResponse")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public PmStatusCheckResponse validate(
@WebParam(name = "validateRequest", targetNamespace =
"http://example.com/PersoStationWS/", partName = "validateRequest")
ValidateRequest validateRequest);
And wrapped parts as follows:
@WebMethod(action =
"http://example.com/PersoStationWS/getDisplacementPosition")
@RequestWrapper(localName = "getDisplacementPosition", targetNamespace =
"http://example.com/PersoStationWS/", className =
"com.example.GetDisplacementPosition")
@ResponseWrapper(localName = "getDisplacementPositionResult",
targetNamespace = "http://example.com/PersoStationWS/", className =
"com.example.GetDisplacementPositionResult")
public void getDisplacementPosition(
@WebParam(name = "argument", targetNamespace = "")
String argument,
@WebParam(name = "ready", targetNamespace = "", mode = WebParam.Mode.OUT)
Holder<Boolean> ready,
@WebParam(name = "errorMessage", targetNamespace = "", mode =
WebParam.Mode.OUT)
Holder<String> errorMessage,
@WebParam(name = "position", targetNamespace = "", mode =
WebParam.Mode.OUT)
Holder<DisplacementPosition> position);
This has also other consequences. JBoss build 7.2., that is running the
web service server, generates for all wrapped parts with same name
"parameters".
<wsdl:message name="getDisplacementPosition">
<wsdl:part name="parameters" element="ns1:getDisplacementPosition">
</wsdl:part>
</wsdl:message>
Client part that is running on .net has problem with it.

No comments:

Post a Comment