You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2012/10/20 10:47:10 UTC
svn commit: r1400387 - in /axis/axis1/java/trunk: integration/
integration/src/main/java/test/wsdl/webref/
integration/src/test/java/test/wsdl/webref/
maven/maven-java2wsdl-plugin/src/main/java/org/apache/axis/tools/maven/java2wsdl/
test/wsdl/webref/
Author: veithen
Date: Sat Oct 20 08:47:09 2012
New Revision: 1400387
URL: http://svn.apache.org/viewvc?rev=1400387&view=rev
Log:
Migrated test/wsdl/webref to the Maven build.
Added:
axis/axis1/java/trunk/integration/src/main/java/test/wsdl/webref/
axis/axis1/java/trunk/integration/src/main/java/test/wsdl/webref/DoubleBack.java
- copied unchanged from r1400200, axis/axis1/java/trunk/test/wsdl/webref/DoubleBack.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/webref/
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/webref/DoubleBackServiceTestCase.java
- copied, changed from r1400200, axis/axis1/java/trunk/test/wsdl/webref/DoubleBackServiceTestCase.java
Removed:
axis/axis1/java/trunk/test/wsdl/webref/
Modified:
axis/axis1/java/trunk/integration/pom.xml
axis/axis1/java/trunk/maven/maven-java2wsdl-plugin/src/main/java/org/apache/axis/tools/maven/java2wsdl/AbstractGenerateWsdlMojo.java
Modified: axis/axis1/java/trunk/integration/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/pom.xml?rev=1400387&r1=1400386&r2=1400387&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/pom.xml (original)
+++ axis/axis1/java/trunk/integration/pom.xml Sat Oct 20 08:47:09 2012
@@ -195,6 +195,27 @@
</mappings>
</configuration>
</execution>
+ <execution>
+ <id>webref</id>
+ <goals>
+ <goal>generate-wsdl</goal>
+ </goals>
+ <phase>process-classes</phase>
+ <configuration>
+ <output>${project.build.directory}/work/test/wsdl/webref/DoubleBackService.wsdl</output>
+ <className>test.wsdl.webref.DoubleBack</className>
+ <style>DOCUMENT</style>
+ <namespace>http://webref.wsdl.test/DoubleBack</namespace>
+ <location>http://localhost:8080/axis/services/DoubleBackService</location>
+ <portTypeName>DoubleBackPortType</portTypeName>
+ <mappings>
+ <mapping>
+ <package>test.wsdl.webref</package>
+ <namespace>http://webref.wsdl.test/DoubleBack</namespace>
+ </mapping>
+ </mappings>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>
@@ -1156,6 +1177,25 @@
</configuration>
</execution>
<execution>
+ <id>webref</id>
+ <goals>
+ <goal>generate-test-sources</goal>
+ </goals>
+ <configuration>
+ <file>${project.build.directory}/work/test/wsdl/webref/DoubleBackService.wsdl</file>
+ <generate>both</generate>
+ <all>true</all>
+ <implementationClassName>test.wsdl.webref.DoubleBack</implementationClassName>
+ <mappings>
+ <mapping>
+ <namespace>http://webref.wsdl.test/DoubleBack</namespace>
+ <package>test.wsdl.webref</package>
+ </mapping>
+ </mappings>
+ <deployWsdd>${project.build.directory}/wsdd/webref.wsdd</deployWsdd>
+ </configuration>
+ </execution>
+ <execution>
<id>wrapped</id>
<goals>
<goal>generate-test-sources</goal>
Copied: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/webref/DoubleBackServiceTestCase.java (from r1400200, axis/axis1/java/trunk/test/wsdl/webref/DoubleBackServiceTestCase.java)
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/webref/DoubleBackServiceTestCase.java?p2=axis/axis1/java/trunk/integration/src/test/java/test/wsdl/webref/DoubleBackServiceTestCase.java&p1=axis/axis1/java/trunk/test/wsdl/webref/DoubleBackServiceTestCase.java&r1=1400200&r2=1400387&rev=1400387&view=diff
==============================================================================
--- axis/axis1/java/trunk/test/wsdl/webref/DoubleBackServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/webref/DoubleBackServiceTestCase.java Sat Oct 20 08:47:09 2012
@@ -7,6 +7,8 @@
package test.wsdl.webref;
+import test.HttpTestUtil;
+
public class DoubleBackServiceTestCase extends junit.framework.TestCase {
public DoubleBackServiceTestCase(java.lang.String name) {
super(name);
@@ -14,16 +16,16 @@ public class DoubleBackServiceTestCase e
public void testDoubleBackServiceWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
- java.net.URL url = new java.net.URL(new test.wsdl.webref.DoubleBackPortTypeServiceLocator().getDoubleBackServiceAddress() + "?WSDL");
- javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.webref.DoubleBackPortTypeServiceLocator().getServiceName());
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new DoubleBackPortTypeServiceLocator().getDoubleBackServiceAddress() + "?WSDL");
+ javax.xml.rpc.Service service = serviceFactory.createService(url, new DoubleBackPortTypeServiceLocator().getServiceName());
assertTrue(service != null);
}
public void test1DoubleBackServiceEcho() throws Exception {
test.wsdl.webref.DoubleBackServiceSoapBindingStub binding;
try {
- binding = (test.wsdl.webref.DoubleBackServiceSoapBindingStub)
- new test.wsdl.webref.DoubleBackPortTypeServiceLocator().getDoubleBackService();
+ DoubleBackPortTypeServiceLocator loc = new DoubleBackPortTypeServiceLocator();
+ binding = (DoubleBackServiceSoapBindingStub)loc.getDoubleBackService(HttpTestUtil.getTestEndpoint(loc.getDoubleBackServiceAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/maven/maven-java2wsdl-plugin/src/main/java/org/apache/axis/tools/maven/java2wsdl/AbstractGenerateWsdlMojo.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-java2wsdl-plugin/src/main/java/org/apache/axis/tools/maven/java2wsdl/AbstractGenerateWsdlMojo.java?rev=1400387&r1=1400386&r2=1400387&view=diff
==============================================================================
--- axis/axis1/java/trunk/maven/maven-java2wsdl-plugin/src/main/java/org/apache/axis/tools/maven/java2wsdl/AbstractGenerateWsdlMojo.java (original)
+++ axis/axis1/java/trunk/maven/maven-java2wsdl-plugin/src/main/java/org/apache/axis/tools/maven/java2wsdl/AbstractGenerateWsdlMojo.java Sat Oct 20 08:47:09 2012
@@ -111,6 +111,14 @@ public abstract class AbstractGenerateWs
private String location;
/**
+ * Indicates the name to use use for the portType element. If not specified, the
+ * class-of-portType name is used.
+ *
+ * @parameter
+ */
+ private String portTypeName;
+
+ /**
* The name of the output WSDL file.
*
* @parameter
@@ -166,6 +174,9 @@ public abstract class AbstractGenerateWs
}
emitter.setIntfNamespace(namespace);
emitter.setLocationUrl(location);
+ if (portTypeName != null) {
+ emitter.setPortTypeName(portTypeName);
+ }
output.getParentFile().mkdirs();
try {
emitter.emit(output.getAbsolutePath(), Emitter.MODE_ALL);