Author: bimargulies
Date: Mon Nov 26 08:59:27 2007
New Revision: 598341
URL: http://svn.apache.org/viewvc?rev=598341&view=rev
Log:
Add test case for CXF-1226.
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorld.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorldImpl.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/MissingQualification1226Test.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/beans.xml
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/package-info.java
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorld.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorld.java?rev=598341&view=auto
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorld.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorld.java
Mon Nov 26 08:59:27 2007
@@ -0,0 +1,37 @@
+/**
+ * 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.cxf1226;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
[EMAIL PROTECTED](name = "MyHelloWorldService", targetNamespace =
"http://nstest.helloworld")
[EMAIL PROTECTED](parameterStyle = SOAPBinding.ParameterStyle.WRAPPED,
+ style = SOAPBinding.Style.DOCUMENT,
+ use = SOAPBinding.Use.LITERAL)
+public interface HelloWorld {
+ @WebMethod
+ @WebResult(name = "MyResult", targetNamespace = "http://nstest.helloworld")
+ String sayHi(@WebParam(name = "MyInput", targetNamespace =
"http://nstest.helloworld")
+ String text);
+}
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorldImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorldImpl.java?rev=598341&view=auto
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorldImpl.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/HelloWorldImpl.java
Mon Nov 26 08:59:27 2007
@@ -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.
+ */
+
+package org.apache.cxf.cxf1226;
+
+import javax.jws.WebService;
+
[EMAIL PROTECTED](endpointInterface = "org.apache.cxf.cxf1226.HelloWorld",
+ targetNamespace = "http://nstest.helloworld")
+public class HelloWorldImpl implements HelloWorld {
+ public String sayHi(String text) {
+ return "Hello " + text;
+ }
+}
+
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/MissingQualification1226Test.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/MissingQualification1226Test.java?rev=598341&view=auto
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/MissingQualification1226Test.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/MissingQualification1226Test.java
Mon Nov 26 08:59:27 2007
@@ -0,0 +1,64 @@
+/**
+ * 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.cxf1226;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.test.AbstractCXFSpringTest;
+import org.junit.Test;
+import org.springframework.context.support.GenericApplicationContext;
+
+/**
+ *
+ */
+public class MissingQualification1226Test extends AbstractCXFSpringTest {
+
+ /**
+ * @throws Exception
+ */
+ public MissingQualification1226Test() throws Exception {
+ }
+
+ /** [EMAIL PROTECTED]/
+ @Override
+ protected void additionalSpringConfiguration(GenericApplicationContext
context) throws Exception {
+ }
+
+ @org.junit.Ignore
+ @Test
+ public void lookForMissingNamespace() throws Exception {
+ EndpointImpl endpoint = (EndpointImpl) getBean(EndpointImpl.class,
"helloWorld");
+ Document d = getWSDLDocument(endpoint.getServer());
+ NodeList schemas = assertValid("//xsd:[EMAIL
PROTECTED]'http://nstest.helloworld']", d);
+ Element schemaElement = (Element)schemas.item(0);
+ String ef = schemaElement.getAttribute("elementFormDefault");
+ assertEquals("qualified", ef);
+ }
+
+ /** [EMAIL PROTECTED]/
+ @Override
+ protected String[] getConfigLocations() {
+ return new String[] {"classpath:/org/apache/cxf/cxf1226/beans.xml" };
+ }
+
+}
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/beans.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/beans.xml?rev=598341&view=auto
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/beans.xml
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/beans.xml
Mon Nov 26 08:59:27 2007
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:jaxws="http://cxf.apache.org/jaxws"
+xmlns:cxf="http://cxf.apache.org/core"
+xsi:schemaLocation="
+http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+<import resource="classpath:META-INF/cxf/cxf.xml" />
+<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+ <bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+ <bean id="logOutbound"
class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+ <cxf:bus>
+ <cxf:inInterceptors> <ref bean="logInbound"/> </cxf:inInterceptors>
+ <cxf:outInterceptors> <ref bean="logOutbound"/> </cxf:outInterceptors>
+ <cxf:inFaultInterceptors> <ref bean="logOutbound"/>
</cxf:inFaultInterceptors>
+ </cxf:bus>
+ <jaxws:endpoint id="helloWorld"
implementor="org.apache.cxf.cxf1226.HelloWorldImpl" address="/HelloWorld" />
+</beans>
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/package-info.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/package-info.java?rev=598341&view=auto
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/package-info.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1226/package-info.java
Mon Nov 26 08:59:27 2007
@@ -0,0 +1,22 @@
+/**
+ * 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.
+ */
+
[EMAIL PROTECTED](namespace = "http://nstest.helloworld",
+ elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.apache.cxf.cxf1226;
\ No newline at end of file