JBossWS SVN: r1516 - in trunk/src/main/java/org/jboss/ws: . deployment integration/jboss50
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-23 02:29:30 -0500 (Thu, 23 Nov 2006)
New Revision: 1516
Removed:
trunk/src/main/java/org/jboss/ws/transport/
Modified:
trunk/src/main/java/org/jboss/ws/WSException.java
trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
Log:
[JBWS-1093] Deploying a war that also contains normal servlets the web.xml is modified as if they are all endpoints
Modified: trunk/src/main/java/org/jboss/ws/WSException.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/WSException.java 2006-11-23 07:08:49 UTC (rev 1515)
+++ trunk/src/main/java/org/jboss/ws/WSException.java 2006-11-23 07:29:30 UTC (rev 1516)
@@ -51,4 +51,12 @@
{
super(cause);
}
+
+ public static void rethrow(String string, Throwable th)
+ {
+ if (th instanceof WSException)
+ throw (WSException)th;
+
+ throw new WSException(string, th);
+ }
}
Modified: trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java 2006-11-23 07:08:49 UTC (rev 1515)
+++ trunk/src/main/java/org/jboss/ws/deployment/AbstractServiceEndpointPublisher.java 2006-11-23 07:29:30 UTC (rev 1516)
@@ -23,9 +23,7 @@
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
-import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
@@ -34,13 +32,14 @@
import java.util.List;
import java.util.Map;
+import javax.servlet.Servlet;
+
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.server.ServerConfig;
-import org.jboss.ws.server.ServerConfigFactory;
import org.jboss.ws.utils.DOMUtils;
import org.jboss.ws.utils.DOMWriter;
import org.jboss.ws.utils.IOUtils;
+import org.jboss.ws.utils.JavaUtils;
import org.w3c.dom.Element;
/**
@@ -98,7 +97,7 @@
throw new WSException("Cannot rename web.xml: " + orgWebXML);
FileInputStream stream = new FileInputStream(orgWebXML);
- return rewriteWebXml(stream, webXML).toURL();
+ return rewriteWebXml(stream, webXML, null).toURL();
}
catch (RuntimeException rte)
{
@@ -110,7 +109,7 @@
}
}
- public File rewriteWebXml(InputStream source, File dest) throws IOException, FileNotFoundException
+ public File rewriteWebXml(InputStream source, File dest, ClassLoader loader) throws Exception
{
if (dest == null)
{
@@ -119,7 +118,7 @@
}
Element root = DOMUtils.parse(source);
- modifyServletConfig(root);
+ modifyServletConfig(root, loader);
FileOutputStream fos = new FileOutputStream(dest);
new DOMWriter(fos).setPrettyprint(true).print(root);
@@ -129,7 +128,7 @@
return dest;
}
- private Map<String, String> modifyServletConfig(Element root)
+ private Map<String, String> modifyServletConfig(Element root, ClassLoader loader) throws ClassNotFoundException
{
Map<String, String> sepTargetMap = new HashMap<String, String>();
@@ -148,6 +147,7 @@
// Get the servlet class
String servletClassName = DOMUtils.getTextContent(classElement);
+ Class servletClass = (loader != null ? loader.loadClass(servletClassName) : null);
String targetBeanName = null;
@@ -155,8 +155,13 @@
if (isAlreadyModified(servletElement) == false)
{
// Check if it is a real servlet that we can ignore
- if (servletClassName.endsWith("Servlet"))
+ if (servletClass != null && JavaUtils.isAssignableFrom(Servlet.class, servletClass))
{
+ log.info("Ignore servlet: " + servletClassName);
+ continue;
+ }
+ else if (servletClassName.endsWith("Servlet"))
+ {
log.info("Ignore <servlet-class> that ends with 'Servlet': " + servletClassName);
continue;
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-11-23 07:08:49 UTC (rev 1515)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-11-23 07:29:30 UTC (rev 1516)
@@ -21,10 +21,10 @@
*/
package org.jboss.ws.integration.jboss50;
+//$Id$
+
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
-import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
@@ -48,9 +48,6 @@
import org.jboss.ws.server.ServerConfigFactory;
import org.jboss.ws.utils.IOUtils;
-//$Id$
-
-
/**
* An abstract deployer for JSE Endpoints
*
@@ -89,11 +86,17 @@
try
{
InputStream stream = unit.getDeploymentContext().getRoot().findChild("WEB-INF/web.xml").openStream();
- return getServiceEndpointPublisher().rewriteWebXml(stream, null).toString();
+ ClassLoader loader = unit.getClassLoader();
+ return getServiceEndpointPublisher().rewriteWebXml(stream, null, loader).toString();
}
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
catch (Exception e)
{
- throw new WSException("Could not generate alternate deployment descriptor", e);
+ WSException.rethrow("Could not generate alternate deployment descriptor", e);
+ return null;
}
}
17 years, 10 months
JBossWS SVN: r1515 - in trunk/src: main/java/javax/jws main/java/javax/xml/ws main/java/org/jboss/ws/metadata/builder/jaxws test/ant test/java/org/jboss/test/ws/jaxws/provider test/resources/jaxws/provider/jaxb/WEB-INF
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-11-23 02:08:49 -0500 (Thu, 23 Nov 2006)
New Revision: 1515
Added:
trunk/src/test/java/org/jboss/test/ws/jaxws/provider/WebServiceEndpoint.java
Removed:
trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ObjectFactory.java
trunk/src/test/java/org/jboss/test/ws/jaxws/provider/package-info.java
Modified:
trunk/src/main/java/javax/jws/WebMethod.java
trunk/src/main/java/javax/xml/ws/Service.java
trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientEndpointMetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/src/test/ant/build-jars-jaxws.xml
trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderBeanJAXB.java
trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/provider/UserType.java
trunk/src/test/resources/jaxws/provider/jaxb/WEB-INF/web.xml
Log:
Fix JBWS-1398
Add missing generics to javax.xml.ws.Service
Add missing annotation attribute to javax.jws.WebMethod
Modified: trunk/src/main/java/javax/jws/WebMethod.java
===================================================================
--- trunk/src/main/java/javax/jws/WebMethod.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/main/java/javax/jws/WebMethod.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -41,6 +41,10 @@
@Target( { ElementType.METHOD })
public @interface WebMethod
{
+ /**
+ * Indicate that a method should not be exposed on the Web Service
+ */
+ boolean exclude() default false;
/**
* Name of the wsdl:operation matching this method. By default the WSDL operation name will be the same
Modified: trunk/src/main/java/javax/xml/ws/Service.java
===================================================================
--- trunk/src/main/java/javax/xml/ws/Service.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/main/java/javax/xml/ws/Service.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -33,26 +33,26 @@
/**
* Service objects provide the client view of a Web service.
- *
+ *
* Service acts as a factory of the following:
- *
+ *
* - Proxies for a target service endpoint.
* - Instances of javax.xml.ws.Dispatch for dynamic message-oriented invocation of a remote operation.
- *
+ *
* The ports available on a service can be enumerated using the getPorts method. Alternatively, you can pass a service endpoint interface to the unary getPort method and let the runtime select a compatible port.
*
* Handler chains for all the objects created by a Service can be set by means of a HandlerResolver.
- *
+ *
* An Executor may be set on the service in order to gain better control over the threads used to dispatch asynchronous callbacks. For instance, thread pooling with certain parameters can be enabled by creating a ThreadPoolExecutor and registering it with the service.
- *
+ *
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
public class Service
{
/**
- * The orientation of a dynamic client or service.
- * MESSAGE provides access to entire protocol message,
+ * The orientation of a dynamic client or service.
+ * MESSAGE provides access to entire protocol message,
* PAYLOAD to protocol message payload only.
*/
public enum Mode
@@ -67,9 +67,9 @@
delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation, serviceName, getClass());
}
- public Object getPort(QName portName, Class serviceEndpointInterface)
+ public <T> T getPort(QName portName, Class<T> serviceEndpointInterface)
{
- Object port = null;
+ T port = null;
try
{
port = delegate.getPort(portName, serviceEndpointInterface);
@@ -81,9 +81,9 @@
return port;
}
- public Object getPort(Class serviceEndpointInterface)
+ public <T> T getPort(Class<T> serviceEndpointInterface)
{
- Object port = null;
+ T port = null;
try
{
port = delegate.getPort(serviceEndpointInterface);
@@ -100,12 +100,12 @@
delegate.addPort(portName, bindingId, endpointAddress);
}
- public Dispatch createDispatch(QName portName, Class type, Mode mode)
+ public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Mode mode)
{
return delegate.createDispatch(portName, type, mode);
}
- public Dispatch createDispatch(QName portName, JAXBContext context, Mode mode)
+ public Dispatch<Object> createDispatch(QName portName, JAXBContext context, Mode mode)
{
return delegate.createDispatch(portName, context, mode);
}
@@ -145,7 +145,7 @@
delegate.setExecutor(executor);
}
- /**
+ /**
* Create a Service instance. The specified WSDL document location and service qualified name must uniquely identify a wsdl:service element.
*/
public static Service create(URL wsdlDocumentLocation, QName serviceName)
Modified: trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientEndpointMetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientEndpointMetaDataBuilder.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientEndpointMetaDataBuilder.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -75,7 +75,7 @@
epMetaData.addHandlers(jaxwsConfig.getHandlers(epMetaData, HandlerType.POST));
// Process @WebMethod
- processWebMethods(epMetaData, wsClass, true);
+ processWebMethods(epMetaData, wsClass);
// Initialize types
createJAXBContext(epMetaData);
Modified: trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -29,6 +29,7 @@
import java.io.Writer;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.MalformedURLException;
@@ -214,8 +215,7 @@
if (wsClass.isAnnotationPresent(BindingType.class))
processBindingType(sepMetaData, wsClass);
- boolean includeAllMethods = (wsClass == seiClass);
- processWebMethods(sepMetaData, wsClass, includeAllMethods);
+ processWebMethods(sepMetaData, wsClass);
// Initialize types
createJAXBContext(sepMetaData);
@@ -399,15 +399,17 @@
// methods other than those inherited from java.lang.Object will be exposed as Web
// Service operations, subject to the inheritance rules specified in Common
// Annotations for the Java Platform [12], section 2.1.
- protected void processWebMethods(EndpointMetaData epMetaData, Class wsClass, boolean includeAllMethods)
+ protected void processWebMethods(EndpointMetaData epMetaData, Class wsClass)
{
epMetaData.clearOperations();
- // Process an @WebMethod annotations
+ // Process @WebMethod annotations
int webMethodCount = 0;
for (Method method : wsClass.getMethods())
{
- if (includeAllMethods || method.isAnnotationPresent(WebMethod.class))
+ WebMethod annotation = method.getAnnotation(WebMethod.class);
+ boolean exclude = annotation != null && annotation.exclude();
+ if (!exclude && (annotation != null || wsClass.isInterface()))
{
processWebMethod(epMetaData, method);
webMethodCount++;
@@ -415,23 +417,22 @@
}
// @WebService should expose all inherited methods if @WebMethod is never specified
- // http://jira.jboss.org/jira/browse/JBWS-754
- if (webMethodCount == 0)
+ if (webMethodCount == 0 && !wsClass.isInterface())
{
- Class auxClass = wsClass;
- while (auxClass != Object.class)
+ for (Method method : wsClass.getMethods())
{
- for (Method method : auxClass.getDeclaredMethods())
+ WebMethod annotation = method.getAnnotation(WebMethod.class);
+ boolean exclude = annotation != null && annotation.exclude();
+ if (!exclude && method.getDeclaringClass() != Object.class)
{
processWebMethod(epMetaData, method);
webMethodCount++;
}
- auxClass = auxClass.getSuperclass();
}
}
if (webMethodCount == 0)
- throw new WSException("At least one @WebMethod annotation is required: " + wsClass.getName());
+ throw new WSException("No exposable methods found");
}
private void processWebMethod(EndpointMetaData epMetaData, Method method)
@@ -1004,4 +1005,4 @@
}
}
}
-}
\ No newline at end of file
+}
Modified: trunk/src/test/ant/build-jars-jaxws.xml
===================================================================
--- trunk/src/test/ant/build-jars-jaxws.xml 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/test/ant/build-jars-jaxws.xml 2006-11-23 07:08:49 UTC (rev 1515)
@@ -320,9 +320,8 @@
<war warfile="${build.tests.dir}/libs/jaxws-provider-jaxb.war" webxml="${build.tests.dir}/resources/jaxws/provider/jaxb/WEB-INF/web.xml">
<classes dir="${build.tests.dir}/classes">
<include name="org/jboss/test/ws/jaxws/provider/ProviderBeanJAXB.class"/>
- <include name="org/jboss/test/ws/jaxws/provider/ObjectFactory.class"/>
+ <include name="org/jboss/test/ws/jaxws/provider/WebServiceEndpoint.class"/>
<include name="org/jboss/test/ws/jaxws/provider/UserType.class"/>
- <include name="org/jboss/test/ws/jaxws/provider/package-info.class"/>
</classes>
<webinf dir="${build.tests.dir}/resources/jaxws/provider/shared">
<include name="wsdl/Provider.wsdl"/>
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ObjectFactory.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ObjectFactory.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ObjectFactory.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -1,60 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.1-b01-fcs
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2006.06.30 at 03:22:46 PM CEST
-//
-
-
-package org.jboss.test.ws.jaxws.provider;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each
- * Java content interface and Java element interface
- * generated in the org.jboss.test.ws.jaxws.provider package.
- * <p>An ObjectFactory allows you to programatically
- * construct new instances of the Java representation
- * for XML content. The Java representation of XML
- * content can consist of schema derived interfaces
- * and classes representing the binding of schema
- * type definitions, element declarations and model
- * groups. Factory methods for each of these are
- * provided in this class.
- *
- */
-@XmlRegistry
-public class ObjectFactory {
-
- private final static QName _User_QNAME = new QName("http://org.jboss.ws/provider", "user");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.provider
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link UserType }
- *
- */
- public UserType createUserType() {
- return new UserType();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link UserType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://org.jboss.ws/provider", name = "user")
- public JAXBElement<UserType> createUser(UserType value) {
- return new JAXBElement<UserType>(_User_QNAME, UserType.class, null, value);
- }
-
-}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderBeanJAXB.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderBeanJAXB.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderBeanJAXB.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -24,7 +24,6 @@
// $Id$
import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
import javax.xml.bind.util.JAXBSource;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
@@ -36,10 +35,13 @@
import org.jboss.logging.Logger;
+import com.sun.xml.bind.api.JAXBRIContext;
+
/**
* Test a Provider<Source> with JAXB
*
* @author Thomas.Diesler(a)jboss.org
+ * @author <a href="jason.greene(a)jboss.com"/>Jason T. Greene</a>
* @since 29-Jun-2006
*/
@WebServiceProvider(
@@ -57,14 +59,12 @@
{
try
{
- JAXBContext jc = JAXBContext.newInstance(UserType.class.getPackage().getName());
- JAXBElement reqElement = (JAXBElement)jc.createUnmarshaller().unmarshal(request);
+ JAXBContext jc = JAXBRIContext.newInstance(new Class[] {UserType.class});
+ UserType user = (UserType)jc.createUnmarshaller().unmarshal(request);
- UserType user = (UserType)reqElement.getValue();
log.info("[string=" + user.getString() + ",qname=" + user.getQname() + "]");
- JAXBElement resElement = new JAXBElement(new QName("http://org.jboss.ws/provider", "user"), UserType.class, user);
- return new JAXBSource(jc, resElement);
+ return new JAXBSource(jc, user);
}
catch (RuntimeException rte)
{
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -24,10 +24,12 @@
// $Id$
import java.io.ByteArrayInputStream;
+import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPConnection;
@@ -35,11 +37,16 @@
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
import javax.xml.transform.dom.DOMSource;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.test.ws.jaxws.jsr181.soapbinding.SubmitBareRequest;
+import org.jboss.test.ws.jaxws.jsr181.soapbinding.SubmitBareResponse;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory;
import org.w3c.dom.Element;
@@ -48,6 +55,7 @@
* Test a Provider<SOAPMessage>
*
* @author Thomas.Diesler(a)jboss.org
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
* @since 29-Jun-2006
*/
public class ProviderJAXBTestCase extends JBossWSTest
@@ -59,12 +67,49 @@
public void testWSDLAccess() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-provider-jaxb?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-provider-jaxb/ProviderEndpoint?wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
assertNotNull(wsdlDefinitions);
}
+ public void testProviderDispatch() throws Exception
+ {
+ Dispatch<Object> dispatch = createDispatch("ProviderEndpoint");
+
+ UserType user = new UserType();
+ user.setString("Kermit");
+ user.setQname(new QName("TheFrog"));
+ UserType userRes = (UserType)dispatch.invoke(user);
+ assertEquals(user.getString(), userRes.getString());
+ assertEquals(user.getQname(), userRes.getQname());
+ }
+
+ public void testWebServiceDispatch() throws Exception
+ {
+ Dispatch<Object> dispatch = createDispatch("WebServiceEndpoint");
+
+ UserType user = new UserType();
+ user.setString("Kermit");
+ user.setQname(new QName("TheFrog"));
+ UserType userRes = (UserType)dispatch.invoke(user);
+ assertEquals(user.getString(), userRes.getString());
+ assertEquals(user.getQname(), userRes.getQname());
+ }
+
+ private Dispatch<Object> createDispatch(String target) throws MalformedURLException, JAXBException
+ {
+ String targetNS = "http://org.jboss.ws/provider";
+ QName serviceName = new QName(targetNS, "ProviderService");
+ QName portName = new QName(targetNS, "ProviderPort");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-provider-jaxb/" + target + "?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ JAXBContext jbc = JAXBContext.newInstance(new Class[] { UserType.class });
+ Dispatch<Object> dispatch = service.createDispatch(portName, jbc, Mode.PAYLOAD);
+ return dispatch;
+ }
+
public void testProviderMessage() throws Exception
{
String reqString =
@@ -72,8 +117,8 @@
" <env:Header/>" +
" <env:Body>" +
" <ns1:user xmlns:ns1='http://org.jboss.ws/provider'>" +
- " <ns1:string>Kermit</ns1:string>" +
- " <ns1:qname>The Frog</ns1:qname>" +
+ " <string>Kermit</string>" +
+ " <qname>The Frog</qname>" +
" </ns1:user>" +
" </env:Body>" +
"</env:Envelope>";
@@ -82,16 +127,15 @@
SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(reqString.getBytes()));
- URL epURL = new URL("http://" + getServerHost() + ":8080/jaxws-provider-jaxb");
+ URL epURL = new URL("http://" + getServerHost() + ":8080/jaxws-provider-jaxb/ProviderEndpoint");
SOAPMessage resMsg = con.call(reqMsg, epURL);
SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();
Element child = (Element)resEnv.getBody().getChildElements().next();
- JAXBContext jc = JAXBContext.newInstance(UserType.class.getPackage().getName());
- JAXBElement jaxbEl = (JAXBElement)jc.createUnmarshaller().unmarshal(new DOMSource(child));
- UserType user = (UserType)jaxbEl.getValue();
+ JAXBContext jc = JAXBContext.newInstance(new Class[]{UserType.class});
+ UserType user = (UserType)jc.createUnmarshaller().unmarshal(new DOMSource(child));
assertEquals("Kermit", user.getString());
assertEquals(new QName("The Frog"), user.getQname());
}
-}
+}
\ No newline at end of file
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/provider/UserType.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/provider/UserType.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/provider/UserType.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -1,10 +1,24 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.1-b01-fcs
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2006.06.30 at 03:22:46 PM CEST
-//
-
+/*
+ * 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.provider;
import javax.xml.bind.annotation.XmlAccessType;
@@ -16,9 +30,9 @@
/**
* <p>Java class for UserType complex type.
- *
+ *
* <p>The following schema fragment specifies the expected content contained within this class.
- *
+ *
* <pre>
* <complexType name="UserType">
* <complexContent>
@@ -31,9 +45,10 @@
* </complexContent>
* </complexType>
* </pre>
- *
- *
+ *
+ *
*/
+@XmlRootElement(namespace = "http://org.jboss.ws/provider", name = "user")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UserType", propOrder = { "string", "qname" })
public class UserType
@@ -46,11 +61,11 @@
/**
* Gets the value of the string property.
- *
+ *
* @return
* possible object is
* {@link String }
- *
+ *
*/
public String getString()
{
@@ -59,11 +74,11 @@
/**
* Sets the value of the string property.
- *
+ *
* @param value
* allowed object is
* {@link String }
- *
+ *
*/
public void setString(String value)
{
@@ -72,11 +87,11 @@
/**
* Gets the value of the qname property.
- *
+ *
* @return
* possible object is
* {@link QName }
- *
+ *
*/
public QName getQname()
{
@@ -85,11 +100,11 @@
/**
* Sets the value of the qname property.
- *
+ *
* @param value
* allowed object is
* {@link QName }
- *
+ *
*/
public void setQname(QName value)
{
Added: trunk/src/test/java/org/jboss/test/ws/jaxws/provider/WebServiceEndpoint.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/provider/WebServiceEndpoint.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/provider/WebServiceEndpoint.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -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.provider;
+
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+
+@WebService(
+ serviceName = "ProviderService",
+ portName = "ProviderPort",
+ targetNamespace = "http://org.jboss.ws/provider",
+ wsdlLocation = "WEB-INF/wsdl/Provider.wsdl")
+@SOAPBinding(parameterStyle = ParameterStyle.BARE)
+public class WebServiceEndpoint
+{
+ @WebResult(name="user")
+ public UserType echo(@WebParam(name="user")UserType type)
+ {
+ return type;
+ }
+}
\ No newline at end of file
Property changes on: trunk/src/test/java/org/jboss/test/ws/jaxws/provider/WebServiceEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxws/provider/package-info.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/provider/package-info.java 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/provider/package-info.java 2006-11-23 07:08:49 UTC (rev 1515)
@@ -1,9 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.1-b01-fcs
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2006.06.30 at 03:22:46 PM CEST
-//
-
-(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://org.jboss.ws/provider", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.jboss.test.ws.jaxws.provider;
Modified: trunk/src/test/resources/jaxws/provider/jaxb/WEB-INF/web.xml
===================================================================
--- trunk/src/test/resources/jaxws/provider/jaxb/WEB-INF/web.xml 2006-11-23 07:06:55 UTC (rev 1514)
+++ trunk/src/test/resources/jaxws/provider/jaxb/WEB-INF/web.xml 2006-11-23 07:08:49 UTC (rev 1515)
@@ -6,12 +6,20 @@
version="2.4">
<servlet>
- <servlet-name>TestEndpoint</servlet-name>
+ <servlet-name>ProviderEndpoint</servlet-name>
<servlet-class>org.jboss.test.ws.jaxws.provider.ProviderBeanJAXB</servlet-class>
</servlet>
+ <servlet>
+ <servlet-name>WebServiceEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.provider.WebServiceEndpoint</servlet-class>
+ </servlet>
<servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
- <url-pattern>/*</url-pattern>
+ <servlet-name>ProviderEndpoint</servlet-name>
+ <url-pattern>/ProviderEndpoint</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>WebServiceEndpoint</servlet-name>
+ <url-pattern>/WebServiceEndpoint</url-pattern>
+ </servlet-mapping>
</web-app>
17 years, 10 months
JBossWS SVN: r1514 - trunk/src/main/java/org/jboss/ws/utils
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-11-23 02:06:55 -0500 (Thu, 23 Nov 2006)
New Revision: 1514
Modified:
trunk/src/main/java/org/jboss/ws/utils/DOMWriter.java
Log:
Merge fix for JBWS-1311
Modified: trunk/src/main/java/org/jboss/ws/utils/DOMWriter.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/utils/DOMWriter.java 2006-11-23 06:59:39 UTC (rev 1513)
+++ trunk/src/main/java/org/jboss/ws/utils/DOMWriter.java 2006-11-23 07:06:55 UTC (rev 1514)
@@ -72,6 +72,7 @@
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import org.jboss.logging.Logger;
/**
* Traverse a DOM tree in order to print a document that is parsed.
@@ -82,6 +83,7 @@
*/
public class DOMWriter
{
+ private static Logger log = Logger.getLogger(DOMWriter.class);
// Print writer
private PrintWriter out;
// True, if canonical output
@@ -291,13 +293,19 @@
{
String nsURI = getNamespaceURI(atPrefix, element, rootNode);
nsMap.put(atPrefix, nsURI);
-
// xsi:type='ns1:SubType', xsi:type='xsd:string'
- if (atName.equals(atPrefix + ":type") && nsURI.equals("http://www.w3.org/2001/XMLSchema-instance") && atValue.indexOf(":") > 0)
+ if (atName.equals(atPrefix + ":type") && atValue.indexOf(":") > 0)
{
- String typePrefix = atValue.substring(0, atValue.indexOf(":"));
- String typeURI = getNamespaceURI(typePrefix, element, rootNode);
- nsMap.put(typePrefix, typeURI);
+ // xsi defined on the envelope
+ if (nsURI == null)
+ nsURI = getNamespaceURI(atPrefix, element, null);
+
+ if ("http://www.w3.org/2001/XMLSchema-instance".equals(nsURI))
+ {
+ String typePrefix = atValue.substring(0, atValue.indexOf(":"));
+ String typeURI = getNamespaceURI(typePrefix, element, rootNode);
+ nsMap.put(typePrefix, typeURI);
+ }
}
}
@@ -576,4 +584,4 @@
}
return (str.toString());
}
-}
\ No newline at end of file
+}
17 years, 10 months
JBossWS SVN: r1513 - trunk/src/test
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-11-23 01:59:39 -0500 (Thu, 23 Nov 2006)
New Revision: 1513
Modified:
trunk/src/test/build.xml
Log:
Fix doc bare sample
Modified: trunk/src/test/build.xml
===================================================================
--- trunk/src/test/build.xml 2006-11-23 06:23:52 UTC (rev 1512)
+++ trunk/src/test/build.xml 2006-11-23 06:59:39 UTC (rev 1513)
@@ -286,6 +286,7 @@
<mkdir dir="${build.tests.dir}/wstools/java"/>
<wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/jbws718/WEB-INF" config="${test.resources.dir}/jaxrpc/jbws718/wstools-config.xml"/>
<wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/samples/docstyle/wrapped/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/docstyle/wrapped/wstools-config.xml"/>
+ <wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/samples/docstyle/bare/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/docstyle/bare/wstools-config.xml"/>
<wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/samples/dynamichandler/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/dynamichandler/wstools-config.xml"/>
<wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/samples/exception/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/exception/wstools-config.xml"/>
<wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/samples/handler/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/handler/wstools-config.xml"/>
17 years, 10 months
JBossWS SVN: r1512 - in trunk/src/test: . java/org/jboss/test/ws/jaxrpc/jbws1303 resources/jaxrpc/jbws1303 resources/jaxrpc/jbws1303/WEB-INF
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-11-23 01:23:52 -0500 (Thu, 23 Nov 2006)
New Revision: 1512
Added:
trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java
trunk/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml
Removed:
trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java
trunk/src/test/resources/jaxrpc/jbws1303/wstools-config.xml
Modified:
trunk/src/test/build.xml
trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/JBWS1303TestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java
trunk/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml
Log:
Merge JBWS-1311
Fix JBWS-1303 test case
Modified: trunk/src/test/build.xml
===================================================================
--- trunk/src/test/build.xml 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/build.xml 2006-11-23 06:23:52 UTC (rev 1512)
@@ -226,7 +226,6 @@
<src path="${test.java.dir}"/>
<exclude name="org/jboss/test/ws/interop/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/jbws718/**"/>
- <exclude name="org/jboss/test/ws/jaxrpc/jbws1303/**"/>
<classpath refid="javac.classpath"/>
</javac>
</target>
@@ -286,8 +285,6 @@
</taskdef>
<mkdir dir="${build.tests.dir}/wstools/java"/>
<wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/jbws718/WEB-INF" config="${test.resources.dir}/jaxrpc/jbws718/wstools-config.xml"/>
- <wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/jbws1303/WEB-INF" config="${test.resources.dir}/jaxrpc/jbws1303/wstools-config.xml"/>
- <wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/samples/docstyle/bare/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/docstyle/bare/wstools-config.xml"/>
<wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/samples/docstyle/wrapped/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/docstyle/wrapped/wstools-config.xml"/>
<wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/samples/dynamichandler/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/dynamichandler/wstools-config.xml"/>
<wstools dest="${build.tests.dir}/wstools/resources/jaxrpc/samples/exception/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/exception/wstools-config.xml"/>
@@ -309,7 +306,6 @@
<wstools dest="${build.tests.dir}/wstools/resources/jaxws/samples/wsaddressing/META-INF" config="${test.resources.dir}/jaxws/samples/wsaddressing/wstools-config.xml"/>
<move todir="${build.tests.dir}/wstools/java">
<fileset dir="${build.tests.dir}/wstools/resources/jaxrpc/jbws718/WEB-INF" includes="org/**"/>
- <fileset dir="${build.tests.dir}/wstools/resources/jaxrpc/jbws1303/WEB-INF" includes="org/**"/>
<fileset dir="${build.tests.dir}/wstools/resources/jaxrpc/samples/docstyle/wrapped/WEB-INF" includes="org/**"/>
</move>
</target>
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/JBWS1303TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/JBWS1303TestCase.java 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/JBWS1303TestCase.java 2006-11-23 06:23:52 UTC (rev 1512)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxrpc.jbws1303;
-// $Id:JBWS1303TestCase.java 1490 2006-11-21 19:27:40Z thomas.diesler(a)jboss.com $
+// $Id$
import javax.naming.InitialContext;
import javax.xml.rpc.Service;
Deleted: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java 2006-11-23 06:23:52 UTC (rev 1512)
@@ -1,39 +0,0 @@
-/*
- * 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.jaxrpc.jbws1303;
-
-import java.rmi.RemoteException;
-
-import org.jboss.logging.Logger;
-
-public class LastModImpl implements LastMod_PortType
-{
- // Provide logging
- private static Logger log = Logger.getLogger(LastModImpl.class);
-
- public LastmodResponse lastmod(Lastmod lastmod) throws RemoteException
- {
- String req = lastmod.getLastmodRequest();
- log.info("lastmod: " + req);
- return new LastmodResponse(req);
- }
-}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java 2006-11-23 06:23:52 UTC (rev 1512)
@@ -0,0 +1,15 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Sun Oct 22 20:21:32 CDT 2006
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1303;
+public interface LastMod_PortType extends java.rmi.Remote
+{
+
+ public org.jboss.test.ws.jaxrpc.jbws1303.LastmodResponse lastmod(org.jboss.test.ws.jaxrpc.jbws1303.Lastmod lastmod) throws java.rmi.RemoteException;
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java 2006-11-23 06:23:52 UTC (rev 1512)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Sun Oct 22 20:21:32 CDT 2006
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jaxrpc.jbws1303;
+
+
+public class Lastmod
+{
+
+protected java.lang.String lastmodRequest;
+public Lastmod(){}
+
+public Lastmod(java.lang.String lastmodRequest){
+this.lastmodRequest=lastmodRequest;
+}
+public java.lang.String getLastmodRequest() { return lastmodRequest ;}
+
+public void setLastmodRequest(java.lang.String lastmodRequest){ this.lastmodRequest = lastmodRequest; }
+
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodImpl.java 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodImpl.java 2006-11-23 06:23:52 UTC (rev 1512)
@@ -0,0 +1,39 @@
+/*
+ * 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.jaxrpc.jbws1303;
+
+import java.rmi.RemoteException;
+
+import org.jboss.logging.Logger;
+
+public class LastmodImpl implements LastMod_PortType
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(LastmodImpl.class);
+
+ public LastmodResponse lastmod(Lastmod lastmod) throws RemoteException
+ {
+ String req = lastmod.getLastmodRequest();
+ log.info("lastmod: " + req);
+ return new LastmodResponse(req);
+ }
+}
Added: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java 2006-11-23 06:23:52 UTC (rev 1512)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Sun Oct 22 20:21:32 CDT 2006
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jaxrpc.jbws1303;
+
+
+public class LastmodResponse
+{
+
+protected java.lang.String timeChanged;
+public LastmodResponse(){}
+
+public LastmodResponse(java.lang.String timeChanged){
+this.timeChanged=timeChanged;
+}
+public java.lang.String getTimeChanged() { return timeChanged ;}
+
+public void setTimeChanged(java.lang.String timeChanged){ this.timeChanged=timeChanged; }
+
+}
Property changes on: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java 2006-11-23 06:23:52 UTC (rev 1512)
@@ -40,11 +40,13 @@
}
/**
- * <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ * <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'
+ * xmlns:xsi='http://www.w3c.org/2001/XMLSchema-instance'
+ & xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
* <env:Header/>
* <env:Body>
* <lastmodResponse xmlns='http://netid.msu.edu:8080/lastmod.pl'>
- * <TimeChanged xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='xsd:string'>yesterday</TimeChanged>
+ * <TimeChanged xsi:type='xsd:string'>yesterday</TimeChanged>
* </lastmodResponse>
* </env:Body>
* </env:Envelope>
@@ -56,10 +58,10 @@
SOAPMessage soapMessage = MessageFactory.newInstance().createMessage();
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
soapEnvelope.addNamespaceDeclaration(Constants.PREFIX_XSD, Constants.NS_SCHEMA_XSD);
+ soapEnvelope.addNamespaceDeclaration(Constants.PREFIX_XSI, Constants.NS_SCHEMA_XSI);
SOAPElement bodyElement = soapMessage.getSOAPBody().addChildElement("lastmodResponse");
bodyElement.setAttribute("xmlns", "http://netid.msu.edu:8080/lastmod.pl");
SOAPElement soapElement = bodyElement.addChildElement("TimeChanged");
- soapElement.addNamespaceDeclaration(Constants.PREFIX_XSI, Constants.NS_SCHEMA_XSI);
soapElement.setAttribute("xsi:type", "xsd:string");
soapElement.setValue("yesterday");
((SOAPMessageContext)msgContext).setMessage(soapMessage);
Added: trunk/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml 2006-11-23 06:23:52 UTC (rev 1512)
@@ -0,0 +1,55 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1303</package-type>
+ <namespaceURI>http://netid.msu.edu:8080/lastmod.pl</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.jbws1303.Lastmod</java-type>
+ <anonymous-type-qname xmlns:typeNS='http://netid.msu.edu:8080/lastmod.pl'>typeNS:>lastmod</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>lastmodRequest</java-variable-name>
+ <xml-element-name>lastmodRequest</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.jbws1303.LastmodResponse</java-type>
+ <anonymous-type-qname xmlns:typeNS='http://netid.msu.edu:8080/lastmod.pl'>typeNS:>lastmodResponse</anonymous-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>timeChanged</java-variable-name>
+ <xml-element-name>TimeChanged</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxrpc.jbws1303.LastMod</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://netid.msu.edu:8080/lastmod.pl'>serviceNS:LastMod</wsdl-service-name>
+ <port-mapping>
+ <port-name>LastModPort</port-name>
+ <java-port-name>LastModPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1303.LastMod_PortType</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://netid.msu.edu:8080/lastmod.pl'>portTypeNS:LastModPortType</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://netid.msu.edu:8080/lastmod.pl'>bindingNS:LastModBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>lastmod</java-method-name>
+ <wsdl-operation>lastmod</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.test.ws.jaxrpc.jbws1303.Lastmod</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://netid.msu.edu:8080/lastmod.pl'>wsdlMsgNS:lastmodInput</wsdl-message>
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.test.ws.jaxrpc.jbws1303.LastmodResponse</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://netid.msu.edu:8080/lastmod.pl'>wsdlMsgNS:lastmodOutput</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
Property changes on: trunk/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml 2006-11-23 06:23:52 UTC (rev 1512)
@@ -7,7 +7,7 @@
<servlet>
<servlet-name>LastMod</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxrpc.jbws1303.LastModImpl</servlet-class>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1303.LastmodImpl</servlet-class>
</servlet>
<servlet-mapping>
Deleted: trunk/src/test/resources/jaxrpc/jbws1303/wstools-config.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/jbws1303/wstools-config.xml 2006-11-23 05:43:20 UTC (rev 1511)
+++ trunk/src/test/resources/jaxrpc/jbws1303/wstools-config.xml 2006-11-23 06:23:52 UTC (rev 1512)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wstools -config wstools-config.xml
--->
-
-<configuration xmlns="http://www.jboss.org/jbossws-tools"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.org/jbossws-tools
- http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
-
- <global>
- <package-namespace package="org.jboss.test.ws.jaxrpc.jbws1303" namespace="http://netid.msu.edu:8080/lastmod.pl"/>
- </global>
-
- <wsdl-java location="resources/jaxrpc/jbws1303/WEB-INF/wsdl/lastmodified.wsdl" parameter-style="bare">
- <mapping file="jaxrpc-mapping.xml" />
- </wsdl-java>
-
-</configuration>
17 years, 10 months
JBossWS SVN: r1511 - in trunk: . src/test
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-11-23 00:43:20 -0500 (Thu, 23 Nov 2006)
New Revision: 1511
Modified:
trunk/build.xml
trunk/src/test/build.xml
Log:
Fix encoding
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2006-11-22 22:22:35 UTC (rev 1510)
+++ trunk/build.xml 2006-11-23 05:43:20 UTC (rev 1511)
@@ -134,7 +134,7 @@
<!-- Compile core java sources -->
<target name="compile-interfaces" depends="init">
<mkdir dir="${build.classes14.dir}"/>
- <javac srcdir="${src.java.dir}" destdir="${build.classes14.dir}" debug="${javac.debug}" verbose="${javac.verbose}"
+ <javac srcdir="${src.java.dir}" destdir="${build.classes14.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}" source="1.4" target="1.4">
<include name="javax/xml/rpc/**"/>
<include name="javax/xml/soap/**"/>
@@ -145,7 +145,7 @@
<!-- Compile core java sources -->
<target name="compile-core" depends="compile-interfaces">
<mkdir dir="${build.classes.dir}"/>
- <javac srcdir="${src.java.dir}" sourcepath="" destdir="${build.classes.dir}" debug="${javac.debug}" verbose="${javac.verbose}"
+ <javac srcdir="${src.java.dir}" sourcepath="" destdir="${build.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
<include name="javax/xml/ws/**"/>
<include name="javax/jws/**"/>
@@ -159,7 +159,7 @@
<!-- Compile interation java sources -->
<target name="compile-integration" depends="compile-core">
<mkdir dir="${build.classes.dir}"/>
- <javac srcdir="${src.java.dir}" sourcepath="" destdir="${build.classes.dir}" debug="${javac.debug}" verbose="${javac.verbose}"
+ <javac srcdir="${src.java.dir}" sourcepath="" destdir="${build.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
<include name="org/jboss/ws/integration/**"/>
<classpath path="${build.classes14.dir}"/>
Modified: trunk/src/test/build.xml
===================================================================
--- trunk/src/test/build.xml 2006-11-22 22:22:35 UTC (rev 1510)
+++ trunk/src/test/build.xml 2006-11-23 05:43:20 UTC (rev 1511)
@@ -210,7 +210,7 @@
<target name="compile14" depends="init" unless="HAVE_JDK_1.5">
<mkdir dir="${build.tests.dir}/classes"/>
- <javac destdir="${build.tests.dir}/classes" debug="${javac.debug}" verbose="${javac.verbose}" deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
+ <javac destdir="${build.tests.dir}/classes" debug="${javac.debug}" encoding="utf-8" verbose="${javac.verbose}" deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
<src path="${test.java.dir}"/>
<exclude name="org/jboss/test/ws/interop/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/jbws718/**"/>
@@ -222,7 +222,7 @@
<target name="compile15" depends="init" if="HAVE_JDK_1.5">
<mkdir dir="${build.tests.dir}/classes"/>
- <javac destdir="${build.tests.dir}/classes" debug="${javac.debug}" verbose="${javac.verbose}" deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
+ <javac destdir="${build.tests.dir}/classes" debug="${javac.debug}" encoding="utf-8" verbose="${javac.verbose}" deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
<src path="${test.java.dir}"/>
<exclude name="org/jboss/test/ws/interop/**"/>
<exclude name="org/jboss/test/ws/jaxrpc/jbws718/**"/>
@@ -233,7 +233,7 @@
<target name="compile-generated" depends="init" description="Compile generated sources">
<mkdir dir="${build.tests.dir}/classes"/>
- <javac destdir="${build.tests.dir}/classes" debug="${javac.debug}" verbose="${javac.verbose}" deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
+ <javac destdir="${build.tests.dir}/classes" debug="${javac.debug}" encoding="utf-8" verbose="${javac.verbose}" deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
<src path="${build.tests.dir}/wstools/java"/>
<exclude name="org/jboss/test/ws/interop/**"/>
<classpath refid="javac.classpath"/>
17 years, 10 months
JBossWS SVN: r1510 - in trunk: . src/ant src/main/java/org/jboss/ws/tools src/main/java/org/jboss/ws/tools/helpers src/main/java/org/jboss/ws/tools/mapping src/test/java/org/jboss/test/ws/tools src/test/java/org/jboss/test/ws/tools/jbws1079 src/test/resources/tools src/test/resources/tools/jbws1079
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-22 17:22:35 -0500 (Wed, 22 Nov 2006)
New Revision: 1510
Added:
trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/
trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java
trunk/src/test/resources/tools/jbws1079/
trunk/src/test/resources/tools/jbws1079/Anonymous.wsdl
trunk/src/test/resources/tools/jbws1079/TelephoneNumber.java
trunk/src/test/resources/tools/jbws1079/TelephoneNumberNumber.java
trunk/src/test/resources/tools/jbws1079/anonymous-mapping.xml
trunk/src/test/resources/tools/jbws1079/wstools-config.xml
Removed:
trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java
trunk/src/test/resources/tools/jbws1079/Anonymous.wsdl
trunk/src/test/resources/tools/jbws1079/TelephoneNumber.java
trunk/src/test/resources/tools/jbws1079/TelephoneNumberNumber.java
trunk/src/test/resources/tools/jbws1079/anonymous-mapping.xml
trunk/src/test/resources/tools/jbws1079/wstools-config.xml
Modified:
trunk/ant.properties.example
trunk/build.xml
trunk/src/ant/build-release.xml
trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java
trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java
Log:
[JBWS-1079] Bring name of class in jax-rpc mapping in synch with the name of the generated class.
Modified: trunk/ant.properties.example
===================================================================
--- trunk/ant.properties.example 2006-11-22 22:03:44 UTC (rev 1509)
+++ trunk/ant.properties.example 2006-11-22 22:22:35 UTC (rev 1510)
@@ -5,9 +5,6 @@
# Required JBoss Home
#jboss.jdk15.home=/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2
-# Optional JBoss Home
-#jboss.jdk14.home=/home/tdiesler/svn/jbossas/tags/JBoss_4_0_4_GA/build/output/jboss-4.0.4.GA
-
# The JBoss server instance
jboss.server.instance=default
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2006-11-22 22:03:44 UTC (rev 1509)
+++ trunk/build.xml 2006-11-22 22:22:35 UTC (rev 1510)
@@ -67,7 +67,6 @@
<target name="prepare">
<echo message="jboss.jdk15.home = ${jboss.jdk15.home}"/>
- <echo message="jboss.jdk14.home = ${jboss.jdk14.home}"/>
<echo message="tomcat.home = ${tomcat.home}"/>
<echo/>
Modified: trunk/src/ant/build-release.xml
===================================================================
--- trunk/src/ant/build-release.xml 2006-11-22 22:03:44 UTC (rev 1509)
+++ trunk/src/ant/build-release.xml 2006-11-22 22:22:35 UTC (rev 1510)
@@ -35,7 +35,7 @@
</target>
<!-- Release to jboss.local.repository -->
- <target name="release-to-repository" depends="module-jars,module-jars14" description="Release to jboss.local.repository">
+ <target name="release-to-repository" depends="module-jars" description="Release to jboss.local.repository">
<!-- jbossws -->
<property name="jbossws.dir" value="${jboss.local.repository}/jboss/jbossws/${repository.id}"/>
@@ -56,27 +56,6 @@
<filtersfile file="version.properties"/>
</filterset>
</copy>
-
- <!-- jbossws14 -->
- <property name="jbossws14.dir" value="${jboss.local.repository}/jboss/jbossws14/${repository.id}"/>
- <mkdir dir="${jbossws14.dir}/lib"/>
- <copy todir="${jbossws14.dir}/lib" overwrite="true">
- <fileset dir="${build.lib.dir}">
- <include name="jbossws14.sar"/>
- <include name="jbossws14-client.jar"/>
- <include name="jbossws14-jboss-integration.jar"/>
- <include name="jbossws14-tomcat-integration.jar"/>
- <include name="jboss-jaxws14.jar"/>
- <include name="jboss-jaxrpc.jar"/>
- <include name="jboss-saaj.jar"/>
- </fileset>
- </copy>
- <copy tofile="${jbossws14.dir}/component-info.xml" file="${src.etc.dir}/jbossws14-component-info.xml" filtering="true" overwrite="true">
- <filterset>
- <filtersfile file="version.properties"/>
- </filterset>
- </copy>
-
</target>
<!-- Release to portal content -->
@@ -118,7 +97,7 @@
<!-- Build the bin dist -->
<target name="build-bin-dist" description="Build the binary distribution"
- depends="main,module-jars14,jbossws-thirdparty-jar,build-samples,build-docs">
+ depends="main,jbossws-thirdparty-jar,build-samples,build-docs">
<mkdir dir="${build.bin.dist}"/>
<mkdir dir="${build.bin.dist}/bin"/>
@@ -159,11 +138,6 @@
<fileset dir="${build.lib.dir}" includes="jbossws-client.jar,jbossws.sar"/>
</copy>
- <!-- lib/jdk1.4 -->
- <copy todir="${build.bin.dist}/lib/jboss-jdk1.4" overwrite="true">
- <fileset dir="${build.lib.dir}" includes="jbossws14-client.jar,jbossws14.sar"/>
- </copy>
-
<!-- lib/tomcat -->
<copy todir="${build.bin.dist}/lib/tomcat/common/endorsed" overwrite="true">
<fileset dir="${thirdparty.dir}">
Modified: trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java 2006-11-22 22:03:44 UTC (rev 1509)
+++ trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java 2006-11-22 22:22:35 UTC (rev 1510)
@@ -53,7 +53,6 @@
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
import org.jboss.ws.utils.JavaUtils;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
/** Class that converts a XSD Type into Java class
* @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
Modified: trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2006-11-22 22:03:44 UTC (rev 1509)
+++ trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2006-11-22 22:22:35 UTC (rev 1510)
@@ -91,7 +91,6 @@
private WSDLDefinitions wsdlDefinitions = null;
private String serviceName = null;
private String packageName = null;
-
private Set<String> registeredTypes = new HashSet<String>();
private LiteralTypeMapping typeMapping = null;
@@ -101,8 +100,7 @@
private String parameterStyle;
- public MappingFileGeneratorHelper(WSDLDefinitions wsdl, String sname,
- String pname, Class seiClass, String tns,LiteralTypeMapping ltm, String parameterStyle)
+ public MappingFileGeneratorHelper(WSDLDefinitions wsdl, String sname, String pname, Class seiClass, String tns, LiteralTypeMapping ltm, String paramStyle)
{
this.wsdlDefinitions = wsdl;
this.serviceName = sname;
@@ -110,7 +108,7 @@
this.typeMapping = ltm;
this.wsdlStyle = utils.getWSDLStyle(wsdl);
- this.parameterStyle = parameterStyle;
+ this.parameterStyle = paramStyle;
checkEssentials();
}
@@ -344,12 +342,12 @@
if (isDocStyle())
{
XSTypeDefinition xt = getXSType( input );
- addJavaXMLTypeMap(xt, input.getElement().getLocalPart(), jwm, false);
+ addJavaXMLTypeMap(xt, input.getElement().getLocalPart(), "", jwm, false);
}
else
{
for (WSDLRPCPart part : input.getChildParts())
- addJavaXMLTypeMap(getXSType(part.getType()), "", jwm, true);
+ addJavaXMLTypeMap(getXSType(part.getType()), "", "", jwm, true);
}
}
@@ -358,12 +356,12 @@
if (isDocStyle())
{
XSTypeDefinition xt = getXSType( output );
- addJavaXMLTypeMap(xt, output.getElement().getLocalPart(), jwm, false);
+ addJavaXMLTypeMap(xt, output.getElement().getLocalPart(), "", jwm, false);
}
else
{
for (WSDLRPCPart part : output.getChildParts())
- addJavaXMLTypeMap(getXSType(part.getType()), "", jwm, true);
+ addJavaXMLTypeMap(getXSType(part.getType()), "", "", jwm, true);
}
}
@@ -375,7 +373,7 @@
WSDLTypes types = wsdlDefinitions.getWsdlTypes();
JBossXSModel xsmodel = WSDLUtils.getSchemaModel(types);
XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(),xmlType.getNamespaceURI());
- addJavaXMLTypeMap(xt, xmlName.getLocalPart(), jwm, true);
+ addJavaXMLTypeMap(xt, xmlName.getLocalPart(), "", jwm, true);
ExceptionMapping exceptionMapping = new ExceptionMapping(jwm);
exceptionMapping.setExceptionType(getJavaTypeAsString(null, xmlType, false, true));
@@ -518,7 +516,7 @@
return xsmodel.getTypeDefinition(xmlType.getLocalPart(),xmlType.getNamespaceURI());
}
- private void addJavaXMLTypeMap(XSTypeDefinition xt, String containingElement, JavaWsdlMapping jwm, boolean skipWrapperArray)
+ private void addJavaXMLTypeMap(XSTypeDefinition xt,String name, String containingElement, JavaWsdlMapping jwm, boolean skipWrapperArray)
{
JavaXmlTypeMapping jxtm = null;
@@ -538,7 +536,7 @@
}
}
- if (! (skipWrapperArray && isRepresentsArray(xt)))
+ if ((skipWrapperArray && isRepresentsArray(xt)) == false)
{
jxtm = new JavaXmlTypeMapping(jwm);
String javaType;
@@ -547,8 +545,8 @@
// Anonymous
if (localName == null)
{
- javaType = getJavaTypeAsString(null, new QName(containingElement), false, true);
- localName = ">" + containingElement;
+ javaType = getJavaTypeAsString(null, new QName(containingElement + name), false, true);
+ localName = ">" + name;
jxtm.setAnonymousTypeQName(new QName(xt.getNamespace(), localName, "typeNS"));
}
else
@@ -576,7 +574,7 @@
XSSimpleTypeDefinition simple = xc.getSimpleType();
if (simple != null)
{
- addJavaXMLTypeMap(simple, xc.getName(), jwm, skipWrapperArray);
+ addJavaXMLTypeMap(simple, xc.getName(), "", jwm, skipWrapperArray);
}
// Add attributes
@@ -622,7 +620,7 @@
XSAttributeUse obj = (XSAttributeUse)attributes.item(i);
XSAttributeDeclaration att = obj.getAttrDeclaration();
XSSimpleTypeDefinition simple = att.getTypeDefinition();
- addJavaXMLTypeMap(simple, "none", jxtm.getJavaWsdlMapping(), true);
+ addJavaXMLTypeMap(simple, "none", "", jxtm.getJavaWsdlMapping(), true);
VariableMapping vm = new VariableMapping(jxtm);
String name = att.getName();
vm.setXmlAttributeName(name);
@@ -647,7 +645,7 @@
{
XSElementDeclaration xe = (XSElementDeclaration)xsterm;
XSTypeDefinition typeDefinition = xe.getTypeDefinition();
- addJavaXMLTypeMap(typeDefinition, xe.getName(), jwm, true);
+ addJavaXMLTypeMap(typeDefinition, xe.getName(), xe.getEnclosingCTDefinition().getName(), jwm, true);
}
}
}
Modified: trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-11-22 22:03:44 UTC (rev 1509)
+++ trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-11-22 22:22:35 UTC (rev 1510)
@@ -311,8 +311,7 @@
MappingFileGenerator mgf = new MappingFileGenerator(wsdl, new LiteralTypeMapping());
mgf.setPackageName(getPackageName(wsdl, glc));
mgf.setServiceName(wsdl.getServices()[0].getName().toString());
- mgf.setParameterStyle(w2jc.parameterStyle);
- //mgf.generate();
+ mgf.setParameterStyle(w2jc.parameterStyle);
JavaWsdlMapping jwm = mgf.generate();
Writer writer = IOUtils.getCharsetFileWriter(new File(outDir + "/" + w2jc.mappingFileName), Constants.DEFAULT_XML_CHARSET);
Modified: trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java 2006-11-22 22:03:44 UTC (rev 1509)
+++ trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java 2006-11-22 22:22:35 UTC (rev 1510)
@@ -219,9 +219,7 @@
MethodParamPartsMapping[] mppmarr = mm.getMethodParamPartsMappings();
int lenmppmarr = mppmarr != null ? mppmarr.length : 0;
for (int j = 0; j < lenmppmarr; j++)
- {
- MethodParamPartsMapping mppm = mppmarr[j];
- String paramType = mppm.getParamType();
+ {
listInputs.addAll(xst.getVARList((XSComplexTypeDefinition)xsmodel.getTypeDefinition(opname, typeNamespace), xsmodel, false));
}
JavaWriter jw = new JavaWriter();
Copied: trunk/src/test/java/org/jboss/test/ws/tools/jbws1079 (from rev 1452, branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1079)
Deleted: trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java 2006-11-16 22:50:57 UTC (rev 1452)
+++ trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java 2006-11-22 22:22:35 UTC (rev 1510)
@@ -1,65 +0,0 @@
-/*
- * 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.tools.jbws1079;
-
-import java.io.File;
-import java.io.FileInputStream;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.tools.WSTools;
-import org.jboss.ws.utils.DOMUtils;
-import org.w3c.dom.Element;
-
-/**
- *
- * @author darran.lofthouse(a)jboss.com
- * @since Nov 5, 2006
- */
-public class JBWS1079TestCase extends JBossWSTest
-{
-
- public void testAnonymousType() throws Exception
- {
- String resourceDir = "resources/tools/jbws1079";
- String toolsDir = "tools/jbws1079";
- String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
- new WSTools().generate(args);
-
- Element exp = DOMUtils.parse(new FileInputStream(resourceDir + "/anonymous-mapping.xml"));
- Element was = DOMUtils.parse(new FileInputStream(toolsDir + "/anonymous-mapping.xml"));
- assertEquals(exp, was);
-
- compareSource(resourceDir + "/TelephoneNumber.java", toolsDir + "/org/jboss/test/ws/jbws1079/TelephoneNumber.java");
- compareSource(resourceDir + "/TelephoneNumberNumber.java", toolsDir + "/org/jboss/test/ws/jbws1079/TelephoneNumberNumber.java");
- }
-
- private static void compareSource(final String expectedName, final String generatedName) throws Exception
- {
- File expected = new File(expectedName);
- File generated = new File(generatedName);
-
- JBossSourceComparator sc = new JBossSourceComparator(expected, generated);
- sc.validate();
- sc.validateImports();
- }
-}
Copied: trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java (from rev 1452, branches/jbossws-1.0/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java)
Copied: trunk/src/test/resources/tools/jbws1079 (from rev 1452, branches/jbossws-1.0/src/test/resources/tools/jbws1079)
Deleted: trunk/src/test/resources/tools/jbws1079/Anonymous.wsdl
===================================================================
--- branches/jbossws-1.0/src/test/resources/tools/jbws1079/Anonymous.wsdl 2006-11-16 22:50:57 UTC (rev 1452)
+++ trunk/src/test/resources/tools/jbws1079/Anonymous.wsdl 2006-11-22 22:22:35 UTC (rev 1510)
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='PhoneBook' targetNamespace='http://test.jboss.org/ws/jbws1079' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://test.jboss.org/ws/jbws1079/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://test.jboss.org/ws/jbws1079' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types>
- <schema targetNamespace='http://test.jboss.org/ws/jbws1079/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://test.jboss.org/ws/jbws1079/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
- <complexType name='Person'>
- <sequence>
- <element name='firstName' nillable='true' type='string'/>
- <element name='surname' nillable='true' type='string'/>
- </sequence>
- </complexType>
- <complexType name='TelephoneNumber'>
- <sequence>
- <element name='Number'>
- <complexType>
- <sequence>
- <element name='areaCode' nillable='true' type='string'/>
- <element name='number' nillable='true' type='string'/>
- </sequence>
- </complexType>
- </element>
- </sequence>
- </complexType>
- <element name='lookup' type='tns:Person'/>
- <element name='lookupResponse' type='tns:TelephoneNumber'/>
- </schema>
- </types>
- <message name='PhoneBook_lookup'>
- <part element='ns1:lookup' name='parameters'/>
- </message>
- <message name='PhoneBook_lookupResponse'>
- <part element='ns1:lookupResponse' name='result'/>
- </message>
- <portType name='PhoneBook'>
- <operation name='lookup'>
- <input message='tns:PhoneBook_lookup'/>
- <output message='tns:PhoneBook_lookupResponse'/>
- </operation>
- </portType>
- <binding name='PhoneBookBinding' type='tns:PhoneBook'>
- <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='lookup'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body use='literal'/>
- </input>
- <output>
- <soap:body use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='PhoneBook'>
- <port binding='tns:PhoneBookBinding' name='PhoneBookPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: trunk/src/test/resources/tools/jbws1079/Anonymous.wsdl (from rev 1452, branches/jbossws-1.0/src/test/resources/tools/jbws1079/Anonymous.wsdl)
Deleted: trunk/src/test/resources/tools/jbws1079/TelephoneNumber.java
===================================================================
--- branches/jbossws-1.0/src/test/resources/tools/jbws1079/TelephoneNumber.java 2006-11-16 22:50:57 UTC (rev 1452)
+++ trunk/src/test/resources/tools/jbws1079/TelephoneNumber.java 2006-11-22 22:22:35 UTC (rev 1510)
@@ -1,27 +0,0 @@
-/*
- * JBossWS WS-Tools Generated Source
- *
- * Generation Date: Sun Nov 05 12:21:27 CET 2006
- *
- * This generated source code represents a derivative work of the input to
- * the generator that produced it. Consult the input for the copyright and
- * terms of use that apply to this source code.
- */
-
-package org.jboss.test.ws.jbws1079;
-
-
-public class TelephoneNumber
-{
-
-protected org.jboss.test.ws.jbws1079.TelephoneNumberNumber number;
-public TelephoneNumber(){}
-
-public TelephoneNumber(org.jboss.test.ws.jbws1079.TelephoneNumberNumber number){
-this.number=number;
-}
-public org.jboss.test.ws.jbws1079.TelephoneNumberNumber getNumber() { return number ;}
-
-public void setNumber(org.jboss.test.ws.jbws1079.TelephoneNumberNumber number){ this.number=number; }
-
-}
Copied: trunk/src/test/resources/tools/jbws1079/TelephoneNumber.java (from rev 1452, branches/jbossws-1.0/src/test/resources/tools/jbws1079/TelephoneNumber.java)
Deleted: trunk/src/test/resources/tools/jbws1079/TelephoneNumberNumber.java
===================================================================
--- branches/jbossws-1.0/src/test/resources/tools/jbws1079/TelephoneNumberNumber.java 2006-11-16 22:50:57 UTC (rev 1452)
+++ trunk/src/test/resources/tools/jbws1079/TelephoneNumberNumber.java 2006-11-22 22:22:35 UTC (rev 1510)
@@ -1,34 +0,0 @@
-/*
- * JBossWS WS-Tools Generated Source
- *
- * Generation Date: Sun Nov 05 12:21:27 CET 2006
- *
- * This generated source code represents a derivative work of the input to
- * the generator that produced it. Consult the input for the copyright and
- * terms of use that apply to this source code.
- */
-
-package org.jboss.test.ws.jbws1079;
-
-
-public class TelephoneNumberNumber
-{
-
-protected java.lang.String areaCode;
-
-protected java.lang.String number;
-public TelephoneNumberNumber(){}
-
-public TelephoneNumberNumber(java.lang.String areaCode, java.lang.String number){
-this.areaCode=areaCode;
-this.number=number;
-}
-public java.lang.String getAreaCode() { return areaCode ;}
-
-public void setAreaCode(java.lang.String areaCode){ this.areaCode=areaCode; }
-
-public java.lang.String getNumber() { return number ;}
-
-public void setNumber(java.lang.String number){ this.number=number; }
-
-}
Copied: trunk/src/test/resources/tools/jbws1079/TelephoneNumberNumber.java (from rev 1452, branches/jbossws-1.0/src/test/resources/tools/jbws1079/TelephoneNumberNumber.java)
Deleted: trunk/src/test/resources/tools/jbws1079/anonymous-mapping.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/tools/jbws1079/anonymous-mapping.xml 2006-11-16 22:50:57 UTC (rev 1452)
+++ trunk/src/test/resources/tools/jbws1079/anonymous-mapping.xml 2006-11-22 22:22:35 UTC (rev 1510)
@@ -1,72 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' 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://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
- <package-mapping>
- <package-type>org.jboss.test.ws.jbws1079</package-type>
- <namespaceURI>http://test.jboss.org/ws/jbws1079</namespaceURI>
- </package-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.jbws1079.Person</java-type>
- <root-type-qname xmlns:typeNS='http://test.jboss.org/ws/jbws1079/types'>typeNS:Person</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>firstName</java-variable-name>
- <xml-element-name>firstName</xml-element-name>
- </variable-mapping>
- <variable-mapping>
- <java-variable-name>surname</java-variable-name>
- <xml-element-name>surname</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.jbws1079.TelephoneNumber</java-type>
- <root-type-qname xmlns:typeNS='http://test.jboss.org/ws/jbws1079/types'>typeNS:TelephoneNumber</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>number</java-variable-name>
- <xml-element-name>Number</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.jbws1079.TelephoneNumberNumber</java-type>
- <anonymous-type-qname xmlns:typeNS='http://test.jboss.org/ws/jbws1079/types'>typeNS:>Number</anonymous-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>areaCode</java-variable-name>
- <xml-element-name>areaCode</xml-element-name>
- </variable-mapping>
- <variable-mapping>
- <java-variable-name>number</java-variable-name>
- <xml-element-name>number</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.jbws1079.PhoneBook_Service</service-interface>
- <wsdl-service-name xmlns:serviceNS='http://test.jboss.org/ws/jbws1079'>serviceNS:PhoneBook</wsdl-service-name>
- <port-mapping>
- <port-name>PhoneBookPort</port-name>
- <java-port-name>PhoneBookPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.jbws1079.PhoneBook_PortType</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS='http://test.jboss.org/ws/jbws1079'>portTypeNS:PhoneBook</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS='http://test.jboss.org/ws/jbws1079'>bindingNS:PhoneBookBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>lookup</java-method-name>
- <wsdl-operation>lookup</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>org.jboss.test.ws.jbws1079.Person</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS='http://test.jboss.org/ws/jbws1079'>wsdlMsgNS:PhoneBook_lookup</wsdl-message>
- <wsdl-message-part-name>parameters</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>org.jboss.test.ws.jbws1079.TelephoneNumber</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS='http://test.jboss.org/ws/jbws1079'>wsdlMsgNS:PhoneBook_lookupResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Copied: trunk/src/test/resources/tools/jbws1079/anonymous-mapping.xml (from rev 1452, branches/jbossws-1.0/src/test/resources/tools/jbws1079/anonymous-mapping.xml)
Deleted: trunk/src/test/resources/tools/jbws1079/wstools-config.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/tools/jbws1079/wstools-config.xml 2006-11-16 22:50:57 UTC (rev 1452)
+++ trunk/src/test/resources/tools/jbws1079/wstools-config.xml 2006-11-22 22:22:35 UTC (rev 1510)
@@ -1,5 +0,0 @@
-<configuration>
- <wsdl-java location="resources/tools/jbws1079/Anonymous.wsdl" parameter-style="bare">
- <mapping file="anonymous-mapping.xml"/>
- </wsdl-java>
-</configuration>
Copied: trunk/src/test/resources/tools/jbws1079/wstools-config.xml (from rev 1452, branches/jbossws-1.0/src/test/resources/tools/jbws1079/wstools-config.xml)
17 years, 10 months
JBossWS SVN: r1509 - trunk/src/main/java/org/jboss/ws/soap/attachment
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-22 17:03:44 -0500 (Wed, 22 Nov 2006)
New Revision: 1509
Modified:
trunk/src/main/java/org/jboss/ws/soap/attachment/ImageDataContentHandler.java
Log:
[JBWS-1284] Gracefully handle invalid ImageIO mime types.
Modified: trunk/src/main/java/org/jboss/ws/soap/attachment/ImageDataContentHandler.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/soap/attachment/ImageDataContentHandler.java 2006-11-22 22:00:49 UTC (rev 1508)
+++ trunk/src/main/java/org/jboss/ws/soap/attachment/ImageDataContentHandler.java 2006-11-22 22:03:44 UTC (rev 1509)
@@ -30,6 +30,7 @@
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;
+import java.util.ArrayList;
import java.util.Iterator;
import javax.activation.ActivationDataFlavor;
@@ -39,6 +40,8 @@
import javax.imageio.ImageWriter;
import javax.imageio.stream.ImageOutputStream;
+import org.jboss.logging.Logger;
+
/**
* <code>ImageDataContentHandler</code> is a JAF content handler that handles
* marshalling/unmarshalling between <code>Image</code> objects and a stream.
@@ -53,9 +56,13 @@
* an exception will be thrown indicating the lack of encoding support.
*
* @author <a href="mailto:jason@stacksmash.com">Jason T. Greene</a>
+ * @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
*/
public class ImageDataContentHandler extends Component implements DataContentHandler
{
+ // provide logging
+ private static Logger log = Logger.getLogger(ImageDataContentHandler.class);
+
private static DataFlavor[] flavors;
static
@@ -71,11 +78,28 @@
String[] mimeTypes = ImageIO.getReaderMIMETypes();
if (mimeTypes == null)
return;
- flavors = new DataFlavor[mimeTypes.length];
+ ArrayList flavs = new ArrayList ();
+ DataFlavor flavor;
+ //flavors = new DataFlavor[mimeTypes.length];
for (int i = 0; i < mimeTypes.length; i++)
{
- flavors[i] = new ActivationDataFlavor(Image.class, mimeTypes[i], "Image");
+ try
+ {
+ flavor = new ActivationDataFlavor(Image.class, mimeTypes[i], "Image");
+ flavs.add(flavor);
+ }
+ catch (IllegalArgumentException iae)
+ {
+ //This mime type is not supported
+ log.warn("Unsupported MIME Type '" + mimeTypes[i] +"'");
+ }
}
+ int size = flavs.size();
+ flavors = new DataFlavor[size];
+ for (int i = 0; i < size; i++)
+ {
+ flavors[i] = (ActivationDataFlavor)flavs.get(i);
+ }
}
private static ImageWriter getImageWriter(String mimeType) {
17 years, 10 months
JBossWS SVN: r1508 - trunk
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-22 17:00:49 -0500 (Wed, 22 Nov 2006)
New Revision: 1508
Modified:
trunk/ant.properties.example
Log:
Automate release steps
Modified: trunk/ant.properties.example
===================================================================
--- trunk/ant.properties.example 2006-11-22 21:59:26 UTC (rev 1507)
+++ trunk/ant.properties.example 2006-11-22 22:00:49 UTC (rev 1508)
@@ -12,18 +12,22 @@
jboss.server.instance=default
# Tomcat Home
-#tomcat.home=/usr/java/tomcat
-#tomcat.manager.username=manager
-#tomcat.manager.password=manager
+tomcat.home=/usr/java/tomcat
+tomcat.manager.username=manager
+tomcat.manager.password=manager
# The target server the test endpoints are deployed to
# This can be [jboss|tomcat]
jbossws.target.server=jboss
# JBoss Repository
-jboss.local.repository=/home/tdiesler/cvs/jboss.local.repository
+#jboss.repository=file:/home/tdiesler/cvs/jboss.local.repository
jboss.repository=http://repository.jboss.com
+# JBossWS Release
+jbossws.portal.content=/home/tdiesler/svn/jbossws/portal-content
+jboss.local.repository=/home/tdiesler/cvs/jboss.local.repository
+
# Force thirdparty HTTP get
#force.thirdparty.get=true
17 years, 10 months
JBossWS SVN: r1507 - in trunk: . src/ant src/main/resources/samples src/main/resources/samples/common
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-22 16:59:26 -0500 (Wed, 22 Nov 2006)
New Revision: 1507
Added:
trunk/src/ant/build-release.xml
trunk/src/main/resources/samples/common/build-thirdparty.xml
trunk/src/main/resources/samples/version.properties
Modified:
trunk/build.xml
Log:
Add release instructions
Automate release steps
Samples use thirdparty get
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2006-11-22 21:19:18 UTC (rev 1506)
+++ trunk/build.xml 2006-11-22 21:59:26 UTC (rev 1507)
@@ -15,6 +15,7 @@
<import file="${basedir}/src/ant/build-thirdparty.xml"/>
<import file="${basedir}/src/ant/build-samples.xml"/>
+ <import file="${basedir}/src/ant/build-release.xml"/>
<!-- ================================================================== -->
<!-- Setup -->
@@ -65,13 +66,17 @@
<target name="prepare">
- <echo message="jboss.home = ${jboss.home}"/>
+ <echo message="jboss.jdk15.home = ${jboss.jdk15.home}"/>
+ <echo message="jboss.jdk14.home = ${jboss.jdk14.home}"/>
<echo message="tomcat.home = ${tomcat.home}"/>
<echo/>
- <available property="jboss.source.dist.available" file="${jboss.thirdparty}" type="dir"/>
+ <available property="jbossws.portal.content.available" file="${jbossws.portal.content}" type="dir"/>
<available property="jboss.ejb3.available" file="${jboss.client}/jboss-ejb3-client.jar"/>
<available property="jbossws.thirdparty.available" file="${build.lib.dir}/jbossws-thirdparty.jar"/>
+ <available property="jboss.source.dist.available" file="${jboss.thirdparty}" type="dir"/>
+ <available property="tomcat.available" file="${tomcat.home}/server/lib/catalina.jar"/>
+ <available property="jboss.available" file="${jboss.client}/jboss-client.jar"/>
<checksum file="version.properties" fileext=".md5" verifyproperty="checksum.ok"/>
<checksum file="version.properties" fileext=".md5"/>
@@ -431,40 +436,14 @@
<delete dir="${build.lib.dir}/build"/>
</target>
- <!-- ================================================================== -->
- <!-- Release -->
- <!-- ================================================================== -->
-
- <!-- Deploy jbossws to the server specified like this: -Dserver=default -->
- <target name="release" depends="all" description="Release to jboss.local.repository">
-
- <property name="jbossws.dir" value="${jboss.local.repository}/jboss/jbossws/${repository.id}"/>
- <mkdir dir="${jbossws.dir}/lib"/>
- <copy todir="${jbossws.dir}/lib" overwrite="true">
- <fileset dir="${build.lib.dir}">
- <include name="jbossws.sar"/>
- <include name="jbossws-client.jar"/>
- <include name="jboss-jaxrpc.jar"/>
- <include name="jboss-jaxws.jar"/>
- <include name="jboss-saaj.jar"/>
- </fileset>
- </copy>
- <copy tofile="${jbossws.dir}/component-info.xml" file="${src.etc.dir}/jbossws-component-info.xml" filtering="true" overwrite="true">
- <filterset>
- <filtersfile file="version.properties"/>
- </filterset>
- </copy>
- </target>
-
- <!-- ================================================================== -->
- <!-- Misc. -->
- <!-- ================================================================== -->
-
- <!-- Clean up all build output -->
<target name="clean" depends="prepare" description="Cleans up most generated files.">
<delete dir="${build.dir}"/>
</target>
+ <target name="build-docs" description="Build the documentation">
+ <ant antfile="${docs.userguide.dir}/build.xml" dir="${docs.userguide.dir}" target="all.doc"/>
+ </target>
+
<target name="main" description="Executes the default target (most)." depends="most"/>
<target name="most" description="Builds almost everything." depends="jars"/>
@@ -472,96 +451,5 @@
<target name="all" description="Create a distribution zip file"
depends="build-bin-dist,build-src-dist">
</target>
-
- <!-- Build the documentation -->
- <target name="build-docs" description="Build the documentation">
- <ant antfile="${docs.userguide.dir}/build.xml" dir="${docs.userguide.dir}" target="all.doc"/>
- </target>
-
- <!-- Build the bin dist -->
- <target name="build-bin-dist" description="Build the binary distribution"
- depends="main,jbossws-thirdparty-jar,build-samples,build-docs">
-
- <mkdir dir="${build.bin.dist}"/>
- <mkdir dir="${build.bin.dist}/bin"/>
- <mkdir dir="${build.bin.dist}/samples"/>
- <mkdir dir="${build.bin.dist}/docs/html"/>
- <mkdir dir="${build.bin.dist}/lib/jboss-jdk1.5"/>
- <mkdir dir="${build.bin.dist}/lib/jboss-jdk1.4"/>
- <mkdir dir="${build.bin.dist}/lib/tomcat/common/endorsed"/>
- <mkdir dir="${build.bin.dist}/lib/tomcat/common/lib"/>
- <mkdir dir="${build.bin.dist}/lib/tomcat/webapps"/>
-
- <copy todir="${build.bin.dist}" file="${src.etc.dir}/JBossORG-EULA.txt" overwrite="true"/>
- <copy todir="${build.bin.dist}" filtering="true" overwrite="true">
- <fileset dir="${src.dist.dir}"/>
- <filterset>
- <filtersfile file="version.properties"/>
- </filterset>
- </copy>
- <copy todir="${build.bin.dist}/bin">
- <fileset dir="${src.etc.dir}">
- <include name="wstools.bat"/>
- <include name="wstools.sh"/>
- </fileset>
- </copy>
- <!-- samples -->
- <copy todir="${build.bin.dist}" file="${build.dir}/${samples.target}.zip" overwrite="true"/>
-
- <!-- documentation -->
- <copy todir="${build.bin.dist}/docs/html" overwrite="true">
- <fileset dir="${docs.userguide.dir}/build/en/html"/>
- </copy>
- <copy todir="${build.bin.dist}/docs" overwrite="true">
- <fileset dir="${docs.userguide.dir}/build/en/pdf"/>
- </copy>
-
- <!-- lib/jdk1.5 -->
- <copy todir="${build.bin.dist}/lib/jboss-jdk1.5" overwrite="true">
- <fileset dir="${build.lib.dir}" includes="jbossws-client.jar,jbossws.sar"/>
- </copy>
-
- <!-- lib/tomcat -->
- <copy todir="${build.bin.dist}/lib/tomcat/common/endorsed" overwrite="true">
- <fileset dir="${thirdparty.dir}">
- <include name="serializer.jar"/>
- <include name="xalan.jar"/>
- <include name="xercesImpl.jar"/>
- </fileset>
- </copy>
- <copy todir="${build.bin.dist}/lib/tomcat/common/lib" overwrite="true">
- <fileset dir="${thirdparty.dir}">
- <include name="activation.jar"/>
- <include name="log4j.jar"/>
- <include name="mailapi.jar"/>
- </fileset>
- <fileset dir="${build.lib.dir}">
- <include name="jbossws-core.jar"/>
- <include name="jbossws-tomcat-integration.jar"/>
- <include name="jbossws-thirdparty.jar"/>
- </fileset>
- </copy>
- <copy todir="${build.bin.dist}/lib/tomcat/webapps" overwrite="true">
- <fileset dir="${build.lib.dir}" includes="jbossws.war"/>
- </copy>
-
- <zip destfile="${build.dir}/jbossws-${version.id}.zip" basedir="${build.bin.dist}"/>
- </target>
-
- <!-- Build the src dist -->
- <target name="build-src-dist" description="Build the source distribution">
- <mkdir dir="${build.src.dist}/jbossws-${version.id}-src"/>
- <copy todir="${build.src.dist}/jbossws-${version.id}-src">
- <fileset dir="${basedir}">
- <include name="ant.properties.example"/>
- <include name="version.properties"/>
- <include name="build.xml"/>
- <include name="src/**"/>
- </fileset>
- </copy>
- <zip destfile="${build.dir}/jbossws-${version.id}-src.zip" basedir="${build.src.dist}"
- includes="jbossws-${version.id}/**"/>
- </target>
-
</project>
Copied: trunk/src/ant/build-release.xml (from rev 1442, branches/jbossws-1.0/src/ant/build-release.xml)
Copied: trunk/src/main/resources/samples/common/build-thirdparty.xml (from rev 1442, branches/jbossws-1.0/src/main/resources/samples/common/build-thirdparty.xml)
Copied: trunk/src/main/resources/samples/version.properties (from rev 1442, branches/jbossws-1.0/src/main/resources/samples/version.properties)
17 years, 10 months