Author: mmao
Date: Tue Jul 17 00:51:12 2007
New Revision: 556837
URL: http://svn.apache.org/viewvc?view=rev&rev=556837
Log:
Add missing files in the last commit.
Added:
incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.wsdl
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.xjb
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/pizza_wrapped.wsdl
Added:
incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java?view=auto&rev=556837
==============================================================================
---
incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java
(added)
+++
incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSBindingTest.java
Tue Jul 17 00:51:12 2007
@@ -0,0 +1,70 @@
+/**
+ * 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.
+ */
+package org.apache.cxf.tools.wsdlto.jaxws;
+
+import java.io.File;
+import java.io.FileInputStream;
+
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.tools.common.ProcessorTestBase;
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.tools.wsdlto.core.DataBindingProfile;
+import org.apache.cxf.tools.wsdlto.core.FrontEndProfile;
+import org.apache.cxf.tools.wsdlto.core.PluginLoader;
+import org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class JAXWSBindingTest extends ProcessorTestBase {
+ private JAXWSContainer processor;
+
+ @Before
+ public void setUp() throws Exception {
+
+ super.setUp();
+ env.put(FrontEndProfile.class,
PluginLoader.getInstance().getFrontEndProfile("jaxws"));
+ env.put(DataBindingProfile.class,
PluginLoader.getInstance().getDataBindingProfile("jaxb"));
+ env.put(ToolConstants.CFG_OUTPUTDIR, output.getCanonicalPath());
+
+ processor = new JAXWSContainer(null);
+ }
+
+ @After
+ public void tearDown() {
+ super.tearDown();
+ processor = null;
+ env = null;
+ }
+
+ @Test
+ public void testDateTypeAdapter() throws Exception {
+ env.put(ToolConstants.CFG_WSDLURL,
getLocation("/wsdl2java_wsdl/echo_date.wsdl"));
+ env.put(ToolConstants.CFG_BINDING,
getLocation("/wsdl2java_wsdl/echo_date.xjb"));
+ processor.setContext(env);
+ processor.execute();
+
+ assertNotNull(output);
+
+ String path = "/org/apache/cxf/tools/fortest/date";
+ File sei = new File(output, path + "/EchoDate.java");
+ assertTrue(sei.exists());
+ assertTrue(IOUtils.toString(new
FileInputStream(sei)).indexOf("java.util.Date") != -1);
+ }
+}
\ No newline at end of file
Added:
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.wsdl?view=auto&rev=556837
==============================================================================
---
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.wsdl
(added)
+++
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.wsdl
Tue Jul 17 00:51:12 2007
@@ -0,0 +1,70 @@
+<?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.
+-->
+<wsdl:definitions name="EchoDateService"
targetNamespace="http://date.fortest.tools.cxf.apache.org/"
xmlns:ns1="http://date.fortest.tools.cxf.apache.org/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://date.fortest.tools.cxf.apache.org/"
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://date.fortest.tools.cxf.apache.org/">
+ <xsd:element name="echoDate" type="echoDate"/>
+ <xsd:complexType name="echoDate">
+ <xsd:sequence>
+ <xsd:element minOccurs="0" name="arg0" type="xsd:dateTime"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="echoDateResponse" type="echoDateResponse"/>
+ <xsd:complexType name="echoDateResponse">
+ <xsd:sequence>
+ <xsd:element minOccurs="0" name="return" type="xsd:dateTime"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="echoDateResponse">
+ <wsdl:part name="result" element="ns1:echoDateResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echoDate">
+ <wsdl:part name="parameters" element="ns1:echoDate">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="EchoDate">
+ <wsdl:operation name="echoDate">
+ <wsdl:input name="echoDate" message="ns1:echoDate">
+ </wsdl:input>
+ <wsdl:output name="echoDateResponse" message="ns1:echoDateResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="EchoDateServiceSoapBinding" type="ns1:EchoDate">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="echoDate">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echoDate">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoDateResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="EchoDateService">
+ <wsdl:port name="EchoDatePort" binding="ns1:EchoDateServiceSoapBinding">
+ <soap:address location="http://localhost:9090/hello"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added:
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.xjb
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.xjb?view=auto&rev=556837
==============================================================================
---
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.xjb
(added)
+++
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/echo_date.xjb
Tue Jul 17 00:51:12 2007
@@ -0,0 +1,46 @@
+<?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.
+-->
+
+<!--
+ * This is a jaxb external customization binding file
+ * was generated by the CXF 2.1-incubator-SNAPSHOT
+ * Tue Jul 17 13:26:16 CST 2007
+ * Generated source version: 2.1-incubator-SNAPSHOT
+ *
+ * The reason we generate this file is that
+ * we detected java.util.Date or java.util.Calendar classes in your SEI
+ *
+ * Useage:
+ * wsdl2java [-b <the path of this file>] wsdl
+ * To customize the generated date types
+-->
+
+<jaxws:bindings wsdlLocation="echo_date.wsdl"
+ xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <jaxws:bindings node="wsdl:definitions/wsdl:types/xs:[EMAIL
PROTECTED]'http://date.fortest.tools.cxf.apache.org/']">
+ <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <jxb:javaType name="java.util.Date" xmlType="xs:dateTime"
+
parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
+
printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>
+ </jxb:globalBindings>
+ </jaxws:bindings>
+</jaxws:bindings>
\ No newline at end of file
Added:
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/pizza_wrapped.wsdl
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/pizza_wrapped.wsdl?view=auto&rev=556837
==============================================================================
---
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/pizza_wrapped.wsdl
(added)
+++
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/pizza_wrapped.wsdl
Tue Jul 17 00:51:12 2007
@@ -0,0 +1,105 @@
+<?xml version="1.0" ?>
+<!--
+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
+ name="PizzaService"
+ targetNamespace="http://cxf.apache.org/pizza_wrapped"
+ xmlns:tns="http://cxf.apache.org/pizza_wrapped"
+ xmlns:types="http://cxf.apache.org/pizza_wrapped/types"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://cxf.apache.org/pizza_wrapped/types"
+ xmlns:tns="http://cxf.apache.org/pizza_wrapped/types"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ version="1.0">
+
+ <xsd:element name="CallerIDHeader" type="tns:CallerIDHeaderType" />
+
+ <xsd:complexType name="CallerIDHeaderType">
+ <xsd:sequence>
+ <xsd:element name="Name" type="xsd:string" />
+ <xsd:element name="PhoneNumber" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="OrderPizza" type="tns:OrderPizzaType" />
+
+ <xsd:complexType name="OrderPizzaType">
+ <xsd:sequence>
+ <xsd:element name="Toppings" type="tns:ToppingsListType" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="OrderPizzaResponse"
type="tns:OrderPizzaResponseType" />
+
+ <xsd:complexType name="OrderPizzaResponseType">
+ <xsd:sequence>
+ <xsd:element name="MinutesUntilReady" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="ToppingsListType">
+ <xsd:sequence>
+ <xsd:element name="Topping" type="xsd:string" minOccurs="0"
maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:portType name="Pizza">
+ <wsdl:operation name="OrderPizza">
+ <wsdl:input message="tns:OrderPizzaRequest" />
+ <wsdl:output message="tns:OrderPizzaResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:message name="CallerIDHeader">
+ <wsdl:part name="callerID" element="types:CallerIDHeader"/>
+ </wsdl:message>
+
+ <wsdl:message name="OrderPizzaRequest">
+ <wsdl:part name="body" element="types:OrderPizza"/>
+ </wsdl:message>
+ <wsdl:message name="OrderPizzaResponse">
+ <wsdl:part name="body" element="types:OrderPizzaResponse"/>
+ </wsdl:message>
+
+ <wsdl:binding name="PizzaPortBinding" type="tns:Pizza">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <wsdl:operation name="OrderPizza">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:header message="tns:CallerIDHeader" part="callerID"
use="literal" />
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="PizzaService">
+ <wsdl:port name="PizzaPort" binding="tns:PizzaPortBinding">
+ <soap:address
location="http://localhost:9013/pizza_service/services/PizzaService"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file