public void setGenerateDocLitBare(boolean generateDocLitBare) {
this.generateDocLitBare = generateDocLitBare;
}
public void generateWSDL() throws Exception {
SchemaGenerator schemaGenerator = resolveSchemaGen(classLoader,
className, getSchemaTargetNamespace(),
getSchemaTargetNamespacePrefix());
ArrayList<String> excludedOperation = new ArrayList<String>();
Utils.addExcludeMethods(excludedOperation);
schemaGenerator.setExcludeMethods(excludedOperation);
schemaGenerator.setAttrFormDefault(getAttrFormDefault());
schemaGenerator.setElementFormDefault(getElementFormDefault());
schemaGenerator.setExtraClasses(getExtraClasses());
schemaGenerator.setNsGen(resolveNSGen());
schemaGenerator.setPkg2nsmap(getPkg2nsMap());
schemaGenerator.setMappingFileLocation(getMappingFileLocation());
schemaGenerator.setCustomSchemaLocation(getCustomSchemaLocation());
if (getPkg2nsMap() != null
&& !getPkg2nsMap().isEmpty()
&& (getPkg2nsMap().containsKey(ALL) || getPkg2nsMap()
.containsKey(ALL.toUpperCase()))) {
schemaGenerator.setUseWSDLTypesNamespace(true);
}
if(messageReceivers == null) {
messageReceivers = new HashMap<String,MessageReceiver>();
Class<?> inOnlyMessageReceiver = Loader
.loadClass("org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver");
MessageReceiver messageReceiver = (MessageReceiver) inOnlyMessageReceiver
.newInstance();
messageReceivers.put(WSDL2Constants.MEP_URI_IN_ONLY, messageReceiver);
Class<?> inoutMessageReceiver = Loader
.loadClass("org.apache.axis2.rpc.receivers.RPCMessageReceiver");
MessageReceiver inOutmessageReceiver = (MessageReceiver) inoutMessageReceiver
.newInstance();
messageReceivers.put(WSDL2Constants.MEP_URI_IN_OUT,
inOutmessageReceiver);
}
AxisService service = new AxisService();
schemaGenerator.setAxisService(service);
AxisService axisService = AxisService.createService(className,
serviceName == null ? Java2WSDLUtils
.getSimpleClassName(className) : serviceName,
axisConfig, messageReceivers,
targetNamespace == null ? Java2WSDLUtils
.namespaceFromClassName(className, classLoader,
resolveNSGen()).toString() : targetNamespace,
classLoader, schemaGenerator, service);
schemaGenerator.setAxisService(axisService);
axisService.setTargetNamespacePrefix(getTargetNamespacePrefix());
axisService.setSchemaTargetNamespace(getSchemaTargetNamespace());
axisService
.setSchemaTargetNamespacePrefix(getSchemaTargetNamespacePrefix());
String uri = locationUri;