Author: jason.greene(a)jboss.com
Date: 2006-10-23 23:38:56 -0400 (Mon, 23 Oct 2006)
New Revision: 1292
Added:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodImpl.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml
Removed:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/DOMWriter.java
branches/jbossws-1.0/src/test/build.xml
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml
Log:
Fix JBWS-1303
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/DOMWriter.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/DOMWriter.java 2006-10-23
22:29:23 UTC (rev 1291)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/DOMWriter.java 2006-10-24
03:38:56 UTC (rev 1292)
@@ -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
+}
Modified: branches/jbossws-1.0/src/test/build.xml
===================================================================
--- branches/jbossws-1.0/src/test/build.xml 2006-10-23 22:29:23 UTC (rev 1291)
+++ branches/jbossws-1.0/src/test/build.xml 2006-10-24 03:38:56 UTC (rev 1292)
@@ -313,7 +313,6 @@
<mkdir dir="${build.test.dir}/wstools/java"/>
<wstools
dest="${build.test.dir}/wstools/resources/jaxrpc/jbws718/WEB-INF"
config="${test.resources.dir}/jaxrpc/jbws718/wstools-config.xml"/>
<!--wstools
dest="${build.test.dir}/wstools/resources/jaxrpc/jbws958/WEB-INF"
config="${test.resources.dir}/jaxrpc/jbws958/wstools-config.xml"/-->
- <wstools
dest="${build.test.dir}/wstools/resources/jaxrpc/jbws1303/WEB-INF"
config="${test.resources.dir}/jaxrpc/jbws1303/wstools-config.xml"/>
<wstools
dest="${build.test.dir}/wstools/resources/jaxrpc/samples/docstyle/bare/WEB-INF"
config="${test.resources.dir}/jaxrpc/samples/docstyle/bare/wstools-config.xml"/>
<wstools
dest="${build.test.dir}/wstools/resources/jaxrpc/samples/docstyle/wrapped/WEB-INF"
config="${test.resources.dir}/jaxrpc/samples/docstyle/wrapped/wstools-config.xml"/>
<wstools
dest="${build.test.dir}/wstools/resources/jaxrpc/samples/dynamichandler/WEB-INF"
config="${test.resources.dir}/jaxrpc/samples/dynamichandler/wstools-config.xml"/>
@@ -337,7 +336,6 @@
<move todir="${build.test.dir}/wstools/java">
<fileset
dir="${build.test.dir}/wstools/resources/jaxrpc/jbws718/WEB-INF"
includes="org/**"/>
- <fileset
dir="${build.test.dir}/wstools/resources/jaxrpc/jbws1303/WEB-INF"
includes="org/**"/>
<fileset
dir="${build.test.dir}/wstools/resources/jaxrpc/samples/docstyle/wrapped/WEB-INF"
includes="org/**"/>
<fileset
dir="${build.test.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF"
includes="org/**"/>
</move>
Deleted:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java
===================================================================
---
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java 2006-10-23
22:29:23 UTC (rev 1291)
+++
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastModImpl.java 2006-10-24
03:38:56 UTC (rev 1292)
@@ -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:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java
===================================================================
---
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java 2006-10-23
22:29:23 UTC (rev 1291)
+++
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java 2006-10-24
03:38:56 UTC (rev 1292)
@@ -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:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastMod_PortType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java
===================================================================
---
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java 2006-10-23
22:29:23 UTC (rev 1291)
+++
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java 2006-10-24
03:38:56 UTC (rev 1292)
@@ -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:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/Lastmod.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodImpl.java
===================================================================
---
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodImpl.java 2006-10-23
22:29:23 UTC (rev 1291)
+++
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodImpl.java 2006-10-24
03:38:56 UTC (rev 1292)
@@ -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:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java
===================================================================
---
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java 2006-10-23
22:29:23 UTC (rev 1291)
+++
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java 2006-10-24
03:38:56 UTC (rev 1292)
@@ -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:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/LastmodResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java
===================================================================
---
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java 2006-10-23
22:29:23 UTC (rev 1291)
+++
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java 2006-10-24
03:38:56 UTC (rev 1292)
@@ -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: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml
===================================================================
---
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml 2006-10-23
22:29:23 UTC (rev 1291)
+++
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml 2006-10-24
03:38:56 UTC (rev 1292)
@@ -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:
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml 2006-10-23
22:29:23 UTC (rev 1291)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1303/WEB-INF/web.xml 2006-10-24
03:38:56 UTC (rev 1292)
@@ -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>