Author: thomas.diesler(a)jboss.com
Date: 2007-03-28 06:11:05 -0400 (Wed, 28 Mar 2007)
New Revision: 2702
Added:
trunk/build/etc/component-info/jbossws-jboss40.xml
trunk/build/etc/component-info/jbossws-jboss42.xml
trunk/build/etc/component-info/jbossws-jboss50.xml
trunk/build/etc/component-info/jbossws.xml
trunk/build/etc/component-info/jbossws14.xml
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java
trunk/jbossws-core/src/resources/schema/soap-encoding_200206.xsd
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/MimeHeaderHandler.java
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/application-client.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/jboss-client.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/jaxrpc-mapping.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/web.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/webservices.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/MarshallTestService.wsdl
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/config.xml
Removed:
trunk/build/etc/component-info/integration-jboss50.xml
trunk/build/etc/component-info/jbossws-core.xml
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.java
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/application-client.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/jboss-client.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/jaxrpc-mapping.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/web.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/webservices.xml
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/MarshallTestService.wsdl
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/config.xml
Modified:
trunk/build/ant-import/build-deploy.xml
trunk/build/ant-import/build-hudson.xml
trunk/build/ant-import/build-release.xml
trunk/build/ant-import/build-samples.xml
trunk/build/ant-import/build-thirdparty.xml
trunk/build/hudson/hudson-home/config.xml
trunk/build/version.properties
trunk/integration-jboss40/build.xml
trunk/jbossws-core/src/java/javax/xml/soap/MimeHeaders.java
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
trunk/jbossws-core/src/java/org/jboss/ws/core/EndpointInvocation.java
trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/EndpointContext.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/ObjectContent.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentElement.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
trunk/jbossws-core/src/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/wsdl/WSDLBindingOperation.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java
trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
trunk/jbossws-core/src/resources/samples/ant-import/build-thirdparty.xml
trunk/jbossws-core/src/resources/samples/ant.properties.example
trunk/jbossws-core/src/resources/samples/build.xml
trunk/jbossws-core/src/resources/samples/version.properties
trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws801/JBWS801TestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/samples/handler/ClientSideHandler.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/TestEndpointImpl.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java
trunk/jbossws-tests/src/resources/jaxrpc/samples/secureejb/META-INF/jboss.xml
trunk/jbossws-tests/src/resources/tests-jboss40-excludes.txt
trunk/jbossws-tests/src/resources/tests-jboss40-noejb3-excludes.txt
trunk/jbossws-tests/src/resources/tests-jboss42-excludes.txt
trunk/jbossws-tests/src/resources/tests-jboss42-noejb3-excludes.txt
trunk/jbossws-tests/src/resources/tests-jboss50-excludes.txt
trunk/jbossws-tests/src/resources/tests-tomcat-excludes.txt
Log:
svn merge -r2655:2700
https://svn.jboss.org/repos/jbossws/branches/jbossws-1.2.1
[JBWS-1515] Regression: Set-Cookie MIME headers not available anymore
Fix soap Array compXMLType detection
Implement href handling by inlining id elements
Fix recursive expand to DOMValid->XMLValid->DOMValid transitions
Add support for operation namespace defined on wsdl biniding
Allow encodingStyle on envelope
Determine service-ref type without loading the SI
exclude jaxws/serviceref for as40, as42
Fix missing soap-env:encodingStyle
Modified: trunk/build/ant-import/build-deploy.xml
===================================================================
--- trunk/build/ant-import/build-deploy.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/build/ant-import/build-deploy.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -16,7 +16,7 @@
<target name="prepare">
<property file="ant.properties"/>
- <property name="etc.dir" value="install/etc"/>
+ <property name="build.etc.dir" value="install/etc"/>
<property name="core.output.lib.dir"
value="install/jbossws-core"/>
<property name="jboss40.output.lib.dir"
value="install/integration-jboss40"/>
<property name="jboss42.output.lib.dir"
value="install/integration-jboss42"/>
Modified: trunk/build/ant-import/build-hudson.xml
===================================================================
--- trunk/build/ant-import/build-hudson.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/build/ant-import/build-hudson.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -80,30 +80,7 @@
<!-- Configure Hudson -->
<copy todir="${hudson.home}" overwrite="true">
- <fileset dir="${build.dir}/hudson/hudson-home">
- <include name="jobs/AS-5.0/**"/>
- <include name="jobs/AS-4.2/**"/>
- <include name="jobs/AS-4.0/**"/>
- <include name="jobs/AS-4.0.5/**"/>
- <include name="jobs/TC-5.5/**"/>
- <include name="jobs/JBWS-Samples-AS-5.0/**"/>
- <include name="jobs/JBWS-Samples-AS-4.2/**"/>
- <include name="jobs/JBWS-Samples-AS-4.0/**"/>
- <include name="jobs/JBWS-Samples-AS-4.0.5/**"/>
- <include name="jobs/JBWS-Samples-TC-5.5/**"/>
- <include name="jobs/JBWS-Tests-AS-5.0/**"/>
- <include name="jobs/JBWS-Tests-AS-4.2/**"/>
- <include name="jobs/JBWS-Tests-AS-4.0/**"/>
- <include name="jobs/JBWS-Tests-AS-4.0.5/**"/>
- <include name="jobs/JBWS-Tests-TC-5.5/**"/>
- <include name="jobs/JBAS-Tests-AS-5.0/**"/>
- <include name="jobs/JBAS-Tests-AS-4.2/**"/>
- <include name="jobs/JBAS-Tests-AS-4.0/**"/>
- <include name="jobs/Release-Matrix-Step1/**"/>
- <include name="jobs/Release-Matrix-Step2/**"/>
- <include name="users/**"/>
- <include name="*.xml"/>
- </fileset>
+ <fileset dir="${build.dir}/hudson/hudson-home"/>
<filterset>
<filter token="version.id" value="${version.id}"/>
<filter token="svn.basedir.local"
value="${svn.basedir.local}"/>
Modified: trunk/build/ant-import/build-release.xml
===================================================================
--- trunk/build/ant-import/build-release.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/build/ant-import/build-release.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -45,11 +45,6 @@
<!-- jboss/jbossws -->
<property name="jboss.repository.dir"
value="${jboss.local.repository}/jboss"/>
<mkdir dir="${jboss.repository.dir}/jbossws/${repository.id}/lib"/>
- <mkdir
dir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib"/>
- <delete>
- <fileset
dir="${jboss.repository.dir}/jbossws/${repository.id}/lib"/>
- <fileset
dir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib"/>
- </delete>
<copy todir="${jboss.repository.dir}/jbossws/${repository.id}/lib"
overwrite="true">
<fileset dir="${core.output.lib.dir}">
<include name="jbossws-integration.jar"/>
@@ -60,37 +55,71 @@
<include name="jboss-saaj.jar"/>
</fileset>
</copy>
- <copy
tofile="${jboss.repository.dir}/jbossws/${repository.id}/component-info.xml"
file="${build.etc.dir}/component-info/jbossws-core.xml"
filtering="true" overwrite="true">
+ <copy
tofile="${jboss.repository.dir}/jbossws/${repository.id}/component-info.xml"
file="${build.etc.dir}/component-info/jbossws.xml" filtering="true"
overwrite="true">
<filterset>
<filtersfile file="${build.dir}/version.properties"/>
</filterset>
</copy>
<!-- jboss/jbossws-jboss50 -->
+ <mkdir
dir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib"/>
<copy
todir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib"
overwrite="true">
<fileset dir="${jboss50.output.lib.dir}">
<include name="jbossws50.sar"/>
<include name="jbossws50-deployer.zip"/>
</fileset>
</copy>
- <copy
tofile="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/component-info.xml"
file="${build.etc.dir}/component-info/integration-jboss50.xml"
filtering="true" overwrite="true">
+ <copy
tofile="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/component-info.xml"
file="${build.etc.dir}/component-info/jbossws-jboss50.xml"
filtering="true" overwrite="true">
<filterset>
<filtersfile file="${build.dir}/version.properties"/>
</filterset>
</copy>
<!-- jboss/jbossws-jboss42 -->
+ <mkdir
dir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib"/>
<copy
todir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib"
overwrite="true">
<fileset dir="${jboss42.output.lib.dir}">
<include name="jbossws42.sar"/>
</fileset>
</copy>
- <copy
tofile="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/component-info.xml"
file="${build.etc.dir}/component-info/integration-jboss42.xml"
filtering="true" overwrite="true">
+ <copy
tofile="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/component-info.xml"
file="${build.etc.dir}/component-info/jbossws-jboss42.xml"
filtering="true" overwrite="true">
<filterset>
<filtersfile file="${build.dir}/version.properties"/>
</filterset>
</copy>
+ <!-- jboss/jbossws-jboss40 -->
+ <mkdir
dir="${jboss.repository.dir}/jbossws-jboss40/${repository.id}/lib"/>
+ <copy
todir="${jboss.repository.dir}/jbossws-jboss40/${repository.id}/lib"
overwrite="true">
+ <fileset dir="${jboss40.output.lib.dir}">
+ <include name="jbossws40.sar"/>
+ </fileset>
+ </copy>
+ <copy
tofile="${jboss.repository.dir}/jbossws-jboss40/${repository.id}/component-info.xml"
file="${build.etc.dir}/component-info/jbossws-jboss40.xml"
filtering="true" overwrite="true">
+ <filterset>
+ <filtersfile file="${build.dir}/version.properties"/>
+ </filterset>
+ </copy>
+
+ <!-- jbossws14 -->
+ <mkdir
dir="${jboss.repository.dir}/jbossws14/${repository.id}/lib"/>
+ <copy todir="${jboss.repository.dir}/jbossws14/${repository.id}/lib"
overwrite="true">
+ <fileset dir="${core.output.lib.dir}">
+ <include name="jboss-jaxrpc.jar"/>
+ <include name="jboss-saaj.jar"/>
+ </fileset>
+ <fileset dir="${jboss40.output.lib.dir}">
+ <include name="jbossws40-jdk14.sar"/>
+ <include name="jbossws14-client.jar"/>
+ <include name="jboss-jaxws14.jar"/>
+ </fileset>
+ </copy>
+ <copy
tofile="${jboss.repository.dir}/jbossws14/${repository.id}/component-info.xml"
file="${build.etc.dir}/component-info/jbossws14.xml" filtering="true"
overwrite="true">
+ <filterset>
+ <filtersfile file="${build.dir}/version.properties"/>
+ </filterset>
+ </copy>
+
</target>
<!-- Release to portal content -->
Modified: trunk/build/ant-import/build-samples.xml
===================================================================
--- trunk/build/ant-import/build-samples.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/build/ant-import/build-samples.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -43,14 +43,14 @@
<fileset dir="${tests.dir}">
<include name="ant-import/build-samples-jaxrpc.xml"/>
<include name="ant-import/build-samples-jaxws.xml"/>
- <include name="src/main/etc/*"/>
- <include
name="src/main/java/org/jboss/test/ws/jaxrpc/samples/**"/>
- <include
name="src/main/java/org/jboss/test/ws/jaxws/samples/**"/>
- <include name="src/main/java/org/jboss/test/ws/*"/>
- <include name="src/main/resources/jaxrpc/samples/**"/>
- <include name="src/main/resources/jaxrpc/samples-override/**"/>
- <include name="src/main/resources/jaxws/samples/**"/>
- <include name="src/main/resources/*excludes.txt"/>
+ <include name="src/etc/*"/>
+ <include name="src/java/org/jboss/test/ws/jaxrpc/samples/**"/>
+ <include name="src/java/org/jboss/test/ws/jaxws/samples/**"/>
+ <include name="src/java/org/jboss/test/ws/*"/>
+ <include name="src/resources/jaxrpc/samples/**"/>
+ <include name="src/resources/jaxrpc/samples-override/**"/>
+ <include name="src/resources/jaxws/samples/**"/>
+ <include name="src/resources/*excludes.txt"/>
</fileset>
</copy>
@@ -63,8 +63,9 @@
<mkdir dir="${build.src.samples.dir}/lib"/>
<copy todir="${build.src.samples.dir}/lib">
<fileset dir="${core.output.lib.dir}">
+ <include name="jbossws-integration.jar"/>
+ <include name="jbossws-client.jar"/>
<include name="jbossws-core.jar"/>
- <include name="jbossws-client.jar"/>
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
Modified: trunk/build/ant-import/build-thirdparty.xml
===================================================================
--- trunk/build/ant-import/build-thirdparty.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/build/ant-import/build-thirdparty.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -54,7 +54,7 @@
<get
src="${jboss.repository}/jboss/jboss-vfs/${jboss-vfs}/lib/jboss-vfs-sources.jar"
dest="${thirdparty.dir}/jboss-vfs-sources.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossretro/${jboss-jbossretro}/lib/jbossretro.jar"
dest="${thirdparty.dir}/jbossretro.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossretro/${jboss-jbossretro}/lib/jbossretro-rt.jar"
dest="${thirdparty.dir}/jbossretro-rt.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/jbossws-wsconsume-impl/${jbossws-wsconsume}/lib/jbossws-wsconsume-impl.jar"
dest="${thirdparty.dir}/jbossws-wsconsume-impl.jar"
usetimestamp="true" verbose="true"/>
+ <get
src="${jboss.repository}/jboss/jbossws-wsconsume-impl/${jbossws-wsconsume-impl}/lib/jbossws-wsconsume-impl.jar"
dest="${thirdparty.dir}/jbossws-wsconsume-impl.jar"
usetimestamp="true" verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar"
dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar"
dest="${thirdparty.dir}/jboss-xml-binding-sources.jar"
usetimestamp="true" verbose="true"/>
<get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar"
dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true"
verbose="true"/>
Deleted: trunk/build/etc/component-info/integration-jboss50.xml
===================================================================
--- trunk/build/etc/component-info/integration-jboss50.xml 2007-03-28 10:08:25 UTC (rev
2701)
+++ trunk/build/etc/component-info/integration-jboss50.xml 2007-03-28 10:11:05 UTC (rev
2702)
@@ -1,29 +0,0 @@
-<project name="jboss/jbossws-jboss50">
-
- <component id="jboss/jbossws-jboss50"
- description="JBossWS an implementation of J2EE Web Services"
- version="@repository.id(a)"
- licenseType="lgpl">
-
- <artifact id="jbossws50.sar"/>
- <artifact id="jbossws50-deployer.zip"/>
-
- <import componentref="jboss/jbossws">
- <compatible version="@repository.id(a)"/>
- </import>
- <import componentref="jboss/jbossxb">
- <compatible version="@jboss-jbossxb@"/>
- </import>
- <import componentref="jboss/microcontainer">
- <compatible version="@jboss-microcontainer@"/>
- </import>
- <import componentref="jboss/remoting">
- <compatible version="@jboss-remoting@"/>
- </import>
-
- <export>
- </export>
-
- </component>
-
-</project>
Deleted: trunk/build/etc/component-info/jbossws-core.xml
===================================================================
--- trunk/build/etc/component-info/jbossws-core.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/build/etc/component-info/jbossws-core.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -1,47 +0,0 @@
-<project name="jboss/jbossws">
-
- <component id="jboss/jbossws"
- description="JBossWS an implementation of J2EE Web Services"
- version="@repository.id(a)"
- licenseType="lgpl">
-
- <artifact id="jbossws-integration.jar"/>
- <artifact id="jbossws-client.jar"/>
- <artifact id="jbossws-core.jar"/>
- <artifact id="jboss-jaxrpc.jar"/>
- <artifact id="jboss-jaxws.jar"/>
- <artifact id="jboss-saaj.jar"/>
-
- <import componentref="apache-xmlsec">
- <compatible version="@apache-xmlsec@"/>
- <compatible version="@apache-xmlsec@-brew"/>
- </import>
- <import componentref="ibm-wsdl4j">
- <compatible version="@ibm-wsdl4j@"/>
- <compatible version="@ibm-wsdl4j@-brew"/>
- </import>
- <import componentref="javassist">
- <compatible version="@javassist@"/>
- <compatible version="@javassist@-brew"/>
- </import>
- <import componentref="jbpm/bpel">
- <compatible version="@jbpm-bpel@"/>
- </import>
- <import componentref="stax-api">
- <compatible version="@stax-api@"/>
- </import>
- <import componentref="sun-jaxb">
- <compatible version="@sun-jaxb@"/>
- </import>
-
- <export>
- <include input="jbossws-integration.jar"/>
- <include input="jbossws-core.jar"/>
- <include input="jboss-jaxrpc.jar"/>
- <include input="jboss-jaxws.jar"/>
- <include input="jboss-saaj.jar"/>
- </export>
-
- </component>
-
-</project>
Copied: trunk/build/etc/component-info/jbossws-jboss40.xml (from rev 2700,
branches/jbossws-1.2.1/build/etc/component-info/jbossws-jboss40.xml)
===================================================================
--- trunk/build/etc/component-info/jbossws-jboss40.xml (rev 0)
+++ trunk/build/etc/component-info/jbossws-jboss40.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -0,0 +1,28 @@
+<project name="jboss/jbossws-jboss40">
+
+ <component id="jboss/jbossws-jboss40"
+ description="JBossWS an implementation of J2EE Web Services"
+ version="@repository.id(a)"
+ licenseType="lgpl">
+
+ <artifact id="jbossws40.sar"/>
+
+ <import componentref="jboss/jbossws">
+ <compatible version="@repository.id(a)"/>
+ </import>
+ <import componentref="jboss/jbossxb">
+ <compatible version="@jboss-jbossxb-jboss40@"/>
+ </import>
+ <import componentref="jboss/microcontainer">
+ <compatible version="@jboss-microcontainer-jboss40@"/>
+ </import>
+ <import componentref="jboss/remoting">
+ <compatible version="@jboss-remoting-jboss40@"/>
+ </import>
+
+ <export>
+ </export>
+
+ </component>
+
+</project>
Copied: trunk/build/etc/component-info/jbossws-jboss42.xml (from rev 2700,
branches/jbossws-1.2.1/build/etc/component-info/jbossws-jboss42.xml)
===================================================================
--- trunk/build/etc/component-info/jbossws-jboss42.xml (rev 0)
+++ trunk/build/etc/component-info/jbossws-jboss42.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -0,0 +1,31 @@
+<project name="jboss/jbossws-jboss42">
+
+ <component id="jboss/jbossws-jboss42"
+ description="JBossWS an implementation of J2EE Web Services"
+ version="@repository.id(a)"
+ licenseType="lgpl">
+
+ <artifact id="jbossws42.sar"/>
+
+ <import componentref="jboss/jbossws">
+ <compatible version="@repository.id(a)"/>
+ </import>
+ <import componentref="jboss/jbossxb">
+ <compatible version="@jboss-jbossxb-jboss42@"/>
+ <compatible version="@jboss-jbossxb-jboss42@-brew"/>
+ </import>
+ <import componentref="jboss/microcontainer">
+ <compatible version="@jboss-microcontainer-jboss42@"/>
+ <compatible version="@jboss-microcontainer-jboss42@-brew"/>
+ </import>
+ <import componentref="jboss/remoting">
+ <compatible version="@jboss-remoting-jboss42@"/>
+ <compatible version="@jboss-remoting-jboss42@-brew"/>
+ </import>
+
+ <export>
+ </export>
+
+ </component>
+
+</project>
Copied: trunk/build/etc/component-info/jbossws-jboss50.xml (from rev 2700,
branches/jbossws-1.2.1/build/etc/component-info/jbossws-jboss50.xml)
===================================================================
--- trunk/build/etc/component-info/jbossws-jboss50.xml (rev 0)
+++ trunk/build/etc/component-info/jbossws-jboss50.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -0,0 +1,29 @@
+<project name="jboss/jbossws-jboss50">
+
+ <component id="jboss/jbossws-jboss50"
+ description="JBossWS an implementation of J2EE Web Services"
+ version="@repository.id(a)"
+ licenseType="lgpl">
+
+ <artifact id="jbossws50.sar"/>
+ <artifact id="jbossws50-deployer.zip"/>
+
+ <import componentref="jboss/jbossws">
+ <compatible version="@repository.id(a)"/>
+ </import>
+ <import componentref="jboss/jbossxb">
+ <compatible version="@jboss-jbossxb@-jboss50"/>
+ </import>
+ <import componentref="jboss/microcontainer">
+ <compatible version="@jboss-microcontainer@-jboss50"/>
+ </import>
+ <import componentref="jboss/remoting">
+ <compatible version="@jboss-remoting@-jboss50"/>
+ </import>
+
+ <export>
+ </export>
+
+ </component>
+
+</project>
Copied: trunk/build/etc/component-info/jbossws.xml (from rev 2700,
branches/jbossws-1.2.1/build/etc/component-info/jbossws.xml)
===================================================================
--- trunk/build/etc/component-info/jbossws.xml (rev 0)
+++ trunk/build/etc/component-info/jbossws.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -0,0 +1,50 @@
+<project name="jboss/jbossws">
+
+ <component id="jboss/jbossws"
+ description="JBossWS an implementation of J2EE Web Services"
+ version="@repository.id(a)"
+ licenseType="lgpl">
+
+ <artifact id="jbossws-integration.jar"/>
+ <artifact id="jbossws-client.jar"/>
+ <artifact id="jbossws-core.jar"/>
+ <artifact id="jboss-jaxrpc.jar"/>
+ <artifact id="jboss-jaxws.jar"/>
+ <artifact id="jboss-saaj.jar"/>
+
+ <import componentref="apache-xmlsec">
+ <compatible version="@apache-xmlsec@"/>
+ <compatible version="@apache-xmlsec@-brew"/>
+ </import>
+ <import componentref="ibm-wsdl4j">
+ <compatible version="@ibm-wsdl4j@"/>
+ <compatible version="@ibm-wsdl4j@-brew"/>
+ </import>
+ <import componentref="javassist">
+ <compatible version="@javassist@"/>
+ <compatible version="@javassist@-brew"/>
+ </import>
+ <import componentref="jbpm/bpel">
+ <compatible version="@jbpm-bpel@"/>
+ </import>
+ <import componentref="jboss/jbossws-wsconsume-impl">
+ <compatible version="@jbossws-wsconsume-impl@"/>
+ </import>
+ <import componentref="stax-api">
+ <compatible version="@stax-api@"/>
+ </import>
+ <import componentref="sun-jaxb">
+ <compatible version="@sun-jaxb@"/>
+ </import>
+
+ <export>
+ <include input="jbossws-integration.jar"/>
+ <include input="jbossws-core.jar"/>
+ <include input="jboss-jaxrpc.jar"/>
+ <include input="jboss-jaxws.jar"/>
+ <include input="jboss-saaj.jar"/>
+ </export>
+
+ </component>
+
+</project>
Copied: trunk/build/etc/component-info/jbossws14.xml (from rev 2700,
branches/jbossws-1.2.1/build/etc/component-info/jbossws14.xml)
===================================================================
--- trunk/build/etc/component-info/jbossws14.xml (rev 0)
+++ trunk/build/etc/component-info/jbossws14.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -0,0 +1,47 @@
+<project name="jboss/jbossws-component-info">
+
+ <component id="jboss/jbossws14" licenseType="lgpl"
version="@repository.id(a)"
+ description="JBossWS an implementation of J2EE Web Services -
Retrotranslated">
+
+ <artifact id="jbossws14-client.jar"/>
+ <artifact id="jboss-jaxws14.jar"/>
+ <artifact id="jboss-jaxrpc.jar"/>
+ <artifact id="jboss-saaj.jar"/>
+
+ <artifact id="jbossws40-jdk14.sar"/>
+
+ <import componentref="apache-xmlsec">
+ <compatible version="@apache-xmlsec@"/>
+ </import>
+ <import componentref="ibm-wsdl4j">
+ <compatible version="@ibm-wsdl4j@"/>
+ </import>
+ <import componentref="javassist">
+ <compatible version="@javassist@"/>
+ </import>
+ <import componentref="jbpm/bpel">
+ <compatible version="@jbpm-bpel@"/>
+ </import>
+ <import componentref="jboss/jbossretro">
+ <compatible version="@jboss-jbossretro@"/>
+ </import>
+ <import componentref="jboss/jbossxb">
+ <compatible version="@jboss-jbossxb-jboss40@"/>
+ </import>
+ <import componentref="jboss/microcontainer">
+ <compatible version="@jboss-microcontainer-jboss40@"/>
+ </import>
+ <import componentref="jboss/remoting">
+ <compatible version="@jboss-remoting-jboss40@"/>
+ </import>
+
+ <export>
+ <include input="jbossws14-client.jar"/>
+ <include input="jboss-jaxws14.jar"/>
+ <include input="jboss-jaxrpc.jar"/>
+ <include input="jboss-saaj.jar"/>
+ </export>
+
+ </component>
+
+</project>
\ No newline at end of file
Modified: trunk/build/hudson/hudson-home/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/config.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/build/hudson/hudson-home/config.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -34,7 +34,7 @@
<jobNames class="tree-set">
<no-comparator/>
<string>JBAS-Tests-AS-4.0</string>
- <!--string>JBAS-Tests-AS-4.0-jdk14</string-->
+ <string>JBAS-Tests-AS-4.0-jdk14</string>
<string>JBAS-Tests-AS-4.2</string>
<string>JBAS-Tests-AS-5.0</string>
</jobNames>
@@ -75,9 +75,9 @@
<jobNames class="tree-set">
<no-comparator/>
<string>JBWS-Tests-AS-4.0.5</string>
- <!--string>JBWS-Tests-AS-4.0.5-jdk14</string-->
+ <string>JBWS-Tests-AS-4.0.5-jdk14</string>
<string>JBWS-Tests-AS-4.0</string>
- <!--string>JBWS-Tests-AS-4.0-jdk14</string-->
+ <string>JBWS-Tests-AS-4.0-jdk14</string>
<string>JBWS-Tests-AS-4.2</string>
<string>JBWS-Tests-AS-5.0</string>
<string>JBWS-Tests-TC-5.5</string>
@@ -148,9 +148,9 @@
<string>AS-5.0</string>
<string>AS-4.2</string>
<string>AS-4.0</string>
- <!--string>AS-4.0-jdk14</string-->
+ <string>AS-4.0-jdk14</string>
<string>AS-4.0.5</string>
- <!--string>AS-4.0.5-jdk14</string-->
+ <string>AS-4.0.5-jdk14</string>
<string>TC-5.5</string>
</jobNames>
<name>Target Container</name>
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/build/version.properties 2007-03-28 10:11:05 UTC (rev 2702)
@@ -13,16 +13,35 @@
implementation.vendor=JBoss Inc.
implementation.vendor.id=http://www.jboss.org
-# thirdparty library versions that are referenced in component-info.xml
+# Thirdparty library versions that are referenced in component-info.xml
apache-xmlsec=1.3.0
ibm-wsdl4j=1.6.2
javassist=3.5.0.CR1
+jbossws-wsconsume-impl=2.0.0
+jbpm-bpel=1.1.0.Beta4
+sun-jaxb=2.0.3jboss
+stax-api=1.0
+
+# Build and Tomcat
jboss-jbossxb=2.0.0.CR1
jboss-microcontainer=2.0.0.Beta3
jboss-remoting=2.2.0.Alpha7
-sun-jaxb=2.0.3
-stax-api=1.0
+# JBossAS-5.0
+jboss-jbossxb-jboss50=2.0.0.CR1
+jboss-microcontainer-jboss50=2.0.0.Beta3
+jboss-remoting-jboss50=2.2.0.Alpha7
+
+# JBossAS-4.2
+jboss-jbossxb-jboss42=1.0.0.CR9
+jboss-microcontainer-jboss42=1.0.2
+jboss-remoting-jboss42=2.0.0.GA
+
+# JBossAS-4.0
+jboss-jbossxb-jboss40=1.0.0.CR9
+jboss-microcontainer-jboss40=1.0.2
+jboss-remoting-jboss40=1.4.3.GA
+
# thirdparty library versions
apache-ant=1.6.5
apache-collections=3.1
@@ -46,8 +65,6 @@
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
jbossas-core-libs=4.0.5.GA
-jbossws-wsconsume=2.0.0
-jbpm-bpel=1.1.0.Beta4
junit=3.8.1
oswego-concurrent=1.3.4
qdox=1.4
Modified: trunk/integration-jboss40/build.xml
===================================================================
--- trunk/integration-jboss40/build.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/integration-jboss40/build.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -307,6 +307,7 @@
<!-- The JBossAS testsuite references jbossws from thirdparty -->
<copy todir="${jboss40.home}/../../../thirdparty/jboss/jbossws/lib"
overwrite="true">
<fileset dir="${core.output.lib.dir}">
+ <include name="jbossws-integration.jar"/>
<include name="jbossws-client.jar" />
<include name="jbossws-core.jar" />
<include name="jboss-jaxrpc.jar" />
Modified: trunk/jbossws-core/src/java/javax/xml/soap/MimeHeaders.java
===================================================================
--- trunk/jbossws-core/src/java/javax/xml/soap/MimeHeaders.java 2007-03-28 10:08:25 UTC
(rev 2701)
+++ trunk/jbossws-core/src/java/javax/xml/soap/MimeHeaders.java 2007-03-28 10:11:05 UTC
(rev 2702)
@@ -21,6 +21,8 @@
*/
package javax.xml.soap;
+// $Id$
+
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
@@ -32,42 +34,47 @@
* This class is used primarily when an application wants to retrieve specific
* attachments based on certain MIME headers and values. This class will most
* likely be used by implementations of AttachmentPart and other MIME dependent
- * parts of the SAAJ API.
-
+ * parts of the SAAJ API.
+ *
* @author Scott.Stark(a)jboss.org
- * @version $Revision$
+ * @author Thomas.Diesler(a)jboss.org
*/
public class MimeHeaders
{
private LinkedList headers = new LinkedList();
- public MimeHeaders()
- {
- }
-
/**
+ * Adds a MimeHeader object with the specified name and value to this MimeHeaders
object's list of headers.
*
- * @param name
- * @param value
- * @throws IllegalArgumentException - if name is null or empty.
+ * Note that RFC822 headers can contain only US-ASCII characters.
+ *
+ * @param name a String with the name of the header to be added
+ * @param value a String with the value of the header to be added
+ * @throws IllegalArgumentException - if there was a problem in the mime header name
or value being added
*/
public void addHeader(String name, String value) throws IllegalArgumentException
{
if (name == null || name.length() == 0)
throw new IllegalArgumentException("Invalid null or empty header
name");
+
MimeHeader header = new MimeHeader(name, value);
headers.add(header);
}
+ /**
+ * Returns all the MimeHeaders in this MimeHeaders object.
+ * @return an Iterator object over this MimeHeaders object's list of MimeHeader
objects
+ */
public Iterator getAllHeaders()
{
return headers.iterator();
}
/**
+ * Returns all of the values for the specified header as an array of String objects.
*
- * @param name
- * @return All matching header values if found, null otherwise
+ * @param name the name of the header for which values will be returned
+ * @return a String array with all of the values for the specified header
*/
public String[] getHeader(String name)
{
@@ -87,23 +94,40 @@
return values;
}
+ /**
+ * Returns all the MimeHeader objects whose name matches a name in the given array of
names.
+ * @param names an array of String objects with the names for which to search
+ * @return an Iterator object over the MimeHeader objects whose name matches one of
the names in the given list
+ */
public Iterator getMatchingHeaders(String[] names)
{
- MatchingIter iter = new MatchingIter(headers, names, true);
+ MatchingIterator iter = new MatchingIterator(headers, names, true);
return iter;
}
+ /**
+ * Returns all of the MimeHeader objects whose name does not match a name in the given
array of names.
+ * @param names an array of String objects with the names for which to search
+ * @return an Iterator object over the MimeHeader objects whose name does not match
one of the names in the given list
+ */
public Iterator getNonMatchingHeaders(String[] names)
{
- MatchingIter iter = new MatchingIter(headers, names, false);
+ MatchingIterator iter = new MatchingIterator(headers, names, false);
return iter;
}
+ /**
+ * Removes all the header entries from this MimeHeaders object.
+ */
public void removeAllHeaders()
{
headers.clear();
}
+ /**
+ * Remove all MimeHeader objects whose name matches the given name.
+ * @param name a String with the name of the header for which to search
+ */
public void removeHeader(String name)
{
Iterator iter = headers.iterator();
@@ -115,11 +139,17 @@
}
}
- /** Replaces the current value of the first header entry whose name matches
+ /**
+ * Replaces the current value of the first header entry whose name matches
* the given name with the given value, adding a new header if no existing
* header name matches. This method also removes all matching headers after
* the first one.
*
+ * Note that RFC822 headers can contain only US-ASCII characters.
+ *
+ * @param name a String with the name of the header for which to search
+ * @param value a String with the value that will replace the current value of the
specified header
+ * @throws IllegalArgumentException if there was a problem in the mime header name or
the value being set
*/
public void setHeader(String name, String value)
{
@@ -149,7 +179,7 @@
}
}
- private static class MatchingIter implements Iterator
+ private static class MatchingIterator implements Iterator
{
private LinkedList headers;
private HashSet names;
@@ -157,7 +187,7 @@
private int index;
private MimeHeader mh;
- MatchingIter(LinkedList headers, String[] names, boolean match)
+ MatchingIterator(LinkedList headers, String[] names, boolean match)
{
this.headers = headers;
this.index = 0;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java 2007-03-28 10:08:25
UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java 2007-03-28 10:11:05
UTC (rev 2702)
@@ -283,6 +283,9 @@
handlerPass = handlerPass && callRequestHandlerChain(portName,
handlerType[1]);
handlerPass = handlerPass && callRequestHandlerChain(portName,
handlerType[2]);
+ // Handlers might have replaced the message
+ reqMessage = msgContext.getSOAPMessage();
+
if (handlerPass)
{
String targetAddress = getTargetEndpointAddress();
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -52,6 +52,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxrpc.Use;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
@@ -168,8 +169,17 @@
if (log.isDebugEnabled())
log.debug("Create RPC body element: " + opName);
+
soapBodyElement = new SOAPBodyElementRpc(opName);
soapBodyElement =
(SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
+
+ // Add soap encodingStyle
+ if (opMetaData.getUse() == Use.ENCODED)
+ {
+ String envURI = soapEnvelope.getNamespaceURI();
+ String envPrefix = soapEnvelope.getPrefix();
+ soapBodyElement.setAttributeNS(envURI, envPrefix +
":encodingStyle", Constants.URI_SOAP11_ENC);
+ }
}
for (ParameterMetaData paramMetaData : opMetaData.getInputParameters())
@@ -308,7 +318,7 @@
else
{
SOAPElement element = paramMetaData.isInHeader() ? soapHeader :
soapBodyElement;
- Object value = getParameterFromMessage(paramMetaData, element,
false);
+ SOAPContentElement value = getParameterFromMessage(paramMetaData,
element, false);
epInv.setRequestParamValue(xmlName, value);
}
}
@@ -380,7 +390,16 @@
Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
soapBodyElement = new SOAPBodyElementRpc(opName);
soapBodyElement =
(SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
+
+ // Add soap encodingStyle
+ if (opMetaData.getUse() == Use.ENCODED)
+ {
+ String envURI = soapEnvelope.getNamespaceURI();
+ String envPrefix = soapEnvelope.getPrefix();
+ soapBodyElement.setAttributeNS(envURI, envPrefix +
":encodingStyle", Constants.URI_SOAP11_ENC);
+ }
}
+
// Add the return to the message
ParameterMetaData retMetaData = opMetaData.getReturnParameter();
if (retMetaData != null)
@@ -556,7 +575,7 @@
}
else
{
- Object value = getParameterFromMessage(retMetaData, soapElement, false);
+ SOAPContentElement value = getParameterFromMessage(retMetaData,
soapElement, false);
epInv.setReturnValue(value);
}
}
@@ -580,7 +599,7 @@
else
{
SOAPElement element = paramMetaData.isInHeader() ? soapHeader :
soapElement;
- Object value = getParameterFromMessage(paramMetaData, element, false);
+ SOAPContentElement value = getParameterFromMessage(paramMetaData, element,
false);
epInv.setResponseParamValue(xmlName, value);
}
}
@@ -703,8 +722,6 @@
}
Name soapName = new NameImpl(xmlName.getLocalPart(), xmlName.getPrefix(),
xmlName.getNamespaceURI());
- if (paramMetaData.isSOAPArrayParam())
- soapName = new NameImpl("Array", Constants.PREFIX_SOAP11_ENC,
Constants.URI_SOAP11_ENC);
SOAPContentElement contentElement;
if (soapElement instanceof SOAPHeader)
@@ -757,7 +774,7 @@
}
/** Unmarshall a message element and add it to the parameter list */
- private Object getParameterFromMessage(ParameterMetaData paramMetaData, SOAPElement
soapElement, boolean optional) throws BindingException
+ private SOAPContentElement getParameterFromMessage(ParameterMetaData paramMetaData,
SOAPElement soapElement, boolean optional) throws BindingException
{
Name xmlName = new NameImpl(paramMetaData.getXmlName());
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/EndpointInvocation.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/EndpointInvocation.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -116,7 +116,7 @@
*/
public Object[] getRequestPayload() throws SOAPException
{
- if(log.isDebugEnabled()) log.debug("getRequestPayload");
+ log.debug("getRequestPayload");
List<QName> xmlNames = getRequestParamNames();
Object[] payload = new
Object[opMetaData.getJavaMethod().getParameterTypes().length];
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -24,8 +24,6 @@
// $Id$
import java.lang.reflect.AnnotatedElement;
-import java.net.URL;
-import java.net.URLClassLoader;
import javax.naming.Context;
import javax.naming.NamingException;
@@ -107,30 +105,42 @@
String serviceRefType = serviceRef.getServiceRefType();
if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
return Type.JAXWS;
-
+
+ // The mapping-file is JAXRPC specific
+ if (serviceRef.getMappingFile() != null)
+ return Type.JAXRPC;
+
String siName = serviceRef.getServiceInterface();
if (siName == null)
throw new IllegalStateException("<service-interface> cannot be
null");
+ if (siName.equals("javax.xml.rpc.Service"))
+ return Type.JAXRPC;
+
+ log.info("Cannot determine service-ref type, assuming JAXWS");
+ return Type.JAXWS;
+
+ /*
+ * Loading the SI like this might not work for webapp clients.
+ *
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
URL rootURL = serviceRef.getVfsRoot().toURL();
URLClassLoader loader = new URLClassLoader(new URL[] {rootURL}, ctxLoader);
- Class siClass;
try
{
- siClass = loader.loadClass(siName);
+ Class siClass = loader.loadClass(siName);
+ if (javax.xml.ws.Service.class.isAssignableFrom(siClass))
+ return Type.JAXWS;
+ else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
+ return Type.JAXRPC;
+ else
+ throw new IllegalStateException("Illegal service interface: " +
siName);
}
catch (ClassNotFoundException e)
{
- throw new NamingException("Cannot load <service-interface>: " +
siName);
+ throw new IllegalStateException("Cannot load <service-interface>:
" + siName);
}
-
- if (javax.xml.ws.Service.class.isAssignableFrom(siClass))
- return Type.JAXWS;
- else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
- return Type.JAXRPC;
- else
- throw new IllegalStateException("Illegal service interface: " +
siName);
+ */
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,24 +1,24 @@
/*
-* 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.
-*/
+ * 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.ws.core.jaxrpc;
// $Id$
@@ -119,7 +119,8 @@
FaultMetaData faultMetaData = opMetaData.getFault(xmlName);
if (faultMetaData != null)
{
- if(log.isDebugEnabled()) log.debug("Deserialize fault: " +
faultMetaData);
+ if (log.isDebugEnabled())
+ log.debug("Deserialize fault: " + faultMetaData);
QName xmlType = faultMetaData.getXmlType();
Class javaType = faultMetaData.getJavaType();
@@ -161,7 +162,8 @@
}
else
{
- if(log.isDebugEnabled()) log.debug("Cannot find fault meta data for:
" + xmlName);
+ if (log.isDebugEnabled())
+ log.debug("Cannot find fault meta data for: " + xmlName);
}
}
}
@@ -284,7 +286,8 @@
}
else
{
- if(log.isDebugEnabled()) log.debug("Cannot obtain fault meta data for:
" + javaType);
+ if (log.isDebugEnabled())
+ log.debug("Cannot obtain fault meta data for: " + javaType);
}
}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -58,7 +58,7 @@
{
if (jaxrpcMapping == null)
{
- if(log.isDebugEnabled()) log.debug("Generate jaxrpcMapping from
typeMapping");
+ log.debug("Generate jaxrpcMapping from typeMapping");
jaxrpcMapping = new JavaWsdlMapping();
for (QName xmlType : getTypeMapping().getRegisteredXmlTypes())
@@ -85,7 +85,8 @@
packageMapping.setNamespaceURI(nsURI);
packageMapping.setPackageType(packageName);
jaxrpcMapping.addPackageMapping(packageMapping);
- if(log.isDebugEnabled()) log.debug("Add package mapping: " +
packageMapping);
+ if (log.isDebugEnabled())
+ log.debug("Add package mapping: " + packageMapping);
}
// Do not add mappings for array types
@@ -100,7 +101,8 @@
xmlTypeMapping.setJavaType(javaTypeName);
xmlTypeMapping.setRootTypeQName(xmlType);
jaxrpcMapping.addJavaXmlTypeMappings(xmlTypeMapping);
- if(log.isDebugEnabled()) log.debug("Add type mapping: " +
xmlTypeMapping);
+ if (log.isDebugEnabled())
+ log.debug("Add type mapping: " + xmlTypeMapping);
}
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -294,6 +294,18 @@
return xmlType;
}
+ /** Get the QNames that was registered last for this javaType */
+ public List<QName> getXMLTypes(Class javaType)
+ {
+ List<QName> xmlTypes = new ArrayList<QName>();
+
+ for (KeyPair kPair : getKeyPairs(null, javaType))
+ {
+ xmlTypes.add(kPair.getXmlType().toQName());
+ }
+ return xmlTypes;
+ }
+
/**
* Get the QName that was registered last for this javaType
* @param javaType class for which XML Type is needed
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,24 +1,24 @@
/*
-* 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.
-*/
+ * 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.ws.core.jaxrpc.binding;
// $Id$
@@ -29,6 +29,7 @@
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
import org.jboss.xb.binding.SimpleTypeBindings;
/**
@@ -41,20 +42,28 @@
// provide logging
private static final Logger log = Logger.getLogger(CalendarDeserializer.class);
- public Object deserialize(QName xmlName, QName xmlType, Source xmlFragment,
SerializationContext serContext) throws BindingException {
+ public Object deserialize(QName xmlName, QName xmlType, Source xmlFragment,
SerializationContext serContext) throws BindingException
+ {
return deserialize(xmlName, xmlType, sourceToString(xmlFragment), serContext);
}
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
{
- if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName +
",xmlType=" + xmlType + "]");
+ if (log.isDebugEnabled())
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
Calendar value = null;
String valueStr = unwrapValueStr(xmlFragment);
if (valueStr != null)
{
- value = SimpleTypeBindings.unmarshalDateTime(valueStr);
+ if (Constants.TYPE_LITERAL_DATE.equals(xmlType))
+ value = SimpleTypeBindings.unmarshalDate(valueStr);
+ else if (Constants.TYPE_LITERAL_TIME.equals(xmlType))
+ value = SimpleTypeBindings.unmarshalTime(valueStr);
+ else if (Constants.TYPE_LITERAL_DATETIME.equals(xmlType))
+ value = SimpleTypeBindings.unmarshalDateTime(valueStr);
+ else throw new IllegalArgumentException("Invalid xmlType: " +
xmlType);
}
return value;
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,24 +1,24 @@
/*
-* 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.
-*/
+ * 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.ws.core.jaxrpc.binding;
// $Id$
@@ -29,6 +29,7 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
@@ -45,9 +46,18 @@
public Result serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName +
",xmlType=" + xmlType + "]");
+ if (log.isDebugEnabled())
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
- String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
+ String valueStr;
+ if (Constants.TYPE_LITERAL_DATE.equals(xmlType))
+ valueStr = SimpleTypeBindings.marshalDate((Calendar)value);
+ else if (Constants.TYPE_LITERAL_TIME.equals(xmlType))
+ valueStr = SimpleTypeBindings.marshalTime((Calendar)value);
+ else if (Constants.TYPE_LITERAL_DATETIME.equals(xmlType))
+ valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
+ else
+ throw new IllegalArgumentException("Invalid xmlType: " + xmlType);
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes,
true);
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -30,11 +30,16 @@
import javax.xml.transform.Source;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
+import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.soap.SOAPContentElement;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.core.utils.XMLPredefinedEntityReferenceResolver;
+import org.w3c.dom.Node;
/** The base class for all Deserializers.
*
@@ -43,7 +48,17 @@
*/
public abstract class DeserializerSupport implements Deserializer
{
+ private static final Logger log = Logger.getLogger(DeserializerSupport.class);
+ public Object deserialize(SOAPContentElement soapElement, SerializationContext
serContext) throws BindingException
+ {
+ QName xmlName = soapElement.getElementQName();
+ QName xmlType = soapElement.getXmlType();
+
+ Source source = soapElement.getXMLFragment().getSource();
+ return deserialize(xmlName, xmlType, source, serContext);
+ }
+
/** Deserialize an XML fragment to an object value
*
* @param xmlName The root element name of the resulting fragment
@@ -53,22 +68,45 @@
*/
public abstract Object deserialize(QName xmlName, QName xmlType, Source xmlFragment,
SerializationContext serContext) throws BindingException;
+ // TODO: remove when JBossXB supports unmarshall(Source)
+ //
http://jira.jboss.org/jira/browse/JBXB-100
protected static String sourceToString(Source source)
{
String xmlFragment = null;
-
- try {
- TransformerFactory tf = TransformerFactory.newInstance();
- ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
- StreamResult streamResult = new StreamResult(baos);
- tf.newTransformer().transform(source, streamResult);
- xmlFragment = new String(baos.toByteArray());
- if (xmlFragment.startsWith("<?xml"))
+ try
+ {
+ if (source instanceof DOMSource)
{
- int index = xmlFragment.indexOf(">");
- xmlFragment = xmlFragment.substring(index + 1);
+ Node node = ((DOMSource)source).getNode();
+ xmlFragment = DOMWriter.printNode(node, false);
}
- } catch (TransformerException e) {
+ else
+ {
+ // Note, this code will not handler namespaces correctly that
+ // are defined on a parent of the DOMSource
+ //
+ // <env:Envelope
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ // <env:Body>
+ // <myMethod>
+ // <param xsi:type='xsd:string'>Hello
World!</param>
+ // </myMethod>
+ // </env:Body>
+ // </env:Envelope>
+ //
+ TransformerFactory tf = TransformerFactory.newInstance();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+ StreamResult streamResult = new StreamResult(baos);
+ tf.newTransformer().transform(source, streamResult);
+ xmlFragment = new String(baos.toByteArray());
+ if (xmlFragment.startsWith("<?xml"))
+ {
+ int index = xmlFragment.indexOf(">");
+ xmlFragment = xmlFragment.substring(index + 1);
+ }
+ }
+ }
+ catch (TransformerException e)
+ {
WSException.rethrow(e);
}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -47,25 +47,26 @@
public Result serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName +
",xmlType=" + xmlType + "]");
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
QName qnameValue = (QName)value;
String nsURI = qnameValue.getNamespaceURI();
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- Set<String> additionalNamespaces = new HashSet<String>();
+ Set<String> nsExtras = new HashSet<String>();
+
// Remove prefix and register again
if (nsURI.length() > 0)
{
qnameValue = new QName(nsURI, qnameValue.getLocalPart());
qnameValue = nsRegistry.registerQName(qnameValue);
- if (!nsURI.equals(xmlName.getNamespaceURI()))
- additionalNamespaces.add(nsURI);
+ if (nsURI.equals(xmlName.getNamespaceURI()) == false)
+ nsExtras.add(nsURI);
}
String valueStr = SimpleTypeBindings.marshalQName(qnameValue, nsRegistry);
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry,
additionalNamespaces, attributes, true);
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, nsExtras,
attributes, true);
return stringToResult(xmlFragment);
}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -52,75 +52,64 @@
// provide logging
private static final Logger log = Logger.getLogger(SOAPArrayDeserializer.class);
- private DeserializerSupport compDeserializer;
+ private DeserializerSupport componentDeserializer;
- public SOAPArrayDeserializer() throws BindingException
+ public Object deserialize(QName xmlName, QName xmlType, Source source,
SerializationContext serContext) throws BindingException
{
- }
+ log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + "]");
- public Object deserialize(QName xmlName, QName xmlType, Source xmlFragment,
SerializationContext serContext) throws BindingException {
- return deserialize(xmlName, xmlType, sourceToString(xmlFragment), serContext);
- }
-
- /**
- */
- private Object deserialize(QName xmlName, QName xmlType, String xmlFragment,
SerializationContext serContext) throws BindingException
- {
- if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName +
",xmlType=" + xmlType + "]");
+ Element soapElement = DOMUtils.sourceToElement(source);
try
{
ParameterMetaData paramMetaData =
(ParameterMetaData)serContext.getProperty(ParameterMetaData.class.getName());
- QName compXmlType = paramMetaData.getSOAPArrayCompType();
- QName compXmlName = paramMetaData.getXmlName();
- Element arrayElement = DOMUtils.parse(xmlFragment);
- int[] arrDims = getDimensionsFromAttribute(arrayElement);
- Class compJavaType = getComponentTypeFromAttribute(arrayElement, serContext);
- Object[] retArray = (Object[])Array.newInstance(compJavaType, arrDims);
+ QName compXmlType = getComponentTypeFromAttribute(soapElement);
+ paramMetaData.setSOAPArrayCompType(compXmlType);
- TypeMappingImpl typeMapping = serContext.getTypeMapping();
if (compXmlType == null)
- {
- compXmlType = typeMapping.getXMLType(compJavaType);
- paramMetaData.setSOAPArrayCompType(compXmlType);
- }
+ throw new WSException("Cannot obtain component xmlType: " +
paramMetaData.getPartName());
- if (compXmlType == null)
- throw new WSException("Cannot obtain component xmlType for: " +
compJavaType);
+ Class compJavaType = getJavaTypeForComponentType(compXmlType, serContext);
// Get the component type deserializer factory
- if(log.isDebugEnabled()) log.debug("Get component deserializer for:
[javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType +
"]");
+ log.debug("Get component deserializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+
+ int[] arrDims = getDimensionsFromAttribute(soapElement);
+ Object[] retArray = (Object[])Array.newInstance(compJavaType, arrDims);
+
+ TypeMappingImpl typeMapping = serContext.getTypeMapping();
DeserializerFactoryBase compDeserializerFactory =
(DeserializerFactoryBase)typeMapping.getDeserializer(compJavaType, compXmlType);
if (compDeserializerFactory == null)
{
log.warn("Cannot obtain component deserializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
compDeserializerFactory =
(DeserializerFactoryBase)typeMapping.getDeserializer(null, compXmlType);
}
+
if (compDeserializerFactory == null)
throw new WSException("Cannot obtain component deserializer for: "
+ compXmlType);
// Get the component type deserializer
- compDeserializer =
(DeserializerSupport)compDeserializerFactory.getDeserializer();
+ componentDeserializer =
(DeserializerSupport)compDeserializerFactory.getDeserializer();
if (arrDims.length < 1 || 2 < arrDims.length)
throw new WSException("Unsupported array dimensions: " +
Arrays.asList(arrDims));
- Iterator it = DOMUtils.getChildElements(arrayElement);
+ Iterator it = DOMUtils.getChildElements(soapElement);
if (arrDims.length == 1)
{
Object[] subArr = retArray;
- deserializeMemberValues(compXmlName, compXmlType, serContext, it, subArr);
+ deserializeMemberValues(compXmlType, serContext, it, subArr);
}
if (arrDims.length == 2)
{
for (int i = 0; i < arrDims[0]; i++)
{
Object[] subArr = (Object[])retArray[i];
- deserializeMemberValues(compXmlName, compXmlType, serContext, it,
subArr);
+ deserializeMemberValues(compXmlType, serContext, it, subArr);
}
}
- if(log.isDebugEnabled()) log.debug("deserialized: " +
retArray.getClass().getName());
+ log.debug("deserialized: " + retArray.getClass().getName());
return retArray;
}
catch (RuntimeException e)
@@ -133,8 +122,10 @@
}
}
- private void deserializeMemberValues(QName compXmlName, QName compXmlType,
SerializationContext serContext, Iterator it, Object[] subArr) throws BindingException
+ private void deserializeMemberValues(QName compXmlType, SerializationContext
serContext, Iterator it, Object[] subArr) throws BindingException
{
+ QName compXmlName = new QName("item");
+
int dim = subArr.length;
for (int i = 0; i < dim; i++)
{
@@ -142,8 +133,8 @@
if (it.hasNext())
{
Element childElement = (Element)it.next();
- Source compXMLFragment = new DOMSource(childElement);
- compValue = compDeserializer.deserialize(compXmlName, compXmlType,
compXMLFragment, serContext);
+ Source source = new DOMSource(childElement);
+ compValue = componentDeserializer.deserialize(compXmlName, compXmlType,
source, serContext);
compValue = JavaUtils.getWrapperValueArray(compValue);
}
subArr[i] = compValue;
@@ -169,7 +160,7 @@
return arrDims;
}
- private Class getComponentTypeFromAttribute(Element arrayElement, SerializationContext
serContext)
+ private QName getComponentTypeFromAttribute(Element arrayElement)
{
QName attrQName = new QName(Constants.URI_SOAP11_ENC, "arrayType");
QName arrayType = DOMUtils.getAttributeValueAsQName(arrayElement, attrQName);
@@ -181,6 +172,11 @@
int dimIndex = localPart.indexOf("[");
QName compXmlType = new QName(nsURI, localPart.substring(0, dimIndex));
+ return compXmlType;
+ }
+
+ private Class getJavaTypeForComponentType(QName compXmlType, SerializationContext
serContext)
+ {
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(compXmlType);
if (javaType == null)
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -30,6 +30,8 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.soap.NameImpl;
+import org.jboss.ws.core.soap.SOAPContentElement;
import org.jboss.ws.core.soap.XMLFragment;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
@@ -46,10 +48,10 @@
// provide logging
private static final Logger log = Logger.getLogger(SOAPArraySerializer.class);
+ private ParameterMetaData paramMetaData;
private SerializerSupport compSerializer;
private NullValueSerializer nullSerializer;
private boolean isArrayComponentType;
- private boolean xsiNamespaceInserted;
private StringBuilder buffer;
public SOAPArraySerializer() throws BindingException
@@ -57,16 +59,26 @@
nullSerializer = new NullValueSerializer();
}
- /**
- */
+ public Result serialize(SOAPContentElement soapElement, SerializationContext
serContext) throws BindingException
+ {
+ paramMetaData = soapElement.getParamMetaData();
+ QName xmlName = soapElement.getElementQName();
+ QName xmlType = soapElement.getXmlType();
+ Object value = soapElement.getObjectValue();
+ NamedNodeMap attributes = soapElement.getAttributes();
+ return serialize(xmlName, xmlType, value, serContext, attributes);
+ }
+
public Result serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName +
",xmlType=" + xmlType + ",valueType=" + value.getClass().getName() +
"]");
+ log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" +
xmlType + ",valueType=" + value.getClass().getName() + "]");
try
{
- ParameterMetaData paramMetaData =
(ParameterMetaData)serContext.getProperty(ParameterMetaData.class.getName());
+ if (paramMetaData == null)
+ throw new IllegalStateException("Use serialize(SOAPContenentElement,
SerializationContext)");
+
+ QName compXmlName = paramMetaData.getXmlName();
QName compXmlType = paramMetaData.getSOAPArrayCompType();
- QName compXmlName = paramMetaData.getXmlName();
Class javaType = paramMetaData.getJavaType();
Class compJavaType = javaType.getComponentType();
@@ -88,7 +100,7 @@
throw new WSException("Cannot obtain component xmlType for: " +
compJavaType);
// Get the component type serializer factory
- if(log.isDebugEnabled()) log.debug("Get component serializer for:
[javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType +
"]");
+ log.debug("Get component serializer for: [javaType=" +
compJavaType.getName() + ",xmlType=" + compXmlType + "]");
SerializerFactoryBase compSerializerFactory =
(SerializerFactoryBase)typeMapping.getSerializer(compJavaType, compXmlType);
if (compSerializerFactory == null)
{
@@ -105,36 +117,42 @@
if (JavaUtils.isPrimitive(value.getClass()))
value = JavaUtils.getWrapperValueArray(value);
- buffer = new StringBuilder("<" + Constants.PREFIX_SOAP11_ENC +
":Array "+
-
"xmlns:"+Constants.PREFIX_SOAP11_ENC+"='http://schemas.xmlsoap.org/soap/encoding/'
");
+ String nodeName = new NameImpl(compXmlName).getQualifiedName();
- if (value instanceof Object[])
- {
- Object[] objArr = (Object[])value;
- String arrayDim = "" + objArr.length;
+ buffer = new StringBuilder("<" + nodeName + " xmlns:" +
Constants.PREFIX_SOAP11_ENC + "='" + Constants.URI_SOAP11_ENC + "'
");
- // Get multiple array dimension
- Object[] subArr = (Object[])value;
- while (isArrayComponentType == false && subArr.length > 0
&& subArr[0] instanceof Object[])
- {
- subArr = (Object[])subArr[0];
- arrayDim += "," + subArr.length;
- }
+ if (!(value instanceof Object[]))
+ throw new WSException("Unsupported array type: " + javaType);
- compXmlType = serContext.getNamespaceRegistry().registerQName(compXmlType);
- String arrayType = Constants.PREFIX_SOAP11_ENC + ":arrayType='"
+ compXmlType.getPrefix() + ":" + compXmlType.getLocalPart() + "[" +
arrayDim + "]'";
- String compns = " xmlns:" + compXmlType.getPrefix() +
"='" + compXmlType.getNamespaceURI() + "'";
- buffer.append(arrayType + compns + ">");
+ Object[] objArr = (Object[])value;
+ String arrayDim = "" + objArr.length;
- serializeArrayComponents(compXmlName, compXmlType, serContext, objArr);
- }
- else
+ // Get multiple array dimension
+ Object[] subArr = (Object[])value;
+ while (isArrayComponentType == false && subArr.length > 0 &&
subArr[0] instanceof Object[])
{
- throw new WSException("Unsupported array type: " + javaType);
+ subArr = (Object[])subArr[0];
+ arrayDim += "," + subArr.length;
}
- buffer.append("</" + Constants.PREFIX_SOAP11_ENC +
":Array>");
- if(log.isDebugEnabled()) log.debug("serialized: " + buffer);
+ compXmlType = serContext.getNamespaceRegistry().registerQName(compXmlType);
+ compXmlName = serContext.getNamespaceRegistry().registerQName(compXmlName);
+ String arrayType = Constants.PREFIX_SOAP11_ENC + ":arrayType='" +
compXmlType.getPrefix() + ":" + compXmlType.getLocalPart() + "[" +
arrayDim + "]'";
+
+ buffer.append(arrayType);
+ buffer.append(" xmlns:" + Constants.PREFIX_XSI + "='" +
Constants.NS_SCHEMA_XSI + "'");
+ if (compXmlType.getNamespaceURI().equals(Constants.URI_SOAP11_ENC) == false)
+ buffer.append(" xmlns:" + compXmlType.getPrefix() +
"='" + compXmlType.getNamespaceURI() + "'");
+ if (compXmlName.getNamespaceURI().length() > 0 &&
compXmlName.getNamespaceURI().equals(compXmlType.getNamespaceURI()) == false)
+ buffer.append(" xmlns:" + compXmlName.getPrefix() +
"='" + compXmlName.getNamespaceURI() + "'");
+
+ buffer.append(">");
+
+ serializeArrayComponents(compXmlName, compXmlType, serContext, objArr);
+
+ buffer.append("</" + nodeName + ">");
+
+ log.debug("serialized: " + buffer);
return stringToResult(buffer.toString());
}
catch (RuntimeException e)
@@ -147,13 +165,13 @@
}
}
- private void serializeArrayComponents(QName compXmlName, QName compXmlType,
SerializationContext serContext, Object[] objArr) throws BindingException
+ private void serializeArrayComponents(QName xmlName, QName xmlType,
SerializationContext serContext, Object[] objArr) throws BindingException
{
for (Object compValue : objArr)
{
if (isArrayComponentType == false && compValue instanceof Object[])
{
- serializeArrayComponents(compXmlName, compXmlType, serContext,
(Object[])compValue);
+ serializeArrayComponents(xmlName, xmlType, serContext, (Object[])compValue);
}
else
{
@@ -163,15 +181,9 @@
if (compValue == null)
{
ser = nullSerializer;
- if (xsiNamespaceInserted == false)
- {
- xsiNamespaceInserted = true;
- int insIndex = ("<" + Constants.PREFIX_SOAP11_ENC +
":Array ").length();
- buffer.insert(insIndex, "xmlns:" + Constants.PREFIX_XSI +
"='" + Constants.NS_SCHEMA_XSI + "' ");
- }
}
- Result result = ser.serialize(compXmlName, compXmlType, compValue,
serContext, null);
+ Result result = ser.serialize(new QName("item"), xmlType,
compValue, serContext, null);
XMLFragment fragment = new XMLFragment(result);
buffer.append(fragment.toStringFragment());
}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -25,6 +25,8 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -34,6 +36,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.soap.SOAPContentElement;
import org.jboss.ws.core.utils.IOUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.NamedNodeMap;
@@ -48,24 +51,37 @@
*/
public abstract class SerializerSupport implements Serializer
{
+
+ public Result serialize(SOAPContentElement soapElement, SerializationContext
serContext) throws BindingException
+ {
+ QName xmlName = soapElement.getElementQName();
+ QName xmlType = soapElement.getXmlType();
+ NamedNodeMap attributes = soapElement.getAttributes();
+ Object objectValue = soapElement.getObjectValue();
+ return serialize(xmlName, xmlType, objectValue, serContext, attributes);
+ }
+
/** Serialize an object value to an XML fragment
*
* @param xmlName The root element name of the resulting fragment
* @param xmlType The associated schema type
* @param value The value to serialize
* @param serContext The serialization context
- * @param attributes TODO
* @param attributes The attributes on this element
*/
public abstract Result serialize(QName xmlName, QName xmlType, Object value,
SerializationContext serContext, NamedNodeMap attributes) throws BindingException;
- protected Result stringToResult(String xmlFragment) {
+ protected Result stringToResult(String xmlFragment)
+ {
BufferedStreamResult result = null;
- try {
+ try
+ {
ByteArrayInputStream in = new ByteArrayInputStream(xmlFragment.getBytes());
result = new BufferedStreamResult();
IOUtils.copyStream(result.getOutputStream(), in);
- } catch (IOException e) {
+ }
+ catch (IOException e)
+ {
WSException.rethrow(e);
}
@@ -74,10 +90,12 @@
/** Wrap the value string in a XML fragment with the given name
*/
- protected String wrapValueStr(QName xmlName, String valueStr, NamespaceRegistry
nsRegistry, Set<String> additionalNamespaces, NamedNodeMap attributes, boolean
normalize)
+ protected String wrapValueStr(QName xmlName, String valueStr, NamespaceRegistry
nsRegistry, Set<String> nsExtras, NamedNodeMap attributes, boolean normalize)
{
- String nsURI = xmlName.getNamespaceURI();
+ String xmlNameURI = xmlName.getNamespaceURI();
String localPart = xmlName.getLocalPart();
+
+ Map<String, String> namespaces = new HashMap<String, String>();
StringBuilder nsAttr = new StringBuilder("");
if (attributes != null)
@@ -88,45 +106,62 @@
String attrName = attr.getNodeName();
String attrValue = attr.getNodeValue();
nsAttr.append(" " + attrName + "='" + attrValue +
"'");
+
+ if (attrName.startsWith("xmlns:"))
+ {
+ String prefix = attrName.substring(6);
+ namespaces.put(attrValue, prefix);
+ }
}
}
String elName;
- if (nsURI.length() > 0)
+ if (xmlNameURI.length() > 0)
{
xmlName = nsRegistry.registerQName(xmlName);
String prefix = xmlName.getPrefix();
elName = prefix + ":" + localPart;
-
- nsAttr.append(" xmlns:" + prefix + "='" + nsURI +
"'");
+ if (namespaces.get(xmlNameURI) == null ||
!prefix.equals(namespaces.get(xmlNameURI)))
+ {
+ nsAttr.append(" xmlns:" + prefix + "='" + xmlNameURI
+ "'");
+ namespaces.put(xmlNameURI, prefix);
+ }
}
else
{
elName = localPart;
}
- if (additionalNamespaces != null)
+ if (nsExtras != null)
{
- for (String ns : additionalNamespaces)
+ for (String nsURI : nsExtras)
{
- if (ns.equals(nsURI))
- continue;
-
- String prefix = nsRegistry.getPrefix(ns);
- nsAttr.append(" xmlns:" + prefix + "='" + ns +
"'");
+ String prefix = nsRegistry.getPrefix(nsURI);
+ if (namespaces.get(nsURI) == null || !prefix.equals(namespaces.get(nsURI)))
+ {
+ nsAttr.append(" xmlns:" + prefix + "='" + nsURI +
"'");
+ namespaces.put(nsURI, prefix);
+ }
}
}
String xmlFragment;
if (valueStr == null)
{
- String xmlns = " xmlns:" + Constants.PREFIX_XSI + "='" +
Constants.NS_SCHEMA_XSI + "'";
- xmlFragment = "<" + elName + nsAttr + " " +
Constants.PREFIX_XSI + ":nil='1'" + xmlns + "/>";
+ String xsins = "";
+ if (namespaces.get(Constants.NS_SCHEMA_XSI) == null ||
!Constants.PREFIX_XSI.equals(namespaces.get(xmlNameURI)))
+ {
+ xsins = " xmlns:" + Constants.PREFIX_XSI + "='" +
Constants.NS_SCHEMA_XSI + "'";
+ namespaces.put(Constants.NS_SCHEMA_XSI, Constants.PREFIX_XSI);
+ }
+
+ xmlFragment = "<" + elName + nsAttr + " " +
Constants.PREFIX_XSI + ":nil='1'" + xsins + "/>";
}
else
{
- if(normalize)
+ if (normalize)
valueStr = normalize(valueStr);
+
xmlFragment = "<" + elName + nsAttr + ">" + valueStr +
"</" + elName + ">";
}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,34 +1,36 @@
/*
-* 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.
-*/
+ * 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.ws.core.jaxrpc.binding.jbossxb;
+// $Id$
+
import java.io.InputStream;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
- * @version $Id$
* @since Jul 5, 2006
*/
-public interface JBossXBUnmarshaller {
+public interface JBossXBUnmarshaller
+{
Object unmarshal(InputStream is) throws UnmarshalException;
Object getProperty(String name);
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -106,7 +106,7 @@
public void doPost(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
{
- if(log.isDebugEnabled()) log.debug("doPost: " + req.getRequestURI());
+ log.debug("doPost: " + req.getRequestURI());
try
{
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/EndpointContext.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/EndpointContext.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/EndpointContext.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -51,7 +51,7 @@
public HttpSession getHttpSession()
{
- return request.getSession();
+ return request.getSession(true);
}
public MessageContext getMessageContext()
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -37,9 +37,11 @@
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import javax.activation.DataHandler;
@@ -47,8 +49,10 @@
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
import javax.servlet.ServletContext;
+import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
@@ -148,13 +152,13 @@
{
if (host == null || host.trim().length() == 0)
{
- if(log.isDebugEnabled()) log.debug("Using undefined host: " +
UNDEFINED_HOSTNAME);
+ log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
host = UNDEFINED_HOSTNAME;
}
if ("0.0.0.0".equals(host))
{
InetAddress localHost = InetAddress.getLocalHost();
- if(log.isDebugEnabled()) log.debug("Using local host: " +
localHost.getHostName());
+ log.debug("Using local host: " + localHost.getHostName());
host = localHost.getHostName();
}
this.webServiceHost = host;
@@ -394,6 +398,8 @@
public void processSOAPRequest(ObjectName sepID, InputStream inStream, OutputStream
outStream, EndpointContext context) throws Exception
{
+ final String SESSION_COOKIES = "org.jboss.ws.cookies";
+
ServiceEndpoint wsEndpoint = getServiceEndpointByID(sepID);
if (wsEndpoint == null)
throw new WSException("Cannot obtain endpoint for: " + sepID);
@@ -402,12 +408,32 @@
ServerEndpointMetaData sepMetaData =
wsEndpoint.getServiceEndpointInfo().getServerEndpointMetaData();
Type type = sepMetaData.getType();
- PropertyCallback httpSessionCallback = new HttpSessionPropertyCallback(context);
ServletContext servletContext = context.getServletContext();
HttpServletRequest httpRequest = context.getHttpServletRequest();
HttpServletResponse httpResponse = context.getHttpServletResponse();
ServletHeaderSource headerSource = new ServletHeaderSource(httpRequest,
httpResponse);
-
+
+ // Default to does not create a new HTTPSession
+ Object lasySession = new HttpSessionPropertyCallback(context);
+
+ Cookie[] cookies = httpRequest.getCookies();
+ if (cookies != null)
+ {
+ HttpSession httpSession = httpRequest.getSession(true);
+ lasySession = httpSession;
+
+ Set<Cookie> sessionCoookies =
(Set<Cookie>)httpSession.getAttribute(SESSION_COOKIES);
+ if (sessionCoookies == null)
+ {
+ sessionCoookies = new HashSet<Cookie>();
+ httpSession.setAttribute(SESSION_COOKIES, sessionCoookies);
+ }
+ for (Cookie cookie : cookies)
+ {
+ sessionCoookies.add(cookie);
+ }
+ }
+
// Associate a message context with the current thread
CommonMessageContext msgContext;
if (type == EndpointMetaData.Type.JAXRPC)
@@ -416,7 +442,7 @@
msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
- msgContext.put(MessageContextJAXRPC.SERVLET_SESSION, httpSessionCallback);
+ msgContext.put(MessageContextJAXRPC.SERVLET_SESSION, lasySession);
}
else
{
@@ -466,6 +492,15 @@
httpResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
+ // Copy the cookies to the response
+ HttpSession httpSession = httpRequest.getSession();
+ Set<Cookie> sessionCoookies = httpSession != null ?
(Set<Cookie>)httpSession.getAttribute(SESSION_COOKIES) : null;
+ if (sessionCoookies != null)
+ {
+ for (Cookie cookie : sessionCoookies)
+ httpResponse.addCookie(cookie);
+ }
+
sendResponse(outStream, msgContext, isFault);
}
finally
@@ -497,7 +532,7 @@
}
if (wsaTo != null)
{
- if(log.isDebugEnabled()) log.debug("Sending response to addressing
destination: " + wsaTo);
+ log.debug("Sending response to addressing destination: " + wsaTo);
new SOAPConnectionImpl().callOneWay(resMessage, wsaTo);
}
else
@@ -510,7 +545,7 @@
*/
public String processSOAPRequest(ObjectName sepID, String inMessage) throws Exception
{
- if(log.isDebugEnabled()) log.debug("processSOAPRequest: " + sepID);
+ log.debug("processSOAPRequest: " + sepID);
ByteArrayInputStream inputStream = new
ByteArrayInputStream(inMessage.getBytes("UTF-8"));
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(512);
@@ -620,7 +655,7 @@
// Register the endpoint with the MBeanServer
registry.put(sepID, wsEndpoint);
- if(log.isDebugEnabled()) log.debug("WebService created: " + sepID);
+ log.debug("WebService created: " + sepID);
}
/** Start a service endpoint
@@ -671,7 +706,7 @@
registry.remove(sepID);
ServiceEndpointInfo seInfo = wsEndpoint.getServiceEndpointInfo();
- if(log.isDebugEnabled()) log.debug("WebService destroyed: " +
seInfo.getServerEndpointMetaData().getEndpointAddress());
+ log.debug("WebService destroyed: " +
seInfo.getServerEndpointMetaData().getEndpointAddress());
}
public void create() throws Exception
@@ -686,7 +721,7 @@
public void destroy() throws Exception
{
- if(log.isDebugEnabled()) log.debug("Destroy service endpoint manager");
+ log.debug("Destroy service endpoint manager");
MBeanServer server = getJMXServer();
if (server != null)
{
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -45,6 +45,7 @@
import javax.xml.transform.stream.StreamSource;
import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.utils.DOMUtils;
@@ -209,6 +210,23 @@
}
}
}
+
+ // Process additional soap encoded body elements
+ boolean attachHRefElements =
Constants.URI_SOAP11_ENC.equals(soapEnv.getAttributeNS(envNS,
"encodingStyle"));
+ attachHRefElements = attachHRefElements ||
Constants.URI_SOAP11_ENC.equals(soapBody.getAttributeNS(envNS,
"encodingStyle"));
+ attachHRefElements = attachHRefElements && itBody.hasNext();
+ while(attachHRefElements && itBody.hasNext())
+ {
+ Element srcElement = (Element)itBody.next();
+ soapBody.addChildElement(soapFactory.createElement(srcElement, true));
+ }
+
+ // Inline all attached href elements
+ if (attachHRefElements)
+ {
+ HRefInlineHandler inlineHandler = new HRefInlineHandler(soapBody);
+ inlineHandler.processHRefs();
+ }
return soapEnv;
}
@@ -218,7 +236,6 @@
soapBody.removeContents();
Element srcElement = (Element)domBodyElement;
- registerNamespacesLocally(srcElement);
QName beName = DOMUtils.getElementQName(domBodyElement);
SOAPContentElement destElement = new SOAPBodyElementDoc(beName);
@@ -244,7 +261,6 @@
while (itBodyElement.hasNext())
{
Element srcElement = (Element)itBodyElement.next();
- registerNamespacesLocally(srcElement);
Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(),
srcElement.getNamespaceURI());
SOAPContentElement destElement = new SOAPContentElement(name);
@@ -321,20 +337,4 @@
}
return child;
}
-
- /**
- * Register globally available namespaces on element level.
- * This is necessary to ensure that each xml fragment is valid.
- */
- private void registerNamespacesLocally(Element srcElement)
- {
- if (srcElement.getPrefix() == null)
- {
- srcElement.setAttribute("xmlns", srcElement.getNamespaceURI());
- }
- else
- {
- srcElement.setAttribute("xmlns:" + srcElement.getPrefix(),
srcElement.getNamespaceURI());
- }
- }
}
Copied: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java (from
rev 2700,
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java
(rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,168 @@
+/*
+ * 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.ws.core.soap;
+
+//$Id$
+
+import java.util.Iterator;
+
+import javax.xml.soap.Node;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPBodyElement;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.Text;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Inline rpc/encoded hrefs
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 27-Mar-2007
+ */
+public class HRefInlineHandler
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(HRefInlineHandler.class);
+
+ private SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
+ private SOAPBody soapBody;
+
+ public HRefInlineHandler(SOAPBody soapBody)
+ {
+ this.soapBody = soapBody;
+ }
+
+ public void processHRefs() throws SOAPException
+ {
+ String bodyStr = DOMWriter.printNode(soapBody, true);
+ log.debug("Begin processHRefs:\n" + bodyStr);
+
+ SOAPBodyElement bodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+ processElement(bodyElement);
+
+ Iterator it = soapBody.getChildElements();
+ while (it.hasNext())
+ {
+ // Remove id elements
+ SOAPElement soapElement = (SOAPElement)it.next();
+ if ((soapElement instanceof SOAPBodyElement) == false)
+ soapBody.removeChild(soapElement);
+ }
+
+ bodyStr = DOMWriter.printNode(soapBody, true);
+ log.debug("End processHRefs:\n" + bodyStr);
+ }
+
+ private void processElement(SOAPElement soapElement) throws SOAPException
+ {
+ // Do inner first outer last
+ Iterator it = soapElement.getChildElements();
+ while (it.hasNext())
+ {
+ Node childElement = (Node)it.next();
+ if (childElement instanceof SOAPElement)
+ processElement((SOAPElement)childElement);
+ }
+
+ String href = soapElement.getAttribute("href");
+ if (href.length() > 0)
+ {
+ processHRef(soapElement, href);
+ soapElement.removeAttribute("href");
+ }
+ }
+
+ private void processHRef(SOAPElement hrefElement, String href) throws SOAPException
+ {
+ SOAPElement idElement = null;
+
+ Iterator it = soapBody.getChildElements();
+ while (it.hasNext())
+ {
+ SOAPElement auxElement = (SOAPElement)it.next();
+ if (href.equals("#" + auxElement.getAttribute("id")))
+ {
+ idElement = (SOAPElement)auxElement;
+ break;
+ }
+ }
+
+ if (idElement == null)
+ throw new IllegalStateException("Cannot get href element: " + href);
+
+ // process nested hrefs
+ processElement(idElement);
+
+ // Copy most attributes, except id
+ copyMostAttributes(hrefElement, idElement);
+
+ // Append id element children
+ if (DOMUtils.hasChildElements(idElement))
+ {
+ Iterator itid = idElement.getChildElements();
+ while (itid.hasNext())
+ {
+ Node childNode = (Node)itid.next();
+ if (childNode instanceof SOAPElement)
+ {
+ SOAPElement childClone = soapFactory.createElement((SOAPElement)childNode,
true);
+ hrefElement.addChildElement(childClone);
+ }
+ else if (childNode instanceof Text)
+ {
+ String value = childNode.getValue();
+ hrefElement.setValue(value);
+ }
+ }
+ }
+ // If no children, copy the value
+ else
+ {
+ String value = idElement.getValue();
+ hrefElement.setValue(value);
+ }
+ }
+
+ private void copyMostAttributes(Element destElement, Element srcElement)
+ {
+ NamedNodeMap attribs = srcElement.getAttributes();
+ for (int i = 0; i < attribs.getLength(); i++)
+ {
+ Attr attr = (Attr)attribs.item(i);
+ String uri = attr.getNamespaceURI();
+ String qname = attr.getName();
+ String value = attr.getNodeValue();
+
+ // Do not copy the id attribute
+ if ("id".equals(qname) == false)
+ destElement.setAttributeNS(uri, qname, value);
+ }
+ }
+
+}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/ObjectContent.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/ObjectContent.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/ObjectContent.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -123,7 +123,6 @@
{
QName xmlType = container.getXmlType();
Class javaType = container.getJavaType();
- QName xmlName = container.getElementQName();
log.debug("getXMLFragment from Object [xmlType=" + xmlType +
",javaType=" + javaType + "]");
@@ -132,7 +131,6 @@
throw new WSException("MessageContext not available");
SerializationContext serContext = msgContext.getSerializationContext();
- serContext.setProperty(ParameterMetaData.class.getName(),
container.getParamMetaData());
serContext.setJavaType(javaType);
TypeMappingImpl typeMapping = serContext.getTypeMapping();
@@ -150,7 +148,8 @@
ser = new NullValueSerializer();
}
- Result result = ser.serialize(xmlName, xmlType, getObjectValue(), serContext,
null);
+ Result result = ser.serialize(container, serContext);
+
xmlFragment = new XMLFragment(result);
log.debug("xmlFragment: " + xmlFragment);
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentElement.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentElement.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPContentElement.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -103,7 +103,7 @@
this.soapContent = new DOMContent(this);
}
- ParameterMetaData getParamMetaData()
+ public ParameterMetaData getParamMetaData()
{
if (paramMetaData == null)
throw new IllegalStateException("Parameter meta data not available");
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -638,7 +638,7 @@
Iterator it = getChildElements();
while (it.hasNext())
{
- SOAPElement el = (SOAPElement)it.next();
+ Node el = (Node)it.next();
el.detachNode();
}
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -106,9 +106,6 @@
else
{
SOAPBodyElement soapBodyElement = (SOAPBodyElement)bodyChildren.next();
- if (bodyChildren.hasNext())
- throw new SOAPException("SOAPBody has more than on child
element");
-
Name soapName = soapBodyElement.getElementName();
QName xmlElementName = new QName(soapName.getURI(),
soapName.getLocalName());
opMetaData = epMetaData.getOperation(xmlElementName);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -104,7 +104,7 @@
private MimeHeaders getMimeHeaders(Map metadata)
{
- if(log.isDebugEnabled()) log.debug("getMimeHeaders from: " + metadata);
+ log.debug("getMimeHeaders from: " + metadata);
MimeHeaders headers = new MimeHeaders();
Iterator i = metadata.keySet().iterator();
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java 2007-03-28 10:08:25
UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java 2007-03-28 10:11:05
UTC (rev 2702)
@@ -37,6 +37,7 @@
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -52,6 +53,7 @@
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.core.utils.MimeUtils;
import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -125,9 +127,10 @@
SerializationContext serContext = msgContext.getSerializationContext();
ParameterMetaData pmd = container.getParamMetaData();
+ OperationMetaData opMetaData = pmd.getOperationMetaData();
serContext.setProperty(ParameterMetaData.class.getName(), pmd);
serContext.setJavaType(javaType);
- List<Class> registeredTypes =
pmd.getOperationMetaData().getEndpointMetaData().getRegisteredTypes();
+ List<Class> registeredTypes =
opMetaData.getEndpointMetaData().getRegisteredTypes();
serContext.setProperty(SerializationContext.CONTEXT_TYPES,
registeredTypes.toArray(new Class[0]));
try
@@ -137,7 +140,7 @@
DeserializerFactoryBase deserializerFactory =
getDeserializerFactory(typeMapping, javaType, xmlType);
DeserializerSupport des =
(DeserializerSupport)deserializerFactory.getDeserializer();
- obj = des.deserialize(container.getElementQName(), xmlType,
xmlFragment.getSource(), serContext);
+ obj = des.deserialize(container, serContext);
if (obj != null)
{
Class objType = obj.getClass();
@@ -254,7 +257,10 @@
*/
private void expandContainerChildren()
{
+ // Do nothing if the source of the XMLFragment is the container itself
Element domElement = xmlFragment.toElement();
+ if (domElement == container)
+ return;
String rootLocalName = domElement.getLocalName();
String rootPrefix = domElement.getPrefix();
@@ -268,7 +274,7 @@
// Remove all child nodes
container.removeContents();
-
+
// Copy attributes
DOMUtils.copyAttributes(container, domElement);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -164,29 +164,7 @@
private static String sourceToStringFragement(Source source)
{
-
throw new IllegalArgumentException("Source should never be converted to
String");
-
- /*new
RuntimeException("sourceToStringFragement").printStackTrace(System.out);
-
- String xmlFragment = null;
-
- try {
- TransformerFactory tf = TransformerFactory.newInstance();
- ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
- tf.newTransformer().transform(source, new StreamResult(baos));
- xmlFragment = new String(baos.toByteArray());
- if (xmlFragment.startsWith("<?xml"))
- {
- int index = xmlFragment.indexOf(">");
- xmlFragment = xmlFragment.substring(index + 1);
- }
- } catch (TransformerException e) {
- WSException.rethrow(e);
- }
-
- return xmlFragment;
- */
}
public void writeTo(Writer writer) throws IOException
@@ -206,9 +184,6 @@
*/
private void writeSource(Writer writer) throws IOException
{
-
- //new RuntimeException("writeSource").printStackTrace(System.out);
-
if (source instanceof DOMSource)
{
DOMSource domSource = (DOMSource)source;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -51,6 +51,7 @@
registerEntity("http://java.sun.com/xml/ns/javaee",
"schema/javaee_web_services_1_2.xsd");
registerEntity("http://www.w3.org/2005/08/addressing",
"schema/ws-addr.xsd");
registerEntity("http://schemas.xmlsoap.org/ws/2004/08/eventing",
"eventing.xsd");
+
registerEntity("http://www.w3.org/2002/06/soap-encoding",
"soap-encoding_200206.xsd");
registerEntity("http://schemas.xmlsoap.org/soap/encoding/",
"soap-encoding_1_1.xsd");
registerEntity("http://www.ibm.com/webservices/xsd/j2ee_web_services...;,
"j2ee_web_services_client_1_1.xsd");
registerEntity("http://www.ibm.com/webservices/xsd/j2ee_web_services...;,
"j2ee_web_services_1_1.xsd");
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -37,6 +37,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.EncodedTypeMapping;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
@@ -63,7 +64,6 @@
import org.jboss.ws.metadata.umdm.TypeMappingMetaData;
import org.jboss.ws.metadata.umdm.TypesMetaData;
import org.jboss.ws.metadata.umdm.WrappedParameter;
-import org.jboss.ws.metadata.wsdl.WSDLBinding;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperationInput;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperationOutput;
@@ -160,6 +160,16 @@
QName opQName = wsdlOperation.getName();
String opName = opQName.getLocalPart();
+ WSDLBindingOperation wsdlBindingOperation =
wsdlOperation.getBindingOperation();
+ if (wsdlBindingOperation == null)
+ log.warn("Could not locate binding operation for:" + opQName);
+
+ // Change operation according namespace defined on binding
+ // <soap:body use="encoded"
namespace="http://MarshallTestW2J.org/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ String namespaceURI = wsdlBindingOperation.getNamespaceURI();
+ if (namespaceURI != null)
+ opQName = new QName(namespaceURI, opName);
+
// Set java method name
String javaName = opName.substring(0, 1).toLowerCase() + opName.substring(1);
ServiceEndpointMethodMapping seiMethodMapping = null;
@@ -186,8 +196,6 @@
opMetaData.setOneWay(true);
// Set the operation SOAPAction
- WSDLBinding wsdlBinding =
wsdlDefinitions.getBindingByInterfaceName(wsdlInterface.getName());
- WSDLBindingOperation wsdlBindingOperation =
wsdlBinding.getOperationByRef(opQName);
if (wsdlBindingOperation != null)
opMetaData.setSOAPAction(wsdlBindingOperation.getSOAPAction());
@@ -214,7 +222,8 @@
}
}
- private ParameterMetaData buildInputParameter(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
TypeMappingImpl typeMapping, String partName, QName xmlName, QName xmlType, int pos,
boolean optional)
+ private ParameterMetaData buildInputParameter(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
+ TypeMappingImpl typeMapping, String partName, QName xmlName, QName xmlType, int
pos, boolean optional)
{
WSDLRPCSignatureItem item = wsdlOperation.getRpcSignatureitem(partName);
if (item != null)
@@ -276,7 +285,8 @@
return inMetaData;
}
- private ParameterMetaData buildOutputParameter(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping, int
pos, String partName, QName xmlName, QName xmlType, TypeMappingImpl typeMapping, boolean
optional)
+ private ParameterMetaData buildOutputParameter(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
+ int pos, String partName, QName xmlName, QName xmlType, TypeMappingImpl
typeMapping, boolean optional)
{
// Default is first listed output
boolean hasReturnMapping = opMetaData.getReturnParameter() == null;
@@ -361,10 +371,12 @@
}
}
+ setupSOAPArrayParameter(outMetaData);
return outMetaData;
}
- private int processBindingParameters(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
TypeMappingImpl typeMapping, WSDLBindingOperation bindingOperation, int wsdlPosition)
+ private int processBindingParameters(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
+ TypeMappingImpl typeMapping, WSDLBindingOperation bindingOperation, int
wsdlPosition)
{
WSDLBindingOperationInput bindingInput = bindingOperation.getInputs()[0];
for (WSDLSOAPHeader header : bindingInput.getSoapHeaders())
@@ -373,7 +385,8 @@
QName xmlType = lookupSchemaType(wsdlOperation, xmlName);
String partName = header.getPartName();
- ParameterMetaData pmd = buildInputParameter(opMetaData, wsdlOperation,
seiMethodMapping, typeMapping, partName, xmlName, xmlType, wsdlPosition++,
!header.isIncludeInSignature());
+ ParameterMetaData pmd = buildInputParameter(opMetaData, wsdlOperation,
seiMethodMapping, typeMapping, partName, xmlName, xmlType, wsdlPosition++, !header
+ .isIncludeInSignature());
if (pmd != null)
pmd.setInHeader(true);
}
@@ -391,7 +404,8 @@
return wsdlPosition;
}
- private int processBindingOutputParameters(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
TypeMappingImpl typeMapping, WSDLBindingOperation bindingOperation, int wsdlPosition)
+ private int processBindingOutputParameters(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
+ TypeMappingImpl typeMapping, WSDLBindingOperation bindingOperation, int
wsdlPosition)
{
WSDLBindingOperationOutput bindingOutput = bindingOperation.getOutputs()[0];
for (WSDLSOAPHeader header : bindingOutput.getSoapHeaders())
@@ -408,7 +422,8 @@
{
QName xmlType = lookupSchemaType(wsdlOperation, xmlName);
- ParameterMetaData pmd = buildOutputParameter(opMetaData, wsdlOperation,
seiMethodMapping, wsdlPosition, partName, xmlName, xmlType, typeMapping,
!header.isIncludeInSignature());
+ ParameterMetaData pmd = buildOutputParameter(opMetaData, wsdlOperation,
seiMethodMapping, wsdlPosition, partName, xmlName, xmlType, typeMapping, !header
+ .isIncludeInSignature());
if (pmd != null)
{
pmd.setInHeader(true);
@@ -469,7 +484,17 @@
if (xmlTypeLocalPart.indexOf("ArrayOfArrayOf") >= 0)
compJavaType = compJavaType.getComponentType();
- QName compXMLType = new LiteralTypeMapping().getXMLType(compJavaType);
+ boolean isSoapEnc =
xmlTypeLocalPart.toLowerCase().indexOf("soapenc") > 0;
+ TypeMappingImpl typeMapping = isSoapEnc ? new EncodedTypeMapping() : new
LiteralTypeMapping();
+ QName compXMLType = typeMapping.getXMLType(compJavaType);
+
+ if (compXMLType != null)
+ {
+ boolean isBase64 =
compXMLType.getLocalPart().startsWith("base64");
+ if (isBase64 &&
xmlTypeLocalPart.toLowerCase().indexOf("hex") > 0)
+ compXMLType = isSoapEnc ? Constants.TYPE_SOAP11_HEXBINARY :
Constants.TYPE_LITERAL_HEXBINARY;
+ }
+
paramMetaData.setSOAPArrayCompType(compXMLType);
}
catch (ClassNotFoundException e)
@@ -490,17 +515,17 @@
String ns = xmlType.getNamespaceURI() != null ? xmlType.getNamespaceURI() :
"";
XSTypeDefinition xsType = schemaModel.getTypeDefinition(localPart, ns);
XOPScanner scanner = new XOPScanner();
- if(scanner.findXOPTypeDef(xsType)!=null |
(localPart.equals("base64Binary")&&ns.equals(Constants.NS_SCHEMA_XSD)))
+ if (scanner.findXOPTypeDef(xsType) != null |
(localPart.equals("base64Binary") &&
ns.equals(Constants.NS_SCHEMA_XSD)))
{
// FIXME: read the xmime:contentType from the element declaration
// See SchemaUtils#findXOPTypeDef(XSTypeDefinition typeDef) for details
/*
- FIXME: the classloader is not set yet
- paramMetaData.setXopContentType(
- MimeUtils.resolveMimeType(paramMetaData.getJavaType())
- );
- */
+ FIXME: the classloader is not set yet
+ paramMetaData.setXopContentType(
+ MimeUtils.resolveMimeType(paramMetaData.getJavaType())
+ );
+ */
paramMetaData.setXOP(true);
@@ -581,7 +606,9 @@
}
}
- private int processDocElement(OperationMetaData operation, WSDLInterfaceOperation
wsdlOperation, WSDLBindingOperation bindingOperation, ServiceEndpointMethodMapping
seiMethodMapping, TypeMappingImpl typeMapping, List<WrappedParameter>
wrappedParameters, List<WrappedParameter> wrappedResponseParameters)
+ private int processDocElement(OperationMetaData operation, WSDLInterfaceOperation
wsdlOperation, WSDLBindingOperation bindingOperation,
+ ServiceEndpointMethodMapping seiMethodMapping, TypeMappingImpl typeMapping,
List<WrappedParameter> wrappedParameters,
+ List<WrappedParameter> wrappedResponseParameters)
{
WSDLInterfaceOperationInput input = wsdlOperation.getInputs()[0];
WSDLBindingOperationInput bindingInput = bindingOperation.getInputs()[0];
@@ -606,7 +633,6 @@
ParameterMetaData inMetaData = new ParameterMetaData(operation, xmlName, xmlType,
javaTypeName);
operation.addParameter(inMetaData);
-
// Set the variable names
if (inMetaData.getOperationMetaData().isDocumentWrapped())
{
@@ -618,7 +644,6 @@
if (javaXmlTypeMapping == null)
throw new WSException("Cannot obtain java/xml type mapping for: " +
xmlType);
-
Map<String, String> variableMap =
createVariableMappingMap(javaXmlTypeMapping.getVariableMappings());
for (MethodParamPartsMapping partMapping :
seiMethodMapping.getMethodParamPartsMappings())
{
@@ -639,17 +664,15 @@
if (variable == null)
throw new IllegalArgumentException("Could not determine variable name
for element: " + elementName);
- WrappedParameter wrapped = new WrappedParameter(new QName(elementName),
partMapping.getParamType(), variable,
- partMapping.getParamPosition());
+ WrappedParameter wrapped = new WrappedParameter(new QName(elementName),
partMapping.getParamType(), variable, partMapping.getParamPosition());
-
String parameterMode = wsdlMessageMapping.getParameterMode();
if (parameterMode == null || parameterMode.length() < 2)
throw new IllegalArgumentException("Invalid parameter mode for
element: " + elementName);
- if (! "OUT".equals(parameterMode))
+ if (!"OUT".equals(parameterMode))
wrappedParameters.add(wrapped);
- if (! "IN".equals(parameterMode))
+ if (!"IN".equals(parameterMode))
{
wrapped.setHolder(true);
// wrapped parameters can not be shared between request/response objects
(accessors)
@@ -738,9 +761,8 @@
return isWrapParameters;
}
- private int processOutputDocElement(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation,
- ServiceEndpointMethodMapping seiMethodMapping, TypeMappingImpl typeMapping,
List<WrappedParameter> wrappedResponseParameters,
- int wsdlPosition)
+ private int processOutputDocElement(OperationMetaData opMetaData,
WSDLInterfaceOperation wsdlOperation, ServiceEndpointMethodMapping seiMethodMapping,
+ TypeMappingImpl typeMapping, List<WrappedParameter>
wrappedResponseParameters, int wsdlPosition)
{
WSDLInterfaceOperationOutput opOutput = wsdlOperation.getOutputs()[0];
QName xmlName = opOutput.getElement();
@@ -828,6 +850,7 @@
}
setupXOPAttachmentParameter(wsdlOperation, outMetaData);
+ setupSOAPArrayParameter(outMetaData);
}
if (hasReturnMapping)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -63,16 +63,16 @@
private QName xmlType;
private String javaTypeName;
private String faultBeanName;
- private Class<? extends Exception> javaType;
- private Class<?> faultBean;
+ private Class javaType;
+ private Class faultBean;
private Method faultInfoMethod;
- private Constructor<? extends Exception> serviceExceptionConstructor;
+ private Constructor serviceExceptionConstructor;
private Method[] serviceExceptionGetters;
private WrappedParameter[] faultBeanProperties;
- private Class<?>[] propertyTypes;
+ private Class[] propertyTypes;
public FaultMetaData(OperationMetaData operation, QName xmlName, QName xmlType, String
javaTypeName)
{
@@ -123,7 +123,7 @@
/** Load the java type.
* It should only be cached during eager initialization.
*/
- public Class<? extends Exception> getJavaType()
+ public Class getJavaType()
{
if (javaType != null)
return javaType;
@@ -134,8 +134,9 @@
try
{
ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
- Class<?> genericType = JavaUtils.loadJavaType(javaTypeName, loader);
- Class<? extends Exception> exceptionType =
genericType.asSubclass(Exception.class);
+ Class exceptionType = JavaUtils.loadJavaType(javaTypeName, loader);
+ if (Exception.class.isAssignableFrom(exceptionType) == false)
+ throw new IllegalStateException("Is not assignable to exception: "
+ exceptionType);
if
(opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().isEagerInitialized())
{
@@ -258,7 +259,7 @@
String[] propertyNames = xmlType.propOrder();
int propertyCount = propertyNames.length;
- propertyTypes = new Class<?>[propertyCount];
+ propertyTypes = new Class[propertyCount];
faultBeanProperties = new WrappedParameter[propertyCount];
serviceExceptionGetters = new Method[propertyCount];
@@ -269,7 +270,7 @@
try
{
PropertyDescriptor propertyDescriptor = new
PropertyDescriptor(propertyName, faultBean);
- Class<?> propertyType = propertyDescriptor.getPropertyType();
+ Class propertyType = propertyDescriptor.getPropertyType();
WrappedParameter faultBeanProperty = new WrappedParameter(null,
propertyType.getName(), propertyName, i);
faultBeanProperty.setAccessor(accessorFactory.create(faultBeanProperty));
@@ -310,11 +311,11 @@
}
}
- private AccessorFactory getAccessorFactory(Class<?> faultBean)
+ private AccessorFactory getAccessorFactory(Class faultBean)
{
// This should catch all cases due to the constraints that JAX-WS puts on the fault
bean
// However, if issues arrise then switch this to a full jaxb reflection library
- XmlAccessorType type = faultBean.getAnnotation(XmlAccessorType.class);
+ XmlAccessorType type =
(XmlAccessorType)faultBean.getAnnotation(XmlAccessorType.class);
if (type != null && type.value() == XmlAccessType.FIELD)
return ReflectiveFieldAccessor.FACTORY_CREATOR.create(this);
@@ -380,7 +381,7 @@
* (i.e. does it match the pattern in JAX-WS 2.5)? */
if (faultInfoMethod != null)
{
- serviceException = serviceExceptionConstructor.newInstance(message,
faultBean);
+ serviceException =
(Exception)serviceExceptionConstructor.newInstance(message, faultBean);
}
else
{
@@ -395,7 +396,7 @@
propertyValues[i] = faultBeanProperties[i].accessor().get(faultBean);
log.debug("constructing " + javaType.getSimpleName() + ":
" + Arrays.toString(propertyValues));
- serviceException = serviceExceptionConstructor.newInstance(propertyValues);
+ serviceException =
(Exception)serviceExceptionConstructor.newInstance(propertyValues);
}
}
catch (InstantiationException e)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -40,8 +40,8 @@
import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.extensions.xop.jaxws.AttachmentScanResult;
import org.jboss.ws.extensions.xop.jaxws.ReflectiveAttachmentRefScanner;
-import org.jboss.ws.extensions.xop.jaxws.AttachmentScanResult;
import org.jboss.ws.metadata.acessor.ReflectiveMethodAccessor;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
@@ -367,9 +367,15 @@
return soapArrayCompType;
}
- public void setSOAPArrayCompType(QName xmlType)
+ public void setSOAPArrayCompType(QName compXmlType)
{
- this.soapArrayCompType = xmlType;
+ if (compXmlType != null && !compXmlType.equals(soapArrayCompType))
+ {
+ String logmsg = "SOAPArrayCompType: [xmlType=" + xmlType +
",compType=" + compXmlType + "]";
+ log.debug((soapArrayCompType == null ? "set" : "reset") +
logmsg);
+ }
+
+ this.soapArrayCompType = compXmlType;
}
@@ -548,29 +554,30 @@
buffer.append("\n xmlName=" + getXmlName());
buffer.append("\n partName=" + getPartName());
buffer.append("\n xmlType=" + getXmlType());
+
+ if (soapArrayParam)
+ buffer.append("\n soapArrayCompType=" + soapArrayCompType);
+
buffer.append("\n javaType=" + getJavaTypeName());
buffer.append("\n mode=" + getMode());
buffer.append("\n inHeader=" + isInHeader());
buffer.append("\n index=" + index);
- if (soapArrayParam)
- buffer.append("\n soapArrayCompType=" + soapArrayCompType);
-
if (isSwA())
{
buffer.append("\n isSwA=" + isSwA());
buffer.append("\n mimeTypes=" + getMimeTypes());
}
- if (wrappedParameters != null)
- buffer.append("\n wrappedParameters=" + wrappedParameters);
-
if (isXOP())
{
buffer.append("\n isXOP=" + isXOP());
buffer.append("\n mimeTypes=" + getMimeTypes());
}
+ if (wrappedParameters != null)
+ buffer.append("\n wrappedParameters=" + wrappedParameters);
+
return buffer.toString();
}
}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/wsdl/WSDLBindingOperation.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/wsdl/WSDLBindingOperation.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/wsdl/WSDLBindingOperation.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -57,6 +57,8 @@
private String encodingStyle = Constants.URI_LITERAL_ENC;
/** WSDL-1.1, soapAction attribute from the soap:operation element */
private String soapAction;
+ /** WSDL-1.1, namespaceURI attribute from the soap:body element */
+ private String namespaceURI;
/** A OPTIONAL set of Binding Message Reference components */
private List<WSDLBindingOperationInput> inputs = new
ArrayList<WSDLBindingOperationInput>();
@@ -104,6 +106,16 @@
this.soapAction = soapAction;
}
+ public String getNamespaceURI()
+ {
+ return namespaceURI;
+ }
+
+ public void setNamespaceURI(String namespaceURI)
+ {
+ this.namespaceURI = namespaceURI;
+ }
+
public WSDLBindingOperationInput[] getInputs()
{
WSDLBindingOperationInput[] arr = new WSDLBindingOperationInput[inputs.size()];
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -257,9 +257,6 @@
return null;
WSDLBindingOperation bindingOperation = binding.getOperationByRef(getName());
- if (bindingOperation == null)
- return null;
-
return bindingOperation;
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -444,28 +444,19 @@
if (locationURL == null)
{
- String parentProtocol = parentURL.getProtocol();
- if (parentProtocol.indexOf("file") >= 0 &&
!location.startsWith("/"))
+ if (location.startsWith("/"))
+ location = location.substring(1);
+
+ String path = parentURL.toExternalForm();
+ path = path.substring(0, path.lastIndexOf("/"));
+
+ while (location.startsWith("../"))
{
- String path = parentURL.toExternalForm();
path = path.substring(0, path.lastIndexOf("/"));
- locationURL = new URL(path + "/" + location);
+ location = location.substring(3);
}
- else if (parentProtocol.startsWith("http") &&
location.startsWith("/"))
- {
- String path = parentProtocol + "://" + parentURL.getHost() +
":" + parentURL.getPort();
- locationURL = new URL(path + location);
- }
- else if (parentProtocol.equals("jar") &&
!location.startsWith("/"))
- {
- String path = parentURL.toExternalForm();
- path = path.substring(0, path.lastIndexOf("/"));
- locationURL = new URL(path + "/" + location);
- }
- else
- {
- throw new WSDLException(WSDLException.OTHER_ERROR, "Unsupported
schemaLocation: " + location);
- }
+
+ locationURL = new URL(path + "/" + location);
}
log.trace("Modified schemaLocation: " + locationURL);
@@ -504,8 +495,7 @@
WSDLInterfaceOperation destOperation = new WSDLInterfaceOperation(destInterface,
srcOperation.getName());
destOperation.setStyle(getOperationStyle(srcWsdl, srcPortType, srcOperation));
- if(srcOperation.getStyle()!=null
- && false ==
OperationType.NOTIFICATION.equals(srcOperation.getStyle()))
+ if (srcOperation.getStyle() != null && false ==
OperationType.NOTIFICATION.equals(srcOperation.getStyle()))
{
processOperationInput(srcWsdl, srcOperation, destOperation, srcPortType);
}
@@ -525,7 +515,7 @@
Message srcMessage = srcInput.getMessage();
if (srcMessage == null)
throw new WSDLException(WSDLException.INVALID_WSDL, "Cannot find input
message on operation " + srcOperation.getName() + " on port type: "
- + srcPortType.getQName());
+ + srcPortType.getQName());
log.trace("processOperationInput: " + srcMessage.getQName());
@@ -586,15 +576,16 @@
}
}
- private boolean ignorePart(PortType srcPortType, Part srcPart) {
+ private boolean ignorePart(PortType srcPortType, Part srcPart)
+ {
boolean canBeSkipped = false;
QName parentName = srcPortType.getQName();
- if(skippedSWAParts.containsKey(parentName))
+ if (skippedSWAParts.containsKey(parentName))
{
- if(skippedSWAParts.get(parentName).contains(srcPart.getName()))
+ if (skippedSWAParts.get(parentName).contains(srcPart.getName()))
{
- log.trace("Skip attachment part: " +
parentName+"->"+srcPart.getName());
+ log.trace("Skip attachment part: " + parentName + "->"
+ srcPart.getName());
canBeSkipped = true;
}
}
@@ -613,11 +604,8 @@
Message srcMessage = srcOutput.getMessage();
if (srcMessage == null)
- throw new WSDLException(
- WSDLException.INVALID_WSDL,
- "Cannot find output message on operation " + srcOperation.getName()
+
- " on port type: "+ srcPortType.getQName()
- );
+ throw new WSDLException(WSDLException.INVALID_WSDL, "Cannot find output
message on operation " + srcOperation.getName() + " on port type: "
+ + srcPortType.getQName());
log.trace("processOperationOutput: " + srcMessage.getQName());
@@ -645,7 +633,8 @@
for (Part srcPart : (List<Part>)srcMessage.getOrderedParts(null))
{
// Skip SWA attachment parts
- if(ignorePart(srcPortType, srcPart)) continue;
+ if (ignorePart(srcPortType, srcPart))
+ continue;
if (Constants.URI_STYLE_DOCUMENT == destOperation.getStyle())
{
@@ -913,47 +902,49 @@
* @param srcBinding
* @param srcWsdl
*/
- private void preProcessSWAParts(Binding srcBinding, Definition srcWsdl) {
+ private void preProcessSWAParts(Binding srcBinding, Definition srcWsdl)
+ {
Iterator opIt = srcBinding.getBindingOperations().iterator();
- while(opIt.hasNext())
+ while (opIt.hasNext())
{
BindingOperation bindingOperation = (BindingOperation)opIt.next();
// Input
- if(bindingOperation.getBindingInput()!=null)
- markSWAParts( bindingOperation.getBindingInput().getExtensibilityElements() ,
srcBinding, srcWsdl);
+ if (bindingOperation.getBindingInput() != null)
+ markSWAParts(bindingOperation.getBindingInput().getExtensibilityElements(),
srcBinding, srcWsdl);
// Output
- if(bindingOperation.getBindingOutput()!=null)
- markSWAParts( bindingOperation.getBindingOutput().getExtensibilityElements()
, srcBinding, srcWsdl);
+ if (bindingOperation.getBindingOutput() != null)
+ markSWAParts(bindingOperation.getBindingOutput().getExtensibilityElements(),
srcBinding, srcWsdl);
}
}
- private void markSWAParts(List extensions, Binding srcBinding, Definition srcWsdl) {
+ private void markSWAParts(List extensions, Binding srcBinding, Definition srcWsdl)
+ {
Iterator extIt = extensions.iterator();
- while(extIt.hasNext())
+ while (extIt.hasNext())
{
Object o = extIt.next();
- if(o instanceof MIMEMultipartRelated)
+ if (o instanceof MIMEMultipartRelated)
{
QName portTypeName = srcBinding.getPortType().getQName();
- if(log.isTraceEnabled())
+ if (log.isTraceEnabled())
log.trace("SWA found on portType" + portTypeName);
MIMEMultipartRelated mrel = (MIMEMultipartRelated)o;
Iterator mimePartIt = mrel.getMIMEParts().iterator();
- while(mimePartIt.hasNext())
+ while (mimePartIt.hasNext())
{
MIMEPart mimePartDesc = (MIMEPart)mimePartIt.next();
List mimePartExt = mimePartDesc.getExtensibilityElements();
- if(! mimePartExt.isEmpty() && (mimePartExt.get(0) instanceof
MIMEContent))
+ if (!mimePartExt.isEmpty() && (mimePartExt.get(0) instanceof
MIMEContent))
{
MIMEContent mimeContent = (MIMEContent)mimePartExt.get(0);
- if(skippedSWAParts.get(portTypeName)==null)
+ if (skippedSWAParts.get(portTypeName) == null)
skippedSWAParts.put(portTypeName, new ArrayList<String>());
skippedSWAParts.get(portTypeName).add(mimeContent.getPart());
}
@@ -1017,18 +1008,18 @@
private void processBindingOperation(Definition srcWsdl, WSDLBinding destBinding,
String bindingStyle, BindingOperation srcBindingOperation) throws WSDLException
{
- String srcBindingName = srcBindingOperation.getName();
- log.trace("processBindingOperation: " + srcBindingName);
+ String srcOperationName = srcBindingOperation.getName();
+ log.trace("processBindingOperation: " + srcOperationName);
WSDLInterface destInterface = destBinding.getInterface();
String namespaceURI = destInterface.getName().getNamespaceURI();
WSDLBindingOperation destBindingOperation = new WSDLBindingOperation(destBinding);
- QName refQName = new QName(namespaceURI, srcBindingName);
+ QName refQName = new QName(namespaceURI, srcOperationName);
destBindingOperation.setRef(refQName);
destBinding.addOperation(destBindingOperation);
- String opName = srcBindingName;
+ String opName = srcOperationName;
WSDLInterfaceOperation destIntfOperation = destInterface.getOperation(opName);
// Process soap:operation@soapAction, soap:operation@style
@@ -1071,11 +1062,10 @@
}
private void processBindingInput(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, final WSDLInterfaceOperation destIntfOperation,
- final BindingOperation srcBindingOperation,
BindingInput srcBindingInput) throws WSDLException
+ final BindingOperation srcBindingOperation, BindingInput srcBindingInput) throws
WSDLException
{
log.trace("processBindingInput");
- QName soap11Body = new QName(Constants.NS_SOAP11, "body");
List<ExtensibilityElement> extList =
srcBindingInput.getExtensibilityElements();
WSDLBindingOperationInput input = new
WSDLBindingOperationInput(destBindingOperation);
destBindingOperation.addInput(input);
@@ -1100,15 +1090,14 @@
}
};
- processBindingReference(srcWsdl, destBindingOperation, destIntfOperation,
soap11Body, extList, input, srcBindingOperation, cb);
+ processBindingReference(srcWsdl, destBindingOperation, destIntfOperation, extList,
input, srcBindingOperation, cb);
}
private void processBindingOutput(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, final WSDLInterfaceOperation destIntfOperation,
- final BindingOperation srcBindingOperation,
BindingOutput srcBindingOutput) throws WSDLException
+ final BindingOperation srcBindingOperation, BindingOutput srcBindingOutput)
throws WSDLException
{
log.trace("processBindingInput");
- QName soap11Body = new QName(Constants.NS_SOAP11, "body");
List<ExtensibilityElement> extList =
srcBindingOutput.getExtensibilityElements();
WSDLBindingOperationOutput output = new
WSDLBindingOperationOutput(destBindingOperation);
destBindingOperation.addOutput(output);
@@ -1134,19 +1123,28 @@
}
};
- processBindingReference(srcWsdl, destBindingOperation, destIntfOperation,
soap11Body, extList, output, srcBindingOperation, cb);
+ processBindingReference(srcWsdl, destBindingOperation, destIntfOperation, extList,
output, srcBindingOperation, cb);
}
- private void processBindingReference(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, WSDLInterfaceOperation destIntfOperation, QName soap11Body,
- List<ExtensibilityElement> extList,
WSDLBindingMessageReference reference, BindingOperation srcBindingOperation,
ReferenceCallback callback) throws WSDLException
+ private void processBindingReference(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, WSDLInterfaceOperation destIntfOperation,
List<ExtensibilityElement> extList,
+ WSDLBindingMessageReference reference, BindingOperation srcBindingOperation,
ReferenceCallback callback)
+ throws WSDLException
{
for (ExtensibilityElement extElement : extList)
{
QName elementType = extElement.getElementType();
- if (soap11Body.equals(elementType) || SOAP12_BODY.equals(elementType))
+ if (extElement instanceof SOAPBody)
{
processEncodingStyle(extElement, destBindingOperation);
+
+ // <soap:body use="encoded"
namespace="http://MarshallTestW2J.org/"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ String namespaceURI = ((SOAPBody)extElement).getNamespaceURI();
+ destBindingOperation.setNamespaceURI(namespaceURI);
}
+ else if (SOAP12_BODY.equals(elementType))
+ {
+ processEncodingStyle(extElement, destBindingOperation);
+ }
else if (extElement instanceof SOAPHeader)
{
SOAPHeader header = (SOAPHeader)extElement;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -282,10 +282,10 @@
private WSDLBindingMessageReference getBindingReference(WSDLInterfaceMessageReference
reference)
{
- WSDLInterfaceOperation operation = reference.getWsdlOperation();
- WSDLInterface wsdlInterface = operation.getWsdlInterface();
+ WSDLInterfaceOperation wsdlOperation = reference.getWsdlOperation();
+ WSDLInterface wsdlInterface = wsdlOperation.getWsdlInterface();
WSDLBinding binding =
wsdlInterface.getWsdlDefinitions().getBindingByInterfaceName(wsdlInterface.getName());
- WSDLBindingOperation bindingOperation =
binding.getOperationByRef(operation.getName());
+ WSDLBindingOperation bindingOperation =
binding.getOperationByRef(wsdlOperation.getName());
WSDLBindingMessageReference[] bindingReferences;
if (reference instanceof WSDLInterfaceOperationInput)
Modified: trunk/jbossws-core/src/resources/samples/ant-import/build-thirdparty.xml
===================================================================
--- trunk/jbossws-core/src/resources/samples/ant-import/build-thirdparty.xml 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/resources/samples/ant-import/build-thirdparty.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -37,7 +37,7 @@
<get
src="${jboss.repository}/jboss/ejb3/${jboss-ejb3}/bin/ejb3.deployer"
dest="${thirdparty.dir}/ejb3.deployer.zip" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar"
dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-client.jar"
dest="${thirdparty.dir}/jbosssx-client.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/jbossws-wsconsume-impl/${jbossws-wsconsume}/lib/jbossws-wsconsume-impl.jar"
dest="${thirdparty.dir}/jbossws-wsconsume-impl.jar"
usetimestamp="true" verbose="true"/>
+ <get
src="${jboss.repository}/jboss/jbossws-wsconsume-impl/${jbossws-wsconsume-impl}/lib/jbossws-wsconsume-impl.jar"
dest="${thirdparty.dir}/jbossws-wsconsume-impl.jar"
usetimestamp="true" verbose="true"/>
<get
src="${jboss.repository}/jbossas/core-libs/${jbossas-core-libs}/lib/jboss-j2ee.jar"
dest="${thirdparty.dir}/jboss-j2ee.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/jbpm/bpel/${jbpm-bpel}/lib/jbpm-bpel.sar"
dest="${thirdparty.dir}/jbpm-bpel.sar" usetimestamp="true"
verbose="true" />
<get
src="${jboss.repository}/oswego-concurrent/${oswego-concurrent}/lib/concurrent.jar"
dest="${thirdparty.dir}/concurrent.jar" usetimestamp="true"
verbose="true"/>
Modified: trunk/jbossws-core/src/resources/samples/ant.properties.example
===================================================================
--- trunk/jbossws-core/src/resources/samples/ant.properties.example 2007-03-28 10:08:25
UTC (rev 2701)
+++ trunk/jbossws-core/src/resources/samples/ant.properties.example 2007-03-28 10:11:05
UTC (rev 2702)
@@ -3,7 +3,7 @@
# Required JBoss Home
jboss50.home=/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2
-jboss42.home=/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.CR1-ejb3
+jboss42.home=/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA
jboss40.home=/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3
# The JBoss server under test. This can be [jboss50|jboss42|jboss40|tomcat]
Modified: trunk/jbossws-core/src/resources/samples/build.xml
===================================================================
--- trunk/jbossws-core/src/resources/samples/build.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/jbossws-core/src/resources/samples/build.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -382,6 +382,14 @@
<copy todir="${tests.output.dir}/classes"
file="${tests.etc.dir}/jndi.properties"/>
<copy todir="${tests.output.dir}/classes"
file="${tests.etc.dir}/log4j.xml"/>
+ <!-- copy handler definitions -->
+ <copy todir="${tests.output.dir}/classes">
+ <fileset dir="${tests.java.dir}">
+ <include name="**/*.xml"/>
+ </fileset>
+ </copy>
+
+ <!-- copy non binary files -->
<copy todir="${tests.output.dir}/resources">
<fileset dir="${tests.resources.dir}">
<include name="**/*.wsdl"/>
Modified: trunk/jbossws-core/src/resources/samples/version.properties
===================================================================
--- trunk/jbossws-core/src/resources/samples/version.properties 2007-03-28 10:08:25 UTC
(rev 2701)
+++ trunk/jbossws-core/src/resources/samples/version.properties 2007-03-28 10:11:05 UTC
(rev 2702)
@@ -17,7 +17,7 @@
jboss-jbossxb=@jboss-jbossxb@
jboss-security=@jboss-security@
jbossas-core-libs=@jbossas-core-libs@
-jbossws-wsconsume=@jbossws-wsconsume@
+jbossws-wsconsume-impl=@jbossws-wsconsume-impl@
oswego-concurrent=@oswego-concurrent@
stax-api=@stax-api@
sun-jaf=@sun-jaf@
Copied: trunk/jbossws-core/src/resources/schema/soap-encoding_200206.xsd (from rev 2700,
branches/jbossws-1.2.1/jbossws-core/src/resources/schema/soap-encoding_200206.xsd)
===================================================================
--- trunk/jbossws-core/src/resources/schema/soap-encoding_200206.xsd
(rev 0)
+++ trunk/jbossws-core/src/resources/schema/soap-encoding_200206.xsd 2007-03-28 10:11:05
UTC (rev 2702)
@@ -0,0 +1,562 @@
+<!-- Schema defined in the SOAP Version 1.2 Part 2 specification
+ Last Call Working Draft:
+
http://www.w3.org/TR/2002/WD-soap12-part2-20020621/
+ $Id$
+
+ Copyright 2001 W3C (Massachusetts Institute of Technology,
+ Institut National de Recherche en Informatique et en Automatique,
+ Keio University). All Rights Reserved.
+
http://www.w3.org/Consortium/Legal/
+
+ This document is governed by the W3C Software License [1] as
+ described in the FAQ [2].
+
+ [1]
http://www.w3.org/Consortium/Legal/copyright-software-19980720
+ [2]
http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+-->
+<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.w3.org/2002/06/soap-encoding"
targetNamespace="http://www.w3.org/2002/06/soap-encoding">
+
+ <xs:attribute name="root" type="xs:boolean"
default="0">
+ <xs:annotation>
+ <xs:documentation>
+ 'root' can be used to distinguish serialization roots from other
+ elements that are present in a serialization but are not roots of
+ a serialized value graph
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="commonAttributes">
+ <xs:annotation>
+ <xs:documentation>
+ Attributes common to all elements that function as accessors or
+ represent independent (multi-ref) values. The ref attribute is
+ intended to be used in a manner like CONREF. That is, the element
+ content should be empty iff the ref attribute appears
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute name="ref" type="xs:IDREF"/>
+ <xs:anyAttribute namespace="##other"
processContents="lax"/>
+ </xs:attributeGroup>
+
+ <!-- Global Attributes. The following attributes are intended to be usable via
qualified attribute names on any complex type referencing them. -->
+
+ <!-- Array attributes. Needed to give the type and dimensions of an array's
contents, and the offset for partially-transmitted arrays. -->
+
+ <xs:simpleType name="arraySizeBase">
+ <xs:annotation>
+ <xs:documentation>
+ A list type that allows * and non negative integers. Used as the
+ base type for arraySize below.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:nonNegativeInteger">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+
+
+ <xs:simpleType name="arraySize">
+ <xs:annotation>
+ <xs:documentation>
+ Pattern based restriction of the arraySizeBase list type. Used
+ as the type of the arraySize attribute. Restricts asterisk ( * )
+ to first list item only. Instances must contain at least an
+ asterisk ( * ) or a nonNegativeInteger. May contain other
+ nonNegativeIntegers as subsequent list items.
+ Valid instances include;
+
+ *
+ 1
+ * 2
+ 2 2
+ * 2 0
+
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="tns:arraySizeBase">
+ <xs:pattern value="(\*|(\d+))(\s*\d+)*"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:attribute name="arraySize" type="tns:arraySize"/>
+ <xs:attribute name="itemType" type="xs:QName"/>
+
+ <xs:attributeGroup name="arrayAttributes">
+ <xs:attribute ref="tns:arraySize"/>
+ <xs:attribute ref="tns:itemType"/>
+ </xs:attributeGroup>
+
+ <xs:group name="Array">
+ <xs:sequence>
+ <xs:any namespace="##any" minOccurs="0"
maxOccurs="unbounded" processContents="lax"/>
+ </xs:sequence>
+ </xs:group>
+
+ <xs:element name="Array" type="tns:Array"/>
+ <xs:complexType name="Array">
+ <xs:annotation>
+ <xs:documentation>
+ 'Array' is a complex type for accessors identified by position
+ </xs:documentation>
+ </xs:annotation>
+ <xs:group ref="tns:Array" minOccurs="0"/>
+ <xs:attributeGroup ref="tns:arrayAttributes"/>
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:complexType>
+
+ <!-- 'Struct' is a complex type for accessors identified by name.
+ Constraint: No element may be have the same name as any other,
+ nor may any element have a maxOccurs > 1. -->
+
+ <xs:element name="Struct" type="tns:Struct"/>
+
+ <xs:group name="Struct">
+ <xs:sequence>
+ <xs:any namespace="##any" minOccurs="0"
maxOccurs="unbounded" processContents="lax"/>
+ </xs:sequence>
+ </xs:group>
+
+ <xs:complexType name="Struct">
+ <xs:group ref="tns:Struct" minOccurs="0"/>
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:complexType>
+
+ <!-- 'Base64' can be used to serialize binary data using base64 encoding
+ as defined in RFC2045 but without the MIME line length limitation. -->
+
+ <xs:simpleType name="base64">
+ <xs:restriction base="xs:base64Binary"/>
+ </xs:simpleType>
+
+ <!-- Element declarations corresponding to each of the simple types in the
+ XML Schemas Specification. -->
+
+ <xs:element name="duration" type="tns:duration"/>
+ <xs:complexType name="duration">
+ <xs:simpleContent>
+ <xs:extension base="xs:duration">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="dateTime" type="tns:dateTime"/>
+ <xs:complexType name="dateTime">
+ <xs:simpleContent>
+ <xs:extension base="xs:dateTime">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="time" type="tns:time"/>
+ <xs:complexType name="time">
+ <xs:simpleContent>
+ <xs:extension base="xs:time">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="date" type="tns:date"/>
+ <xs:complexType name="date">
+ <xs:simpleContent>
+ <xs:extension base="xs:date">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gYearMonth" type="tns:gYearMonth"/>
+ <xs:complexType name="gYearMonth">
+ <xs:simpleContent>
+ <xs:extension base="xs:gYearMonth">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gYear" type="tns:gYear"/>
+ <xs:complexType name="gYear">
+ <xs:simpleContent>
+ <xs:extension base="xs:gYear">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gMonthDay" type="tns:gMonthDay"/>
+ <xs:complexType name="gMonthDay">
+ <xs:simpleContent>
+ <xs:extension base="xs:gMonthDay">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gDay" type="tns:gDay"/>
+ <xs:complexType name="gDay">
+ <xs:simpleContent>
+ <xs:extension base="xs:gDay">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="gMonth" type="tns:gMonth"/>
+ <xs:complexType name="gMonth">
+ <xs:simpleContent>
+ <xs:extension base="xs:gMonth">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="boolean" type="tns:boolean"/>
+ <xs:complexType name="boolean">
+ <xs:simpleContent>
+ <xs:extension base="xs:boolean">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="base64Binary" type="tns:base64Binary"/>
+ <xs:complexType name="base64Binary">
+ <xs:simpleContent>
+ <xs:extension base="xs:base64Binary">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="hexBinary" type="tns:hexBinary"/>
+ <xs:complexType name="hexBinary">
+ <xs:simpleContent>
+ <xs:extension base="xs:hexBinary">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="float" type="tns:float"/>
+ <xs:complexType name="float">
+ <xs:simpleContent>
+ <xs:extension base="xs:float">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="double" type="tns:double"/>
+ <xs:complexType name="double">
+ <xs:simpleContent>
+ <xs:extension base="xs:double">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="anyURI" type="tns:anyURI"/>
+ <xs:complexType name="anyURI">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="QName" type="tns:QName"/>
+ <xs:complexType name="QName">
+ <xs:simpleContent>
+ <xs:extension base="xs:QName">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="string" type="tns:string"/>
+ <xs:complexType name="string">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="normalizedString"
type="tns:normalizedString"/>
+ <xs:complexType name="normalizedString">
+ <xs:simpleContent>
+ <xs:extension base="xs:normalizedString">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="token" type="tns:token"/>
+ <xs:complexType name="token">
+ <xs:simpleContent>
+ <xs:extension base="xs:token">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="language" type="tns:language"/>
+ <xs:complexType name="language">
+ <xs:simpleContent>
+ <xs:extension base="xs:language">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="Name" type="tns:Name"/>
+ <xs:complexType name="Name">
+ <xs:simpleContent>
+ <xs:extension base="xs:Name">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="NMTOKEN" type="tns:NMTOKEN"/>
+ <xs:complexType name="NMTOKEN">
+ <xs:simpleContent>
+ <xs:extension base="xs:NMTOKEN">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="NCName" type="tns:NCName"/>
+ <xs:complexType name="NCName">
+ <xs:simpleContent>
+ <xs:extension base="xs:NCName">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!--
+ For compatibility with XML 1.0 the following element declaration and
+ associated complex type definition should NOT be used. It is
+ provided here for completenes.
+ -->
+ <xs:element name="NMTOKENS" type="tns:NMTOKENS"/>
+ <xs:complexType name="NMTOKENS">
+ <xs:simpleContent>
+ <xs:extension base="xs:NMTOKENS">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!--
+ For compatibility with XML 1.0 the following element declaration and
+ associated complex type definition should NOT be used. It is
+ provided here for completenes.
+ -->
+ <xs:element name="ID" type="tns:ID"/>
+ <xs:complexType name="ID">
+ <xs:simpleContent>
+ <xs:extension base="xs:ID">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!--
+ For compatibility with XML 1.0 the following element declaration and
+ associated complex type definition should NOT be used. It is
+ provided here for completenes.
+ -->
+ <xs:element name="IDREF" type="tns:IDREF"/>
+ <xs:complexType name="IDREF">
+ <xs:simpleContent>
+ <xs:extension base="xs:IDREF">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!--
+ For compatibility with XML 1.0 the following element declaration and
+ associated complex type definition should NOT be used. It is
+ provided here for completenes.
+ -->
+ <xs:element name="ENTITY" type="tns:ENTITY"/>
+ <xs:complexType name="ENTITY">
+ <xs:simpleContent>
+ <xs:extension base="xs:ENTITY">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!--
+ For compatibility with XML 1.0 the following element declaration and
+ associated complex type definition should NOT be used. It is
+ provided here for completenes.
+ -->
+ <xs:element name="IDREFS" type="tns:IDREFS"/>
+ <xs:complexType name="IDREFS">
+ <xs:simpleContent>
+ <xs:extension base="xs:IDREFS">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!--
+ For compatibility with XML 1.0 the following element declaration and
+ associated complex type definition should NOT be used. It is
+ provided here for completenes.
+ -->
+ <xs:element name="ENTITIES" type="tns:ENTITIES"/>
+ <xs:complexType name="ENTITIES">
+ <xs:simpleContent>
+ <xs:extension base="xs:ENTITIES">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="decimal" type="tns:decimal"/>
+ <xs:complexType name="decimal">
+ <xs:simpleContent>
+ <xs:extension base="xs:decimal">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="integer" type="tns:integer"/>
+ <xs:complexType name="integer">
+ <xs:simpleContent>
+ <xs:extension base="xs:integer">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="nonPositiveInteger"
type="tns:nonPositiveInteger"/>
+ <xs:complexType name="nonPositiveInteger">
+ <xs:simpleContent>
+ <xs:extension base="xs:nonPositiveInteger">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="negativeInteger"
type="tns:negativeInteger"/>
+ <xs:complexType name="negativeInteger">
+ <xs:simpleContent>
+ <xs:extension base="xs:negativeInteger">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="long" type="tns:long"/>
+ <xs:complexType name="long">
+ <xs:simpleContent>
+ <xs:extension base="xs:long">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="int" type="tns:int"/>
+ <xs:complexType name="int">
+ <xs:simpleContent>
+ <xs:extension base="xs:int">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="short" type="tns:short"/>
+ <xs:complexType name="short">
+ <xs:simpleContent>
+ <xs:extension base="xs:short">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="byte" type="tns:byte"/>
+ <xs:complexType name="byte">
+ <xs:simpleContent>
+ <xs:extension base="xs:byte">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="nonNegativeInteger"
type="tns:nonNegativeInteger"/>
+ <xs:complexType name="nonNegativeInteger">
+ <xs:simpleContent>
+ <xs:extension base="xs:nonNegativeInteger">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="unsignedLong" type="tns:unsignedLong"/>
+ <xs:complexType name="unsignedLong">
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedLong">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="unsignedInt" type="tns:unsignedInt"/>
+ <xs:complexType name="unsignedInt">
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedInt">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="unsignedShort" type="tns:unsignedShort"/>
+ <xs:complexType name="unsignedShort">
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedShort">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="unsignedByte" type="tns:unsignedByte"/>
+ <xs:complexType name="unsignedByte">
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedByte">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="positiveInteger"
type="tns:positiveInteger"/>
+ <xs:complexType name="positiveInteger">
+ <xs:simpleContent>
+ <xs:extension base="xs:positiveInteger">
+ <xs:attributeGroup ref="tns:commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="anyType"/>
+</xs:schema>
\ No newline at end of file
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-03-28 10:08:25 UTC (rev
2701)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-03-28 10:11:05 UTC (rev
2702)
@@ -142,6 +142,34 @@
</metainf>
</jar>
+ <!-- jaxrpc-encoded-href.war -->
+ <war warfile="${tests.output.dir}/libs/jaxrpc-encoded-href.war"
webxml="${tests.output.dir}/resources/jaxrpc/encoded/href/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/resources/jaxrpc/encoded/href/WEB-INF">
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="webservices.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <jar
jarfile="${tests.output.dir}/libs/jaxrpc-encoded-href-client.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.class"/>
+ <include
name="org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.class"/>
+ </fileset>
+ <metainf
dir="${tests.output.dir}/resources/jaxrpc/encoded/href/WEB-INF">
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ <metainf
dir="${tests.output.dir}/resources/jaxrpc/encoded/href/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ </jar>
+
<!-- jaxrpc-encoded-marshalltest.war -->
<war warfile="${tests.output.dir}/libs/jaxrpc-encoded-marshalltest.war"
webxml="${tests.output.dir}/resources/jaxrpc/encoded/marshalltest/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-03-28 10:08:25 UTC (rev 2701)
+++ trunk/jbossws-tests/build.xml 2007-03-28 10:11:05 UTC (rev 2702)
@@ -277,9 +277,11 @@
<taskdef name="servicegen"
classname="org.jbpm.bpel.ant.ServiceGeneratorTask">
<classpath refid="jbpm.bpel.classpath"/>
</taskdef>
+ <!-- Resurect when bpel supports wsdl4j-1.6.2
<servicegen
processfile="${tests.output.dir}/libs/jaxrpc-samples-wsbpel-hello-process.zip"
outputdir="${tests.output.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF/wsdl"
bindingfile="hello-binding-.wsdl"
servicefile="hello-service.wsdl" />
+ -->
</target>
<!--
@@ -353,7 +355,7 @@
<wsprovide
resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurity"
genwsdl="true"
sei="org.jboss.test.ws.jaxws.samples.wssecurity.HelloJavaBean"/>
</target>
- <target name="generate-resources"
depends="wstools,wsprovide">
+ <target name="generate-resources"
depends="servicegen,wstools,wsprovide">
<javac destdir="${tests.output.dir}/classes"
debug="${javac.debug}" encoding="utf-8"
verbose="${javac.verbose}" deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}">
<src path="${tests.output.dir}/wstools/java"/>
<exclude name="org/jboss/test/ws/interop/**"/>
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -50,7 +50,7 @@
/** Get the URL to the defining schema */
protected XSModel getSchemaModel(QName xmlType, Class javaType) throws Exception
{
- File xsdFile = new
File("resources/common/jbossxb/ComplexTypesService_RPC.xsd");
+ File xsdFile = new
File("../src/resources/common/jbossxb/ComplexTypesService_RPC.xsd");
assertTrue(xsdFile.exists());
return new JavaToXSD().parseSchema(xsdFile.toURL());
@@ -110,8 +110,8 @@
public void testCompositeType() throws Exception
{
- String xmlStr = "<ns1:CompositeType_1 xmlns:ns1='" +
TARGET_NAMESPACE
- + "'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+ String xmlStr =
+ "<ns1:CompositeType_1 xmlns:ns1='" + TARGET_NAMESPACE +
"'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
" <composite>" +
" <composite xsi:nil='1'/>" +
" <dateTime xsi:nil='1'/>" +
Copied: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href (from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href)
Deleted:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.java
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.java 2007-03-28
09:17:06 UTC (rev 2700)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,124 +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.encoded.href;
-
-import java.io.ByteArrayInputStream;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.handler.GenericHandler;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.MessageContext;
-import javax.xml.rpc.handler.soap.SOAPMessageContext;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPMessage;
-
-import org.jboss.logging.Logger;
-
-public class HRefHandler extends GenericHandler
-{
- // Provide logging
- private static Logger log = Logger.getLogger(HRefHandler.class);
-
- private static boolean hrefEncoding;
-
- protected QName[] headers;
-
- public QName[] getHeaders()
- {
- return headers;
- }
-
- public void init(HandlerInfo info)
- {
- log.info("init: " + info);
- headers = info.getHeaders();
- }
-
- public static void setHrefEncoding(boolean flag)
- {
- hrefEncoding = flag;
- }
-
- public boolean handleRequest(MessageContext msgContext)
- {
- log.info("handleRequest");
-
- if (hrefEncoding)
- {
- try
- {
- String envStr =
- "<env:Envelope
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- "<env:Body
env:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:enc='http://schemas.xmlsoap.org/soap/encoding/'>" +
- "<ns1:base64BinaryTest
xmlns:ns1='http://marshalltestservice.org/wsdl'>" +
- "<arrayOfbyte_1 href='#ID1'/>" +
- "</ns1:base64BinaryTest>" +
- "<enc:base64 id='ID1'
xsi:type='enc:base64'>SHJlZkVuY29kZWRSZXF1ZXN0</enc:base64>" +
- "</env:Body>" +
- "</env:Envelope>";
-
- MessageFactory factory = MessageFactory.newInstance();
- SOAPMessage reqMessage = factory.createMessage(null, new
ByteArrayInputStream(envStr.getBytes()));
- ((SOAPMessageContext)msgContext).setMessage(reqMessage);
- }
- catch (Exception e)
- {
- throw new JAXRPCException(e);
- }
- }
-
- return true;
- }
-
-
- public boolean handleResponse(MessageContext msgContext)
- {
- log.info("handleResponse");
-
- if (hrefEncoding)
- {
- try
- {
- String envStr =
- "<env:Envelope
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- "<env:Body
env:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:enc='http://schemas.xmlsoap.org/soap/encoding/'>" +
- "<ns1:base64BinaryTestResponse
xmlns:ns1='http://marshalltestservice.org/wsdl'>" +
- "<result href='#ID1'/>" +
- "</ns1:base64BinaryTestResponse>" +
- "<enc:base64 id='ID1'
xsi:type='enc:base64'>SHJlZkVuY29kZWRSZXNwb25zZQ==</enc:base64>" +
- "</env:Body>" +
- "</env:Envelope>";
-
- MessageFactory factory = MessageFactory.newInstance();
- SOAPMessage resMessage = factory.createMessage(null, new
ByteArrayInputStream(envStr.getBytes()));
- ((SOAPMessageContext)msgContext).setMessage(resMessage);
- }
- catch (Exception e)
- {
- throw new JAXRPCException(e);
- }
- }
-
- return true;
- }
-}
Copied:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.java (from
rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.java)
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.java
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/HRefHandler.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,124 @@
+/*
+ * 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.encoded.href;
+
+import java.io.ByteArrayInputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+
+public class HRefHandler extends GenericHandler
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(HRefHandler.class);
+
+ private static boolean hrefEncoding;
+
+ protected QName[] headers;
+
+ public QName[] getHeaders()
+ {
+ return headers;
+ }
+
+ public void init(HandlerInfo info)
+ {
+ log.info("init: " + info);
+ headers = info.getHeaders();
+ }
+
+ public static void setHrefEncoding(boolean flag)
+ {
+ hrefEncoding = flag;
+ }
+
+ public boolean handleRequest(MessageContext msgContext)
+ {
+ log.info("handleRequest");
+
+ if (hrefEncoding)
+ {
+ try
+ {
+ String envStr =
+ "<env:Envelope
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ "<env:Body
env:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:enc='http://schemas.xmlsoap.org/soap/encoding/'>" +
+ "<ns1:base64BinaryTest
xmlns:ns1='http://marshalltestservice.org/wsdl'>" +
+ "<arrayOfbyte_1 href='#ID1'/>" +
+ "</ns1:base64BinaryTest>" +
+ "<enc:base64 id='ID1'
xsi:type='enc:base64'>SHJlZkVuY29kZWRSZXF1ZXN0</enc:base64>" +
+ "</env:Body>" +
+ "</env:Envelope>";
+
+ MessageFactory factory = MessageFactory.newInstance();
+ SOAPMessage reqMessage = factory.createMessage(null, new
ByteArrayInputStream(envStr.getBytes()));
+ ((SOAPMessageContext)msgContext).setMessage(reqMessage);
+ }
+ catch (Exception e)
+ {
+ throw new JAXRPCException(e);
+ }
+ }
+
+ return true;
+ }
+
+
+ public boolean handleResponse(MessageContext msgContext)
+ {
+ log.info("handleResponse");
+
+ if (hrefEncoding)
+ {
+ try
+ {
+ String envStr =
+ "<env:Envelope
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ "<env:Body
env:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:enc='http://schemas.xmlsoap.org/soap/encoding/'>" +
+ "<ns1:base64BinaryTestResponse
xmlns:ns1='http://marshalltestservice.org/wsdl'>" +
+ "<result href='#ID1'/>" +
+ "</ns1:base64BinaryTestResponse>" +
+ "<enc:base64 id='ID1'
xsi:type='enc:base64'>SHJlZkVuY29kZWRSZXNwb25zZQ==</enc:base64>" +
+ "</env:Body>" +
+ "</env:Envelope>";
+
+ MessageFactory factory = MessageFactory.newInstance();
+ SOAPMessage resMessage = factory.createMessage(null, new
ByteArrayInputStream(envStr.getBytes()));
+ ((SOAPMessageContext)msgContext).setMessage(resMessage);
+ }
+ catch (Exception e)
+ {
+ throw new JAXRPCException(e);
+ }
+ }
+
+ return true;
+ }
+}
Deleted:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.java
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.java 2007-03-28
09:17:06 UTC (rev 2700)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,14 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.ws.jaxrpc.encoded.href;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-public interface MarshallTest extends Remote
-{
- public byte[] base64BinaryTest(byte[] byteArray) throws RemoteException;
-}
Copied:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.java (from
rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.java)
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.java
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTest.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,14 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.jaxrpc.encoded.href;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface MarshallTest extends Remote
+{
+ public byte[] base64BinaryTest(byte[] byteArray) throws RemoteException;
+}
Deleted:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase.java
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase.java 2007-03-28
09:17:06 UTC (rev 2700)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,72 +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.encoded.href;
-
-// $Id$
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * Test soap encoded href
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Mar-2007
- */
-public class MarshallTestCase extends JBossWSTest
-{
- private static MarshallTest port;
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(MarshallTestCase.class,
"jaxrpc-encoded-href.war, jaxrpc-encoded-href-client.jar");
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
- if (port == null)
- {
- InitialContext iniCtx = getInitialContext();
- Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestService");
- port = (MarshallTest)service.getPort(MarshallTest.class);
- }
- }
-
- public void testByteArrayTest() throws Exception
- {
- byte[] retObj = port.base64BinaryTest("Hello World!".getBytes());
- assertEquals("Hello World!", new String(retObj));
- }
-
- public void testHrefMessage() throws Exception
- {
- HRefHandler.setHrefEncoding(true);
- byte[] retObj = port.base64BinaryTest("HandlerReplacesThis".getBytes());
- assertEquals("HrefEncodedResponse", new String(retObj));
- }
-}
Copied:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase.java
(from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase.java)
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase.java
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,72 @@
+/*
+ * 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.encoded.href;
+
+// $Id$
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test soap encoded href
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Mar-2007
+ */
+public class MarshallTestCase extends JBossWSTest
+{
+ private static MarshallTest port;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(MarshallTestCase.class,
"jaxrpc-encoded-href.war, jaxrpc-encoded-href-client.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (MarshallTest)service.getPort(MarshallTest.class);
+ }
+ }
+
+ public void testByteArrayTest() throws Exception
+ {
+ byte[] retObj = port.base64BinaryTest("Hello World!".getBytes());
+ assertEquals("Hello World!", new String(retObj));
+ }
+
+ public void testHrefMessage() throws Exception
+ {
+ HRefHandler.setHrefEncoding(true);
+ byte[] retObj = port.base64BinaryTest("HandlerReplacesThis".getBytes());
+ assertEquals("HrefEncodedResponse", new String(retObj));
+ }
+}
Deleted:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.java
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.java 2007-03-28
09:17:06 UTC (rev 2700)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,26 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.ws.jaxrpc.encoded.href;
-
-import org.jboss.logging.Logger;
-
-public class MarshallTestImpl implements MarshallTest
-{
- // Provide logging
- private static Logger log = Logger.getLogger(MarshallTestImpl.class);
-
- public byte[] base64BinaryTest(byte[] byteArray)
- {
- String message = new String(byteArray);
- log.info("base64BinaryTest: " + message);
-
- if (message == null && message.length() == 0)
- throw new IllegalStateException("Incommig message is null");
-
- HRefHandler.setHrefEncoding("HrefEncodedRequest".equals(message));
- return byteArray;
- }
-}
Copied:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.java
(from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.java)
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.java
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestImpl.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,26 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.jaxrpc.encoded.href;
+
+import org.jboss.logging.Logger;
+
+public class MarshallTestImpl implements MarshallTest
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(MarshallTestImpl.class);
+
+ public byte[] base64BinaryTest(byte[] byteArray)
+ {
+ String message = new String(byteArray);
+ log.info("base64BinaryTest: " + message);
+
+ if (message == null && message.length() == 0)
+ throw new IllegalStateException("Incommig message is null");
+
+ HRefHandler.setHrefEncoding("HrefEncodedRequest".equals(message));
+ return byteArray;
+ }
+}
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws801/JBWS801TestCase.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws801/JBWS801TestCase.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws801/JBWS801TestCase.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,24 +1,24 @@
/*
- * 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.
- */
+ * 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.jbws801;
import java.io.IOException;
@@ -51,14 +51,14 @@
public class JBWS801TestCase extends JBossWSTest
{
private static final String NS_PREFIX = "ns1";
- private static final String NS_URI = "http://org.jboss.webservice/jbws801";
+ private static final String NS_URI =
"http://org.jboss.webservice/attachment";
private static final String CID_MIMEPART = "big";
/** Deploy the test ear */
public static Test suite() throws Exception
{
return JBossWSTestSetup.newTestSetup(JBWS801TestCase.class,
"jaxrpc-jbws801.war");
- }
+ }
public void testLargeFile() throws Exception
{
@@ -118,7 +118,7 @@
if (size == 0)
return -1;
- int ret = (int) Math.min(size, len);
+ int ret = (int)Math.min(size, len);
Arrays.fill(b, off, off + ret, (byte)1);
size -= ret;
@@ -137,8 +137,7 @@
}
}
- private SOAPMessage setupMimeMessage(String rpcMethodName)
- throws Exception
+ private SOAPMessage setupMimeMessage(String rpcMethodName) throws Exception
{
MessageFactory mf = MessageFactory.newInstance();
@@ -172,8 +171,7 @@
/** Send the message and validate the result
*/
- private void sendAndValidateMimeMessage(String rpcMethodName, SOAPMessage msg, long
count)
- throws SOAPException, MalformedURLException
+ private void sendAndValidateMimeMessage(String rpcMethodName, SOAPMessage msg, long
count) throws SOAPException, MalformedURLException
{
SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance();
SOAPConnection con = conFactory.createConnection();
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/samples/handler/ClientSideHandler.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/samples/handler/ClientSideHandler.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/samples/handler/ClientSideHandler.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,32 +1,38 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+ * 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.samples.handler;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.handler.GenericHandler;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.MessageContext;
import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.MimeHeader;
+import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPException;
@@ -71,6 +77,9 @@
SOAPBodyElement soapBodyElement =
(SOAPBodyElement)soapBody.getChildElements().next();
String rpcName = soapBodyElement.getElementName().getLocalName();
+ MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
+ mimeHeaders.setHeader("Cookie", "username=kermit");
+
// testInHeader
if (rpcName.equals("testInHeader"))
{
@@ -107,4 +116,22 @@
return true;
}
+
+ @Override
+ public boolean handleResponse(MessageContext msgContext)
+ {
+ log.info("handleResponse");
+
+ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+ MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
+ String[] cookieValues = mimeHeaders.getHeader("Set-Cookie");
+ if (cookieValues == null)
+ throw new JAXRPCException("Cannot obtain cookie values");
+
+ List<String> cookieList = Arrays.asList(cookieValues);
+ if (!cookieList.contains("username=kermit"))
+ throw new JAXRPCException("Cannot obtain expected cookie value in: " +
cookieList);
+
+ return true;
+ }
}
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -36,7 +36,6 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLException;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
@@ -133,22 +132,6 @@
assertEquals("The 'mafia' boss is currently out of office, please call
again.", info);
}
- public void testBasicSecuredWSDLAccess() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxrpc-samples-ejb/BasicSecured?wsdl");
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- try
- {
- factory.parse(wsdlURL);
- fail("Expect secured wsdl access");
- }
- catch (WSDLException ex)
- {
- String cause = ex.getCause().getMessage();
- assertTrue("Server returned HTTP response code: 401",
cause.startsWith("Server returned HTTP response code: 401"));
- }
- }
-
public void testBasicSecuredServiceAccess() throws Exception
{
InitialContext iniCtx = getInitialContext();
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/TestEndpointImpl.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/TestEndpointImpl.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/wsdlpublish/TestEndpointImpl.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -53,6 +53,6 @@
WSException.rethrow(ex);
}
- return portType.getLocalPart();
+ return portType.toString();
}
}
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -63,6 +63,7 @@
handlerChain.add(new LogHandler());
handlerChain.add(new AuthorizationHandler());
handlerChain.add(new RoutingHandler());
+ handlerChain.add(new MimeHeaderHandler());
bindingProvider.getBinding().setHandlerChain(handlerChain);
String resStr = port.echo("Kermit");
Copied:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/MimeHeaderHandler.java
(from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/MimeHeaderHandler.java)
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/MimeHeaderHandler.java
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/MimeHeaderHandler.java 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,75 @@
+/*
+ * 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.samples.handlerchain;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+
+/**
+ * A client side handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 08-Oct-2005
+ */
+public class MimeHeaderHandler extends GenericSOAPHandler
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(MimeHeaderHandler.class);
+
+ protected boolean handleInbound(MessageContext msgContext)
+ {
+ log.info("handleInbound");
+
+ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+ MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
+ String[] cookieValues = mimeHeaders.getHeader("Set-Cookie");
+ if (cookieValues == null)
+ throw new JAXRPCException("Cannot obtain cookie values");
+
+ List<String> cookieList = Arrays.asList(cookieValues);
+ if (!cookieList.contains("username=kermit"))
+ throw new JAXRPCException("Cannot obtain expected cookie value in: " +
cookieList);
+
+ return true;
+ }
+
+ protected boolean handleOutbound(MessageContext msgContext)
+ {
+ log.info("handleOutbound");
+
+ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+
+ MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
+ mimeHeaders.setHeader("Cookie", "username=kermit");
+
+ return true;
+ }
+}
Copied: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href (from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href)
Copied: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF (from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF)
Deleted:
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/application-client.xml
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/application-client.xml 2007-03-28
09:17:06 UTC (rev 2700)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/application-client.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>JAXRPC simple tests</display-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/MarshallTestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTest</service-endpoint-interface>
- </port-component-ref>
- <handler>
- <handler-name>HrefHandler</handler-name>
-
<handler-class>org.jboss.test.ws.jaxrpc.encoded.href.HRefHandler</handler-class>
- </handler>
- </service-ref>
-
-</application-client>
-
Copied:
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/application-client.xml
(from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/application-client.xml)
===================================================================
--- trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/application-client.xml
(rev 0)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/application-client.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>JAXRPC simple tests</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/MarshallTestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTest</service-endpoint-interface>
+ </port-component-ref>
+ <handler>
+ <handler-name>HrefHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxrpc.encoded.href.HRefHandler</handler-class>
+ </handler>
+ </service-ref>
+
+</application-client>
+
Deleted: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/jboss-client.xml
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/jboss-client.xml 2007-03-28
09:17:06 UTC (rev 2700)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/jboss-client.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,13 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
-
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-encoded-href/MarshallTest?wsdl</wsdl-override>
- </service-ref>
-
-</jboss-client>
Copied: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/jboss-client.xml
(from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/jboss-client.xml)
===================================================================
--- trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/jboss-client.xml
(rev 0)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/META-INF/jboss-client.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-encoded-href/MarshallTest?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
Copied: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF (from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF)
Deleted: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/jaxrpc-mapping.xml
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/jaxrpc-mapping.xml 2007-03-28
09:17:06 UTC (rev 2700)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/jaxrpc-mapping.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<java-wsdl-mapping
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1"
-
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.encoded.href</package-type>
- <
namespaceURI>http://marshalltestservice.org/wsdl</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
-
<service-interface>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTestService</service-interface>
- <wsdl-service-name
xmlns:serviceNS="http://marshalltestservice.org/wsdl">servic...
- <port-mapping>
- <port-name>MarshallTestPort</port-name>
- <java-port-name>MarshallTestPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTest</service-endpoint-interface>
- <wsdl-port-type
xmlns:portTypeNS="http://marshalltestservice.org/wsdl">portT...
- <wsdl-binding
xmlns:bindingNS="http://marshalltestservice.org/wsdl">bindin...
- <service-endpoint-method-mapping>
- <java-method-name>base64BinaryTest</java-method-name>
- <wsdl-operation>base64BinaryTest</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>byte[]</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://marshalltestservice.org/wsdl">wsdlMs...
- <wsdl-message-part-name>arrayOfbyte_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>byte[]</method-return-value>
- <wsdl-message
xmlns:wsdlMsgNS="http://marshalltestservice.org/wsdl">wsdlMs...
- <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/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/jaxrpc-mapping.xml
(from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/jaxrpc-mapping.xml)
===================================================================
--- trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/jaxrpc-mapping.xml
(rev 0)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/jaxrpc-mapping.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<java-wsdl-mapping
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1"
+
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.encoded.href</package-type>
+ <
namespaceURI>http://marshalltestservice.org/wsdl</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+
<service-interface>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTestService</service-interface>
+ <wsdl-service-name
xmlns:serviceNS="http://marshalltestservice.org/wsdl">servic...
+ <port-mapping>
+ <port-name>MarshallTestPort</port-name>
+ <java-port-name>MarshallTestPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTest</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS="http://marshalltestservice.org/wsdl">portT...
+ <wsdl-binding
xmlns:bindingNS="http://marshalltestservice.org/wsdl">bindin...
+ <service-endpoint-method-mapping>
+ <java-method-name>base64BinaryTest</java-method-name>
+ <wsdl-operation>base64BinaryTest</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>byte[]</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS="http://marshalltestservice.org/wsdl">wsdlMs...
+ <wsdl-message-part-name>arrayOfbyte_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>byte[]</method-return-value>
+ <wsdl-message
xmlns:wsdlMsgNS="http://marshalltestservice.org/wsdl">wsdlMs...
+ <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
Deleted: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/web.xml
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/web.xml 2007-03-28
09:17:06 UTC (rev 2700)
+++ trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/web.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
-
- <servlet>
- <servlet-name>MarshallTest</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTestImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>MarshallTest</servlet-name>
- <url-pattern>/MarshallTest</url-pattern>
- </servlet-mapping>
-
-</web-app>
Copied: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/web.xml (from rev
2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/web.xml)
===================================================================
--- trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/web.xml
(rev 0)
+++ trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/web.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
+
+ <servlet>
+ <servlet-name>MarshallTest</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTestImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>MarshallTest</servlet-name>
+ <url-pattern>/MarshallTest</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Deleted: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/webservices.xml
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/webservices.xml 2007-03-28
09:17:06 UTC (rev 2700)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/webservices.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<webservices
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:impl="http://marshalltestservice.org/wsdl"
-
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_web_services_1_1.xsd"
- version="1.1">
-
- <webservice-description>
-
<webservice-description-name>MarshallTestService</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/MarshallTestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component>
- <port-component-name>MarshallTestPort</port-component-name>
- <wsdl-port>impl:MarshallTestPort</wsdl-port>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTest</service-endpoint-interface>
- <service-impl-bean>
- <servlet-link>MarshallTest</servlet-link>
- </service-impl-bean>
- <handler>
- <handler-name>HrefHandler</handler-name>
-
<handler-class>org.jboss.test.ws.jaxrpc.encoded.href.HRefHandler</handler-class>
- </handler>
- </port-component>
- </webservice-description>
-</webservices>
Copied: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/webservices.xml
(from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/webservices.xml)
===================================================================
--- trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/webservices.xml
(rev 0)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/webservices.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<webservices
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:impl="http://marshalltestservice.org/wsdl"
+
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_web_services_1_1.xsd"
+ version="1.1">
+
+ <webservice-description>
+
<webservice-description-name>MarshallTestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/MarshallTestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>MarshallTestPort</port-component-name>
+ <wsdl-port>impl:MarshallTestPort</wsdl-port>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.encoded.href.MarshallTest</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>MarshallTest</servlet-link>
+ </service-impl-bean>
+ <handler>
+ <handler-name>HrefHandler</handler-name>
+
<handler-class>org.jboss.test.ws.jaxrpc.encoded.href.HRefHandler</handler-class>
+ </handler>
+ </port-component>
+ </webservice-description>
+</webservices>
Copied: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl (from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl)
Deleted:
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/MarshallTestService.wsdl
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/MarshallTestService.wsdl 2007-03-28
09:17:06 UTC (rev 2700)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/MarshallTestService.wsdl 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<definitions name="MarshallTestService"
targetNamespace="http://marshalltestservice.org/wsdl"
xmlns:tns="http://marshalltestservice.org/wsdl"
-
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
-
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns3="http://marshalltestservice.org/types">
-
- <message name="MarshallTest_base64BinaryTest">
- <part name="arrayOfbyte_1" type="xsd:base64Binary"/>
- </message>
- <message name="MarshallTest_base64BinaryTestResponse">
- <part name="result" type="xsd:base64Binary"/>
- </message>
-
- <portType name="MarshallTest">
- <operation name="base64BinaryTest"
parameterOrder="arrayOfbyte_1">
- <input message="tns:MarshallTest_base64BinaryTest"/>
- <output message="tns:MarshallTest_base64BinaryTestResponse"/>
- </operation>
- </portType>
-
- <binding name="MarshallTestBinding" type="tns:MarshallTest">
- <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc"/>
- <operation name="base64BinaryTest">
- <soap:operation soapAction=""/>
- <input>
- <soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded"
namespace="http://marshalltestservice.org/wsdl"/>
- </input>
- <output>
- <soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded"
namespace="http://marshalltestservice.org/wsdl"/>
- </output>
- </operation>
- </binding>
-
- <service name="MarshallTestService">
- <port name="MarshallTestPort"
binding="tns:MarshallTestBinding">
- <soap:address
location="http://@jbosstest.host.name@:8080/J2WMT/jaxrpc/MarshallTest"/>
- </port>
- </service>
-
-</definitions>
Copied:
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/MarshallTestService.wsdl
(from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/MarshallTestService.wsdl)
===================================================================
---
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/MarshallTestService.wsdl
(rev 0)
+++
trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/WEB-INF/wsdl/MarshallTestService.wsdl 2007-03-28
10:11:05 UTC (rev 2702)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions name="MarshallTestService"
targetNamespace="http://marshalltestservice.org/wsdl"
xmlns:tns="http://marshalltestservice.org/wsdl"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns3="http://marshalltestservice.org/types">
+
+ <message name="MarshallTest_base64BinaryTest">
+ <part name="arrayOfbyte_1" type="xsd:base64Binary"/>
+ </message>
+ <message name="MarshallTest_base64BinaryTestResponse">
+ <part name="result" type="xsd:base64Binary"/>
+ </message>
+
+ <portType name="MarshallTest">
+ <operation name="base64BinaryTest"
parameterOrder="arrayOfbyte_1">
+ <input message="tns:MarshallTest_base64BinaryTest"/>
+ <output message="tns:MarshallTest_base64BinaryTestResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="MarshallTestBinding" type="tns:MarshallTest">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc"/>
+ <operation name="base64BinaryTest">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded"
namespace="http://marshalltestservice.org/wsdl"/>
+ </input>
+ <output>
+ <soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded"
namespace="http://marshalltestservice.org/wsdl"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="MarshallTestService">
+ <port name="MarshallTestPort"
binding="tns:MarshallTestBinding">
+ <soap:address
location="http://@jbosstest.host.name@:8080/J2WMT/jaxrpc/MarshallTest"/>
+ </port>
+ </service>
+
+</definitions>
Deleted: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/config.xml
===================================================================
---
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/config.xml 2007-03-28
09:17:06 UTC (rev 2700)
+++ trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/config.xml 2007-03-28 10:11:05
UTC (rev 2702)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wscompile -cp ../../../../output/classes -gen:server -mapping jaxrpc-mapping.xml -keep
config.xml
--->
-
-<configuration
-
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
-
- <wsdl location="./WEB-INF/wsdl/MarshallTestService.wsdl"
- packageName="org.jboss.test.ws.jaxrpc.encoded.href">
- </wsdl>
-
-</configuration>
-
Copied: trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/config.xml (from rev 2700,
branches/jbossws-1.2.1/jbossws-tests/src/resources/jaxrpc/encoded/href/config.xml)
===================================================================
--- trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/config.xml
(rev 0)
+++ trunk/jbossws-tests/src/resources/jaxrpc/encoded/href/config.xml 2007-03-28 10:11:05
UTC (rev 2702)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wscompile -cp ../../../../output/classes -gen:server -mapping jaxrpc-mapping.xml -keep
config.xml
+-->
+
+<configuration
+
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+
+ <wsdl location="./WEB-INF/wsdl/MarshallTestService.wsdl"
+ packageName="org.jboss.test.ws.jaxrpc.encoded.href">
+ </wsdl>
+
+</configuration>
+
Modified: trunk/jbossws-tests/src/resources/jaxrpc/samples/secureejb/META-INF/jboss.xml
===================================================================
---
trunk/jbossws-tests/src/resources/jaxrpc/samples/secureejb/META-INF/jboss.xml 2007-03-28
10:08:25 UTC (rev 2701)
+++
trunk/jbossws-tests/src/resources/jaxrpc/samples/secureejb/META-INF/jboss.xml 2007-03-28
10:11:05 UTC (rev 2702)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<jboss>
@@ -15,7 +15,6 @@
<port-component-uri>/jaxrpc-samples-ejb/RoleSecured</port-component-uri>
<auth-method>BASIC</auth-method>
<transport-guarantee>NONE</transport-guarantee>
- <!-- default secure-wsdl-access (false for jaxrpc) -->
</port-component>
</session>
<session>
@@ -26,7 +25,6 @@
<port-component-uri>/jaxrpc-samples-ejb/BasicSecured</port-component-uri>
<auth-method>BASIC</auth-method>
<transport-guarantee>NONE</transport-guarantee>
- <secure-wsdl-access>true</secure-wsdl-access>
</port-component>
</session>
<session>
@@ -36,7 +34,6 @@
<port-component-name>ConfidentialSecured</port-component-name>
<port-component-uri>/jaxrpc-samples-ejb/ConfidentialSecured</port-component-uri>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
- <secure-wsdl-access>false</secure-wsdl-access>
</port-component>
</session>
</enterprise-beans>
Modified: trunk/jbossws-tests/src/resources/tests-jboss40-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/resources/tests-jboss40-excludes.txt 2007-03-28 10:08:25 UTC
(rev 2701)
+++ trunk/jbossws-tests/src/resources/tests-jboss40-excludes.txt 2007-03-28 10:11:05 UTC
(rev 2702)
@@ -2,8 +2,13 @@
org/jboss/test/ws/interop/**
org/jboss/test/ws/benchmark/**
+# JBossAS-4.2 excludes
+org/jboss/test/ws/jaxrpc/jbws723/**
+
# EJB3/Injection excludes
org/jboss/test/ws/jaxws/endpoint/**
+org/jboss/test/ws/jaxws/jbws1581/**
org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase*
org/jboss/test/ws/jaxws/samples/retail/**
org/jboss/test/ws/jaxws/samples/webserviceref/**
+org/jboss/test/ws/jaxws/serviceref/**
Modified: trunk/jbossws-tests/src/resources/tests-jboss40-noejb3-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/resources/tests-jboss40-noejb3-excludes.txt 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-tests/src/resources/tests-jboss40-noejb3-excludes.txt 2007-03-28
10:11:05 UTC (rev 2702)
@@ -2,11 +2,15 @@
org/jboss/test/ws/interop/**
org/jboss/test/ws/benchmark/**
+# JBossAS-4.2 excludes
+org/jboss/test/ws/jaxrpc/jbws723/**
+
# EJB3/Injection excludes
org/jboss/test/ws/jaxws/eardeployment/**
org/jboss/test/ws/jaxws/endpoint/**
org/jboss/test/ws/jaxws/jbws944/**
org/jboss/test/ws/jaxws/jbws981/**
+org/jboss/test/ws/jaxws/jbws1581/**
org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase*
org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase*
org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.*
@@ -14,5 +18,6 @@
org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceEJB3TestCase.*
org/jboss/test/ws/jaxws/samples/webserviceref/**
org/jboss/test/ws/jaxws/samples/xop/**
+org/jboss/test/ws/jaxws/serviceref/**
Modified: trunk/jbossws-tests/src/resources/tests-jboss42-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/resources/tests-jboss42-excludes.txt 2007-03-28 10:08:25 UTC
(rev 2701)
+++ trunk/jbossws-tests/src/resources/tests-jboss42-excludes.txt 2007-03-28 10:11:05 UTC
(rev 2702)
@@ -6,3 +6,5 @@
org/jboss/test/ws/jaxws/endpoint/**
org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase.*
org/jboss/test/ws/jaxws/samples/webserviceref/**
+org/jboss/test/ws/jaxws/jbws1581/**
+org/jboss/test/ws/jaxws/serviceref/**
Modified: trunk/jbossws-tests/src/resources/tests-jboss42-noejb3-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/resources/tests-jboss42-noejb3-excludes.txt 2007-03-28
10:08:25 UTC (rev 2701)
+++ trunk/jbossws-tests/src/resources/tests-jboss42-noejb3-excludes.txt 2007-03-28
10:11:05 UTC (rev 2702)
@@ -7,6 +7,7 @@
org/jboss/test/ws/jaxws/endpoint/**
org/jboss/test/ws/jaxws/jbws944/**
org/jboss/test/ws/jaxws/jbws981/**
+org/jboss/test/ws/jaxws/jbws1581/**
org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase*
org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase*
org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.*
@@ -14,4 +15,5 @@
org/jboss/test/ws/jaxws/samples/webservice/JSR181WebServiceEJB3TestCase.*
org/jboss/test/ws/jaxws/samples/webserviceref/**
org/jboss/test/ws/jaxws/samples/xop/**
+org/jboss/test/ws/jaxws/serviceref/**
Modified: trunk/jbossws-tests/src/resources/tests-jboss50-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/resources/tests-jboss50-excludes.txt 2007-03-28 10:08:25 UTC
(rev 2701)
+++ trunk/jbossws-tests/src/resources/tests-jboss50-excludes.txt 2007-03-28 10:11:05 UTC
(rev 2702)
@@ -15,5 +15,6 @@
org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*TestCase.*
org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.*
org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.*
+org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
org/jboss/test/ws/jaxrpc/wsdlpublish/**
Modified: trunk/jbossws-tests/src/resources/tests-tomcat-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/resources/tests-tomcat-excludes.txt 2007-03-28 10:08:25 UTC
(rev 2701)
+++ trunk/jbossws-tests/src/resources/tests-tomcat-excludes.txt 2007-03-28 10:11:05 UTC
(rev 2702)
@@ -14,10 +14,12 @@
org/jboss/test/ws/jaxws/samples/webserviceref/**
# JBoss excludes
+org/jboss/test/ws/jaxrpc/jbws723/**
org/jboss/test/ws/jaxrpc/samples/dynamichandler/*TestCase.*
org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.*
org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.*
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
+org/jboss/test/ws/jaxws/jbws1581/**
org/jboss/test/ws/jaxws/samples/jaxr/**
# TODO: Why are these excluded