You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by aj...@apache.org on 2005/08/25 10:57:42 UTC
svn commit: r240024 - in /webservices/axis/trunk/java/modules/wsdl:
test-resources/ping-mod.xsd test-resources/ping-modified.wsdl
test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java
Author: ajith
Date: Thu Aug 25 01:57:06 2005
New Revision: 240024
URL: http://svn.apache.org/viewcvs?rev=240024&view=rev
Log:
updated the test case to include a WSDL that checks the functionality of the new change (the schema element problem)
Added:
webservices/axis/trunk/java/modules/wsdl/test-resources/ping-mod.xsd
webservices/axis/trunk/java/modules/wsdl/test-resources/ping-modified.wsdl
Modified:
webservices/axis/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java
Added: webservices/axis/trunk/java/modules/wsdl/test-resources/ping-mod.xsd
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/test-resources/ping-mod.xsd?rev=240024&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/test-resources/ping-mod.xsd (added)
+++ webservices/axis/trunk/java/modules/wsdl/test-resources/ping-mod.xsd Thu Aug 25 01:57:06 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<s:schema elementFormDefault="qualified" targetNamespace="http://xmlsoap.org/Ping" xmlns:s="http://www.w3.org/2001/XMLSchema">
+ <s:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+ <s:element name="Ping" nillable="true" type="tns:ping"/>
+ <s:complexType name="ping">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="ticket" type="tns:ticketType"/>
+ <s:element minOccurs="1" maxOccurs="1" name="text" nillable="true" type="s:string"/>
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="ticketType">
+ <s:simpleContent>
+ <s:extension base="s:string">
+ <s:attribute ref="s1:Id"/>
+ </s:extension>
+ </s:simpleContent>
+ </s:complexType>
+ <s:element name="PingResponse" nillable="true" type="tns:pingResponse"/>
+ <s:complexType name="pingResponse">
+ <s:sequence>
+ <s:element minOccurs="1" maxOccurs="1" name="text" nillable="true" type="s:string"/>
+ </s:sequence>
+ </s:complexType>
+ </s:schema>
Added: webservices/axis/trunk/java/modules/wsdl/test-resources/ping-modified.wsdl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/test-resources/ping-modified.wsdl?rev=240024&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/test-resources/ping-modified.wsdl (added)
+++ webservices/axis/trunk/java/modules/wsdl/test-resources/ping-modified.wsdl Thu Aug 25 01:57:06 2005
@@ -0,0 +1,82 @@
+<definitions xmlns:s1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://xmlsoap.org/Ping"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ targetNamespace="http://xmlsoap.org/Ping"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema>
+ <s:import
+ namespace="http://xmlsoap.org/Ping"
+ schemaLocation="ping-mod.xsd" />
+ </s:schema>
+
+ <s:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+ <s:attribute name="Id" type="s:string"/>
+ </s:schema>
+ </types>
+ <message name="PingRequest">
+ <part name="ping" element="tns:Ping"/>
+ </message>
+ <message name="PingResponse">
+ <part name="pingResponse" element="tns:PingResponse"/>
+ </message>
+ <portType name="PingPort">
+ <operation name="Ping">
+ <input message="tns:PingRequest"/>
+ <output message="tns:PingResponse"/>
+ </operation>
+ </portType>
+ <binding name="PingBinding" type="tns:PingPort">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="Ping">
+ <soap:operation soapAction="Ping" style="document"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="PingService">
+ <port name="Ping1" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/Ping1"/>
+ </port>
+ <port name="Ping2" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/Ping2"/>
+ </port>
+ <port name="Ping2a" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/Ping2a"/>
+ </port>
+ <port name="Ping3" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/Ping3"/>
+ </port>
+ <port name="Ping4" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/Ping4"/>
+ </port>
+ <port name="Ping5" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/Ping5"/>
+ </port>
+ <port name="Ping6" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/Ping6"/>
+ </port>
+ <port name="Ping7" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/Ping7"/>
+ </port>
+ <port name="STPing1" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/STPing1"/>
+ </port>
+ <port name="STPing3" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/STPing3"/>
+ </port>
+ <port name="STPing4" binding="tns:PingBinding">
+ <soap:address location="http://localhost:9080/pingservice/STPing4"/>
+ </port>
+
+ </service>
+</definitions>
Modified: webservices/axis/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java?rev=240024&r1=240023&r2=240024&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/test/org/apache/axis2/wsdl/codegen/WSDL2JavaTest.java Thu Aug 25 01:57:06 2005
@@ -48,8 +48,8 @@
protected void setUp() throws Exception {
File outputFile = new File(OUTPUT_LOCATION_BASE);
if (outputFile.exists() && outputFile.isDirectory()){
- deleteDir(outputFile);
- outputFile.mkdir();
+ deleteDir(outputFile);
+ outputFile.mkdir();
}else{
outputFile.mkdir();
}
@@ -124,6 +124,19 @@
}
/**
+ * Test for the modified ping wsdl. it will be the test for the detached schema with only an import
+ * statement
+ */
+ public void testCodeGenerationPingModified(){
+
+ try {
+ generateAndCompile("ping-modified.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+FOLDER_COUNT++);
+ } catch (CodeGenerationException e) {
+ fail("Exception while code generation test!"+ e.getMessage());
+ }
+ }
+
+ /**
*
* @param wsdlName
* @param outputLocation
@@ -132,7 +145,7 @@
private void generateAndCompile(String wsdlName, String outputLocation) throws CodeGenerationException {
codeGenerate(WSDL_BASE_DIR + wsdlName,outputLocation);
//todo - Still the compilation fails (the original problem of the java.home was settled by setting fork
- //todo - to true). Now the compiler fails for some unknown reason (inside maven)
+ //todo - to true). Now the compiler fails for some unknown reason (inside maven! works fine in the IDE though)
//compile(outputLocation);
}