You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2007/02/28 07:38:43 UTC
svn commit: r512623 - in /incubator/cxf/trunk/rt/frontend/jaxws/src:
main/generated/org/apache/cxf/jaxws/javaee/
test/java/org/apache/cxf/jaxws/javaee/ test/resources/
Author: ningjiang
Date: Tue Feb 27 22:38:43 2007
New Revision: 512623
URL: http://svn.apache.org/viewvc?view=rev&rev=512623
Log:
[CXF-302] Applied the David's patch which added an @XmlRootElement annotation to read the webservices.xml using the WebServicesType jaxb class
Added:
incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/
incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java (with props)
incubator/cxf/trunk/rt/frontend/jaxws/src/test/resources/webservices.xml (with props)
Modified:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/generated/org/apache/cxf/jaxws/javaee/WebservicesType.java
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/generated/org/apache/cxf/jaxws/javaee/WebservicesType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/generated/org/apache/cxf/jaxws/javaee/WebservicesType.java?view=diff&rev=512623&r1=512622&r2=512623
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/generated/org/apache/cxf/jaxws/javaee/WebservicesType.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/generated/org/apache/cxf/jaxws/javaee/WebservicesType.java Tue Feb 27 22:38:43 2007
@@ -16,6 +16,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@@ -42,6 +43,7 @@
*
*
*/
+@XmlRootElement(name="webservices", namespace="http://java.sun.com/xml/ns/javaee")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "webservicesType", propOrder = {
"description",
Added: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java?view=auto&rev=512623
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java Tue Feb 27 22:38:43 2007
@@ -0,0 +1,42 @@
+/**
+ * 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.jaxws.javaee;
+
+import java.io.InputStream;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Unmarshaller;
+
+import junit.framework.TestCase;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class WebservicesTypeTest extends TestCase {
+
+ public void testReadWebservicesXml() throws Exception {
+ JAXBContext ctx = JAXBContext.newInstance(WebservicesType.class);
+ InputStream in = this.getClass().getClassLoader().getResourceAsStream("webservices.xml");
+ Unmarshaller unmarshaller = ctx.createUnmarshaller();
+ Object obj = unmarshaller.unmarshal(in);
+
+ assertTrue("obj is an " + obj.getClass(), obj instanceof WebservicesType);
+ }
+}
Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/rt/frontend/jaxws/src/test/resources/webservices.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/resources/webservices.xml?view=auto&rev=512623
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/resources/webservices.xml (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/resources/webservices.xml Tue Feb 27 22:38:43 2007
@@ -0,0 +1,42 @@
+<?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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd"
+ version="1.2">
+ <webservice-description>
+ <webservice-description-name>cxfPojo</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/greeter_control.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>cxfPojoName</port-component-name>
+ <wsdl-service></wsdl-service>
+ <enable-mtom>false</enable-mtom>
+ <service-endpoint-interface>org.apache.hello_world_soap_http.Greeter</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>cxfPojoServlet</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+
+</webservices>
\ No newline at end of file
Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/resources/webservices.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/resources/webservices.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/test/resources/webservices.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml