add `skeletonInterfaceName` and `skeletonInterfaceName` to WSDL2CodeMojo
diff --git a/modules/tool/axis2-wsdl2code-maven-plugin/src/it/test3/pom.xml b/modules/tool/axis2-wsdl2code-maven-plugin/src/it/test3/pom.xml
new file mode 100644
index 0000000..753acb7
--- /dev/null
+++ b/modules/tool/axis2-wsdl2code-maven-plugin/src/it/test3/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>@pom.groupId@</groupId>
+ <artifactId>axis2</artifactId>
+ <version>@pom.version@</version>
+ </parent>
+ <artifactId>axis2-wsdl2code-maven-plugin-test1</artifactId>
+ <name>Test 3 of the axis2-wsdl2code-maven-plugin to test
+ custom skeletonInterfaceName and skeletonClassName</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>@pom.groupId@</groupId>
+ <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
+ <version>@pom.version@</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>wsdl2code</goal>
+ </goals>
+ <configuration>
+ <wsdlFile>src/main/axis2/service.wsdl</wsdlFile>
+ <syncMode>both</syncMode>
+ <generateServerSide>true</generateServerSide>
+ <generateServerSideInterface>true</generateServerSideInterface>
+ <generateAllClasses>true</generateAllClasses>
+ <generateServicesXml>true</generateServicesXml>
+ <skeletonInterfaceName>Interface</skeletonInterfaceName>
+ <skeletonClassName>GeneratedStub</skeletonClassName>
+ <packageName>demo3</packageName>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/modules/tool/axis2-wsdl2code-maven-plugin/src/it/test3/src/main/axis2/test dir/service.wsdl b/modules/tool/axis2-wsdl2code-maven-plugin/src/it/test3/src/main/axis2/test dir/service.wsdl
new file mode 100644
index 0000000..9eec86d
--- /dev/null
+++ b/modules/tool/axis2-wsdl2code-maven-plugin/src/it/test3/src/main/axis2/test dir/service.wsdl
@@ -0,0 +1,106 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<wsdl:definitions
+ xmlns:axis2="http://ws.apache.org/axis2"
+ xmlns:ns1="http://org.apache.axis2/xsd"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:ns="http://axisversion.sample/xsd"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+ targetNamespace="http://ws.apache.org/axis2">
+ <wsdl:documentation>
+ xDWS service example
+ </wsdl:documentation>
+ <wsdl:types>
+ <xs:schema>
+ <xs:import
+ namespace="http://axisversion.sample/xsd"
+ schemaLocation="service.xsd"/>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="commandsMessage">
+ <wsdl:part name="part1" element="ns:commands"/>
+ </wsdl:message>
+ <wsdl:message name="commandsResponse">
+ <wsdl:part name="part1" element="ns:commandsResponse"/>
+ </wsdl:message>
+ <wsdl:portType name="axis2-test-0.0.1PortType">
+ <wsdl:operation name="commands">
+ <wsdl:input
+ xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+ message="axis2:commandsMessage"
+ wsaw:Action="urn:commands"/>
+ <wsdl:output
+ xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+ message="axis2:commandsResponse"
+ wsaw:Action="http://ws.apache.org/axis2/xDWSPortType/commandsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="axis2-test-0.0.1SOAP11Binding" type="axis2:axis2-test-0.0.1PortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="commands">
+ <soap:operation soapAction="urn:commands" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="axis2-test-0.0.1SOAP12Binding" type="axis2:axis2-test-0.0.1PortType">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="commands">
+ <soap12:operation soapAction="urn:commands" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="axis2-test-0.0.1HttpBinding" type="axis2:axis2-test-0.0.1PortType">
+ <http:binding verb="POST"/>
+ <wsdl:operation name="commands">
+ <http:operation location="commands"/>
+ <wsdl:input>
+ <mime:content type="text/xml"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content type="text/xml"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="axis2-test-0.0.1">
+ <wsdl:port name="axis2-test-0.0.1SOAP11port_http" binding="axis2:axis2-test-0.0.1SOAP11Binding">
+ <soap:address location="http://192.168.136.3:8080/axis2-webapp/services/axis2-test-0.0.1"/>
+ </wsdl:port>
+ <wsdl:port name="axis2-test-0.0.1SOAP12port_http" binding="axis2:axis2-test-0.0.1SOAP12Binding">
+ <soap12:address location="http://192.168.136.3:8080/axis2-webapp/services/axis2-test-0.0.1"/>
+ </wsdl:port>
+ <wsdl:port name="axis2-test-0.0.1Httpport0" binding="axis2:axis2-test-0.0.1HttpBinding">
+ <http:address location="http://192.168.136.3:8080/axis2-webapp/rest/axis2-test-0.0.1"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/modules/tool/axis2-wsdl2code-maven-plugin/src/it/test3/src/main/axis2/test dir/service.xsd b/modules/tool/axis2-wsdl2code-maven-plugin/src/it/test3/src/main/axis2/test dir/service.xsd
new file mode 100644
index 0000000..6a2bf0c
--- /dev/null
+++ b/modules/tool/axis2-wsdl2code-maven-plugin/src/it/test3/src/main/axis2/test dir/service.xsd
@@ -0,0 +1,31 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ attributeFormDefault="unqualified"
+ elementFormDefault="qualified"
+ targetNamespace="http://axisversion.sample/xsd">
+ <xs:element name="commands">
+ <xs:complexType/>
+ </xs:element>
+ <xs:element name="commandsResponse">
+ <xs:complexType/>
+ </xs:element>
+</xs:schema>
\ No newline at end of file
diff --git a/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/AbstractWSDL2CodeMojo.java b/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/AbstractWSDL2CodeMojo.java
index b83df49..4b09252 100644
--- a/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/AbstractWSDL2CodeMojo.java
+++ b/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/AbstractWSDL2CodeMojo.java
@@ -265,6 +265,25 @@
* @parameter default-value="${project.build.sourceEncoding}"
*/
private String encoding;
+
+ /**
+ * Skeleton interface name - used to specify a name for skeleton interface other than the default one.
+ * In general, you should use the {@code serviceName} parameter or ensure only one service exist.
+ * Should be used together with {@code generateServerSideInterface}.
+ * Maps to the -sin option of the command line tool.
+ *
+ * @parameter property="axis2.wsdl2code.skeletonInterfaceName"
+ */
+ private String skeletonInterfaceName;
+
+ /**
+ * Skeleton class name - used to specify a name for skeleton class other than the default one.
+ * In general, you should use the {@code serviceName} parameter or ensure only one service exist.
+ * Maps to the -scn option of the command line tool.
+ *
+ * @parameter property="axis2.wsdl2code.skeletonClassName"
+ */
+ private String skeletonClassName;
private CodeGenConfiguration buildConfiguration() throws CodeGenerationException, MojoFailureException {
CodeGenConfiguration config = new CodeGenConfiguration();
@@ -334,7 +353,9 @@
config.setPortName(portName);
config.setUri2PackageNameMap(getNamespaceToPackagesMap());
config.setOutputEncoding(encoding);
-
+ config.setSkeltonInterfaceName(skeletonInterfaceName);
+ config.setSkeltonClassName(skeletonClassName);
+
config.loadWsdl(wsdlFile);
return config;