JBossWS SVN: r4562 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/metadata.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-14 06:04:23 -0400 (Fri, 14 Sep 2007)
New Revision: 4562
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/metadata/PolicyMetaDataBuilder.java
Log:
fixing java coding convention for exceptions
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/metadata/PolicyMetaDataBuilder.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/metadata/PolicyMetaDataBuilder.java 2007-09-14 10:03:04 UTC (rev 4561)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/metadata/PolicyMetaDataBuilder.java 2007-09-14 10:04:23 UTC (rev 4562)
@@ -36,7 +36,7 @@
import org.jboss.ws.extensions.policy.PolicyScopeLevel;
import org.jboss.ws.extensions.policy.annotation.PolicyAttachment;
import org.jboss.ws.extensions.policy.deployer.PolicyDeployer;
-import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicy;
+import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicyException;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
import org.jboss.ws.metadata.wsdl.WSDLBinding;
@@ -291,7 +291,7 @@
Policy deployedPolicy = deployer.deployServerside(policy, extMetaData);
ext.addPolicy(scope, deployedPolicy);
}
- catch (UnsupportedPolicy e)
+ catch (UnsupportedPolicyException e)
{
log.warn("Policy Not supported:" + policy.getPolicyURI());
}
@@ -310,7 +310,7 @@
deployer.deployClientSide(policy, extMetaData);
ext.addPolicy(scope, policy);
}
- catch (UnsupportedPolicy e)
+ catch (UnsupportedPolicyException e)
{
if (log.isDebugEnabled())
{
16 years, 8 months
JBossWS SVN: r4561 - in stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer: domainAssertion and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-14 06:03:04 -0400 (Fri, 14 Sep 2007)
New Revision: 4561
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/AssertionDeployer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/NopAssertionDeployer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/WSSecurityAssertionDeployer.java
Log:
fixing Java coding convention (for Exceptions) + small generic improvements
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java 2007-09-14 10:01:36 UTC (rev 4560)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/PolicyDeployer.java 2007-09-14 10:03:04 UTC (rev 4561)
@@ -36,9 +36,9 @@
import org.jboss.ws.extensions.policy.deployer.domainAssertion.AssertionDeployer;
import org.jboss.ws.extensions.policy.deployer.domainAssertion.NopAssertionDeployer;
import org.jboss.ws.extensions.policy.deployer.domainAssertion.WSSecurityAssertionDeployer;
-import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAlternative;
-import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertion;
-import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicy;
+import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAlternativeException;
+import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertionException;
+import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicyException;
import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
/**
@@ -50,12 +50,14 @@
{
private final static Logger log = Logger.getLogger(PolicyDeployer.class);
private static PolicyDeployer me;
- private Map<String, Class> domainDeployerMap = new HashMap<String, Class>();
+ private Map<String, Class<? extends AssertionDeployer>> domainDeployerMap = new HashMap<String, Class<? extends AssertionDeployer>>();
static
{
me = new PolicyDeployer();
me.domainDeployerMap.put("http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd", WSSecurityAssertionDeployer.class);
+ me.domainDeployerMap.put("http://schemas.xmlsoap.org/ws/2005/02/rm/policy", NopAssertionDeployer.class);
+ me.domainDeployerMap.put("http://docs.oasis-open.org/ws-rx/wsrmp/200702", NopAssertionDeployer.class);
}
//hide constructor
@@ -69,7 +71,7 @@
}
//for test
- public static PolicyDeployer newInstance(Map<String, Class> customDomainMap)
+ public static PolicyDeployer newInstance(Map<String, Class<? extends AssertionDeployer>> customDomainMap)
{
PolicyDeployer instance = new PolicyDeployer();
instance.domainDeployerMap = customDomainMap;
@@ -82,12 +84,14 @@
{
PolicyDeployer instance = new PolicyDeployer();
instance.domainDeployerMap.put("http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd", NopAssertionDeployer.class);
+ instance.domainDeployerMap.put("http://schemas.xmlsoap.org/ws/2005/02/rm/policy", NopAssertionDeployer.class);
+ instance.domainDeployerMap.put("http://docs.oasis-open.org/ws-rx/wsrmp/200702", NopAssertionDeployer.class);
return instance;
}
@SuppressWarnings("unchecked")
- public Policy deployServerside(Policy policy, ExtensibleMetaData extMetaData) throws UnsupportedPolicy
+ public Policy deployServerside(Policy policy, ExtensibleMetaData extMetaData) throws UnsupportedPolicyException
{
if (policy == null)
throw new WSException("Cannot deploy null policy!");
@@ -111,7 +115,7 @@
deployAlternativeServerSide(alternative, extMetaData);
returnedPolicyTerms.add(alternative);
}
- catch (UnsupportedAlternative e)
+ catch (UnsupportedAlternativeException e)
{
log.debug("Unsupported Alternative");
//policy is unsupported only if it have all alternative unsupported
@@ -124,7 +128,7 @@
{
log.debug("XorComposite zero element...Policy not supported");
}
- throw new UnsupportedPolicy();
+ throw new UnsupportedPolicyException();
}
policy.getTerms().clear();
policy.addTerms(returnedPolicyTerms);
@@ -137,10 +141,10 @@
*
* @param policy
* @param extMetaData
- * @throws UnsupportedPolicy
+ * @throws UnsupportedPolicyException
*/
@SuppressWarnings("unchecked")
- public void deployClientSide(Policy policy, ExtensibleMetaData extMetaData) throws UnsupportedPolicy
+ public void deployClientSide(Policy policy, ExtensibleMetaData extMetaData) throws UnsupportedPolicyException
{
if (policy == null)
throw new WSException("Cannot deploy null policy!");
@@ -161,10 +165,10 @@
{
deployAssertionClientSide((PrimitiveAssertion)assertion, extMetaData);
}
- catch (UnsupportedAssertion e)
+ catch (UnsupportedAssertionException e)
{
log.error("Unsupported assertion!");
- throw new UnsupportedPolicy();
+ throw new UnsupportedPolicyException();
}
}
else if (assertion instanceof Policy) //inner policy to be verified
@@ -176,7 +180,7 @@
}
@SuppressWarnings("unchecked")
- private void deployAlternativeServerSide(AndCompositeAssertion alternative, ExtensibleMetaData extMetaData) throws UnsupportedAlternative
+ private void deployAlternativeServerSide(AndCompositeAssertion alternative, ExtensibleMetaData extMetaData) throws UnsupportedAlternativeException
{
for (Assertion assertion : (List<Assertion>)alternative.getTerms())
{
@@ -197,41 +201,41 @@
{
log.debug("Unknown Alternative type....Alternative not supported");
}
- throw new UnsupportedAlternative();
+ throw new UnsupportedAlternativeException();
}
}
- catch (UnsupportedAssertion e)
+ catch (UnsupportedAssertionException e)
{
//If there is al least one unsupported assertion the alternative isn't supported
- throw new UnsupportedAlternative();
+ throw new UnsupportedAlternativeException();
}
- catch (UnsupportedPolicy ep)
+ catch (UnsupportedPolicyException ep)
{
//If there is al least one unsupported assertion the alternative isn't supported
- throw new UnsupportedAlternative();
+ throw new UnsupportedAlternativeException();
}
}
}
- private void deployAssertionServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion
+ private void deployAssertionServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertionException
{
AssertionDeployer deployer = getDomainDeployerInstance(assertion.getName().getNamespaceURI());
deployer.deployServerSide(assertion, extMetaData);
}
- private void deployAssertionClientSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion
+ private void deployAssertionClientSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertionException
{
AssertionDeployer deployer = getDomainDeployerInstance(assertion.getName().getNamespaceURI());
deployer.deployClientSide(assertion, extMetaData);
}
/**
- *
- * @param namespace
- * @return the correct AssertionDeployer instance, or null if namespace not supported
+ * @param namespace to be used to get the associated assertion deployer
+ * @return AssertionDeployer instance
+ * @throws UnsupportedAssertionException
*/
- private AssertionDeployer getDomainDeployerInstance(String namespace) throws UnsupportedAssertion
+ private AssertionDeployer getDomainDeployerInstance(String namespace) throws UnsupportedAssertionException
{
try
{
@@ -239,16 +243,15 @@
{
if (log.isDebugEnabled())
{
- log.debug("Unknown namespace:" + namespace + "...Assertion not supported");
+ log.debug("Unknown namespace: '" + namespace + "' - Assertion not supported");
}
- throw new UnsupportedAssertion();
+ throw new UnsupportedAssertionException();
}
- return (AssertionDeployer)(domainDeployerMap.get(namespace)).newInstance();
+ return domainDeployerMap.get(namespace).newInstance();
}
catch (Exception e)
{
-
- throw new UnsupportedAssertion();
+ throw new UnsupportedAssertionException();
}
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/AssertionDeployer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/AssertionDeployer.java 2007-09-14 10:01:36 UTC (rev 4560)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/AssertionDeployer.java 2007-09-14 10:03:04 UTC (rev 4561)
@@ -22,7 +22,7 @@
package org.jboss.ws.extensions.policy.deployer.domainAssertion;
import org.apache.ws.policy.PrimitiveAssertion;
-import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertion;
+import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertionException;
import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
/**
@@ -40,9 +40,9 @@
*
* @param assertion
* @param extMetaData
- * @throws UnsupportedAssertion
+ * @throws UnsupportedAssertionException
*/
- public void deployServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion;
+ public void deployServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertionException;
/**
* Client side deployment method; ExtensibleMetaData provided so
@@ -50,7 +50,7 @@
*
* @param assertion
* @param extMetaData
- * @throws UnsupportedAssertion
+ * @throws UnsupportedAssertionException
*/
- public void deployClientSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion;
+ public void deployClientSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertionException;
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/NopAssertionDeployer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/NopAssertionDeployer.java 2007-09-14 10:01:36 UTC (rev 4560)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/NopAssertionDeployer.java 2007-09-14 10:03:04 UTC (rev 4561)
@@ -22,7 +22,7 @@
package org.jboss.ws.extensions.policy.deployer.domainAssertion;
import org.apache.ws.policy.PrimitiveAssertion;
-import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertion;
+import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertionException;
import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
/**
@@ -41,12 +41,12 @@
public class NopAssertionDeployer implements AssertionDeployer
{
- public void deployClientSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion
+ public void deployClientSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertionException
{
//nop
}
- public void deployServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion
+ public void deployServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertionException
{
//nop
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/WSSecurityAssertionDeployer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/WSSecurityAssertionDeployer.java 2007-09-14 10:01:36 UTC (rev 4560)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/domainAssertion/WSSecurityAssertionDeployer.java 2007-09-14 10:03:04 UTC (rev 4561)
@@ -27,7 +27,7 @@
import org.apache.ws.policy.PrimitiveAssertion;
import org.jboss.logging.Logger;
import org.jboss.ws.extensions.policy.deployer.PolicyDeployer;
-import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertion;
+import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedAssertionException;
import org.jboss.ws.extensions.policy.deployer.util.PrimitiveAssertionWriter;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
@@ -46,7 +46,7 @@
{
private final static Logger log = Logger.getLogger(PolicyDeployer.class);
- public void deployServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion
+ public void deployServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertionException
{
ByteArrayOutputStream stream = new ByteArrayOutputStream();
if (extMetaData instanceof EndpointMetaData)
@@ -73,12 +73,12 @@
catch (Exception e)
{
e.printStackTrace();
- throw new UnsupportedAssertion();
+ throw new UnsupportedAssertionException();
}
}
}
- public void deployClientSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion
+ public void deployClientSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertionException
{
if (extMetaData instanceof EndpointMetaData)
{
@@ -101,7 +101,7 @@
catch (Exception e)
{
e.printStackTrace();
- throw new UnsupportedAssertion();
+ throw new UnsupportedAssertionException();
}
}
}
16 years, 8 months
JBossWS SVN: r4560 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-14 06:01:36 -0400 (Fri, 14 Sep 2007)
New Revision: 4560
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAlternativeException.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAssertionException.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedPolicyException.java
Removed:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAlternative.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAssertion.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedPolicy.java
Log:
Java code convention is to have the Exception suffix in the exception class name
Deleted: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAlternative.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAlternative.java 2007-09-13 12:02:46 UTC (rev 4559)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAlternative.java 2007-09-14 10:01:36 UTC (rev 4560)
@@ -1,32 +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.ws.extensions.policy.deployer.exceptions;
-
-/**
- * @author Stefano Maestri <mailto:stefano.maestri@javalinux.it>
- *
- * since 27/04/2007
- */
-public class UnsupportedAlternative extends Exception
-{
-
-}
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAlternativeException.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAlternativeException.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAlternativeException.java 2007-09-14 10:01:36 UTC (rev 4560)
@@ -0,0 +1,32 @@
+/*
+ * 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.extensions.policy.deployer.exceptions;
+
+/**
+ * @author Stefano Maestri <mailto:stefano.maestri@javalinux.it>
+ *
+ * since 27/04/2007
+ */
+public class UnsupportedAlternativeException extends Exception
+{
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAlternativeException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAssertion.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAssertion.java 2007-09-13 12:02:46 UTC (rev 4559)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAssertion.java 2007-09-14 10:01:36 UTC (rev 4560)
@@ -1,32 +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.ws.extensions.policy.deployer.exceptions;
-
-/**
- * @author Stefano Maestri <mailto:stefano.maestri@javalinux.it>
- *
- * since 27/04/2007
- */
-public class UnsupportedAssertion extends Exception
-{
-
-}
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAssertionException.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAssertionException.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAssertionException.java 2007-09-14 10:01:36 UTC (rev 4560)
@@ -0,0 +1,32 @@
+/*
+ * 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.extensions.policy.deployer.exceptions;
+
+/**
+ * @author Stefano Maestri <mailto:stefano.maestri@javalinux.it>
+ *
+ * since 27/04/2007
+ */
+public class UnsupportedAssertionException extends Exception
+{
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedAssertionException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedPolicy.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedPolicy.java 2007-09-13 12:02:46 UTC (rev 4559)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedPolicy.java 2007-09-14 10:01:36 UTC (rev 4560)
@@ -1,32 +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.ws.extensions.policy.deployer.exceptions;
-
-/**
- * @author Stefano Maestri <mailto:stefano.maestri@javalinux.it>
- *
- * since 27/04/2007
- */
-public class UnsupportedPolicy extends Exception
-{
-
-}
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedPolicyException.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedPolicyException.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedPolicyException.java 2007-09-14 10:01:36 UTC (rev 4560)
@@ -0,0 +1,32 @@
+/*
+ * 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.extensions.policy.deployer.exceptions;
+
+/**
+ * @author Stefano Maestri <mailto:stefano.maestri@javalinux.it>
+ *
+ * since 27/04/2007
+ */
+public class UnsupportedPolicyException extends Exception
+{
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/policy/deployer/exceptions/UnsupportedPolicyException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 8 months
JBossWS SVN: r4559 - in legacy/branches/jbossws-1.2.1.GA_JBWS-1803: jbossws-core/src/java/org/jboss/ws/core and 25 other directories.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-09-13 08:02:46 -0400 (Thu, 13 Sep 2007)
New Revision: 4559
Added:
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/resources/jboss-saaj.jar/META-INF/services/org.jboss.ws.core.soap.EnvelopeBuilder
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647TestBase.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml
Modified:
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/MessageFactory.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/SOAPConstants.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/SOAPFactory.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/NodeImpl.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyElementMessage.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPEnvelopeImpl.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/TextImpl.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/ant-import/build-jars-jaxrpc.xml
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws707/JBWS707TestCase.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/provider/WebServiceEndpoint.java
legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/tests-jboss42-excludes.txt
Log:
[JBWS-1803] Port JBWS-1647 to 1.2.1 - Text Node Preservation For Messages Sent Across The Wire
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/MessageFactory.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/MessageFactory.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/MessageFactory.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -81,7 +81,7 @@
if (factory == null)
{
SAAJMetaFactory saajFactory = SAAJMetaFactory.getInstance();
- factory = saajFactory.newMessageFactory(SOAPConstants.DYNAMIC_SOAP_PROTOCOL);
+ factory = saajFactory.newMessageFactory(SOAPConstants.DEFAULT_SOAP_PROTOCOL);
}
if (factory == null)
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/SOAPConstants.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/SOAPConstants.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/SOAPConstants.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -30,16 +30,16 @@
*/
public interface SOAPConstants
{
+ /** Used to create MessageFactory instances that create SOAPMessages whose behavior supports the SOAP 1.1 specification */
+ String SOAP_1_1_PROTOCOL = "SOAP 1.1 Protocol";
+ /** The media type of the Content-Type MIME header in SOAP 1.2. */
+ String SOAP_1_2_CONTENT_TYPE = "application/soap+xml";
/** The default protocol: SOAP 1.1 for backwards compatibility. */
- String DEFAULT_SOAP_PROTOCOL = "SOAP 1.1 Protocol";
+ String DEFAULT_SOAP_PROTOCOL = SOAP_1_1_PROTOCOL;
/** Used to create MessageFactory instances that create SOAPMessages whose concrete type is based on the Content-Type MIME header passed to the createMessage method. */
String DYNAMIC_SOAP_PROTOCOL = "Dynamic Protocol";
/** The media type of the Content-Type MIME header in SOAP 1.1. */
String SOAP_1_1_CONTENT_TYPE = "text/xml";
- /** Used to create MessageFactory instances that create SOAPMessages whose behavior supports the SOAP 1.1 specification */
- String SOAP_1_1_PROTOCOL = "SOAP 1.1 Protocol";
- /** The media type of the Content-Type MIME header in SOAP 1.2. */
- String SOAP_1_2_CONTENT_TYPE = "application/soap+xml";
/** Used to create MessageFactory instances that create SOAPMessages whose behavior supports the SOAP 1.2 specification */
String SOAP_1_2_PROTOCOL = "SOAP 1.2 Protocol";
/** The default namespace prefix for http://www.w3.org/2003/05/soap-envelope */
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/SOAPFactory.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/SOAPFactory.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/javax/xml/soap/SOAPFactory.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -72,7 +72,7 @@
if (soapFactory == null)
{
SAAJMetaFactory saajFactory = SAAJMetaFactory.getInstance();
- soapFactory = saajFactory.newSOAPFactory(SOAPConstants.DYNAMIC_SOAP_PROTOCOL);
+ soapFactory = saajFactory.newSOAPFactory(SOAPConstants.DEFAULT_SOAP_PROTOCOL);
}
if (soapFactory == null)
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -34,6 +34,7 @@
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.Name;
+import javax.xml.soap.Node;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPElement;
@@ -60,6 +61,7 @@
import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPBodyElementDoc;
import org.jboss.ws.core.soap.SOAPBodyElementRpc;
+import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPContentElement;
import org.jboss.ws.core.soap.SOAPElementImpl;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
@@ -69,13 +71,13 @@
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.soap.attachment.AttachmentPartImpl;
import org.jboss.ws.core.soap.attachment.CIDGenerator;
-import org.jboss.ws.core.utils.DOMUtils;
-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.jboss.ws.metadata.umdm.TypesMetaData;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.Element;
@@ -133,7 +135,8 @@
protected abstract MessageAbstraction createMessage(OperationMetaData opMetaData) throws SOAPException;
/** On the client side, generate the payload from IN parameters. */
- public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders) throws BindingException
+ public MessageAbstraction bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
+ throws BindingException
{
if (log.isDebugEnabled())
log.debug("bindRequestMessage: " + opMetaData.getQName());
@@ -224,10 +227,13 @@
xmlName = namespaceRegistry.registerQName(xmlName);
Name soapName = new NameImpl(xmlName.getLocalPart(), xmlName.getPrefix(), xmlName.getNamespaceURI());
- if (log.isDebugEnabled())
- log.debug("Add unboundHeader element: " + soapName);
+ log.debug("Add unboundHeader element: " + soapName);
SOAPContentElement contentElement = new SOAPHeaderElementImpl(soapName);
contentElement.setParamMetaData(unboundHeader.toParameterMetaData(opMetaData));
+
+ if (soapHeader == null)
+ soapHeader = soapEnvelope.addHeader();
+
soapHeader.addChildElement(contentElement);
contentElement.setObjectValue(value);
}
@@ -283,14 +289,25 @@
if (opMetaData.isMessageEndpoint() == false)
{
Style style = opMetaData.getStyle();
- SOAPElement soapBodyElement = soapBody;
+ SOAPElement payloadParent = soapBody;
if (style == Style.RPC)
{
- soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
- Name elName = soapBodyElement.getElementName();
-
- QName elQName = new QName(elName.getURI(), elName.getLocalName(), elName.getPrefix());
- elQName = namespaceRegistry.registerQName(elQName);
+ payloadParent = null;
+ Iterator it = soapBody.getChildElements();
+ while (payloadParent == null && it.hasNext())
+ {
+ Object childNode = it.next();
+ if (childNode instanceof SOAPElement)
+ {
+ payloadParent = (SOAPElement)childNode;
+ }
+ }
+
+ if (payloadParent == null)
+ throw new SOAPException("Cannot find RPC element in");
+
+ QName elName = payloadParent.getElementQName();
+ elName = namespaceRegistry.registerQName(elName);
}
int numParameters = 0;
@@ -319,18 +336,27 @@
else
{
boolean isHeader = paramMetaData.isInHeader();
- SOAPElement element = isHeader ? soapHeader : soapBodyElement;
- if(!isHeader) numParameters++;
-
+ SOAPElement element = isHeader ? soapHeader : payloadParent;
+ if (!isHeader)
+ numParameters++;
+
SOAPContentElement value = getParameterFromMessage(paramMetaData, element, false);
epInv.setRequestParamValue(xmlName, value);
}
}
}
- // TCK: verify the numer of parameters matches the actual message payload
- int numChildren = soapBodyElement.getChildNodes().getLength();
- if(numChildren!=numParameters) throw new WSException("Invalid number of payload elements: " + numChildren);
+ // Verify the numer of parameters matches the actual message payload
+ int numChildElements = 0;
+ Iterator itElements = payloadParent.getChildElements();
+ while (itElements.hasNext())
+ {
+ Node node = (Node)itElements.next();
+ if (node instanceof SOAPElement)
+ numChildElements++;
+ }
+ if (numChildElements != numParameters)
+ throw new WSException("Invalid number of payload elements: " + numChildElements);
}
// Generic message endpoint
@@ -519,19 +545,15 @@
msgContext.put(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
SOAPHeader soapHeader = soapEnvelope.getHeader();
- SOAPBody soapBody = soapEnvelope.getBody();
- Iterator bodyChildren = soapBody.getChildElements();
+ SOAPBodyImpl soapBody = (SOAPBodyImpl)soapEnvelope.getBody();
+ SOAPBodyElement soapBodyElement = soapBody.getBodyElement();
- SOAPBodyElement soapBodyElement = null;
- if (bodyChildren.hasNext() != false)
- soapBodyElement = (SOAPBodyElement)bodyChildren.next();
-
// Translate the SOAPFault to an exception and throw it
if (soapBodyElement instanceof SOAPFaultImpl)
throwFaultException((SOAPFaultImpl)soapBodyElement);
// Extract unbound OUT headers
- if (unboundHeaders != null)
+ if (unboundHeaders != null && soapHeader != null)
{
Map<QName, UnboundHeader> outHeaders = new HashMap<QName, UnboundHeader>();
Iterator itHeaderElements = soapHeader.getChildElements();
@@ -790,44 +812,47 @@
Iterator childElements = soapElement.getChildElements();
while (childElements.hasNext())
{
- SOAPElementImpl childElement = (SOAPElementImpl)childElements.next();
+ Object childNode = childElements.next();
+ if (childNode instanceof SOAPElement)
+ {
+ SOAPElementImpl childElement = (SOAPElementImpl)childNode;
+ // If this message was manipulated by a handler the child may not be a content element
+ if (!(childElement instanceof SOAPContentElement))
+ childElement = (SOAPContentElement)soapElement.replaceChild(new SOAPContentElement(childElement), childElement);
- // If this message was manipulated by a handler the child may not be a content element
- if (!(childElement instanceof SOAPContentElement))
- childElement = (SOAPContentElement)soapElement.replaceChild(new SOAPContentElement(childElement), childElement);
+ // The parameters are expected to be lazy
+ SOAPContentElement aux = (SOAPContentElement)childElement;
+ Name elName = aux.getElementName();
- // The parameters are expected to be lazy
- SOAPContentElement aux = (SOAPContentElement)childElement;
- Name elName = aux.getElementName();
+ if (xmlName.equals(elName))
+ {
+ soapContentElement = aux;
+ soapContentElement.setParamMetaData(paramMetaData);
+ break;
+ }
- if (xmlName.equals(elName))
- {
- soapContentElement = aux;
- soapContentElement.setParamMetaData(paramMetaData);
- break;
- }
-
- if (SOAP_ARRAY_NAME.equals(elName))
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
- try
+ if (SOAP_ARRAY_NAME.equals(elName))
{
- QName compXMLName = paramMetaData.getXmlName();
- Element compElement = DOMUtils.getFirstChildElement(aux);
- // NPE when the soap encoded array size is 0 on the return path
- // http://jira.jboss.org/jira/browse/JBWS-1285
- if (compElement == null || compElement.getNodeName().equals(compXMLName.getLocalPart()))
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
+ try
{
- soapContentElement = aux;
- soapContentElement.setParamMetaData(paramMetaData);
- break;
+ QName compXMLName = paramMetaData.getXmlName();
+ Element compElement = DOMUtils.getFirstChildElement(aux);
+ // NPE when the soap encoded array size is 0 on the return path
+ // http://jira.jboss.org/jira/browse/JBWS-1285
+ if (compElement == null || compElement.getNodeName().equals(compXMLName.getLocalPart()))
+ {
+ soapContentElement = aux;
+ soapContentElement.setParamMetaData(paramMetaData);
+ break;
+ }
}
+ finally
+ {
+ msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
+ }
}
- finally
- {
- msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
- }
}
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -239,78 +239,6 @@
}
/**
- * Narrow port selection tries to nail down available endpoints
- * by <port-component-ref> declarations. A selection base upon
- * Service.getPort(SEI) later on needs to be distinct to an endpoint, or in this case EndpointMetaData.
- *
- * @param serviceRef
- * @param serviceMetaData
- */
- private void narrowPortSelection(UnifiedServiceRefMetaData serviceRef, ServiceMetaData serviceMetaData)
- {
- Map<String, List<UnifiedPortComponentRefMetaData>> seiGroups = new HashMap<String, List<UnifiedPortComponentRefMetaData>>();
- for(UnifiedPortComponentRefMetaData pcref : serviceRef.getPortComponentRefs())
- {
- String sei = pcref.getServiceEndpointInterface();
- if(null==seiGroups.get(sei))
- seiGroups.put(sei, new ArrayList<UnifiedPortComponentRefMetaData>());
- List<UnifiedPortComponentRefMetaData> group = seiGroups.get(sei);
- group.add(pcref);
-
- // Constraint#1: within a service-ref it's not allowed to use a SEI across different pcref's
- if(group.size()>1)
- throw new WSException("Within a <service-ref> it's not allowed to use a SEI across different <port-component-ref>'s: "+group);
- }
-
- // Constraint#2: A pcref may only match one EndpointMetaData
- for( String sei : seiGroups.keySet())
- {
- // Narrow available endpoints by port-component-ref declaration
- List<QName> narrowedEndpoints = new ArrayList<QName>();
-
- List<UnifiedPortComponentRefMetaData> group = seiGroups.get(sei);
- UnifiedPortComponentRefMetaData pcref = group.get(0); // distinct, see above Constraint#1
-
- // Constraint#3: Port selection only applies when both SEI and QName are given
- if(pcref.getServiceEndpointInterface()!=null && pcref.getPortQName()!=null)
- {
- List<QName> pcRef2EndpointMapping = new ArrayList<QName>();
- for(EndpointMetaData epMeta : serviceMetaData.getEndpoints())
- {
- if(pcref.getServiceEndpointInterface().equals(epMeta.getServiceEndpointInterfaceName()))
- {
- pcRef2EndpointMapping.add(epMeta.getPortName());
- }
-
- }
-
- for(QName q : pcRef2EndpointMapping)
- {
- EndpointMetaData mappedEndpoint = serviceMetaData.getEndpoint(q);
- if(! pcref.getPortQName().equals( mappedEndpoint.getPortName()) )
- narrowedEndpoints.add(q);
- }
-
- // Constraint: Dont exclude all of them ;)
- if(pcRef2EndpointMapping.size()>0 && (pcRef2EndpointMapping.size() == narrowedEndpoints.size()))
- throw new WSException("Failed to narrow available endpoints by <port-component-ref> declaration");
-
- for(QName q : narrowedEndpoints)
- {
- EndpointMetaData removed = serviceMetaData.removeEndpoint(q);
- log.debug("Narrowed endpoint " + q + "("+removed+")");
- }
- }
- else
- {
- // TODO: In case there is more then one EMPD this should cause an exception
- log.warn("Unable to narrow port selection for "+ pcref);
- }
-
- }
- }
-
- /**
* Setup the handler chain(s) for this service
*/
private void setupHandlerChain(ServiceImpl jaxrpcService) throws Exception
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -23,10 +23,12 @@
// $Id$
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPMessage;
import javax.xml.transform.Source;
import javax.xml.ws.handler.Handler;
@@ -93,7 +95,8 @@
SOAPMessage reqMessage = (SOAPMessage)payload;
SOAPBodyImpl body = (SOAPBodyImpl)reqMessage.getSOAPBody();
- SOAPContentElement bodyElement = (SOAPContentElement)body.getFirstChild();
+
+ SOAPContentElement bodyElement = (SOAPContentElement)body.getBodyElement();
Source source = bodyElement.getXMLFragment().getSource();
if (source == null)
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/DispatchSOAPBinding.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -31,7 +31,6 @@
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
@@ -157,8 +156,8 @@
{
if (mode == Mode.PAYLOAD)
{
- SOAPBody soapBody = resMsg.getSOAPBody();
- SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next();
+ SOAPBodyImpl soapBody = (SOAPBodyImpl)resMsg.getSOAPBody();
+ SOAPElement soapElement = soapBody.getBodyElement();
retObj = new DOMSource(soapElement);
}
if (mode == Mode.MESSAGE)
@@ -171,7 +170,7 @@
else if (jaxbContext != null)
{
SOAPBodyImpl soapBody = (SOAPBodyImpl)resMsg.getSOAPBody();
- SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next();
+ SOAPElement soapElement = soapBody.getBodyElement();
log.debug("JAXB unmarshal: " + DOMWriter.printNode(soapElement, false));
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/LogicalMessageImpl.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -103,16 +103,9 @@
{
if (style == Style.RPC)
{
- try
- {
- EnvelopeBuilderDOM builder = new EnvelopeBuilderDOM(style);
- Element domBodyElement = DOMUtils.sourceToElement(source);
- builder.buildBodyElementRpc(soapBody, domBodyElement);
- }
- catch (IOException ex)
- {
- WSException.rethrow(ex);
- }
+ EnvelopeBuilderDOM builder = new EnvelopeBuilderDOM(style);
+ Element domBodyElement = DOMUtils.sourceToElement(source);
+ builder.buildBodyElementRpc(soapBody, domBodyElement);
}
else
{
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -27,6 +27,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.HashMap;
+import java.util.Iterator;
import javax.activation.DataHandler;
import javax.management.MBeanException;
@@ -344,9 +345,22 @@
{
String faultString;
SOAPBody soapBody = soapMessage.getSOAPBody();
- if (soapBody.getChildElements().hasNext())
+ Iterator bodyChildren = soapBody.getChildElements();
+ SOAPBodyElement soapBodyElement = null;
+
+ while (bodyChildren.hasNext() && soapBodyElement == null)
+
{
- SOAPBodyElement soapBodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
+
+ Object next = bodyChildren.next();
+ if (next instanceof SOAPBodyElement)
+ {
+ soapBodyElement = (SOAPBodyElement)next;
+ }
+ }
+
+ if (soapBodyElement != null)
+ {
Name soapName = soapBodyElement.getElementName();
faultString = "Endpoint " + epMetaData.getPortName() + " does not contain operation meta data for: " + soapName;
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -29,7 +29,11 @@
import java.util.Iterator;
import javax.xml.namespace.QName;
+import javax.xml.soap.Detail;
import javax.xml.soap.Name;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPBodyElement;
+import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
@@ -42,7 +46,10 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Comment;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
@@ -58,10 +65,12 @@
// provide logging
private static Logger log = Logger.getLogger(EnvelopeBuilderDOM.class);
- private Style style = Style.DOCUMENT;
+ private SOAPFactoryImpl soapFactory;
+ private Style style;
public EnvelopeBuilderDOM(Style style)
{
+ this.soapFactory = new SOAPFactoryImpl();
this.style = style;
}
@@ -107,29 +116,58 @@
public SOAPEnvelope build(SOAPMessage soapMessage, Element domEnv) throws SOAPException
{
- String envNS = domEnv.getNamespaceURI();
- String envPrefix = domEnv.getPrefix();
-
// Construct the envelope
- SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
SOAPPartImpl soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
- SOAPEnvelopeImpl soapEnv = new SOAPEnvelopeImpl(soapPart, soapFactory.createElement(domEnv, false));
+ SOAPEnvelopeImpl soapEnv = new SOAPEnvelopeImpl(soapPart, soapFactory.createElement(domEnv, false), false);
DOMUtils.copyAttributes(soapEnv, domEnv);
- // Add the header elements
- Element domHeader = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Header"));
- if (domHeader != null)
+ NodeList envChildNodes = domEnv.getChildNodes();
+ for (int i = 0; i < envChildNodes.getLength(); i++)
{
- SOAPHeader soapHeader = soapEnv.getHeader();
+ Node child = envChildNodes.item(i);
+ short childType = child.getNodeType();
+ if (childType == Node.ELEMENT_NODE)
+ {
+ String elName = child.getLocalName();
+ if ("Header".equals(elName))
+ {
+ buildSOAPHeader(soapEnv, (Element)child);
+ }
+ else if ("Body".equals(elName))
+ {
+ buildSOAPBody(soapEnv, (Element)child);
+ }
+ else
+ {
+ log.warn("Ignore envelope chile element: " + elName);
+ }
+ }
+ else
+ {
+ log.warn("Ignore child type: " + childType);
+ }
+ }
- DOMUtils.copyAttributes(soapHeader, domHeader);
+ return soapEnv;
+ }
- Iterator it = DOMUtils.getChildElements(domHeader);
- while (it.hasNext())
+ private SOAPHeader buildSOAPHeader(SOAPEnvelopeImpl soapEnv, Element domHeader) throws SOAPException
+ {
+ SOAPHeader soapHeader = soapEnv.getHeader();
+ if (soapHeader == null)
+ soapHeader = soapEnv.addHeader();
+
+ DOMUtils.copyAttributes(soapHeader, domHeader);
+
+ NodeList headerChildNodes = domHeader.getChildNodes();
+ for (int i = 0; i < headerChildNodes.getLength(); i++)
+ {
+ Node child = headerChildNodes.item(i);
+ short childType = child.getNodeType();
+ if (childType == Node.ELEMENT_NODE)
{
- Element srcElement = (Element)it.next();
- //registerNamespacesLocally(srcElement);
+ Element srcElement = (Element)child;
XMLFragment xmlFragment = new XMLFragment(new DOMSource(srcElement));
Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
@@ -139,99 +177,59 @@
DOMUtils.copyAttributes(destElement, srcElement);
destElement.setXMLFragment(xmlFragment);
}
+ else
+ {
+ log.warn("Ignore child type: " + childType);
+ }
}
- // Add the body elements
- Element domBody = DOMUtils.getFirstChildElement(domEnv, new QName(envNS, "Body"));
+ return soapHeader;
+ }
+
+ private SOAPBody buildSOAPBody(SOAPEnvelopeImpl soapEnv, Element domBody) throws SOAPException
+ {
+ String envNS = soapEnv.getNamespaceURI();
+
SOAPBodyImpl soapBody = (SOAPBodyImpl)soapEnv.getBody();
+ if (soapBody == null)
+ soapBody = (SOAPBodyImpl)soapEnv.addBody();
DOMUtils.copyAttributes(soapBody, domBody);
- Iterator itBody = DOMUtils.getChildElements(domBody);
- if (itBody.hasNext())
+ SOAPBodyElement soapBodyElement = null;
+ boolean attachHRefElements = Constants.URI_SOAP11_ENC.equals(soapEnv.getAttributeNS(envNS, "encodingStyle"));
+
+ NodeList bodyChildNodes = domBody.getChildNodes();
+ for (int i = 0; i < bodyChildNodes.getLength(); i++)
{
- Element domBodyElement = (Element)itBody.next();
-
- String localName = domBodyElement.getLocalName();
- String prefix = domBodyElement.getPrefix();
- String nsURI = domBodyElement.getNamespaceURI();
- Name beName = new NameImpl(localName, prefix, nsURI);
-
- // Process a <env:Fault> message
- if (beName.equals(new NameImpl("Fault", envPrefix, envNS)))
+ Node child = bodyChildNodes.item(i);
+ short childType = child.getNodeType();
+ if (childType == Node.ELEMENT_NODE)
{
- SOAPFaultImpl soapFault = new SOAPFaultImpl(envPrefix, envNS);
- soapBody.addChildElement(soapFault);
-
- DOMUtils.copyAttributes(soapFault, domBodyElement);
-
- // copy everything and let soapFault discover child elements itself
- XMLFragment xmlFragment = new XMLFragment(new DOMSource(domBodyElement));
- soapFault.setXMLFragment(xmlFragment);
- }
-
- // Process and RPC or DOCUMENT style message
- else
- {
-
- if (style == Style.RPC)
+ if (soapBodyElement == null)
{
- buildBodyElementRpc(soapBody, domBodyElement);
+ soapBodyElement = buildSOAPBodyElement(soapEnv, (Element)child);
+ attachHRefElements = attachHRefElements || Constants.URI_SOAP11_ENC.equals(soapBody.getAttributeNS(envNS, "encodingStyle"));
}
- else if (style == Style.DOCUMENT)
+ else if (attachHRefElements)
{
- buildBodyElementDoc(soapBody, domBodyElement);
+ // Process additional soap encoded body elements
+ soapBody.addChildElement(soapFactory.createElement((Element)child, true));
}
- else if (style == null)
- {
- SOAPBodyElementMessage soapBodyElement = new SOAPBodyElementMessage(beName);
- soapBodyElement = (SOAPBodyElementMessage)soapBody.addChildElement(soapBodyElement);
-
- DOMUtils.copyAttributes(soapBodyElement, domBodyElement);
-
- NodeList nlist = domBodyElement.getChildNodes();
- for (int i = 0; i < nlist.getLength(); i++)
- {
- org.w3c.dom.Node child = nlist.item(i);
- short childType = child.getNodeType();
- if (childType == org.w3c.dom.Node.ELEMENT_NODE)
- {
- SOAPElement soapElement = soapFactory.createElement((Element)child);
- soapBodyElement.addChildElement(soapElement);
- }
- else if (childType == org.w3c.dom.Node.TEXT_NODE)
- {
- String nodeValue = child.getNodeValue();
- soapBodyElement.addTextNode(nodeValue);
- }
- else if (childType == org.w3c.dom.Node.CDATA_SECTION_NODE)
- {
- String nodeValue = child.getNodeValue();
- soapBodyElement.addTextNode(nodeValue);
- }
- else
- {
- log.warn("Ignore child type: " + childType);
- }
- }
- }
- else
- {
- throw new WSException("Unsupported message style: " + style);
- }
}
+ else if (childType == Node.COMMENT_NODE)
+ {
+ appendCommentNode(soapBody, child);
+ }
+ else if (childType == Node.TEXT_NODE)
+ {
+ appendTextNode(soapBody, child);
+ }
+ else
+ {
+ log.warn("Ignore child type: " + childType);
+ }
}
-
- // 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)
{
@@ -239,48 +237,166 @@
inlineHandler.processHRefs();
}
- return soapEnv;
+ return soapBody;
}
- public void buildBodyElementDoc(SOAPBodyImpl soapBody, Element domBodyElement) throws SOAPException
+ private SOAPBodyElement buildSOAPBodyElement(SOAPEnvelopeImpl soapEnv, Element domBodyElement) throws SOAPException
{
- soapBody.removeContents();
+ String envNS = soapEnv.getNamespaceURI();
+ String envPrefix = soapEnv.getPrefix();
+ SOAPBodyImpl soapBody = (SOAPBodyImpl)soapEnv.getBody();
+ QName beName = DOMUtils.getElementQName(domBodyElement);
+
+ SOAPBodyElement soapBodyElement = null;
+
+ // Process a <env:Fault> message
+ if (beName.equals(new QName(envNS, "Fault")))
+ {
+ SOAPFaultImpl soapFault = new SOAPFaultImpl(envPrefix, envNS);
+ soapBody.addChildElement(soapFault);
+ soapBodyElement = soapFault;
+
+ DOMUtils.copyAttributes(soapFault, domBodyElement);
+
+ // copy everything and let soapFault discover child elements itself
+ XMLFragment xmlFragment = new XMLFragment(new DOMSource(domBodyElement));
+ soapFault.setXMLFragment(xmlFragment);
+ }
+
+ // Process and RPC or DOCUMENT style message
+ else
+ {
+ if (style == Style.DOCUMENT)
+ {
+ buildBodyElementDoc(soapBody, domBodyElement);
+ }
+ else if (style == Style.RPC)
+ {
+ soapBodyElement = buildBodyElementRpc(soapBody, domBodyElement);
+ }
+ else if (style == null)
+ {
+ buildBodyElementDefault(soapBody, domBodyElement);
+ }
+ else
+ {
+ throw new WSException("Unsupported message style: " + style);
+ }
+ }
+
+ return soapBodyElement;
+ }
+
+ public SOAPBodyElement buildBodyElementDoc(SOAPBodyImpl soapBody, Element domBodyElement) throws SOAPException
+ {
Element srcElement = (Element)domBodyElement;
QName beName = DOMUtils.getElementQName(domBodyElement);
- SOAPContentElement destElement = new SOAPBodyElementDoc(beName);
- destElement = (SOAPContentElement)soapBody.addChildElement(destElement);
+ SOAPBodyElementDoc soapBodyElement = new SOAPBodyElementDoc(beName);
+ SOAPContentElement contentElement = (SOAPContentElement)soapBody.addChildElement(soapBodyElement);
- DOMUtils.copyAttributes(destElement, srcElement);
+ DOMUtils.copyAttributes(contentElement, srcElement);
XMLFragment xmlFragment = new XMLFragment(new DOMSource(srcElement));
- destElement.setXMLFragment(xmlFragment);
+ contentElement.setXMLFragment(xmlFragment);
+
+ return soapBodyElement;
}
- public void buildBodyElementRpc(SOAPBodyImpl soapBody, Element domBodyElement) throws SOAPException
+ public SOAPBodyElement buildBodyElementRpc(SOAPBodyImpl soapBody, Element domBodyElement) throws SOAPException
{
- soapBody.removeContents();
-
QName beName = DOMUtils.getElementQName(domBodyElement);
SOAPBodyElementRpc soapBodyElement = new SOAPBodyElementRpc(beName);
soapBodyElement = (SOAPBodyElementRpc)soapBody.addChildElement(soapBodyElement);
DOMUtils.copyAttributes(soapBodyElement, domBodyElement);
- Iterator itBodyElement = DOMUtils.getChildElements(domBodyElement);
- while (itBodyElement.hasNext())
+ NodeList nlist = domBodyElement.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
{
- Element srcElement = (Element)itBodyElement.next();
+ Node child = nlist.item(i);
+ short childType = child.getNodeType();
+ if (childType == Node.ELEMENT_NODE)
+ {
+ Element srcElement = (Element)child;
+ Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
+ SOAPContentElement destElement = new SOAPContentElement(name);
+ destElement = (SOAPContentElement)soapBodyElement.addChildElement(destElement);
- Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
- SOAPContentElement destElement = new SOAPContentElement(name);
- destElement = (SOAPContentElement)soapBodyElement.addChildElement(destElement);
+ DOMUtils.copyAttributes(destElement, srcElement);
- DOMUtils.copyAttributes(destElement, srcElement);
+ XMLFragment xmlFragment = new XMLFragment(new DOMSource(srcElement));
+ destElement.setXMLFragment(xmlFragment);
+ }
+ else if (childType == Node.COMMENT_NODE)
+ {
+ appendCommentNode(soapBodyElement, child);
+ }
+ else if (childType == Node.TEXT_NODE)
+ {
+ appendTextNode(soapBodyElement, child);
+ }
+ else
+ {
+ log.warn("Ignore child type: " + childType);
+ }
+ }
- XMLFragment xmlFragment = new XMLFragment(new DOMSource(srcElement));
- destElement.setXMLFragment(xmlFragment);
+ return soapBodyElement;
+ }
+
+ public SOAPBodyElement buildBodyElementDefault(SOAPBodyImpl soapBody, Element domBodyElement) throws SOAPException
+ {
+ QName beName = DOMUtils.getElementQName(domBodyElement);
+ SOAPBodyElement soapBodyElement = new SOAPBodyElementMessage(beName);
+ soapBodyElement = (SOAPBodyElementMessage)soapBody.addChildElement(soapBodyElement);
+
+ DOMUtils.copyAttributes(soapBodyElement, domBodyElement);
+
+ NodeList nlist = domBodyElement.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ short childType = child.getNodeType();
+ if (childType == Node.ELEMENT_NODE)
+ {
+ SOAPElement soapElement = soapFactory.createElement((Element)child);
+ soapBodyElement.addChildElement(soapElement);
+ }
+ else if (childType == Node.COMMENT_NODE)
+ {
+ appendCommentNode(soapBodyElement, child);
+ }
+ else if (childType == Node.TEXT_NODE)
+ {
+ appendTextNode(soapBodyElement, child);
+ }
+ else if (childType == Node.CDATA_SECTION_NODE)
+ {
+ String nodeValue = child.getNodeValue();
+ soapBodyElement.addTextNode(nodeValue);
+ }
+ else
+ {
+ log.warn("Ignore child type: " + childType);
+ }
}
+
+ return soapBodyElement;
}
+
+ private void appendCommentNode(SOAPElement soapElement, Node child)
+ {
+ String nodeValue = child.getNodeValue();
+ Document ownerDoc = soapElement.getOwnerDocument();
+ Comment comment = ownerDoc.createComment(nodeValue);
+ soapElement.appendChild(comment);
+ }
+
+ private void appendTextNode(SOAPElement soapElement, Node child) throws SOAPException
+ {
+ String nodeValue = child.getNodeValue();
+ soapElement.addTextNode(nodeValue);
+ }
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -26,10 +26,12 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.Reader;
import javax.xml.namespace.QName;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFault;
@@ -40,6 +42,8 @@
import javax.xml.stream.XMLStreamReader;
import javax.xml.transform.stream.StreamSource;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.core.jaxrpc.Style;
import org.w3c.dom.Element;
import com.ctc.wstx.stax.WstxInputFactory;
@@ -256,7 +260,7 @@
if (Part.ENVELOPE == currentPart)
{
// setup envelope impl
- soapEnv = new SOAPEnvelopeImpl(soapPart, qName.getNamespaceURI());
+ soapEnv = new SOAPEnvelopeImpl(soapPart, qName.getNamespaceURI(), false);
destElement = soapEnv; // soapEnv becomes current
}
else if (Part.HEADER == currentPart)
@@ -469,4 +473,34 @@
return builder.toString();
}
+
+ public SOAPEnvelope build(SOAPMessage soapMessage, Reader reader, boolean ignoreParseError) throws IOException, SOAPException
+ {
+ throw new NotImplementedException();
+ }
+
+ public SOAPEnvelope build(SOAPMessage soapMessage, Element domEnv) throws SOAPException
+ {
+ throw new NotImplementedException();
+ }
+
+ public SOAPBodyElement buildBodyElementDoc(SOAPBodyImpl soapBody, Element domBodyElement) throws SOAPException
+ {
+ throw new NotImplementedException();
+ }
+
+ public SOAPBodyElement buildBodyElementRpc(SOAPBodyImpl soapBody, Element domBodyElement) throws SOAPException
+ {
+ throw new NotImplementedException();
+ }
+
+ public Style getStyle()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void setStyle(Style style)
+ {
+ throw new NotImplementedException();
+ }
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/HRefInlineHandler.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -26,7 +26,6 @@
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;
@@ -51,9 +50,9 @@
private static Logger log = Logger.getLogger(HRefInlineHandler.class);
private SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
- private SOAPBody soapBody;
+ private SOAPBodyImpl soapBody;
- public HRefInlineHandler(SOAPBody soapBody)
+ public HRefInlineHandler(SOAPBodyImpl soapBody)
{
this.soapBody = soapBody;
}
@@ -63,16 +62,21 @@
String bodyStr = DOMWriter.printNode(soapBody, true);
log.debug("Begin processHRefs:\n" + bodyStr);
- SOAPBodyElement bodyElement = (SOAPBodyElement)soapBody.getChildElements().next();
- processElement(bodyElement);
+ SOAPBodyElement soapBodyElement = soapBody.getBodyElement();
+ processElement(soapBodyElement);
+ // Process elements after SOAPBodyElement
Iterator it = soapBody.getChildElements();
while (it.hasNext())
{
- // Remove id elements
- SOAPElement soapElement = (SOAPElement)it.next();
- if ((soapElement instanceof SOAPBodyElement) == false)
- soapBody.removeChild(soapElement);
+ Object next = it.next();
+ if (next instanceof SOAPElement)
+ {
+ // Remove id elements
+ SOAPElement soapElement = (SOAPElement)next;
+ if ((soapElement instanceof SOAPBodyElement) == false)
+ soapBody.removeChild(soapElement);
+ }
}
bodyStr = DOMWriter.printNode(soapBody, true);
@@ -105,11 +109,15 @@
Iterator it = soapBody.getChildElements();
while (it.hasNext())
{
- SOAPElement auxElement = (SOAPElement)it.next();
- if (href.equals("#" + auxElement.getAttribute("id")))
+ Object next = it.next();
+ if (next instanceof SOAPElement)
{
- idElement = (SOAPElement)auxElement;
- break;
+ SOAPElement auxElement = (SOAPElement)next;
+ if (href.equals("#" + auxElement.getAttribute("id")))
+ {
+ idElement = (SOAPElement)auxElement;
+ break;
+ }
}
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -154,7 +154,7 @@
SOAPMessageImpl soapMessage = new SOAPMessageImpl();
SOAPPartImpl soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
- new SOAPEnvelopeImpl(soapPart, envNamespace);
+ new SOAPEnvelopeImpl(soapPart, envNamespace, true);
return soapMessage;
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/NodeImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/NodeImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/NodeImpl.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -552,6 +552,21 @@
{
retNode = new TextImpl(node);
}
+ else if (node instanceof org.w3c.dom.Comment)
+ {
+ retNode = new TextImpl(node);
+ }
+ else if (node instanceof org.w3c.dom.Element)
+ {
+ try
+ {
+ retNode = new SOAPFactoryImpl().createElement((Element)node);
+ }
+ catch (SOAPException ex)
+ {
+ throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "CAnnot convert to SOAP element: " + node);
+ }
+ }
else
{
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Operation not supported on this type of node: " + node);
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyElementMessage.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyElementMessage.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyElementMessage.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -25,6 +25,7 @@
import javax.xml.rpc.JAXRPCException;
import javax.xml.soap.Name;
+import javax.xml.namespace.QName;
import javax.xml.soap.SOAPBodyElement;
import org.jboss.ws.core.utils.DOMWriter;
@@ -39,7 +40,8 @@
*/
public class SOAPBodyElementMessage extends SOAPElementImpl implements SOAPBodyElement
{
- public SOAPBodyElementMessage(Name name)
+
+ public SOAPBodyElementMessage(QName name)
{
super(name);
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -38,6 +38,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Comment;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
@@ -181,6 +182,19 @@
return getChildElements(new QName(getNamespaceURI(), "Fault"));
}
+ public SOAPBodyElement getBodyElement()
+ {
+ SOAPBodyElement bodyElement = null;
+ Iterator it = getChildElements();
+ while (bodyElement == null && it.hasNext())
+ {
+ Object next = it.next();
+ if (next instanceof SOAPBodyElement)
+ bodyElement = (SOAPBodyElement)next;
+ }
+ return bodyElement;
+ }
+
public Node appendChild(Node newChild) throws DOMException
{
log.trace("appendChild: " + newChild.getNodeName());
@@ -254,10 +268,14 @@
return newDocument;
}
- private static boolean needsConversionToBodyElement(Node node)
+ private static boolean needsConversionToBodyElement(Node newChild)
{
// JBCTS-440 #addTextNodeTest1 appends a Text node to a SOAPBody
- return !(node instanceof SOAPBodyElement || node instanceof DocumentFragment || node instanceof Text);
+ boolean validChild = newChild instanceof SOAPBodyElement;
+ validChild = validChild || newChild instanceof DocumentFragment;
+ validChild = validChild || newChild instanceof Text;
+ validChild = validChild || newChild instanceof Comment;
+ return validChild == false;
}
private static SOAPBodyElementDoc convertToBodyElement(Node node)
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -465,9 +465,7 @@
}
else if (node instanceof Text)
{
- String value = node.getNodeValue();
- if (value.trim().length() > 0)
- list.add(node);
+ list.add(node);
}
}
return list.iterator();
@@ -835,7 +833,7 @@
}
else if (node instanceof TextImpl)
{
- out.write(node.getValue());
+ ((TextImpl)node).writeNode(out);
}
else
{
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPEnvelopeImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPEnvelopeImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPEnvelopeImpl.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -54,7 +54,7 @@
/** Construct a SOAP envelope for the given SOAP version URI prefix, etc.
*/
- public SOAPEnvelopeImpl(SOAPPartImpl soapPart, SOAPElement element) throws SOAPException
+ public SOAPEnvelopeImpl(SOAPPartImpl soapPart, SOAPElement element, boolean addHeaderAndBody) throws SOAPException
{
super((SOAPElementImpl)element);
@@ -71,16 +71,16 @@
assertEnvelopeNamespace(namespaceURI);
addNamespaceDeclaration(prefix, namespaceURI);
- // the Element source might already contain a Header and Body declaration
- if (null == soapPart.getEnvelope().getHeader())
+ if (addHeaderAndBody)
+ {
addHeader();
- if (null == soapPart.getEnvelope().getBody())
addBody();
+ }
}
/** Construct a SOAP envelope for the given SOAP version URI.
*/
- SOAPEnvelopeImpl(SOAPPartImpl soapPart, String namespace) throws SOAPException
+ SOAPEnvelopeImpl(SOAPPartImpl soapPart, String namespace, boolean addHeaderAndBody) throws SOAPException
{
super("Envelope", Constants.PREFIX_ENV, namespace);
@@ -90,8 +90,11 @@
assertEnvelopeNamespace(namespace);
addNamespaceDeclaration(getPrefix(), namespace);
- addHeader();
- addBody();
+ if (addHeaderAndBody)
+ {
+ addHeader();
+ addBody();
+ }
}
public SOAPMessage getSOAPMessage()
@@ -156,7 +159,7 @@
while (it.hasNext())
{
Node node = (Node)it.next();
- if (node.getLocalName().equals("Body"))
+ if ("Body".equals(node.getLocalName()))
return (SOAPBody)node;
}
return null;
@@ -168,7 +171,7 @@
while (it.hasNext())
{
Node node = (Node)it.next();
- if (node.getLocalName().equals("Header"))
+ if ("Header".equals(node.getLocalName()))
return (SOAPHeader)node;
}
return null;
@@ -179,7 +182,10 @@
*/
public SOAPElement addTextNode(String value) throws SOAPException
{
- throw new SOAPException("Cannot add Text node to SOAPEnvelope");
+ if (value.trim().length() > 0)
+ throw new SOAPException("Cannot add Text node to SOAPEnvelope");
+
+ return super.addTextNode(value);
}
public Document getOwnerDocument()
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -110,7 +110,8 @@
if (domElement == null)
throw new IllegalArgumentException("Source node cannot be null");
- if (domElement instanceof SOAPElement)
+ // Can only use this optimization if we are doing a deep copy.
+ if (domElement instanceof SOAPElement && deep==true)
return (SOAPElement)domElement;
String localName = domElement.getLocalName();
@@ -159,8 +160,7 @@
@Override
public Detail createDetail() throws SOAPException
{
- if (envNamespace == null)
- throw new UnsupportedOperationException("the specified protocol was DYNAMIC_SOAP_PROTOCOL");
+ assertEnvNamespace();
return SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(envNamespace) ? new DetailImpl() :
new DetailImpl(SOAPConstants.SOAP_ENV_PREFIX, envNamespace);
@@ -181,8 +181,7 @@
@Override
public SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException
{
- if (envNamespace == null)
- throw new UnsupportedOperationException("the specified protocol was DYNAMIC_SOAP_PROTOCOL");
+ assertEnvNamespace();
SOAPFaultImpl soapFault = new SOAPFaultImpl(SOAPConstants.SOAP_ENV_PREFIX, envNamespace);
soapFault.setFaultCode(faultCode);
@@ -193,11 +192,16 @@
@Override
public SOAPFault createFault() throws SOAPException
{
- if (envNamespace == null)
- throw new UnsupportedOperationException("the specified protocol was DYNAMIC_SOAP_PROTOCOL");
+ assertEnvNamespace();
SOAPFaultImpl soapFault = new SOAPFaultImpl(SOAPConstants.SOAP_ENV_PREFIX, envNamespace);
soapFault.setFaultCode(soapFault.getDefaultFaultCode());
return soapFault;
}
+
+ private void assertEnvNamespace()
+ {
+ if (envNamespace == null)
+ throw new UnsupportedOperationException("Envelope namespace not specified, use one of the SOAP protocols");
+ }
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -68,7 +68,7 @@
if (wsaAction.equals(opAux.getSOAPAction()))
{
opMetaData = opAux;
- if(log.isDebugEnabled()) log.debug("Use wsa:Action dispatch: " + wsaAction);
+ log.debug("Use wsa:Action dispatch: " + wsaAction);
break;
}
}
@@ -86,9 +86,19 @@
{
SOAPBody soapBody = soapMessage.getSOAPBody();
+ SOAPBodyElement soapBodyElement = null;
Iterator bodyChildren = soapBody.getChildElements();
- if (bodyChildren.hasNext() == false)
+ while (bodyChildren.hasNext() && soapBodyElement == null)
{
+ Object childNode = bodyChildren.next();
+ if (childNode instanceof SOAPBodyElement)
+ {
+ soapBodyElement = (SOAPBodyElement)childNode;
+ }
+ }
+
+ if (soapBodyElement == null)
+ {
if (epMetaData.getStyle() == Style.RPC)
throw new SOAPException("Empty SOAP body with no child element not supported for RPC");
@@ -97,7 +107,7 @@
{
if (opAux.getParameters().size() == 0)
{
- if(log.isDebugEnabled()) log.debug ("Dispatching empty SOAP body");
+ log.debug ("Dispatching empty SOAP body");
opMetaData = opAux;
break;
}
@@ -105,7 +115,6 @@
}
else
{
- SOAPBodyElement soapBodyElement = (SOAPBodyElement)bodyChildren.next();
Name soapName = soapBodyElement.getElementName();
QName xmlElementName = new QName(soapName.getURI(), soapName.getLocalName());
opMetaData = epMetaData.getOperation(xmlElementName);
@@ -119,14 +128,14 @@
{
if (opAux.isMessageEndpoint())
{
- if(log.isDebugEnabled()) log.debug("Use generic message style dispatch");
+ log.debug("Use generic message style dispatch");
opMetaData = opAux;
break;
}
}
}
- if(log.isDebugEnabled()) log.debug("getDispatchDestination: " + (opMetaData != null ? opMetaData.getQName() : null));
+ log.debug("getDispatchDestination: " + (opMetaData != null ? opMetaData.getQName() : null));
return opMetaData;
}
}
\ No newline at end of file
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/TextImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/TextImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/TextImpl.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -21,6 +21,9 @@
*/
package org.jboss.ws.core.soap;
+import java.io.IOException;
+import java.io.Writer;
+
import org.w3c.dom.DOMException;
import org.w3c.dom.Text;
@@ -42,8 +45,7 @@
*/
public boolean isComment()
{
- String value = getNodeValue().trim();
- return value.startsWith("<!--") && value.endsWith("-->");
+ return domNode.getNodeType() == org.w3c.dom.Node.COMMENT_NODE;
}
public String getValue()
@@ -56,6 +58,15 @@
setNodeValue(value);
}
+ public void writeNode(Writer out) throws IOException
+ {
+ String nodeValue = getNodeValue();
+ if (isComment() && !nodeValue.startsWith("<!--"))
+ out.write("<!--" + nodeValue + "-->");
+ else
+ out.write(nodeValue);
+ }
+
/**
* Breaks this node into two nodes at the specified <code>offset</code>, keeping both in the tree as siblings.
* <p/>
@@ -323,5 +334,4 @@
{
return null;
}
-
}
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/XMLContent.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -54,6 +54,8 @@
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.Comment;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -297,18 +299,13 @@
if (domElement == container)
return;
- String rootLocalName = domElement.getLocalName();
- String rootPrefix = domElement.getPrefix();
- String rootNS = domElement.getNamespaceURI();
- NameImpl contentRootName = new NameImpl(rootLocalName, rootPrefix, rootNS);
-
// Make sure the content root element name matches this element name
- Name name = container.getElementName();
QName qname = container.getElementQName();
+ QName contentRootName = DOMUtils.getElementQName(domElement);
boolean artificalElement = (SOAPContentElement.GENERIC_PARAM_NAME.equals(qname) || SOAPContentElement.GENERIC_RETURN_NAME.equals(qname));
- if (!artificalElement && !contentRootName.equals(name))
- throw new WSException("Content root name does not match element name: " + contentRootName + " != " + name);
+ if (!artificalElement && !contentRootName.equals(qname))
+ throw new WSException("Content root name does not match element name: " + contentRootName + " != " + qname);
// Remove all child nodes
container.removeContents();
@@ -317,11 +314,10 @@
// These need to be replaced (costly!)
if (artificalElement)
{
- QName xmlName = contentRootName.toQName();
- container.setElementQNameInternal(xmlName);
+ container.setElementQNameInternal(contentRootName);
}
- // Copy attributes
+ Document ownerDoc = container.getOwnerDocument();
DOMUtils.copyAttributes(container, domElement);
SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
@@ -335,7 +331,7 @@
{
SOAPElement soapElement = soapFactory.createElement((Element)child);
container.addChildElement(soapElement);
- if (Constants.NAME_XOP_INCLUDE.equals(name) || container.isXOPParameter())
+ if (Constants.NAME_XOP_INCLUDE.equals(qname) || container.isXOPParameter())
XOPContext.inlineXOPData(soapElement);
}
else if (childType == Node.TEXT_NODE)
@@ -343,6 +339,12 @@
String nodeValue = child.getNodeValue();
container.addTextNode(nodeValue);
}
+ else if (childType == Node.COMMENT_NODE)
+ {
+ String nodeValue = child.getNodeValue();
+ Comment comment = ownerDoc.createComment(nodeValue);
+ container.appendChild(comment);
+ }
else if (childType == Node.CDATA_SECTION_NODE)
{
String nodeValue = child.getNodeValue();
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/soap/XMLFragment.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -130,16 +130,11 @@
public Element toElement()
{
Element retElement = null;
- try
- {
- source = beginSourceAccess(source);
- retElement = DOMUtils.sourceToElement(source);
- endSourceAccess();
- }
- catch (IOException ex)
- {
- handleSourceAccessException(ex);
- }
+
+ source = beginSourceAccess(source);
+ retElement = DOMUtils.sourceToElement(source);
+ endSourceAccess();
+
return retElement;
}
@@ -235,15 +230,8 @@
}
else
{
- try
- {
- Element element = DOMUtils.sourceToElement(source);
- source = new DOMSource(element);
- }
- catch (IOException ex)
- {
- WSException.rethrow(ex);
- }
+ Element element = DOMUtils.sourceToElement(source);
+ source = new DOMSource(element);
}
return source;
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/java/org/jboss/ws/core/utils/DOMUtils.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -37,15 +37,12 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamSource;
+import javax.xml.transform.stream.StreamResult;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
@@ -72,8 +69,7 @@
// All elements created by the same thread are created by the same builder and belong to the same doc
private static ThreadLocal documentThreadLocal = new ThreadLocal();
private static ThreadLocal builderThreadLocal = new ThreadLocal() {
- protected Object initialValue()
- {
+ protected Object initialValue() {
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
@@ -208,7 +204,7 @@
return resolveQName(el, qualifiedName);
}
- /** Transform the given qualified name into a QName
+ /** Transform the giveen qualified name into a QName
*/
public static QName resolveQName(Element el, String qualifiedName)
{
@@ -251,7 +247,7 @@
nsElement = getParentElement(nsElement);
}
}
-
+
qname = new QName(namespaceURI, localPart, prefix);
return qname;
}
@@ -526,12 +522,11 @@
return doc;
}
- public static Element sourceToElement(Source source) throws IOException
+ public static Element sourceToElement(Source source)
{
- Element retElement = null;
+ Element elementResult = null;
- try
- {
+ try {
if (source instanceof StreamSource)
{
StreamSource streamSource = (StreamSource)source;
@@ -539,13 +534,17 @@
InputStream ins = streamSource.getInputStream();
if (ins != null)
{
- retElement = DOMUtils.parse(ins);
+ elementResult = DOMUtils.parse(ins);
}
else
{
Reader reader = streamSource.getReader();
- retElement = DOMUtils.parse(new InputSource(reader));
+ elementResult = DOMUtils.parse(new InputSource(reader));
}
+
+ // reset the excausted input stream
+ String xmlStr = DOMWriter.printNode(elementResult, false);
+ source = new StreamSource(new ByteArrayInputStream(xmlStr.getBytes()));
}
else if (source instanceof DOMSource)
{
@@ -553,11 +552,11 @@
Node node = domSource.getNode();
if (node instanceof Element)
{
- retElement = (Element)node;
+ elementResult = (Element)node;
}
else if (node instanceof Document)
{
- retElement = ((Document)node).getDocumentElement();
+ elementResult = ((Document)node).getDocumentElement();
}
else
{
@@ -572,11 +571,9 @@
TransformerFactory tf = TransformerFactory.newInstance();
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
- Transformer transformer = tf.newTransformer();
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.transform(source, new StreamResult(baos));
- retElement = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
+ tf.newTransformer().transform(source, new StreamResult(baos));
+
+ elementResult = DOMUtils.parse(new ByteArrayInputStream(baos.toByteArray()));
}
else
{
@@ -584,13 +581,11 @@
}
}
- catch (TransformerException ex)
+ catch (Exception e)
{
- IOException ioex = new IOException();
- ioex.initCause(ex);
- throw ioex;
+ WSException.rethrow(e);
}
- return retElement;
+ return elementResult;
}
}
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/resources/jboss-saaj.jar/META-INF/services/org.jboss.ws.core.soap.EnvelopeBuilder
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/resources/jboss-saaj.jar/META-INF/services/org.jboss.ws.core.soap.EnvelopeBuilder (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-core/src/resources/jboss-saaj.jar/META-INF/services/org.jboss.ws.core.soap.EnvelopeBuilder 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1 @@
+org.jboss.ws.core.soap.EnvelopeBuilderDOM
\ No newline at end of file
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/ant-import/build-jars-jaxrpc.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/ant-import/build-jars-jaxrpc.xml 2007-09-13 12:02:46 UTC (rev 4559)
@@ -2452,7 +2452,41 @@
<include name="wsdl/**"/>
</metainf>
</jar>
-
+
+ <!-- jbossws-jbws1647 RPC/Literal -->
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1647-rpclit.war"
+ webxml="${tests.output.dir}/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxrpc/jbws1647/rpclit/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+
+ <!-- jbossws-jbws1647 Document/Literal -->
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1647-doclit.war"
+ webxml="${tests.output.dir}/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxrpc/jbws1647/doclit/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+
<!-- jaxrpc-marshall-doclit.war -->
<war warfile="${tests.output.dir}/libs/jaxrpc-marshall-doclit.war" webxml="${tests.output.dir}/resources/jaxrpc/marshall-doclit/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -25,18 +25,25 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Iterator;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.Text;
+import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamSource;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.Constants;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
@@ -77,7 +84,10 @@
assertEquals("env:Envelope", env.getNodeName());
assertEquals(Constants.NS_SOAP11_ENV, env.getNamespaceURI());
- SOAPBodyElement soapBodyElement = (SOAPBodyElement)env.getBody().getChildElements().next();
+ Iterator it = env.getBody().getChildElements();
+ Text text = (Text)it.next();
+ assertEquals(" ", text.getValue());
+ SOAPBodyElement soapBodyElement = (SOAPBodyElement)it.next();
assertEquals("urn:uddi-org:api_v2", soapBodyElement.getNamespaceURI());
}
@@ -123,7 +133,7 @@
assertEquals(Constants.NS_SOAP11_ENV, env.getNamespaceURI());
}
- public void testSetContentOnSOAPPart() throws Exception
+ public void testSetContentOnSOAPPart_StreamSource() throws Exception
{
String expMsg =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>" +
@@ -149,32 +159,79 @@
assertEquals(DOMUtils.parse(expMsg), DOMUtils.parse(wasMsg));
}
+ public void testSetContentOnSOAPPart_DOMSource() throws Exception
+ {
+ String expMsg =
+ "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <soapenv:Header/>" +
+ " <soapenv:Body>" +
+ " <HelloResponse xmlns='http://helloservice.org/types\'>" +
+ " <argument>responseBean</argument>" +
+ " </HelloResponse>" +
+ " </soapenv:Body>" +
+ "</soapenv:Envelope>";
+
+ MessageFactory factory = new MessageFactoryImpl();
+
+ ByteArrayInputStream inputStream = new ByteArrayInputStream(expMsg.getBytes());
+ SOAPMessage soapMsg = factory.createMessage(null, inputStream);
+
+ SOAPMessage message = factory.createMessage();
+ message.getSOAPPart().setContent(soapMsg.getSOAPPart().getContent());
+ message.saveChanges();
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ message.writeTo(baos);
+ String wasMsg = new String(baos.toByteArray());
+
+ assertEquals(DOMUtils.parse(expMsg), DOMUtils.parse(wasMsg));
+ }
+
// [JBWS-1511] MessageFactory does not preserve comments
public void testPreserveComments() throws Exception
{
String expMsg =
- "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ns1='http://somens.org'>" +
- " <!-- header -->" +
- " <soapenv:Header>" +
- " <!-- header element -->" +
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ns1='http://somens.org'>" +
+ " <env:Header>" +
" <ns1:header>kermit</ns1:header>" +
- " </soapenv:Header>" +
- " <!-- body -->" +
- " <soapenv:Body>" +
- " <!-- body element -->" +
+ " </env:Header>" +
+ " <env:Body>" +
+ " <!-- pre body element -->" +
" <Hello>" +
- " <!-- element -->" +
+ " <!-- pre element -->" +
" <argument>kermit</argument>" +
+ " <!-- post element -->" +
" </Hello>" +
- " </soapenv:Body>" +
- "</soapenv:Envelope>";
+ " <!-- post body element -->" +
+ " </env:Body>" +
+ "</env:Envelope>";
- MessageFactory factory = new MessageFactoryImpl();
- ByteArrayInputStream inputStream = new ByteArrayInputStream(expMsg.getBytes());
+ // Verify that DOM parse/write do not modify the message
+ Element expEnv = DOMUtils.parse(expMsg);
+ assertEquals(expMsg, DOMWriter.printNode(expEnv, false));
+
+ doPreserveCommentsPerStyle(expMsg, Style.DOCUMENT);
+ doPreserveCommentsPerStyle(expMsg, Style.RPC);
+ doPreserveCommentsPerStyle(expMsg, null);
+ }
+
+ private void doPreserveCommentsPerStyle(String expXML, Style style) throws IOException, SOAPException
+ {
+ MessageFactoryImpl factory = new MessageFactoryImpl();
+ factory.setStyle(style);
+
+ ByteArrayInputStream inputStream = new ByteArrayInputStream(expXML.getBytes());
SOAPMessage soapMsg = factory.createMessage(null, inputStream);
- SOAPEnvelope env = soapMsg.getSOAPPart().getEnvelope();
+ SOAPEnvelope wasEnv = soapMsg.getSOAPPart().getEnvelope();
- System.out.println("FIXME: [JBWS-1511] MessageFactory does not preserve comments");
- //assertEquals(DOMUtils.parse(expMsg), (Element)env);
+ String wasXML = DOMWriter.printNode(wasEnv, false);
+ String wasBody = wasXML.substring(wasXML.indexOf("<env:Body>"));
+ wasBody = wasBody.substring(0, wasBody.indexOf("</env:Body>") + 11);
+
+ String expBody = expXML.substring(expXML.indexOf("<env:Body>"));
+ expBody = expBody.substring(0, expBody.indexOf("</env:Body>") + 11);
+ //System.out.println(expBody);
+ //System.out.println(wasBody);
+ assertEquals(expBody, wasBody);
}
}
\ No newline at end of file
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -107,9 +107,9 @@
{
String xml =
"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <soap:Body>" +
- " <np:bear name='ted' zoo:species='ursus maritimus' xmlns:np='http://northpole.net' xmlns:zoo='http://zoofan.net'/>" +
- " </soap:Body>" +
+ "<soap:Body>" +
+ "<np:bear name='ted' zoo:species='ursus maritimus' xmlns:np='http://northpole.net' xmlns:zoo='http://zoofan.net'/>" +
+ "</soap:Body>" +
"</soap:Envelope>";
SOAPMessage soapMessage = MessageFactory.newInstance().createMessage(null, new ByteArrayInputStream(xml.getBytes()));
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -23,6 +23,7 @@
import java.io.ByteArrayInputStream;
+import javax.xml.namespace.QName;
import javax.xml.rpc.soap.SOAPFaultException;
import javax.xml.soap.Detail;
import javax.xml.soap.DetailEntry;
@@ -49,19 +50,20 @@
*/
public class SOAPFaultTestCase extends JBossWSTest
{
- private String envStr = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- " <env:Header/>" +
- " <env:Body>" +
- " <env:Fault>" +
- " <faultcode>env:Client</faultcode>" +
- " <faultstring>Some fault message</faultstring>" +
- " <faultactor>Some fault actor</faultactor>" +
- " <detail>" +
- " <ns1:name xmlns:ns1='http://somens'>Kermit</ns1:name>" +
- " </detail>" +
- " </env:Fault>" +
- " </env:Body>" +
- "</env:Envelope>";
+ private String envStr =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <env:Fault>" +
+ " <faultcode>env:Client</faultcode>" +
+ " <faultstring>Some fault message</faultstring>" +
+ " <faultactor>Some fault actor</faultactor>" +
+ " <detail>" +
+ " <ns1:name xmlns:ns1='http://somens'>Kermit</ns1:name>" +
+ " </detail>" +
+ " </env:Fault>" +
+ " </env:Body>" +
+ "</env:Envelope>";
public void testExceptionToFault() throws Exception
{
@@ -76,7 +78,7 @@
MessageFactory factory = MessageFactory.newInstance();
SOAPMessage soapMessage = factory.createMessage(null, new ByteArrayInputStream(envStr.getBytes()));
SOAPBody soapBody = soapMessage.getSOAPBody();
- SOAPFault soapFault = (SOAPFault)soapBody.getChildElements().next();
+ SOAPFault soapFault = (SOAPFault)soapBody.getChildElements(new QName("http://schemas.xmlsoap.org/soap/envelope/", "Fault")).next();
assertEquals("env:Client", soapFault.getFaultCode());
assertEquals("Some fault message", soapFault.getFaultString());
assertEquals("Some fault actor", soapFault.getFaultActor());
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws1647;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.DOMWriter;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public abstract class AbstractHandler extends GenericHandler
+{
+ private static final Logger log = Logger.getLogger(AbstractHandler.class);
+
+ public abstract String getMessageBody();
+
+ public boolean handleRequest(MessageContext msgContext)
+ {
+ log.info("handleRequest");
+
+ SOAPMessageContext messageContext = (SOAPMessageContext)msgContext;
+ SOAPMessage soapMessage = messageContext.getMessage();
+
+ try
+ {
+ SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
+ String wasEnv = DOMWriter.printNode(soapEnv, false);
+ String wasBody = wasEnv.substring(wasEnv.indexOf("<env:Body>"));
+ wasBody = wasBody.substring(0, wasBody.indexOf("</env:Envelope>"));
+ if (wasBody.equals(getMessageBody()) == false)
+ {
+ log.error("Exp Body: " + getMessageBody());
+ log.error("Was Body: " + wasBody);
+ throw new RuntimeException("Received message does not contain expected soap body.");
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Unable to process SOAPMessage", e);
+ }
+ return true;
+ }
+
+ public QName[] getHeaders()
+ {
+ return null;
+ }
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/AbstractHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws1647;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public class DocumentHandler extends AbstractHandler
+{
+
+ public static final String MESSAGE_BODY =
+ "<env:Body>" +
+ " <!-- Comment After Body -->" +
+ " <typ:echoMessage xmlns:typ='http://org.jboss.test.ws/jbws1647/types'>" +
+ " <!-- Comment After Wrapper -->" +
+ " <String_1>My Message</String_1>" +
+ " <!-- Comment After Parameter -->" +
+ " </typ:echoMessage>" +
+ " <!-- Comment Before Close Body -->" +
+ "</env:Body>";
+
+ public String getMessageBody()
+ {
+ return MESSAGE_BODY;
+ }
+
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/DocumentHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws1647;
+
+import org.jboss.test.ws.JBossWSTestSetup;
+
+import junit.framework.Test;
+
+/**
+ * Text Node Preservation For Messages Sent Across The Wire
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1647
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public class JBWS1647DocumentTestCase extends JBWS1647TestBase
+{
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1647DocumentTestCase.class, "jaxrpc-jbws1647-doclit.war");
+ }
+
+ public String getMessage()
+ {
+ return "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + DocumentHandler.MESSAGE_BODY + "</env:Envelope>";
+ }
+
+ public String getEndpointAddress()
+ {
+ return "http://" + getServerHost() + ":8080/jaxrpc-jbws1647-doclit/TestEndpoint";
+ }
+
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647DocumentTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws1647;
+
+import org.jboss.test.ws.JBossWSTestSetup;
+
+import junit.framework.Test;
+
+/**
+ * Text Node Preservation For Messages Sent Across The Wire
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1647
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 14 May 2007
+ */
+public class JBWS1647RPCTestCase extends JBWS1647TestBase
+{
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1647RPCTestCase.class, "jaxrpc-jbws1647-rpclit.war");
+ }
+
+ public String getMessage()
+ {
+ return "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + RpcHandler.MESSAGE_BODY + "</env:Envelope>";
+ }
+
+ public String getEndpointAddress()
+ {
+ return "http://" + getServerHost() + ":8080/jaxrpc-jbws1647-rpclit/TestEndpoint";
+ }
+
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647RPCTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647TestBase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647TestBase.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647TestBase.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws1647;
+
+import java.io.ByteArrayInputStream;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.test.ws.JBossWSTest;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public abstract class JBWS1647TestBase extends JBossWSTest
+{
+ public abstract String getMessage();
+
+ public abstract String getEndpointAddress();
+
+ public void testCall() throws Exception
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPMessage soapMessage = msgFactory.createMessage(null, new ByteArrayInputStream(getMessage().getBytes()));
+
+ SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance();
+ SOAPConnection con = conFactory.createConnection();
+ SOAPMessage resMessage = con.call(soapMessage, getEndpointAddress());
+
+ SOAPElement soapElement = (SOAPElement)resMessage.getSOAPBody().getChildElements().next();
+ assertEquals("echoMessageResponse", soapElement.getElementName().getLocalName());
+ }
+
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/JBWS1647TestBase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws1647;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 15 May 2007
+ */
+public class RpcHandler extends AbstractHandler
+{
+
+ public static final String MESSAGE_BODY =
+ "<env:Body>" +
+ " <!-- Comment After Body -->" +
+ " <jbw:echoMessage xmlns:jbw='http://org.jboss.test.ws/jbws1647'>" +
+ " <!-- Comment After Operation -->" +
+ " <String_1>My Message</String_1>" +
+ " <!-- Comment After Parameter -->" +
+ " </jbw:echoMessage>" +
+ " <!-- Comment Before Close Body -->" +
+ "</env:Body>";
+
+ public String getMessageBody()
+ {
+ return MESSAGE_BODY;
+ }
+
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/RpcHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws1647;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 14 May 2007
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String echoMessage(final String message) throws RemoteException;
+
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.jbws1647;
+
+import org.jboss.logging.Logger;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 14 May 2007
+ */
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ private static final Logger log = Logger.getLogger(TestEndpointImpl.class);
+
+ public String echoMessage(final String message)
+ {
+ return message;
+ }
+
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue May 15 11:14:30 CEST 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jaxrpc.jbws1647;
+
+
+public class TestEndpoint_echoMessage_RequestStruct
+{
+
+protected java.lang.String string_1;
+public TestEndpoint_echoMessage_RequestStruct(){}
+
+public TestEndpoint_echoMessage_RequestStruct(java.lang.String string_1){
+this.string_1=string_1;
+}
+public java.lang.String getString_1() { return string_1 ;}
+
+public void setString_1(java.lang.String string_1){ this.string_1=string_1; }
+
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_RequestStruct.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue May 15 11:14:30 CEST 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jaxrpc.jbws1647;
+
+
+public class TestEndpoint_echoMessage_ResponseStruct
+{
+
+protected java.lang.String result;
+public TestEndpoint_echoMessage_ResponseStruct(){}
+
+public TestEndpoint_echoMessage_ResponseStruct(java.lang.String result){
+this.result=result;
+}
+public java.lang.String getResult() { return result ;}
+
+public void setResult(java.lang.String result){ this.result=result; }
+
+}
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1647/TestEndpoint_echoMessage_ResponseStruct.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws707/JBWS707TestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws707/JBWS707TestCase.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws707/JBWS707TestCase.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -28,13 +28,13 @@
import javax.xml.rpc.Service;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import junit.framework.Test;
+import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.w3c.dom.Node;
@@ -184,8 +184,8 @@
mimeHeaders.addHeader("Content-Type", "text/xml; charset=UTF-8");
SOAPMessage soapMessage = mf.createMessage(mimeHeaders, new ByteArrayInputStream(xmlStr.getBytes()));
- SOAPBody soapBody = soapMessage.getSOAPBody();
- SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next();
+ SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
+ SOAPElement soapElement = soapBody.getBodyElement();
StringBuffer builder = new StringBuffer();
NodeList nlist = soapElement.getChildNodes();
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -22,12 +22,14 @@
package org.jboss.test.ws.jaxws.handlerlifecycle;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
@@ -186,8 +188,32 @@
String testMethod;
try
{
- SOAPElement soapElement = (SOAPElement)((SOAPMessageContext)msgContext).getMessage().getSOAPBody().getChildElements().next();
- soapElement = (SOAPElement)soapElement.getChildElements().next();
+
+ SOAPMessage message = ((SOAPMessageContext)msgContext).getMessage();
+ SOAPElement soapElement = null;
+ Iterator it = message.getSOAPBody().getChildElements();
+
+ while (soapElement == null && it.hasNext())
+ {
+ Object current = it.next();
+ if (current instanceof SOAPElement)
+ {
+ soapElement = (SOAPElement)current;
+ }
+ }
+
+ it = soapElement.getChildElements();
+ soapElement = null;
+
+ while (soapElement == null && it.hasNext())
+ {
+ Object current = it.next();
+ if (current instanceof SOAPElement)
+ {
+ soapElement = (SOAPElement)current;
+ }
+ }
+
testMethod = soapElement.getValue();
}
catch (SOAPException e)
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -41,7 +41,7 @@
*/
public class ExceptionTestCase extends JBossWSTest
{
- private String targetNS = "http://exception.samples.jaxws.ws.test.jboss.org/";
+ private String targetNS = "http://exception.jaxws.ws.test.jboss.org/";
private ExceptionEndpoint proxy;
public static Test suite()
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/provider/WebServiceEndpoint.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/provider/WebServiceEndpoint.java 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/provider/WebServiceEndpoint.java 2007-09-13 12:02:46 UTC (rev 4559)
@@ -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.jaxws.samples.provider;
import javax.jws.WebParam;
@@ -27,16 +27,12 @@
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
-@WebService(
- serviceName = "ProviderService",
- portName = "ProviderPort",
- targetNamespace = "http://org.jboss.ws/provider",
- wsdlLocation = "WEB-INF/wsdl/Provider.wsdl")
+@WebService(name = "Provider", serviceName = "ProviderService", portName = "ProviderPort", targetNamespace = "http://org.jboss.ws/provider", wsdlLocation = "WEB-INF/wsdl/Provider.wsdl")
@SOAPBinding(parameterStyle = ParameterStyle.BARE)
public class WebServiceEndpoint
{
- @WebResult(name="user")
- public UserType echo(@WebParam(name="user")UserType type)
+ @WebResult(name = "user")
+ public UserType echo(@WebParam(name = "user") UserType type)
{
return type;
}
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,56 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1647</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1647/types</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint_echoMessage_RequestStruct</java-type>
+ <root-type-qname xmlns:typeNS='http://org.jboss.test.ws/jbws1647/types'>typeNS:echoMessage</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>string_1</java-variable-name>
+ <xml-element-name>String_1</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint_echoMessage_ResponseStruct</java-type>
+ <root-type-qname xmlns:typeNS='http://org.jboss.test.ws/jbws1647/types'>typeNS:echoMessageResponse</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>result</java-variable-name>
+ <xml-element-name>result</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1647'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1647'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1647'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoMessage</java-method-name>
+ <wsdl-operation>echoMessage</wsdl-operation>
+ <wrapped-element/>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1647'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1647'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,19 @@
+<?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>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,21 @@
+<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port xmlns:portNS='http://org.jboss.test.ws/jbws1647'>portNS:TestEndpointPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+
+ <handler>
+ <handler-name>TestHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxrpc.jbws1647.DocumentHandler</handler-class>
+ </handler>
+
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1647' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://org.jboss.test.ws/jbws1647/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1647' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://org.jboss.test.ws/jbws1647/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://org.jboss.test.ws/jbws1647/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+ <complexType name='echoMessage'>
+ <sequence>
+ <element name='String_1' nillable='true' type='string'/>
+ </sequence>
+ </complexType>
+ <complexType name='echoMessageResponse'>
+ <sequence>
+ <element name='result' nillable='true' type='string'/>
+ </sequence>
+ </complexType>
+ <element name='echoMessage' type='tns:echoMessage'/>
+ <element name='echoMessageResponse' type='tns:echoMessageResponse'/>
+ </schema>
+ </types>
+ <message name='TestEndpoint_echoMessage' xmlns='http://schemas.xmlsoap.org/wsdl/'>
+ <part element='ns1:echoMessage' name='echoMessage'/>
+ </message>
+ <message name='TestEndpoint_echoMessageResponse'>
+ <part element='ns1:echoMessageResponse' name='echoMessageResponse'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoMessage' parameterOrder='echoMessage'>
+ <input message='tns:TestEndpoint_echoMessage'/>
+ <output message='tns:TestEndpoint_echoMessageResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoMessage'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools.sh -cp ../../../../../output/classes -config wstools-config.xml
+-->
+
+<!-- Add the following handler to the generated webservices.xml
+
+ <handler>
+ <handler-name>TestHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxrpc.jbws1647.DocumentHandler</handler-class>
+ </handler>
+
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint" style="document">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1647" type-namespace="http://org.jboss.test.ws/jbws1647/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+
+</configuration>
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/doclit/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1647</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1647/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1647'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1647'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1647'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoMessage</java-method-name>
+ <wsdl-operation>echoMessage</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1647'>wsdlMsgNS:TestEndpoint_echoMessage</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1647'>wsdlMsgNS:TestEndpoint_echoMessageResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,19 @@
+<?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>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,21 @@
+<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port xmlns:portNS='http://org.jboss.test.ws/jbws1647'>portNS:TestEndpointPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+
+ <handler>
+ <handler-name>TestHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxrpc.jbws1647.RpcHandler</handler-class>
+ </handler>
+
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1647' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1647' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoMessage'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoMessageResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoMessage' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoMessage'/>
+ <output message='tns:TestEndpoint_echoMessageResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoMessage'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1647' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1647' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml 2007-09-13 12:02:46 UTC (rev 4559)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools.sh -cp ../../../../../output/classes -config wstools-config.xml
+-->
+
+<!-- Add the following handler to the generated webservices.xml
+
+ <handler>
+ <handler-name>TestHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxrpc.jbws1647.RpcHandler</handler-class>
+ </handler>
+
+-->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1647.TestEndpoint" style="rpc">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1647" type-namespace="http://org.jboss.test.ws/jbws1647/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+
+</configuration>
Property changes on: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/jaxrpc/jbws1647/rpclit/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/tests-jboss42-excludes.txt
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/tests-jboss42-excludes.txt 2007-09-13 10:17:46 UTC (rev 4558)
+++ legacy/branches/jbossws-1.2.1.GA_JBWS-1803/jbossws-tests/src/resources/tests-jboss42-excludes.txt 2007-09-13 12:02:46 UTC (rev 4559)
@@ -1,10 +1,15 @@
-# Always excludes
+# Always exclude
org/jboss/test/ws/interop/**
org/jboss/test/ws/benchmark/**
# EJB3/Injection excludes
org/jboss/test/ws/jaxws/endpoint/**
-org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase.*
+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/retail/**
org/jboss/test/ws/jaxws/samples/webserviceref/**
-org/jboss/test/ws/jaxws/jbws1581/**
org/jboss/test/ws/jaxws/serviceref/**
+
+org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.*
+org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.*
16 years, 8 months
JBossWS SVN: r4558 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-13 06:17:46 -0400 (Thu, 13 Sep 2007)
New Revision: 4558
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/NullPrintStream.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
Log:
turning NullPrintStream to singleton
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
@@ -50,7 +50,7 @@
private File outputDir = new File("output");
private File resourceDir = null;
private File sourceDir = null;
- private PrintStream messageStream = new NullPrintStream();
+ private PrintStream messageStream = NullPrintStream.getInstance();
private void createDirectories(File resourceDir, File sourceDir)
{
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/NullPrintStream.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/NullPrintStream.java 2007-09-12 16:12:45 UTC (rev 4557)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/NullPrintStream.java 2007-09-13 10:17:46 UTC (rev 4558)
@@ -26,11 +26,22 @@
import java.io.PrintStream;
import java.util.Locale;
-class NullPrintStream extends PrintStream
+/**
+ * Print stream Singleton behaving like /dev/null device
+ * @author richard.opalka(a)jboss.com
+ */
+final class NullPrintStream extends PrintStream
{
- NullPrintStream()
+
+ private static final PrintStream INSTANCE = new NullPrintStream();
+
+ public static PrintStream getInstance()
{
- // Doesn't actually do anything
+ return INSTANCE;
+ }
+
+ private NullPrintStream()
+ {
super(new ByteArrayOutputStream());
}
@@ -206,4 +217,5 @@
public void write(byte[] b) throws IOException
{
}
+
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-09-13 10:17:46 UTC (rev 4558)
@@ -160,7 +160,7 @@
}
else
{
- stream = new NullPrintStream();
+ stream = NullPrintStream.getInstance();
}
if (!outputDir.exists() && !outputDir.mkdirs())
16 years, 8 months
JBossWS SVN: r4557 - in stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm: spec200502 and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-12 12:12:45 -0400 (Wed, 12 Sep 2007)
New Revision: 4557
Added:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/Serializer.java
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AbstractSerializable.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceFaultSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationRepository.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java
Log:
refactoring
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AbstractSerializable.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AbstractSerializable.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AbstractSerializable.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -28,7 +28,7 @@
import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
/**
- * Utility class which should be used by all WS-RM protocol providers.
+ * Utility class which should be subclassed by all WS-RM protocol providers.
* @author richard.opalka(a)jboss.com
* @see org.jboss.ws.extensions.wsrm.spi.protocol.Serializable
*/
@@ -37,7 +37,7 @@
protected AbstractSerializable()
{
- // intended to be overriden
+ // intended to be subclassed
}
/*
@@ -58,6 +58,10 @@
SerializationRepository.serialize(this, soapMessage);
}
+ /**
+ * Each subclass must implement this method
+ * @return RM provider to be used for de/serialization purposes
+ */
public abstract Provider getProvider();
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -37,28 +37,37 @@
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
/**
* <b>AckRequested</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class AckRequestedSerializer
+final class AckRequestedSerializer implements Serializer
{
+ private static final Serializer INSTANCE = new AckRequestedSerializer();
+
private AckRequestedSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>AckRequested</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(AckRequested object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ AckRequested o = (AckRequested)object;
try
{
SOAPHeader soapHeader = soapMessage.getSOAPPart().getEnvelope().getHeader();
@@ -72,7 +81,7 @@
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(ackRequestedElement, identifierQName, ackRequestedQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
- object.setIdentifier(identifier);
+ o.setIdentifier(identifier);
// read optional wsrm:MessageNumber element
QName messageNumberQName = wsrmConstants.getMessageNumberQName();
@@ -81,7 +90,7 @@
{
String messageNumberString = getRequiredTextContent(messageNumberElement, messageNumberQName);
long messageNumberValue = stringToLong(messageNumberString, "Unable to parse MessageNumber element text content");
- object.setMessageNumber(messageNumberValue);
+ o.setMessageNumber(messageNumberValue);
}
}
catch (SOAPException se)
@@ -100,9 +109,10 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(AckRequested object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ AckRequested o = (AckRequested)object;
try
{
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
@@ -117,14 +127,14 @@
// write required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
- ackRequestedElement.addChildElement(identifierQName).setValue(object.getIdentifier());
+ ackRequestedElement.addChildElement(identifierQName).setValue(o.getIdentifier());
- if (object.getMessageNumber() != 0)
+ if (o.getMessageNumber() != 0)
{
// write optional wsrm:MessageNumber element
QName messageNumberQName = wsrmConstants.getMessageNumberQName();
SOAPElement messageNumberElement = ackRequestedElement.addChildElement(messageNumberQName);
- messageNumberElement.setValue(String.valueOf(object.getMessageNumber()));
+ messageNumberElement.setValue(String.valueOf(o.getMessageNumber()));
}
}
catch (SOAPException se)
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -35,28 +35,37 @@
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
/**
* <b>CloseSequenceResponse</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class CloseSequenceResponseSerializer
+final class CloseSequenceResponseSerializer implements Serializer
{
+ private static final Serializer INSTANCE = new CloseSequenceResponseSerializer();
+
private CloseSequenceResponseSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>CloseSequenceResponse</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(CloseSequenceResponse object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ CloseSequenceResponse o = (CloseSequenceResponse)object;
try
{
SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
@@ -70,7 +79,7 @@
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(closeSequenceResponseElement, identifierQName, closeSequenceResponseQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
- object.setIdentifier(identifier);
+ o.setIdentifier(identifier);
}
catch (SOAPException se)
{
@@ -88,9 +97,10 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(CloseSequenceResponse object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ CloseSequenceResponse o = (CloseSequenceResponse)object;
try
{
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
@@ -105,7 +115,7 @@
// write required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
- closeSequenceResponseElement.addChildElement(identifierQName).setValue(object.getIdentifier());
+ closeSequenceResponseElement.addChildElement(identifierQName).setValue(o.getIdentifier());
}
catch (SOAPException se)
{
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -37,28 +37,37 @@
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
/**
* <b>CloseSequence</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class CloseSequenceSerializer
+final class CloseSequenceSerializer implements Serializer
{
+ private static final Serializer INSTANCE = new CloseSequenceSerializer();
+
private CloseSequenceSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>CloseSequence</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(CloseSequence object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ CloseSequence o = (CloseSequence)object;
try
{
SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
@@ -72,7 +81,7 @@
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(closeSequenceElement, identifierQName, closeSequenceQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
- object.setIdentifier(identifier);
+ o.setIdentifier(identifier);
// read optional wsrm:LastMsgNumber element
QName lastMsgNumberQName = wsrmConstants.getLastMsgNumberQName();
@@ -81,7 +90,7 @@
{
String lastMsgNumberString = getRequiredTextContent(lastMsgNumberElement, lastMsgNumberQName);
long lastMsgNumberValue = stringToLong(lastMsgNumberString, "Unable to parse LastMsgNumber element text content");
- object.setLastMsgNumber(lastMsgNumberValue);
+ o.setLastMsgNumber(lastMsgNumberValue);
}
}
catch (SOAPException se)
@@ -100,9 +109,10 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(CloseSequence object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ CloseSequence o = (CloseSequence)object;
try
{
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
@@ -117,14 +127,14 @@
// write required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
- closeSequenceElement.addChildElement(identifierQName).setValue(object.getIdentifier());
+ closeSequenceElement.addChildElement(identifierQName).setValue(o.getIdentifier());
- if (object.getLastMsgNumber() != 0)
+ if (o.getLastMsgNumber() != 0)
{
// write optional wsrm:LastMsgNumber element
QName lastMsgNumberQName = wsrmConstants.getLastMsgNumberQName();
SOAPElement lastMsgNumberElement = closeSequenceElement.addChildElement(lastMsgNumberQName);
- lastMsgNumberElement.setValue(String.valueOf(object.getLastMsgNumber()));
+ lastMsgNumberElement.setValue(String.valueOf(o.getLastMsgNumber()));
}
}
catch (SOAPException se)
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -39,31 +39,40 @@
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
import org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
/**
* <b>CreateSequenceResponse</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class CreateSequenceResponseSerializer
+final class CreateSequenceResponseSerializer implements Serializer
{
private static final AddressingConstants ADDRESSING_CONSTANTS =
AddressingBuilder.getAddressingBuilder().newAddressingConstants();
+ private static final Serializer INSTANCE = new CreateSequenceResponseSerializer();
+
private CreateSequenceResponseSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>CreateSequenceResponse</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(CreateSequenceResponse object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ CreateSequenceResponse o = (CreateSequenceResponse)object;
try
{
SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
@@ -77,7 +86,7 @@
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(createSequenceResponseElement, identifierQName, createSequenceResponseQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
- object.setIdentifier(identifier);
+ o.setIdentifier(identifier);
// read optional wsrm:Expires element
QName expiresQName = wsrmConstants.getExpiresQName();
@@ -85,7 +94,7 @@
if (expiresElement != null)
{
String duration = getRequiredTextContent(expiresElement, expiresQName);
- object.setExpires(duration);
+ o.setExpires(duration);
}
// read optional wsrm:IncompleteSequenceBehavior element
@@ -94,7 +103,7 @@
if (behaviorElement != null)
{
String behaviorString = getRequiredTextContent(behaviorElement, behaviorQName);
- object.setIncompleteSequenceBehavior(IncompleteSequenceBehavior.getValue(behaviorString));
+ o.setIncompleteSequenceBehavior(IncompleteSequenceBehavior.getValue(behaviorString));
}
// read optional wsrm:Accept element
@@ -102,7 +111,7 @@
SOAPElement acceptElement = getOptionalElement(createSequenceResponseElement, acceptQName, createSequenceResponseQName);
if (acceptElement != null)
{
- CreateSequenceResponse.Accept accept = object.newAccept();
+ CreateSequenceResponse.Accept accept = o.newAccept();
// read required wsrm:AcksTo element
QName acksToQName = wsrmConstants.getAcksToQName();
@@ -113,7 +122,7 @@
accept.setAcksTo(acksToAddress);
// set created accept
- object.setAccept(accept);
+ o.setAccept(accept);
}
}
catch (SOAPException se)
@@ -132,9 +141,10 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(CreateSequenceResponse object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ CreateSequenceResponse o = (CreateSequenceResponse)object;
try
{
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
@@ -149,25 +159,25 @@
// write required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
- createSequenceResponseElement.addChildElement(identifierQName).setValue(object.getIdentifier());
+ createSequenceResponseElement.addChildElement(identifierQName).setValue(o.getIdentifier());
- if (object.getExpires() != null)
+ if (o.getExpires() != null)
{
// write optional wsrm:Expires element
QName expiresQName = wsrmConstants.getExpiresQName();
- createSequenceResponseElement.addChildElement(expiresQName).setValue(object.getExpires());
+ createSequenceResponseElement.addChildElement(expiresQName).setValue(o.getExpires());
}
- if (object.getIncompleteSequenceBehavior() != null)
+ if (o.getIncompleteSequenceBehavior() != null)
{
// write optional wsrm:IncompleteSequenceBehavior element
- IncompleteSequenceBehavior behavior = object.getIncompleteSequenceBehavior();
+ IncompleteSequenceBehavior behavior = o.getIncompleteSequenceBehavior();
QName behaviorQName = wsrmConstants.getIncompleteSequenceBehaviorQName();
SOAPElement behaviorElement = createSequenceResponseElement.addChildElement(behaviorQName);
behaviorElement.setValue(behavior.toString());
}
- if (object.getAccept() != null)
+ if (o.getAccept() != null)
{
// write optional wsrm:Accept element
QName acceptQName = wsrmConstants.getAcceptQName();
@@ -178,7 +188,7 @@
QName addressQName = ADDRESSING_CONSTANTS.getAddressQName();
acceptElement.addChildElement(acksToQName)
.addChildElement(addressQName)
- .setValue(object.getAccept().getAcksTo());
+ .setValue(o.getAccept().getAcksTo());
}
}
catch (SOAPException se)
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -39,31 +39,40 @@
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.IncompleteSequenceBehavior;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
/**
* <b>CreateSequence</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class CreateSequenceSerializer
+final class CreateSequenceSerializer implements Serializer
{
private static final AddressingConstants ADDRESSING_CONSTANTS =
AddressingBuilder.getAddressingBuilder().newAddressingConstants();
+ private static final Serializer INSTANCE = new CreateSequenceSerializer();
+
private CreateSequenceSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>CreateSequence</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(CreateSequence object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ CreateSequence o = (CreateSequence)object;
try
{
SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
@@ -79,7 +88,7 @@
QName addressQName = ADDRESSING_CONSTANTS.getAddressQName();
SOAPElement acksToAddressElement = getRequiredElement(acksToElement, addressQName, acksToQName);
String acksToAddress = getRequiredTextContent(acksToAddressElement, addressQName);
- object.setAcksTo(acksToAddress);
+ o.setAcksTo(acksToAddress);
// read optional wsrm:Expires element
QName expiresQName = wsrmConstants.getExpiresQName();
@@ -87,7 +96,7 @@
if (expiresElement != null)
{
String duration = getRequiredTextContent(expiresElement, expiresQName);
- object.setExpires(duration);
+ o.setExpires(duration);
}
// read optional wsrm:Offer element
@@ -95,7 +104,7 @@
SOAPElement offerElement = getOptionalElement(createSequenceElement, offerQName, createSequenceQName);
if (offerElement != null)
{
- CreateSequence.Offer offer = object.newOffer();
+ CreateSequence.Offer offer = o.newOffer();
// read required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
@@ -131,7 +140,7 @@
}
// set created offer
- object.setOffer(offer);
+ o.setOffer(offer);
}
}
catch (SOAPException se)
@@ -150,9 +159,10 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(CreateSequence object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ CreateSequence o = (CreateSequence)object;
try
{
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
@@ -170,18 +180,18 @@
QName addressQName = ADDRESSING_CONSTANTS.getAddressQName();
createSequenceElement.addChildElement(acksToQName)
.addChildElement(addressQName)
- .setValue(object.getAcksTo());
+ .setValue(o.getAcksTo());
- if (object.getExpires() != null)
+ if (o.getExpires() != null)
{
// write optional wsrm:Expires element
QName expiresQName = wsrmConstants.getExpiresQName();
- createSequenceElement.addChildElement(expiresQName).setValue(object.getExpires());
+ createSequenceElement.addChildElement(expiresQName).setValue(o.getExpires());
}
- if (object.getOffer() != null)
+ if (o.getOffer() != null)
{
- CreateSequence.Offer offer = object.getOffer();
+ CreateSequence.Offer offer = o.getOffer();
// write optional wsrm:Offer element
QName offerQName = wsrmConstants.getOfferQName();
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -38,6 +38,7 @@
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
import java.util.List;
@@ -45,23 +46,31 @@
* <b>SequenceAcknowledgement</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class SequenceAcknowledgementSerializer
+final class SequenceAcknowledgementSerializer implements Serializer
{
+ private static final Serializer INSTANCE = new SequenceAcknowledgementSerializer();
+
private SequenceAcknowledgementSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>SequenceAcknowledgement</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(SequenceAcknowledgement object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ SequenceAcknowledgement o = (SequenceAcknowledgement)object;
try
{
SOAPHeader soapHeader = soapMessage.getSOAPPart().getEnvelope().getHeader();
@@ -75,14 +84,14 @@
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(sequenceAckElement, identifierQName, sequenceAckQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
- object.setIdentifier(identifier);
+ o.setIdentifier(identifier);
// read optional wsrm:Final element
QName finalQName = wsrmConstants.getFinalQName();
SOAPElement finalElement = getOptionalElement(sequenceAckElement, finalQName, sequenceAckQName);
if (finalElement != null)
{
- object.setFinal();
+ o.setFinal();
}
// read optional wsrm:None element
@@ -90,7 +99,7 @@
SOAPElement noneElement = getOptionalElement(sequenceAckElement, noneQName, sequenceAckQName);
if (noneElement != null)
{
- object.setNone();
+ o.setNone();
}
// read optional wsrm:Nack elements
@@ -99,7 +108,7 @@
for (SOAPElement nackElement : nackElements)
{
String messageId = getRequiredTextContent(nackElement, nackQName);
- object.addNack(stringToLong(messageId, "Unable to parse Nack element text content"));
+ o.addNack(stringToLong(messageId, "Unable to parse Nack element text content"));
}
// read optional wsrm:AcknowledgementRange elements
@@ -112,7 +121,7 @@
for (SOAPElement ackRangeElement : ackRangeElements)
{
- SequenceAcknowledgement.AcknowledgementRange ackRange = object.newAcknowledgementRange();
+ SequenceAcknowledgement.AcknowledgementRange ackRange = o.newAcknowledgementRange();
// read required wsrm:Upper attribute
String upper = getRequiredTextContent(ackRangeElement, upperQName, ackRangeQName);
@@ -123,7 +132,7 @@
ackRange.setLower(stringToLong(lower, "Unable to parse Lower attribute text content"));
// set created acknowledgement range
- object.addAcknowledgementRange(ackRange);
+ o.addAcknowledgementRange(ackRange);
}
}
}
@@ -143,9 +152,10 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(SequenceAcknowledgement object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ SequenceAcknowledgement o = (SequenceAcknowledgement)object;
try
{
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
@@ -160,23 +170,23 @@
// write required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
- sequenceAckElement.addChildElement(identifierQName).setValue(object.getIdentifier());
+ sequenceAckElement.addChildElement(identifierQName).setValue(o.getIdentifier());
- if (object.isFinal())
+ if (o.isFinal())
{
// write optional wsrm:Final element
QName finalQName = wsrmConstants.getFinalQName();
sequenceAckElement.addChildElement(finalQName);
}
- if (object.isNone())
+ if (o.isNone())
{
// write optional wsrm:None element
QName noneQName = wsrmConstants.getNoneQName();
sequenceAckElement.addChildElement(noneQName);
}
- List<Long> nacks = object.getNacks();
+ List<Long> nacks = o.getNacks();
if (nacks.size() != 0)
{
QName nackQName = wsrmConstants.getNackQName();
@@ -188,7 +198,7 @@
}
}
- List<SequenceAcknowledgement.AcknowledgementRange> ackRanges = object.getAcknowledgementRanges();
+ List<SequenceAcknowledgement.AcknowledgementRange> ackRanges = o.getAcknowledgementRanges();
if (ackRanges.size() != 0)
{
QName acknowledgementRangeQName = wsrmConstants.getAcknowledgementRangeQName();
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceFaultSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceFaultSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceFaultSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -26,27 +26,34 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.spi.Provider;
-import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
/**
* <b>SequenceFault</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class SequenceFaultSerializer
+final class SequenceFaultSerializer implements Serializer
{
+ private static final Serializer INSTANCE = new SequenceFaultSerializer();
+
private SequenceFaultSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>SequenceFault</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(SequenceFault object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
throw new NotImplementedException();
@@ -58,7 +65,7 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(SequenceFault object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
throw new NotImplementedException();
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -37,28 +37,37 @@
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
/**
* <b>Sequence</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class SequenceSerializer
+final class SequenceSerializer implements Serializer
{
+ private static final Serializer INSTANCE = new SequenceSerializer();
+
private SequenceSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>Sequence</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(Sequence object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ Sequence o = (Sequence)object;
try
{
SOAPHeader soapHeader = soapMessage.getSOAPPart().getEnvelope().getHeader();
@@ -72,21 +81,21 @@
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(sequenceElement, identifierQName, sequenceQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
- object.setIdentifier(identifier);
+ o.setIdentifier(identifier);
// read required wsrm:MessageNumber element
QName messageNumberQName = wsrmConstants.getMessageNumberQName();
SOAPElement messageNumberElement = getRequiredElement(sequenceElement, messageNumberQName, sequenceQName);
String messageNumberString = getRequiredTextContent(messageNumberElement, messageNumberQName);
long messageNumberValue = stringToLong(messageNumberString, "Unable to parse MessageNumber element text content");
- object.setMessageNumber(messageNumberValue);
+ o.setMessageNumber(messageNumberValue);
// read optional wsrm:LastMessage element
QName lastMessageQName = wsrmConstants.getLastMessageQName();
SOAPElement lastMessageElement = getOptionalElement(sequenceElement, lastMessageQName, sequenceQName);
if (lastMessageElement != null)
{
- object.setLastMessage();
+ o.setLastMessage();
}
}
catch (SOAPException se)
@@ -105,9 +114,10 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(Sequence object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ Sequence o = (Sequence)object;
try
{
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
@@ -122,14 +132,14 @@
// write required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
- sequenceElement.addChildElement(identifierQName).setValue(object.getIdentifier());
+ sequenceElement.addChildElement(identifierQName).setValue(o.getIdentifier());
// write required wsrm:MessageNumber element
QName messageNumberQName = wsrmConstants.getMessageNumberQName();
SOAPElement messageNumberElement = sequenceElement.addChildElement(messageNumberQName);
- messageNumberElement.setValue(String.valueOf(object.getMessageNumber()));
+ messageNumberElement.setValue(String.valueOf(o.getMessageNumber()));
- if (object.isLastMessage())
+ if (o.isLastMessage())
{
// write optional wsrm:LastMessage element
QName lastMessageQName = wsrmConstants.getLastMessageQName();
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationRepository.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationRepository.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationRepository.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -22,7 +22,6 @@
package org.jboss.ws.extensions.wsrm.common.serialization;
import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
-import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
@@ -31,10 +30,15 @@
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse;
+
import javax.xml.soap.SOAPMessage;
+import java.util.Map;
+import java.util.HashMap;
+
/**
* Utility class used for de/serialization
* @author richard.opalka(a)jboss.com
@@ -42,81 +46,67 @@
final class SerializationRepository
{
+ private static final Map<Class<? extends Serializable>, Serializer> SERIALIZER_REGISTRY;
+
+ static
+ {
+ SERIALIZER_REGISTRY = new HashMap<Class<? extends Serializable>, Serializer>();
+ SERIALIZER_REGISTRY.put(AckRequested.class, AckRequestedSerializer.getInstance());
+ SERIALIZER_REGISTRY.put(CloseSequence.class, CloseSequenceSerializer.getInstance());
+ SERIALIZER_REGISTRY.put(CloseSequenceResponse.class, CloseSequenceResponseSerializer.getInstance());
+ SERIALIZER_REGISTRY.put(CreateSequence.class, CreateSequenceSerializer.getInstance());
+ SERIALIZER_REGISTRY.put(CreateSequenceResponse.class, CreateSequenceResponseSerializer.getInstance());
+ SERIALIZER_REGISTRY.put(SequenceAcknowledgement.class, SequenceAcknowledgementSerializer.getInstance());
+ SERIALIZER_REGISTRY.put(SequenceFault.class, SequenceFaultSerializer.getInstance());
+ SERIALIZER_REGISTRY.put(Sequence.class, SequenceSerializer.getInstance());
+ SERIALIZER_REGISTRY.put(TerminateSequence.class, TerminateSequenceSerializer.getInstance());
+ SERIALIZER_REGISTRY.put(TerminateSequenceResponse.class, TerminateSequenceResponseSerializer.getInstance());
+ }
+
private SerializationRepository()
{
- // forbidden inheritance
+ // no instances
}
- public static void serialize(AbstractSerializable object, SOAPMessage soapMessage) throws ReliableMessagingException
+ /**
+ * Serialize passed <b>object</b> data to the <b>soapMessage</b>
+ * @param object to be serialized
+ * @param soapMessage where to write data
+ * @throws ReliableMessagingException if something went wrong
+ */
+ public static void serialize(AbstractSerializable object, SOAPMessage soapMessage)
+ throws ReliableMessagingException
{
- Provider provider = object.getProvider();
-
- if (object instanceof AckRequested)
- AckRequestedSerializer
- .serialize((AckRequested)object, provider, soapMessage);
- if (object instanceof CloseSequence)
- CloseSequenceSerializer
- .serialize((CloseSequence)object, provider, soapMessage);
- if (object instanceof CloseSequenceResponse)
- CloseSequenceResponseSerializer
- .serialize((CloseSequenceResponse)object, provider, soapMessage);
- if (object instanceof CreateSequence)
- CreateSequenceSerializer
- .serialize((CreateSequence)object, provider, soapMessage);
- if (object instanceof CreateSequenceResponse)
- CreateSequenceResponseSerializer
- .serialize((CreateSequenceResponse)object, provider, soapMessage);
- if (object instanceof SequenceAcknowledgement)
- SequenceAcknowledgementSerializer
- .serialize((SequenceAcknowledgement)object, provider, soapMessage);
- if (object instanceof SequenceFault)
- SequenceFaultSerializer
- .serialize((SequenceFault)object, provider, soapMessage);
- if (object instanceof Sequence)
- SequenceSerializer
- .serialize((Sequence)object, provider, soapMessage);
- if (object instanceof TerminateSequence)
- TerminateSequenceSerializer
- .serialize((TerminateSequence)object, provider, soapMessage);
- if (object instanceof TerminateSequenceResponse)
- TerminateSequenceResponseSerializer
- .serialize((TerminateSequenceResponse)object, provider, soapMessage);
+ getSerializer(object).serialize(object, object.getProvider(), soapMessage);
}
- public static void deserialize(AbstractSerializable object, SOAPMessage soapMessage) throws ReliableMessagingException
+ /**
+ * Initialize passed <b>object</b> using data in <b>soapMessage</b>
+ * @param object to be initialized
+ * @param soapMessage from which to read the data
+ * @throws ReliableMessagingException if something went wrong
+ */
+ public static void deserialize(AbstractSerializable object, SOAPMessage soapMessage)
+ throws ReliableMessagingException
{
- Provider provider = object.getProvider();
+ getSerializer(object).deserialize(object, object.getProvider(), soapMessage);
+ }
+
+ /**
+ * Lookups the serializer associated with the passed <b>object</b>
+ * @param object to lookup serializer for
+ * @return serializer to be used
+ * @throws IllegalArgumentException if passed object has no defined serializer
+ */
+ private static Serializer getSerializer(Serializable object)
+ {
+ for (Class<? extends Serializable> serializable : SERIALIZER_REGISTRY.keySet())
+ {
+ if (serializable.isAssignableFrom(object.getClass()))
+ return SERIALIZER_REGISTRY.get(serializable);
+ }
- if (object instanceof AckRequested)
- AckRequestedSerializer
- .deserialize((AckRequested)object, provider, soapMessage);
- if (object instanceof CloseSequence)
- CloseSequenceSerializer
- .deserialize((CloseSequence)object, provider, soapMessage);
- if (object instanceof CloseSequenceResponse)
- CloseSequenceResponseSerializer
- .deserialize((CloseSequenceResponse)object, provider, soapMessage);
- if (object instanceof CreateSequence)
- CreateSequenceSerializer
- .deserialize((CreateSequence)object, provider, soapMessage);
- if (object instanceof CreateSequenceResponse)
- CreateSequenceResponseSerializer
- .deserialize((CreateSequenceResponse)object, provider, soapMessage);
- if (object instanceof SequenceAcknowledgement)
- SequenceAcknowledgementSerializer
- .deserialize((SequenceAcknowledgement)object, provider, soapMessage);
- if (object instanceof SequenceFault)
- SequenceFaultSerializer
- .deserialize((SequenceFault)object, provider, soapMessage);
- if (object instanceof Sequence)
- SequenceSerializer
- .deserialize((Sequence)object, provider, soapMessage);
- if (object instanceof TerminateSequence)
- TerminateSequenceSerializer
- .deserialize((TerminateSequence)object, provider, soapMessage);
- if (object instanceof TerminateSequenceResponse)
- TerminateSequenceResponseSerializer
- .deserialize((TerminateSequenceResponse)object, provider, soapMessage);
+ throw new IllegalArgumentException();
}
}
Added: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/Serializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/Serializer.java (rev 0)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/Serializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -0,0 +1,52 @@
+/*
+ * 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.extensions.wsrm.common.serialization;
+
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ws.extensions.wsrm.spi.Provider;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
+
+/**
+ * Each WS-RM message de/serializer must implement this interface
+ * @author richard.opalka(a)jboss.com
+ */
+interface Serializer
+{
+
+ /**
+ * Serialize the specified <b>object</b> using passed RM <b>provider</b> to the <b>soapMessage</b>
+ * @param object to be serialized
+ * @param provider RM provider to be used
+ * @param soapMessage where to write the data
+ */
+ void serialize(Serializable object, Provider provider, SOAPMessage soapMessage);
+
+ /**
+ * Deserialize the specified <b>object</b> using passed RM <b>provider</b> from the <b>soapMessage</b>
+ * @param object to be deserialized
+ * @param provider RM provider to be used
+ * @param soapMessage from which to read the data
+ */
+ void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage);
+
+}
Property changes on: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/Serializer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -34,29 +34,38 @@
import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse;
/**
* <b>TerminateSequenceResponse</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class TerminateSequenceResponseSerializer
+final class TerminateSequenceResponseSerializer implements Serializer
{
+ private static final Serializer INSTANCE = new TerminateSequenceResponseSerializer();
+
private TerminateSequenceResponseSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>TerminateSequenceResponse</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(TerminateSequenceResponse object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ TerminateSequenceResponse o = (TerminateSequenceResponse)object;
try
{
SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
@@ -70,7 +79,7 @@
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(terminateSequenceResponseElement, identifierQName, terminateSequenceResponseQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
- object.setIdentifier(identifier);
+ o.setIdentifier(identifier);
}
catch (SOAPException se)
{
@@ -88,9 +97,10 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(TerminateSequenceResponse object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ TerminateSequenceResponse o = (TerminateSequenceResponse)object;
try
{
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
@@ -105,7 +115,7 @@
// write required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
- terminateSequenceResponseElement.addChildElement(identifierQName).setValue(object.getIdentifier());
+ terminateSequenceResponseElement.addChildElement(identifierQName).setValue(o.getIdentifier());
}
catch (SOAPException se)
{
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -36,29 +36,38 @@
import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.spi.Constants;
import org.jboss.ws.extensions.wsrm.spi.Provider;
+import org.jboss.ws.extensions.wsrm.spi.protocol.Serializable;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
/**
* <b>TerminateSequence</b> object de/serializer
* @author richard.opalka(a)jboss.com
*/
-final class TerminateSequenceSerializer
+final class TerminateSequenceSerializer implements Serializer
{
+ private static final Serializer INSTANCE = new TerminateSequenceSerializer();
+
private TerminateSequenceSerializer()
{
- // no instances
+ // hide constructor
}
+ static Serializer getInstance()
+ {
+ return INSTANCE;
+ }
+
/**
* Deserialize <b>TerminateSequence</b> using <b>provider</b> from the <b>soapMessage</b>
* @param object to be deserialized
* @param provider wsrm provider to be used for deserialization process
* @param soapMessage soap message from which object will be deserialized
*/
- public static void deserialize(TerminateSequence object, Provider provider, SOAPMessage soapMessage)
+ public final void deserialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ TerminateSequence o = (TerminateSequence)object;
try
{
SOAPBody soapBody = soapMessage.getSOAPPart().getEnvelope().getBody();
@@ -72,7 +81,7 @@
QName identifierQName = wsrmConstants.getIdentifierQName();
SOAPElement identifierElement = getRequiredElement(terminateSequenceElement, identifierQName, terminateSequenceQName);
String identifier = getRequiredTextContent(identifierElement, identifierQName);
- object.setIdentifier(identifier);
+ o.setIdentifier(identifier);
// read optional wsrm:LastMsgNumber element
QName lastMsgNumberQName = wsrmConstants.getLastMsgNumberQName();
@@ -81,7 +90,7 @@
{
String lastMsgNumberString = getRequiredTextContent(lastMsgNumberElement, lastMsgNumberQName);
long lastMsgNumberValue = stringToLong(lastMsgNumberString, "Unable to parse LastMsgNumber element text content");
- object.setLastMsgNumber(lastMsgNumberValue);
+ o.setLastMsgNumber(lastMsgNumberValue);
}
}
catch (SOAPException se)
@@ -100,9 +109,10 @@
* @param provider wsrm provider to be used for serialization process
* @param soapMessage soap message to which object will be serialized
*/
- public static void serialize(TerminateSequence object, Provider provider, SOAPMessage soapMessage)
+ public final void serialize(Serializable object, Provider provider, SOAPMessage soapMessage)
throws ReliableMessagingException
{
+ TerminateSequence o = (TerminateSequence)object;
try
{
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
@@ -117,14 +127,14 @@
// write required wsrm:Identifier element
QName identifierQName = wsrmConstants.getIdentifierQName();
- terminateSequenceElement.addChildElement(identifierQName).setValue(object.getIdentifier());
+ terminateSequenceElement.addChildElement(identifierQName).setValue(o.getIdentifier());
- if (object.getLastMsgNumber() != 0)
+ if (o.getLastMsgNumber() != 0)
{
// write optional wsrm:LastMsgNumber element
QName lastMsgNumberQName = wsrmConstants.getLastMsgNumberQName();
SOAPElement lastMsgNumberElement = terminateSequenceElement.addChildElement(lastMsgNumberQName);
- lastMsgNumberElement.setValue(String.valueOf(object.getLastMsgNumber()));
+ lastMsgNumberElement.setValue(String.valueOf(o.getLastMsgNumber()));
}
}
catch (SOAPException se)
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/AckRequestedImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
@@ -131,7 +132,7 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier not set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
@@ -181,7 +182,7 @@
public void validate()
{
if (this.acksTo == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("AcksTo must be set");
}
/*
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/CreateSequenceResponseImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
@@ -195,7 +196,7 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier must be set");
}
/*
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceAcknowledgementImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -25,6 +25,7 @@
import java.util.LinkedList;
import java.util.Collections;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
@@ -213,8 +214,10 @@
public void validate()
{
+ if (this.identifier == null)
+ throw new ReliableMessagingException("Identifier not set");
if ((this.acknowledgementRanges.size() == 0) && (this.nacks.size() == 0))
- throw new IllegalStateException();
+ throw new ReliableMessagingException("AcknowledgementRange or Nack must be set");
}
private static void checkOverlap(AcknowledgementRange currentRange, AcknowledgementRange newRange)
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceFaultImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
@@ -137,7 +138,7 @@
public void validate()
{
if (this.faultCode == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("FaultCode must be set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/SequenceImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
@@ -151,9 +152,9 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier must be set");
if (this.messageNumber == 0)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("MessageNumber must be set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200502/TerminateSequenceImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200502;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
@@ -122,7 +123,7 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier not set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/AckRequestedImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.AckRequested;
@@ -122,7 +123,7 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier not set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequence;
@@ -131,7 +132,7 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier not set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CloseSequenceResponseImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CloseSequenceResponse;
@@ -106,7 +107,7 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier not set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequence;
@@ -181,7 +182,7 @@
public void validate()
{
if (this.acksTo == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("AcksTo must be set");
}
/*
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/CreateSequenceResponseImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.CreateSequenceResponse;
@@ -209,7 +210,7 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier must be set");
}
/*
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceAcknowledgementImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -25,6 +25,7 @@
import java.util.LinkedList;
import java.util.Collections;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceAcknowledgement;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
@@ -235,8 +236,10 @@
public void validate()
{
+ if (this.identifier == null)
+ throw new ReliableMessagingException("Identifier not set");
if ((this.acknowledgementRanges.size() == 0) && (this.nacks.size() == 0) && (!this.isNone))
- throw new IllegalStateException();
+ throw new ReliableMessagingException("AcknowledgementRange or Nack or None must be set");
}
private static void checkOverlap(AcknowledgementRange currentRange, AcknowledgementRange newRange)
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceFaultImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.SequenceFault;
@@ -137,7 +138,7 @@
public void validate()
{
if (this.faultCode == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("FaultCode must be set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/SequenceImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.Sequence;
@@ -147,9 +148,9 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier must be set");
if (this.messageNumber == 0)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("MessageNumber must be set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequence;
@@ -131,7 +132,7 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier not set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spec200702/TerminateSequenceResponseImpl.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.spec200702;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.ws.extensions.wsrm.common.serialization.AbstractSerializable;
import org.jboss.ws.extensions.wsrm.spi.Provider;
import org.jboss.ws.extensions.wsrm.spi.protocol.TerminateSequenceResponse;
@@ -106,7 +107,7 @@
public void validate()
{
if (this.identifier == null)
- throw new IllegalStateException();
+ throw new ReliableMessagingException("Identifier not set");
}
}
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java 2007-09-12 16:10:57 UTC (rev 4556)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/spi/protocol/Serializable.java 2007-09-12 16:12:45 UTC (rev 4557)
@@ -36,18 +36,20 @@
/**
* Serialize object instance to SOAP message
* @param soapMessage
+ * @throws ReliableMessagingException is something went wrong
*/
void serializeTo(SOAPMessage soapMessage) throws ReliableMessagingException;
/**
* Deserialize object instance from SOAP message
- * @param soapMessage
+ * @param soapMessage ReliableMessagingException is something went wrong
*/
void deserializeFrom(SOAPMessage soapMessage) throws ReliableMessagingException;
/**
* Validate object state if everything is all right
+ * @throws ReliableMessagingException if object is in incorrect state
*/
- void validate();
+ void validate() throws ReliableMessagingException;
}
16 years, 8 months
JBossWS SVN: r4556 - common/branches/ropalka/trunk/src/main/java/org/jboss/wsf/common.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-12 12:10:57 -0400 (Wed, 12 Sep 2007)
New Revision: 4556
Modified:
common/branches/ropalka/trunk/src/main/java/org/jboss/wsf/common/DOMUtils.java
Log:
small optimization
Modified: common/branches/ropalka/trunk/src/main/java/org/jboss/wsf/common/DOMUtils.java
===================================================================
--- common/branches/ropalka/trunk/src/main/java/org/jboss/wsf/common/DOMUtils.java 2007-09-12 13:20:47 UTC (rev 4555)
+++ common/branches/ropalka/trunk/src/main/java/org/jboss/wsf/common/DOMUtils.java 2007-09-12 16:10:57 UTC (rev 4556)
@@ -28,7 +28,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
-import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -70,10 +70,10 @@
private static Logger log = Logger.getLogger(DOMUtils.class);
// All elements created by the same thread are created by the same builder and belong to the same doc
- private static ThreadLocal documentThreadLocal = new ThreadLocal();
- private static ThreadLocal builderThreadLocal = new ThreadLocal()
+ private static ThreadLocal<Document> documentThreadLocal = new ThreadLocal<Document>();
+ private static ThreadLocal<DocumentBuilder> builderThreadLocal = new ThreadLocal<DocumentBuilder>()
{
- protected Object initialValue()
+ protected DocumentBuilder initialValue()
{
try
{
@@ -119,12 +119,11 @@
{
}
- /** Initialise the the DocumentBuilder
+ /** Initialize the DocumentBuilder
*/
public static DocumentBuilder getDocumentBuilder()
{
- DocumentBuilder builder = (DocumentBuilder)builderThreadLocal.get();
- return builder;
+ return builderThreadLocal.get();
}
/** Parse the given XML string and return the root Element
@@ -148,13 +147,11 @@
{
try
{
- Document doc = getDocumentBuilder().parse(xmlStream);
- Element root = doc.getDocumentElement();
- return root;
+ return getDocumentBuilder().parse(xmlStream).getDocumentElement();
}
- catch (SAXException e)
+ catch (SAXException se)
{
- throw new IOException(e.toString());
+ throw new IOException(se.toString());
}
}
@@ -164,13 +161,11 @@
{
try
{
- Document doc = getDocumentBuilder().parse(source);
- Element root = doc.getDocumentElement();
- return root;
+ return getDocumentBuilder().parse(source).getDocumentElement();
}
- catch (SAXException e)
+ catch (SAXException se)
{
- throw new IOException(e.toString());
+ throw new IOException(se.toString());
}
}
@@ -436,15 +431,15 @@
/** Gets child elements
*/
- public static Iterator getChildElements(Node node)
+ public static Iterator<Element> getChildElements(Node node)
{
- ArrayList list = new ArrayList();
+ List<Element> list = new LinkedList<Element>();
NodeList nlist = node.getChildNodes();
for (int i = 0; i < nlist.getLength(); i++)
{
Node child = nlist.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE)
- list.add(child);
+ list.add((Element)child);
}
return list.iterator();
}
@@ -526,7 +521,7 @@
private static List<Element> getChildElementsAsListIntern(Node node, QName nodeName)
{
- List<Element> list = new ArrayList<Element>();
+ List<Element> list = new LinkedList<Element>();
NodeList nlist = node.getChildNodes();
for (int i = 0; i < nlist.getLength(); i++)
{
@@ -574,7 +569,7 @@
/** Get the owner document that is associated with the current thread */
public static Document getOwnerDocument()
{
- Document doc = (Document)documentThreadLocal.get();
+ Document doc = documentThreadLocal.get();
if (doc == null)
{
doc = getDocumentBuilder().newDocument();
16 years, 8 months
JBossWS SVN: r4555 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-12 09:20:47 -0400 (Wed, 12 Sep 2007)
New Revision: 4555
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java
Log:
refactoring helper class
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java 2007-09-12 09:39:33 UTC (rev 4554)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java 2007-09-12 13:20:47 UTC (rev 4555)
@@ -21,19 +21,19 @@
*/
package org.jboss.ws.extensions.wsrm.common.serialization;
-import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
+import java.util.LinkedList;
+import java.util.Collections;
-import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
-import org.jboss.wsf.common.DOMUtils;
import org.w3c.dom.Element;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPElement;
/**
- * Serialization helper - TODO: optimize it to minimize usage of org.w3c.dom.Element class
+ * Serialization helper
* @author richard.opalka(a)jboss.com
*/
final class SerializationHelper
@@ -48,76 +48,64 @@
{
if (!DOMUtils.hasTextChildNodesOnly(element))
throw new ReliableMessagingException(
- "Only text content is allowed for element " + elementQName.getLocalPart());
+ "Only text content is allowed for element " + elementQName);
return DOMUtils.getTextContent(element).trim();
}
- private static Element getRequiredElementFromList(List<Element> list, QName requiredQName, QName contextQName)
- {
- return getRequiredElementFromList(list, requiredQName.getLocalPart(), contextQName.getLocalPart());
- }
-
- private static Element getRequiredElementFromList(List<Element> list, QName requiredQName, String context)
- {
- return getRequiredElementFromList(list, requiredQName.getLocalPart(), context);
- }
-
- private static Element getRequiredElement(Element element, QName requiredQName, QName contextQName)
- {
- List<Element> list = DOMUtils.getChildElementsAsList(element, requiredQName);
- return getRequiredElementFromList(list, requiredQName, contextQName);
- }
-
public static SOAPElement getRequiredElement(SOAPElement element, QName requiredQName, QName contextQName)
{
- return (SOAPElement)getRequiredElement((Element)element, requiredQName, contextQName);
+ return (SOAPElement)getRequiredElement(element, requiredQName, contextQName.toString());
}
- private static Element getRequiredElement(Element element, QName requiredQName, String context)
- {
- List<Element> list = DOMUtils.getChildElementsAsList(element, requiredQName);
- return getRequiredElementFromList(list, requiredQName, context);
- }
-
public static SOAPElement getRequiredElement(SOAPElement element, QName requiredQName, String context)
{
- return (SOAPElement)getRequiredElement((Element)element, requiredQName, context);
+ List<Element> childElements = DOMUtils.getChildElementsAsList(element, requiredQName);
+
+ if (childElements.size() < 1)
+ throw new ReliableMessagingException(
+ "Required " + requiredQName + " element not found in " + context + " element");
+
+ if (childElements.size() > 1)
+ throw new ReliableMessagingException(
+ "Only one " + requiredQName + " element can be present in " + context + " element");
+
+ return (SOAPElement)childElements.get(0);
}
- private static Element getOptionalElement(Element element, QName optionalQName, QName contextQName)
- {
- List<Element> list = DOMUtils.getChildElementsAsList(element, optionalQName);
- return getOptionalElementFromList(list, optionalQName, contextQName);
- }
-
public static String getRequiredTextContent(SOAPElement element, QName attributeQName, QName elementQName)
{
String attributeValue = element.getAttributeValue(attributeQName);
if (attributeValue == null)
throw new ReliableMessagingException(
- "Required attribute " + attributeQName.getLocalPart() + " is missing in element " + elementQName.getLocalPart());
+ "Required attribute " + attributeQName + " is missing in element " + elementQName);
return attributeValue;
}
public static SOAPElement getOptionalElement(SOAPElement contextElement, QName optionalQName, QName contextQName)
{
- return (SOAPElement)getOptionalElement((Element)contextElement, optionalQName, contextQName);
+ List<Element> list = DOMUtils.getChildElementsAsList(contextElement, optionalQName);
+
+ if (list.size() > 1)
+ throw new ReliableMessagingException(
+ "At most one " + optionalQName + " element can be present in " + contextQName + " element");
+
+ return (SOAPElement)((list.size() == 1) ? list.get(0) : null);
}
public static List<SOAPElement> getOptionalElements(SOAPElement contextElement, QName optionalQName, QName contextQName)
{
- // TODO: optimize this method - do not create new list
List<Element> temp = DOMUtils.getChildElementsAsList(contextElement, optionalQName);
+
if (temp.size() == 0)
{
return Collections.emptyList();
}
else
{
- List<SOAPElement> retVal = new ArrayList<SOAPElement>();
+ List<SOAPElement> retVal = new LinkedList<SOAPElement>();
for (Element e : temp)
{
@@ -128,7 +116,7 @@
}
}
- public static long stringToLong(String toEvaluate, String errorMessage) throws ReliableMessagingException
+ public static long stringToLong(String toEvaluate, String errorMessage)
{
try
{
@@ -140,31 +128,4 @@
}
}
- private static Element getOptionalElementFromList(List<Element> list, QName requiredQName, QName contextQName)
- {
- return getOptionalElementFromList(list, requiredQName.getLocalPart(), contextQName.getLocalPart());
- }
-
- private static Element getOptionalElementFromList(List<Element> list, String required, String context)
- {
- if (list.size() > 1)
- throw new ReliableMessagingException(
- "At most one " + required + " element can be present in " + context + " element");
-
- return (list.size() == 1) ? list.get(0) : null;
- }
-
- private static Element getRequiredElementFromList(List<Element> list, String required, String context)
- {
- if (list.size() < 1)
- throw new ReliableMessagingException(
- "Required " + required + " element not found in " + context + " element");
-
- if (list.size() > 1)
- throw new ReliableMessagingException(
- "Only one " + required + " element can be present in " + context + " element");
-
- return list.get(0);
- }
-
}
16 years, 8 months
JBossWS SVN: r4554 - stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-12 05:39:33 -0400 (Wed, 12 Sep 2007)
New Revision: 4554
Modified:
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java
stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java
Log:
catching RuntimeExceptions during deserialization process and propagating them to the higher level
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/AckRequestedSerializer.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -88,6 +88,10 @@
{
throw new ReliableMessagingException("Unable to deserialize RM message", se);
}
+ catch (RuntimeException re)
+ {
+ throw new ReliableMessagingException("Unable to deserialize RM message", re);
+ }
}
/**
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceResponseSerializer.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -76,6 +76,10 @@
{
throw new ReliableMessagingException("Unable to deserialize RM message", se);
}
+ catch (RuntimeException re)
+ {
+ throw new ReliableMessagingException("Unable to deserialize RM message", re);
+ }
}
/**
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CloseSequenceSerializer.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -88,6 +88,10 @@
{
throw new ReliableMessagingException("Unable to deserialize RM message", se);
}
+ catch (RuntimeException re)
+ {
+ throw new ReliableMessagingException("Unable to deserialize RM message", re);
+ }
}
/**
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceResponseSerializer.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -120,6 +120,10 @@
{
throw new ReliableMessagingException("Unable to deserialize RM message", se);
}
+ catch (RuntimeException re)
+ {
+ throw new ReliableMessagingException("Unable to deserialize RM message", re);
+ }
}
/**
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/CreateSequenceSerializer.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -138,6 +138,10 @@
{
throw new ReliableMessagingException("Unable to deserialize RM message", se);
}
+ catch (RuntimeException re)
+ {
+ throw new ReliableMessagingException("Unable to deserialize RM message", re);
+ }
}
/**
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceAcknowledgementSerializer.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -131,6 +131,10 @@
{
throw new ReliableMessagingException("Unable to deserialize RM message", se);
}
+ catch (RuntimeException re)
+ {
+ throw new ReliableMessagingException("Unable to deserialize RM message", re);
+ }
}
/**
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SequenceSerializer.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -93,6 +93,10 @@
{
throw new ReliableMessagingException("Unable to deserialize RM message", se);
}
+ catch (RuntimeException re)
+ {
+ throw new ReliableMessagingException("Unable to deserialize RM message", re);
+ }
}
/**
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/SerializationHelper.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -21,17 +21,17 @@
*/
package org.jboss.ws.extensions.wsrm.common.serialization;
-import static org.jboss.ws.extensions.wsrm.common.serialization.SerializationHelper.getRequiredTextContent;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import javax.xml.namespace.QName;
+
import org.jboss.ws.extensions.wsrm.ReliableMessagingException;
import org.jboss.wsf.common.DOMUtils;
-import javax.xml.soap.SOAPElement;
import org.w3c.dom.Element;
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+
/**
* Serialization helper - TODO: optimize it to minimize usage of org.w3c.dom.Element class
* @author richard.opalka(a)jboss.com
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceResponseSerializer.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -76,6 +76,10 @@
{
throw new ReliableMessagingException("Unable to deserialize RM message", se);
}
+ catch (RuntimeException re)
+ {
+ throw new ReliableMessagingException("Unable to deserialize RM message", re);
+ }
}
/**
Modified: stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java
===================================================================
--- stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java 2007-09-11 15:10:53 UTC (rev 4553)
+++ stack/native/branches/ropalka/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/serialization/TerminateSequenceSerializer.java 2007-09-12 09:39:33 UTC (rev 4554)
@@ -88,6 +88,10 @@
{
throw new ReliableMessagingException("Unable to deserialize RM message", se);
}
+ catch (RuntimeException re)
+ {
+ throw new ReliableMessagingException("Unable to deserialize RM message", re);
+ }
}
/**
16 years, 8 months
JBossWS SVN: r4553 - in legacy/branches/jbossws-1.2.1.GA_CP: jbossws-tests/src/java/org/jboss/test/ws/tools and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-09-11 11:10:53 -0400 (Tue, 11 Sep 2007)
New Revision: 4553
Added:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/JBWS1801TestCase.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/Person.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook.wsdl
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook_PortType.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/TelephoneNumber.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/jaxrpc-mapping.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/wstools-config.xml
Removed:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/JBWS1801TestCase.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/Person.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook.wsdl
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook_PortType.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/TelephoneNumber.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/jaxrpc-mapping.xml
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/wstools-config.xml
Modified:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
Log:
[JBPAPP-331] WSDL To Java - When an array if returned from a method on the SEI it is incorrectly ommitted from the generated JAX-RPC.
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2007-09-11 14:38:19 UTC (rev 4552)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2007-09-11 15:10:53 UTC (rev 4553)
@@ -489,7 +489,8 @@
if (isDocStyle())
{
XSTypeDefinition xt = getXSType(input);
- addJavaXMLTypeMap(xt, input.getElement().getLocalPart(), "", "", jwm, !isWrapped());
+ // Don't unwrap the actual parameter.
+ addJavaXMLTypeMap(xt, input.getElement().getLocalPart(), "", "", jwm, false);
}
else
{
@@ -503,7 +504,8 @@
if (isDocStyle())
{
XSTypeDefinition xt = getXSType(output);
- addJavaXMLTypeMap(xt, output.getElement().getLocalPart(), "", "", jwm, !isWrapped());
+ // Don't unwrap the response type.
+ addJavaXMLTypeMap(xt, output.getElement().getLocalPart(), "", "", jwm, false);
}
else
{
@@ -704,7 +706,7 @@
}
}
- if ((skipWrapperArray && isRepresentsArray(xt)) == false)
+ if ((skipWrapperArray && SchemaUtils.isWrapperArrayType(xt)) == false)
{
jxtm = new JavaXmlTypeMapping(jwm);
String javaType;
@@ -899,40 +901,6 @@
}
/**
- * Checks whether the type represents an array type
- *
- * @param xst
- * @return true: type represents an array
- */
- private boolean isRepresentsArray(XSTypeDefinition xst)
- {
- boolean bool = false;
- if (xst instanceof XSComplexTypeDefinition)
- {
- XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xst;
- if (xc.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
- return false;
- XSParticle xsp = xc.getParticle();
-
- if (xsp == null)
- return false;
-
- XSTerm xsterm = xsp.getTerm();
- if (xsterm instanceof XSModelGroup)
- {
- XSModelGroup xm = (XSModelGroup)xsterm;
- XSObjectList xo = xm.getParticles();
- if (xo.getLength() == 1)
- {
- XSParticle xp = (XSParticle)xo.item(0);
- bool = xp.getMaxOccursUnbounded() || xp.getMaxOccurs() > 1;
- }
- }
- }
- return bool;
- }
-
- /**
* Any custom decisions that need to be made will be done here
*
* @param javaType
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801 (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801)
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/JBWS1801TestCase.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/JBWS1801TestCase.java 2007-09-11 13:38:20 UTC (rev 4551)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/JBWS1801TestCase.java 2007-09-11 15:10:53 UTC (rev 4553)
@@ -1,108 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.tools.jbws1801;
-
-import java.io.File;
-import java.io.FilenameFilter;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
-import org.jboss.ws.tools.WSTools;
-
-/**
- * Test case to test the following fix: -
- *
- * @see http://jira.jboss.com/jira/browse/JBWS-1801
- *
- * WSDL To Java - When an array if returned from a method
- * on the SEI it is incorrectly ommitted from the generated
- * JAX-RPC mapping.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since Sep 11, 2007
- */
-public class JBWS1801TestCase extends JBossWSTest
-{
-
- public void testDocumentLiteral() throws Exception
- {
- generateScenario("doclit");
- }
-
- protected void generateScenario(final String scenario) throws Exception
- {
- String resourceDir = "resources/tools/jbws1801/" + scenario;
- String toolsDir = "tools/jbws1801/" + scenario;
- String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
- new WSTools().generate(args);
- File resourceDirFile = new File(resourceDir);
- String[] expectedFiles = resourceDirFile.list(new FilenameFilter() {
- public boolean accept(File dir, String name)
- {
- return name.endsWith(".java");
- }
- });
-
- for (int i = 0; i < expectedFiles.length; i++)
- {
- String currentFile = expectedFiles[i];
-
- try
- {
- compareSource(resourceDir + "/" + currentFile, toolsDir + "/org/jboss/test/ws/jbws1801/" + currentFile);
- }
- catch (Exception e)
- {
- throw new Exception("Validation of '" + currentFile + "' failed.", e);
- }
- }
-
- File packageDir = new File(toolsDir + "/org/jboss/test/ws/jbws1801");
- String[] generatedFiles = packageDir.list();
- for (int i = 0; i < generatedFiles.length; i++)
- {
- String currentFile = generatedFiles[i];
-
- boolean matched = "PhoneBookService.java".equals(currentFile);
-
- for (int j = 0; j < expectedFiles.length && (matched == false); j++)
- matched = currentFile.equals(expectedFiles[j]);
-
- assertTrue("File '" + currentFile + "' was not expected to be generated", matched);
- }
-
- JaxrpcMappingValidator mappingValidator = new JaxrpcMappingValidator();
- mappingValidator.validate(resourceDir + "/jaxrpc-mapping.xml", toolsDir + "/jaxrpc-mapping.xml");
- }
-
- private static void compareSource(final String expectedName, final String generatedName) throws Exception
- {
- File expected = new File(expectedName);
- File generated = new File(generatedName);
-
- JBossSourceComparator sc = new JBossSourceComparator(expected, generated);
- sc.validate();
- sc.validateImports();
- }
-
-}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/JBWS1801TestCase.java (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/JBWS1801TestCase.java)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/JBWS1801TestCase.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1801/JBWS1801TestCase.java 2007-09-11 15:10:53 UTC (rev 4553)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.tools.jbws1801;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
+import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
+import org.jboss.ws.tools.WSTools;
+
+/**
+ * Test case to test the following fix: -
+ *
+ * @see http://jira.jboss.com/jira/browse/JBWS-1801
+ *
+ * WSDL To Java - When an array if returned from a method
+ * on the SEI it is incorrectly ommitted from the generated
+ * JAX-RPC mapping.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Sep 11, 2007
+ */
+public class JBWS1801TestCase extends JBossWSTest
+{
+
+ public void testDocumentLiteral() throws Exception
+ {
+ generateScenario("doclit");
+ }
+
+ protected void generateScenario(final String scenario) throws Exception
+ {
+ String resourceDir = "resources/tools/jbws1801/" + scenario;
+ String toolsDir = "tools/jbws1801/" + scenario;
+ String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
+ new WSTools().generate(args);
+ File resourceDirFile = new File(resourceDir);
+ String[] expectedFiles = resourceDirFile.list(new FilenameFilter() {
+ public boolean accept(File dir, String name)
+ {
+ return name.endsWith(".java");
+ }
+ });
+
+ for (int i = 0; i < expectedFiles.length; i++)
+ {
+ String currentFile = expectedFiles[i];
+
+ try
+ {
+ compareSource(resourceDir + "/" + currentFile, toolsDir + "/org/jboss/test/ws/jbws1801/" + currentFile);
+ }
+ catch (Exception e)
+ {
+ throw new Exception("Validation of '" + currentFile + "' failed.", e);
+ }
+ }
+
+ File packageDir = new File(toolsDir + "/org/jboss/test/ws/jbws1801");
+ String[] generatedFiles = packageDir.list();
+ for (int i = 0; i < generatedFiles.length; i++)
+ {
+ String currentFile = generatedFiles[i];
+
+ boolean matched = "PhoneBookService.java".equals(currentFile);
+
+ for (int j = 0; j < expectedFiles.length && (matched == false); j++)
+ matched = currentFile.equals(expectedFiles[j]);
+
+ assertTrue("File '" + currentFile + "' was not expected to be generated", matched);
+ }
+
+ JaxrpcMappingValidator mappingValidator = new JaxrpcMappingValidator();
+ mappingValidator.validate(resourceDir + "/jaxrpc-mapping.xml", toolsDir + "/jaxrpc-mapping.xml");
+ }
+
+ private static void compareSource(final String expectedName, final String generatedName) throws Exception
+ {
+ File expected = new File(expectedName);
+ File generated = new File(generatedName);
+
+ JBossSourceComparator sc = new JBossSourceComparator(expected, generated);
+ sc.validate();
+ sc.validateImports();
+ }
+
+}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801 (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801)
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit)
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/Person.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/Person.java 2007-09-11 13:38:20 UTC (rev 4551)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/Person.java 2007-09-11 15:10:53 UTC (rev 4553)
@@ -1,27 +0,0 @@
-/*
- * JBossWS WS-Tools Generated Source
- *
- * Generation Date: Tue Sep 11 12:13:54 BST 2007
- *
- * This generated source code represents a derivative work of the input to
- * the generator that produced it. Consult the input for the copyright and
- * terms of use that apply to this source code.
- */
-
-package org.jboss.test.ws.jbws1801;
-
-
-public class Person
-{
-
-protected java.lang.String[] surname;
-public Person(){}
-
-public Person(java.lang.String[] surname){
-this.surname=surname;
-}
-public java.lang.String[] getSurname() { return surname ;}
-
-public void setSurname(java.lang.String[] surname){ this.surname=surname; }
-
-}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/Person.java (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/Person.java)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/Person.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/Person.java 2007-09-11 15:10:53 UTC (rev 4553)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Sep 11 12:13:54 BST 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jbws1801;
+
+
+public class Person
+{
+
+protected java.lang.String[] surname;
+public Person(){}
+
+public Person(java.lang.String[] surname){
+this.surname=surname;
+}
+public java.lang.String[] getSurname() { return surname ;}
+
+public void setSurname(java.lang.String[] surname){ this.surname=surname; }
+
+}
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook.wsdl
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook.wsdl 2007-09-11 13:38:20 UTC (rev 4551)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook.wsdl 2007-09-11 15:10:53 UTC (rev 4553)
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='PhoneBook'
- targetNamespace='http://test.jboss.org/ws/jbws1801'
- xmlns='http://schemas.xmlsoap.org/wsdl/'
- xmlns:ns1='http://test.jboss.org/ws/jbws1801/types'
- xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
- xmlns:tns='http://test.jboss.org/ws/jbws1801'
- xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types>
- <schema targetNamespace='http://test.jboss.org/ws/jbws1801/types'
- xmlns='http://www.w3.org/2001/XMLSchema'
- xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
- xmlns:tns='http://test.jboss.org/ws/jbws1801/types'
- xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
-
- <complexType name='Person'>
- <sequence>
- <element maxOccurs="unbounded" minOccurs="0" name="surname" nillable="true" type="string"/>
- </sequence>
- </complexType>
-
- <complexType name='TelephoneNumber'>
- <sequence>
- <element maxOccurs="unbounded" minOccurs="0" name="number" nillable="true" type="string"/>
- </sequence>
- </complexType>
-
- <element name='lookup' type='tns:Person'/>
- <element name='lookupResponse' type='tns:TelephoneNumber'/>
-
- </schema>
- </types>
-
- <message name='PhoneBook_lookup'>
- <part element='ns1:lookup' name='parameters'/>
- </message>
-
- <message name='PhoneBook_lookupResponse'>
- <part element='ns1:lookupResponse' name='result'/>
- </message>
-
- <portType name='PhoneBook'>
- <operation name='lookup'>
- <input message='tns:PhoneBook_lookup'/>
- <output message='tns:PhoneBook_lookupResponse'/>
- </operation>
- </portType>
-
- <binding name='PhoneBookBinding' type='tns:PhoneBook'>
- <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='lookup'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body use='literal' parts='parameters'/>
- </input>
- <output>
- <soap:body use='literal'/>
- </output>
- </operation>
- </binding>
-
- <service name='PhoneBook'>
- <port binding='tns:PhoneBookBinding' name='PhoneBookPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
- </port>
- </service>
-
-</definitions>
\ No newline at end of file
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook.wsdl (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook.wsdl)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook.wsdl (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook.wsdl 2007-09-11 15:10:53 UTC (rev 4553)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='PhoneBook'
+ targetNamespace='http://test.jboss.org/ws/jbws1801'
+ xmlns='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:ns1='http://test.jboss.org/ws/jbws1801/types'
+ xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
+ xmlns:tns='http://test.jboss.org/ws/jbws1801'
+ xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://test.jboss.org/ws/jbws1801/types'
+ xmlns='http://www.w3.org/2001/XMLSchema'
+ xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
+ xmlns:tns='http://test.jboss.org/ws/jbws1801/types'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+
+ <complexType name='Person'>
+ <sequence>
+ <element maxOccurs="unbounded" minOccurs="0" name="surname" nillable="true" type="string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name='TelephoneNumber'>
+ <sequence>
+ <element maxOccurs="unbounded" minOccurs="0" name="number" nillable="true" type="string"/>
+ </sequence>
+ </complexType>
+
+ <element name='lookup' type='tns:Person'/>
+ <element name='lookupResponse' type='tns:TelephoneNumber'/>
+
+ </schema>
+ </types>
+
+ <message name='PhoneBook_lookup'>
+ <part element='ns1:lookup' name='parameters'/>
+ </message>
+
+ <message name='PhoneBook_lookupResponse'>
+ <part element='ns1:lookupResponse' name='result'/>
+ </message>
+
+ <portType name='PhoneBook'>
+ <operation name='lookup'>
+ <input message='tns:PhoneBook_lookup'/>
+ <output message='tns:PhoneBook_lookupResponse'/>
+ </operation>
+ </portType>
+
+ <binding name='PhoneBookBinding' type='tns:PhoneBook'>
+ <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='lookup'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal' parts='parameters'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name='PhoneBook'>
+ <port binding='tns:PhoneBookBinding' name='PhoneBookPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+
+</definitions>
\ No newline at end of file
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook_PortType.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook_PortType.java 2007-09-11 13:38:20 UTC (rev 4551)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook_PortType.java 2007-09-11 15:10:53 UTC (rev 4553)
@@ -1,15 +0,0 @@
-/*
- * JBossWS WS-Tools Generated Source
- *
- * Generation Date: Tue Sep 11 12:13:54 BST 2007
- *
- * This generated source code represents a derivative work of the input to
- * the generator that produced it. Consult the input for the copyright and
- * terms of use that apply to this source code.
- */
-package org.jboss.test.ws.jbws1801;
-public interface PhoneBook_PortType extends java.rmi.Remote
-{
-
- public org.jboss.test.ws.jbws1801.TelephoneNumber lookup(org.jboss.test.ws.jbws1801.Person lookup) throws java.rmi.RemoteException;
-}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook_PortType.java (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook_PortType.java)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook_PortType.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/PhoneBook_PortType.java 2007-09-11 15:10:53 UTC (rev 4553)
@@ -0,0 +1,15 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Sep 11 12:13:54 BST 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+package org.jboss.test.ws.jbws1801;
+public interface PhoneBook_PortType extends java.rmi.Remote
+{
+
+ public org.jboss.test.ws.jbws1801.TelephoneNumber lookup(org.jboss.test.ws.jbws1801.Person lookup) throws java.rmi.RemoteException;
+}
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/TelephoneNumber.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/TelephoneNumber.java 2007-09-11 13:38:20 UTC (rev 4551)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/TelephoneNumber.java 2007-09-11 15:10:53 UTC (rev 4553)
@@ -1,27 +0,0 @@
-/*
- * JBossWS WS-Tools Generated Source
- *
- * Generation Date: Tue Sep 11 12:13:54 BST 2007
- *
- * This generated source code represents a derivative work of the input to
- * the generator that produced it. Consult the input for the copyright and
- * terms of use that apply to this source code.
- */
-
-package org.jboss.test.ws.jbws1801;
-
-
-public class TelephoneNumber
-{
-
-protected java.lang.String[] number;
-public TelephoneNumber(){}
-
-public TelephoneNumber(java.lang.String[] number){
-this.number=number;
-}
-public java.lang.String[] getNumber() { return number ;}
-
-public void setNumber(java.lang.String[] number){ this.number=number; }
-
-}
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/TelephoneNumber.java (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/TelephoneNumber.java)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/TelephoneNumber.java (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/TelephoneNumber.java 2007-09-11 15:10:53 UTC (rev 4553)
@@ -0,0 +1,27 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Tue Sep 11 12:13:54 BST 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+
+package org.jboss.test.ws.jbws1801;
+
+
+public class TelephoneNumber
+{
+
+protected java.lang.String[] number;
+public TelephoneNumber(){}
+
+public TelephoneNumber(java.lang.String[] number){
+this.number=number;
+}
+public java.lang.String[] getNumber() { return number ;}
+
+public void setNumber(java.lang.String[] number){ this.number=number; }
+
+}
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/jaxrpc-mapping.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/jaxrpc-mapping.xml 2007-09-11 13:38:20 UTC (rev 4551)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/jaxrpc-mapping.xml 2007-09-11 15:10:53 UTC (rev 4553)
@@ -1,59 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
- <package-mapping>
- <package-type>org.jboss.test.ws.jbws1801</package-type>
- <namespaceURI>http://test.jboss.org/ws/jbws1801/types</namespaceURI>
- </package-mapping>
- <package-mapping>
- <package-type>org.jboss.test.ws.jbws1801</package-type>
- <namespaceURI>http://test.jboss.org/ws/jbws1801</namespaceURI>
- </package-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.jbws1801.Person</java-type>
- <root-type-qname xmlns:typeNS='http://test.jboss.org/ws/jbws1801/types'>typeNS:Person</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>surname</java-variable-name>
- <xml-element-name>surname</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.jbws1801.TelephoneNumber</java-type>
- <root-type-qname xmlns:typeNS='http://test.jboss.org/ws/jbws1801/types'>typeNS:TelephoneNumber</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>number</java-variable-name>
- <xml-element-name>number</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.jbws1801.PhoneBook_Service</service-interface>
- <wsdl-service-name xmlns:serviceNS='http://test.jboss.org/ws/jbws1801'>serviceNS:PhoneBook</wsdl-service-name>
- <port-mapping>
- <port-name>PhoneBookPort</port-name>
- <java-port-name>PhoneBookPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.jbws1801.PhoneBook_PortType</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS='http://test.jboss.org/ws/jbws1801'>portTypeNS:PhoneBook</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS='http://test.jboss.org/ws/jbws1801'>bindingNS:PhoneBookBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>lookup</java-method-name>
- <wsdl-operation>lookup</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>org.jboss.test.ws.jbws1801.Person</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS='http://test.jboss.org/ws/jbws1801'>wsdlMsgNS:PhoneBook_lookup</wsdl-message>
- <wsdl-message-part-name>parameters</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>org.jboss.test.ws.jbws1801.TelephoneNumber</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS='http://test.jboss.org/ws/jbws1801'>wsdlMsgNS:PhoneBook_lookupResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/jaxrpc-mapping.xml (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/jaxrpc-mapping.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/jaxrpc-mapping.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/jaxrpc-mapping.xml 2007-09-11 15:10:53 UTC (rev 4553)
@@ -0,0 +1,59 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws1801</package-type>
+ <namespaceURI>http://test.jboss.org/ws/jbws1801/types</namespaceURI>
+ </package-mapping>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jbws1801</package-type>
+ <namespaceURI>http://test.jboss.org/ws/jbws1801</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws1801.Person</java-type>
+ <root-type-qname xmlns:typeNS='http://test.jboss.org/ws/jbws1801/types'>typeNS:Person</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>surname</java-variable-name>
+ <xml-element-name>surname</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jbws1801.TelephoneNumber</java-type>
+ <root-type-qname xmlns:typeNS='http://test.jboss.org/ws/jbws1801/types'>typeNS:TelephoneNumber</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>number</java-variable-name>
+ <xml-element-name>number</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jbws1801.PhoneBook_Service</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://test.jboss.org/ws/jbws1801'>serviceNS:PhoneBook</wsdl-service-name>
+ <port-mapping>
+ <port-name>PhoneBookPort</port-name>
+ <java-port-name>PhoneBookPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jbws1801.PhoneBook_PortType</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://test.jboss.org/ws/jbws1801'>portTypeNS:PhoneBook</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://test.jboss.org/ws/jbws1801'>bindingNS:PhoneBookBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>lookup</java-method-name>
+ <wsdl-operation>lookup</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>org.jboss.test.ws.jbws1801.Person</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://test.jboss.org/ws/jbws1801'>wsdlMsgNS:PhoneBook_lookup</wsdl-message>
+ <wsdl-message-part-name>parameters</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>org.jboss.test.ws.jbws1801.TelephoneNumber</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://test.jboss.org/ws/jbws1801'>wsdlMsgNS:PhoneBook_lookupResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Deleted: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/wstools-config.xml
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/wstools-config.xml 2007-09-11 13:38:20 UTC (rev 4551)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/wstools-config.xml 2007-09-11 15:10:53 UTC (rev 4553)
@@ -1,6 +0,0 @@
-<configuration>
- <wsdl-java location="resources/tools/jbws1801/doclit/PhoneBook.wsdl"
- parameter-style="bare">
- <mapping file="jaxrpc-mapping.xml"/>
- </wsdl-java>
-</configuration>
Copied: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/wstools-config.xml (from rev 4551, legacy/branches/jbossws-1.2.1.GA_JBWS-1788/jbossws-tests/src/resources/tools/jbws1801/doclit/wstools-config.xml)
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/wstools-config.xml (rev 0)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-tests/src/resources/tools/jbws1801/doclit/wstools-config.xml 2007-09-11 15:10:53 UTC (rev 4553)
@@ -0,0 +1,6 @@
+<configuration>
+ <wsdl-java location="resources/tools/jbws1801/doclit/PhoneBook.wsdl"
+ parameter-style="bare">
+ <mapping file="jaxrpc-mapping.xml"/>
+ </wsdl-java>
+</configuration>
16 years, 8 months