boolean isDoclit = binding.isDocLit();
// Message message = portDefinitions.message().name(method.getOperation().getName().getLocalPart());
Message message = portDefinitions.message().name(method.getRequestMessageName());
extension.addInputMessageExtension(message, method);
com.sun.xml.ws.wsdl.writer.document.Part part;
JAXBRIContext jaxbContext = model.getJAXBContext();
boolean unwrappable = true;
for (ParameterImpl param : method.getRequestParameters()) {
if (isDoclit) {
if (isHeaderParameter(param))
unwrappable = false;
part = message.part().name(param.getPartName());
part.element(param.getName());
} else {
if (param.isWrapperStyle()) {
for (ParameterImpl childParam : ((WrapperParameter)param).getWrapperChildren()) {
part = message.part().name(childParam.getPartName());
part.type(jaxbContext.getTypeName(childParam.getBridge().getTypeReference()));
}
} else {
part = message.part().name(param.getPartName());
part.element(param.getName());
}
}
}
if (method.getMEP() != MEP.ONE_WAY) {
// message = portDefinitions.message().name(method.getOperation().getName().getLocalPart()+RESPONSE);
message = portDefinitions.message().name(method.getResponseMessageName());
extension.addOutputMessageExtension(message, method);
if (unwrappable) {
for (ParameterImpl param : method.getResponseParameters()) {
if (isHeaderParameter(param))
unwrappable = false;
}
}
for (ParameterImpl param : method.getResponseParameters()) {
if (isDoclit) {
part = message.part().name(param.getPartName());
part.element(param.getName());
} else {
if (param.isWrapperStyle()) {
for (ParameterImpl childParam : ((WrapperParameter)param).getWrapperChildren()) {
part = message.part().name(childParam.getPartName());
part.type(jaxbContext.getTypeName(childParam.getBridge().getTypeReference()));
}
} else {
part = message.part().name(param.getPartName());
part.element(param.getName());
}