Author: jason.greene(a)jboss.com
Date: 2006-11-02 22:23:16 -0500 (Thu, 02 Nov 2006)
New Revision: 1351
Added:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java
branches/JEE5_TCK/src/test/resources/jaxws/anonymous/
branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/
branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml
Modified:
branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml
Log:
Fix JBWS-1322
Modified:
branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
---
branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-11-02
22:08:38 UTC (rev 1350)
+++
branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-11-03
03:23:16 UTC (rev 1351)
@@ -301,9 +301,25 @@
if (xmlType == null)
{
- xmlType = jaxbCtx.getTypeName(new TypeReference(xmlName, javaType));
+ try
+ {
+ xmlType = jaxbCtx.getTypeName(new TypeReference(xmlName, javaType));
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new IllegalStateException("Cannot obtain xml type for:
[xmlName=" + xmlName + ",javaName=" + javaName + "]");
+ }
+
+ /* Anonymous type.
+ *
+ * Currently the design of our stack is based on the
+ * notion of their always being a unique type. In order to lookup the
+ * appropriate (de)serializer you must have a type. So we use a fake
+ * name. This is an illegal NCName, so it shouldn't collide.
+ */
if (xmlType == null)
- throw new IllegalStateException("Cannot obtain xml type for:
[xmlName=" + xmlName + ",javaName=" + javaName + "]");
+ xmlType = new QName(xmlName.getNamespaceURI(), ">" +
xmlName.getLocalPart());
+
paramMetaData.setXmlType(xmlType);
}
Modified: branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml
===================================================================
--- branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml 2006-11-02 22:08:38 UTC (rev
1350)
+++ branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml 2006-11-03 03:23:16 UTC (rev
1351)
@@ -472,6 +472,16 @@
</classes>
</war>
+ <!-- jaxws-anonymous -->
+ <war warfile="${build.test.dir}/libs/jaxws-anonymous.war"
webxml="${build.test.dir}/resources/jaxws/anonymous/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxws/anonymous/Anonymous.class"/>
+ <include
name="org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.class"/>
+ <include
name="org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.class"/>
+ <include
name="org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-wsaddressing-action -->
<war warfile="${build.test.dir}/libs/jaxws-wsaddressing-action-rpc.war"
webxml="${build.test.dir}/resources/jaxws/wsaddressing/action/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java
===================================================================
---
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java 2006-11-02
22:08:38 UTC (rev 1350)
+++
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java 2006-11-03
03:23:16 UTC (rev 1351)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.anonymous;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * Tests anonymous bare types
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+@WebService
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface Anonymous
+{
+ public AnonymousResponse echoAnonymous(AnonymousRequest request);
+}
Property changes on:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/Anonymous.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java
===================================================================
---
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java 2006-11-02
22:08:38 UTC (rev 1350)
+++
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java 2006-11-03
03:23:16 UTC (rev 1351)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.anonymous;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * An endpoint that echos an anonymous type.
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.anonymous.Anonymous")
+public class AnonymousImpl implements Anonymous
+{
+ public AnonymousResponse echoAnonymous(AnonymousRequest request)
+ {
+ AnonymousResponse response = new AnonymousResponse();
+ response.message = request.message;
+
+ return response;
+ }
+}
Property changes on:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java
===================================================================
---
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java 2006-11-02
22:08:38 UTC (rev 1350)
+++
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java 2006-11-03
03:23:16 UTC (rev 1351)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.anonymous;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * An anonymous request
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+@XmlType(name="")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public class AnonymousRequest
+{
+ @XmlElement
+ public String message;
+}
Property changes on:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousRequest.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java
===================================================================
---
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java 2006-11-02
22:08:38 UTC (rev 1350)
+++
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java 2006-11-03
03:23:16 UTC (rev 1351)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.anonymous;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * An anonymous response
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+@XmlType(name="")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+public class AnonymousResponse
+{
+ @XmlElement
+ public String message;
+}
Property changes on:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousResponse.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java
===================================================================
---
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java 2006-11-02
22:08:38 UTC (rev 1350)
+++
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java 2006-11-03
03:23:16 UTC (rev 1351)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.anonymous;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test anonymous bare types.
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class AnonymousTestCase extends JBossWSTest
+{
+ private String targetNS = "http://anonymous.jaxws.ws.test.jboss.org/jaws";
+ private Anonymous proxy;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(AnonymousTestCase.class,
"jaxws-anonymous.war");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ QName serviceName = new QName(targetNS, "AnonymousService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-anonymous/AnonymousService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ proxy = (Anonymous) service.getPort(Anonymous.class);
+ }
+
+
+ public void testEcho() throws Exception
+ {
+ AnonymousRequest req = new AnonymousRequest();
+ req.message = "echo123";
+ assertEquals("echo123", proxy.echoAnonymous(req).message);
+ }
+}
\ No newline at end of file
Property changes on:
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousTestCase.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml
===================================================================
--- branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml 2006-11-02
22:08:38 UTC (rev 1350)
+++ branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml 2006-11-03
03:23:16 UTC (rev 1351)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
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"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>AnonymousService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.anonymous.AnonymousImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AnonymousService</servlet-name>
+ <url-pattern>/AnonymousService</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on: branches/JEE5_TCK/src/test/resources/jaxws/anonymous/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF