Author: darran.lofthouse(a)jboss.com
Date: 2008-07-14 08:04:02 -0400 (Mon, 14 Jul 2008)
New Revision: 7820
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Id.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/JBWS2250TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Message.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/ObjectFactory.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/web.xml
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Id.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/JBWS2250TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Message.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/ObjectFactory.java
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/web.xml
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/ant-import-tests/build-jars-jaxws.xml
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/main/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java
Log:
[JBPAPP-976] Reference to JAXBElement Causes NullPointerException on deployment.
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/ant-import-tests/build-jars-jaxws.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/ant-import-tests/build-jars-jaxws.xml 2008-07-14
11:40:00 UTC (rev 7819)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/ant-import-tests/build-jars-jaxws.xml 2008-07-14
12:04:02 UTC (rev 7820)
@@ -570,6 +570,17 @@
<include name="*.*"/>
</fileset>
</war>
+
+ <!-- jaxws-jbws2250 -->
+ <war warfile="${tests.output.dir}/libs/jaxws-jbws2250.war"
webxml="${tests.output.dir}/resources/jaxws/jbws2250/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2250/**/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws2250/*TestCase.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/resources/jaxws/jbws2250/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
<!-- jbossws-interop-wsa10.war -->
<war warfile="${tests.output.dir}/libs/jbossws-interop-wsa10.war"
webxml="${tests.output.dir}/resources/interop/wsa/WEB-INF/web.xml">
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/main/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/main/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java 2008-07-14
11:40:00 UTC (rev 7819)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/main/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -21,7 +21,14 @@
*/
package org.jboss.ws.tools.wsdl;
-import com.sun.xml.bind.api.JAXBRIContext;
+import java.io.IOException;
+
+import javax.xml.bind.SchemaOutputResolver;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.dom.DOMResult;
+
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.extensions.security.Util;
@@ -29,12 +36,7 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.Result;
-import javax.xml.transform.dom.DOMResult;
-import java.io.IOException;
+import com.sun.xml.bind.api.JAXBRIContext;
/**
* JAXBWSDLGenerator provides a JAXB based WSDLGenerator.
@@ -69,8 +71,7 @@
final Element element = types.getElement();
final Element throwAway = doc.createElement("throw-away");
- ctx.generateSchema(new SchemaOutputResolver()
- {
+ ctx.generateSchema(new SchemaOutputResolver() {
@Override
public Result createOutput(String namespace, String file) throws IOException
{
@@ -79,8 +80,18 @@
wsdl.registerNamespaceURI(namespace, null);
// JAXB creates an empty namespace due to type references, ignore it
- DOMResult result = new DOMResult((namespace == null || namespace.length()
== 0) ? throwAway : element);
- result.setSystemId("replace-me");
+ DOMResult result = null;
+ if (namespace == null || namespace.length() == 0)
+ {
+ result = new DOMResult(throwAway);
+ result.setSystemId("remove-me");
+ }
+ else
+ {
+ result = new DOMResult(element);
+ result.setSystemId("replace-me");
+ }
+
return result;
}
});
@@ -100,10 +111,16 @@
{
for (Element child = Util.getFirstChildElement(element); child != null; child =
Util.getNextSiblingElement(child))
{
- if ("import".equals(child.getLocalName()) &&
Constants.NS_SCHEMA_XSD.equals(child.getNamespaceURI()) &&
"replace-me".equals(child.getAttribute("schemaLocation")))
+ if ("import".equals(child.getLocalName()) &&
Constants.NS_SCHEMA_XSD.equals(child.getNamespaceURI())
+ &&
"replace-me".equals(child.getAttribute("schemaLocation")))
{
child.removeAttribute("schemaLocation");
}
+ else if ("import".equals(child.getLocalName()) &&
Constants.NS_SCHEMA_XSD.equals(child.getNamespaceURI())
+ &&
"remove-me".equals(child.getAttribute("schemaLocation")))
+ {
+ element.removeChild(child);
+ }
else
{
removeSchemaLocations(child);
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250)
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Endpoint.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Endpoint.java 2008-07-07
12:35:44 UTC (rev 7790)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Endpoint.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws2250;
-
-import javax.jws.WebService;
-
-/**
- * The test service endpoint interface.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 7th July 2008
- */
-@WebService(name = "Endpoint", targetNamespace =
"http://ws.jboss.org/jbws2250")
-public interface Endpoint
-{
-
- public Message echo(Message message);
-
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Endpoint.java
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Endpoint.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Endpoint.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Endpoint.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2250;
+
+import javax.jws.WebService;
+
+/**
+ * The test service endpoint interface.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 7th July 2008
+ */
+@WebService(name = "Endpoint", targetNamespace =
"http://ws.jboss.org/jbws2250")
+public interface Endpoint
+{
+
+ public Message echo(Message message);
+
+}
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/EndpointImpl.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/EndpointImpl.java 2008-07-07
12:35:44 UTC (rev 7790)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/EndpointImpl.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws2250;
-
-import javax.jws.WebService;
-
-/**
- * The test service endpoint implementation.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 7th July 2008
- */
-@WebService(name = "Endpoint", serviceName = "EndpointService",
targetNamespace = "http://ws.jboss.org/jbws2250")
-public class EndpointImpl implements Endpoint
-{
-
- public Message echo(Message message)
- {
- return message;
- }
-
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/EndpointImpl.java
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/EndpointImpl.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/EndpointImpl.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/EndpointImpl.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2250;
+
+import javax.jws.WebService;
+
+/**
+ * The test service endpoint implementation.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 7th July 2008
+ */
+@WebService(name = "Endpoint", serviceName = "EndpointService",
targetNamespace = "http://ws.jboss.org/jbws2250")
+public class EndpointImpl implements Endpoint
+{
+
+ public Message echo(Message message)
+ {
+ return message;
+ }
+
+}
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Id.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Id.java 2008-07-07
12:35:44 UTC (rev 7790)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Id.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws2250;
-
-/**
- * Test type to be marshalled.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 7th July 2008
- */
-public class Id
-{
-
- private String id;
-
- public String getId()
- {
- return id;
- }
-
- public void setId(String id)
- {
- this.id = id;
- }
-
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Id.java
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Id.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Id.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Id.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2250;
+
+/**
+ * Test type to be marshalled.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 7th July 2008
+ */
+public class Id
+{
+
+ private String id;
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+}
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/JBWS2250TestCase.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/JBWS2250TestCase.java 2008-07-07
12:35:44 UTC (rev 7790)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/JBWS2250TestCase.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws2250;
-
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * [JBWS-2250] Test Case.
- *
- * The user of JAXBElement causes a NullPointerException on deployment
- * where JBossWS generates a new WSDL.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 7th July 2008
- */
-public class JBWS2250TestCase extends JBossWSTest
-{
-
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS2250TestCase.class,
"jaxws-jbws2250.war");
- }
-
- public void testPortAccess() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2250?wsdl");
- QName serviceName = new
QName("http://ws.jboss.org/jbws2250",
"EndpointService");
- Service service = Service.create(wsdlURL, serviceName);
- Endpoint port = service.getPort(Endpoint.class);
-
- ObjectFactory of = new ObjectFactory();
- Id id = new Id();
- id.setId("003");
-
- Message message = new Message();
- message.setMessage("Hello");
- message.setMyId(of.createLayoutPerformanceId(id));
-
- Message retMessage = port.echo(message);
- assertEquals(message.getMessage(), retMessage.getMessage());
- assertEquals(id.getId(), retMessage.getMyId().getValue().getId());
- }
-
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/JBWS2250TestCase.java
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/JBWS2250TestCase.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/JBWS2250TestCase.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/JBWS2250TestCase.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2250;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2250] Test Case.
+ *
+ * The user of JAXBElement causes a NullPointerException on deployment
+ * where JBossWS generates a new WSDL.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 7th July 2008
+ */
+public class JBWS2250TestCase extends JBossWSTest
+{
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2250TestCase.class,
"jaxws-jbws2250.war");
+ }
+
+ public void testPortAccess() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2250?wsdl");
+ QName serviceName = new
QName("http://ws.jboss.org/jbws2250",
"EndpointService");
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = service.getPort(Endpoint.class);
+
+ ObjectFactory of = new ObjectFactory();
+ Id id = new Id();
+ id.setId("003");
+
+ Message message = new Message();
+ message.setMessage("Hello");
+ message.setMyId(of.createLayoutPerformanceId(id));
+
+ Message retMessage = port.echo(message);
+ assertEquals(message.getMessage(), retMessage.getMessage());
+ assertEquals(id.getId(), retMessage.getMyId().getValue().getId());
+ }
+
+}
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Message.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Message.java 2008-07-07
12:35:44 UTC (rev 7790)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Message.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws2250;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElementRef;
-
-/**
- * Test type to be marshalled.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 7th July 2008
- */
-(a)XmlAccessorType(XmlAccessType.FIELD)
-public class Message
-{
-
- @XmlElementRef(name = "myId", type = JAXBElement.class)
- protected JAXBElement<Id> myId;
-
- protected String message;
-
- public JAXBElement<Id> getMyId()
- {
- return myId;
- }
-
- public void setMyId(JAXBElement<Id> myId)
- {
- this.myId = myId;
- }
-
- public String getMessage()
- {
- return message;
- }
-
- public void setMessage(String message)
- {
- this.message = message;
- }
-
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Message.java
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Message.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Message.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/Message.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2250;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElementRef;
+
+/**
+ * Test type to be marshalled.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 7th July 2008
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public class Message
+{
+
+ @XmlElementRef(name = "myId", type = JAXBElement.class)
+ protected JAXBElement<Id> myId;
+
+ protected String message;
+
+ public JAXBElement<Id> getMyId()
+ {
+ return myId;
+ }
+
+ public void setMyId(JAXBElement<Id> myId)
+ {
+ this.myId = myId;
+ }
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public void setMessage(String message)
+ {
+ this.message = message;
+ }
+
+}
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/ObjectFactory.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/ObjectFactory.java 2008-07-07
12:35:44 UTC (rev 7790)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/ObjectFactory.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws2250;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-/**
- * The ObjectFactory to instantiate the JAXBElement.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 7th July 2008
- */
-@XmlRegistry
-public class ObjectFactory
-{
-
- private final static QName _MessageId_QNAME = new QName("",
"myId");
-
- @XmlElementDecl(namespace = "", name = "myId")
- public JAXBElement<Id> createLayoutPerformanceId(Id value)
- {
- return new JAXBElement<Id>(_MessageId_QNAME, Id.class, value);
- }
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/ObjectFactory.java
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2250/ObjectFactory.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/ObjectFactory.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/java/org/jboss/test/ws/jaxws/jbws2250/ObjectFactory.java 2008-07-14
12:04:02 UTC (rev 7820)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2250;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+/**
+ * The ObjectFactory to instantiate the JAXBElement.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 7th July 2008
+ */
+@XmlRegistry
+public class ObjectFactory
+{
+
+ private final static QName _MessageId_QNAME = new QName("",
"myId");
+
+ @XmlElementDecl(namespace = "", name = "myId")
+ public JAXBElement<Id> createLayoutPerformanceId(Id value)
+ {
+ return new JAXBElement<Id>(_MessageId_QNAME, Id.class, value);
+ }
+}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2250)
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2250/WEB-INF)
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/jboss-web.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2250/WEB-INF/jboss-web.xml 2008-07-07
12:35:44 UTC (rev 7790)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/jboss-web.xml 2008-07-14
12:04:02 UTC (rev 7820)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
- <!-- Use an explicit context, because the default context in jboss-5.0.0 prepends
the sar name -->
- <context-root>/jaxws-jbws2250</context-root>
-</jboss-web>
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/jboss-web.xml
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2250/WEB-INF/jboss-web.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/jboss-web.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/jboss-web.xml 2008-07-14
12:04:02 UTC (rev 7820)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <!-- Use an explicit context, because the default context in jboss-5.0.0 prepends
the sar name -->
+ <context-root>/jaxws-jbws2250</context-root>
+</jboss-web>
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/web.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2250/WEB-INF/web.xml 2008-07-07
12:35:44 UTC (rev 7790)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/web.xml 2008-07-14
12:04:02 UTC (rev 7820)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <servlet>
- <servlet-name>Endpoint</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxws.jbws2250.EndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Endpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-</web-app>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/web.xml
(from rev 7790,
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws2250/WEB-INF/web.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/web.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_JBPAPP-976/src/test/resources/jaxws/jbws2250/WEB-INF/web.xml 2008-07-14
12:04:02 UTC (rev 7820)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2250.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file