[jboss-svn-commits] JBL Code SVN: r28834 - in labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA: product/rosetta and 17 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Aug 5 08:02:28 EDT 2009
Author: kevin.conner at jboss.com
Date: 2009-08-05 08:02:24 -0400 (Wed, 05 Aug 2009)
New Revision: 28834
Added:
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/SystinetIntegration.odt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletRequest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletResponse.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletInputStream.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletOutputStream.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Inquiry.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Publish.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/resources/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/taxonomy.xml
Removed:
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/SystinetIntegration.odt
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletRequest.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletResponse.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletInputStream.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletOutputStream.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Inquiry.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Publish.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/resources/
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/taxonomy.xml
Modified:
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build-distr.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivy.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/resources/META-INF/jboss-aop.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/build.xml
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java
Log:
Merge 4.4.0.GA_CP3_CR6 into SOA branch
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build-distr.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build-distr.xml 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/build-distr.xml 2009-08-05 12:02:24 UTC (rev 28834)
@@ -102,11 +102,8 @@
<copy todir="${build.dir}/jbossesb.sar/lib">
<fileset dir="${lib.ext.dir}" includes="jbossts-common.jar"/>
<fileset dir="${build.lib.dir}" includes="jbossesb*.jar"/>
- <!-- We use AOP on scout to get around an issue, use the modified jar for now
- <fileset dir="${lib.dir}" includes="scout-*.jar"/>
- -->
<!-- scout -->
- <fileset dir="${aoplib.dir}" includes="scout-*.jar"/>
+ <fileset dir="${lib.dir}" includes="scout-*.jar"/>
<!-- xbean for reading/marchalling xml for configuration, and scout -->
<fileset dir="${lib.dir}" includes="xbean*.jar"/>
<fileset dir="${lib.dir}" includes="stax-api-*.jar"/>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivy.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivy.xml 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/ivy.xml 2009-08-05 12:02:24 UTC (rev 28834)
@@ -21,13 +21,14 @@
<dependency org="javassist" name="javassist" rev="3.6.0.GA"/>
<!-- Only declaring a direct dependency on jaxr-api because there's an issue with
- the scout-1.0rc2 pom in the repo. It declares a dep on an unavailable (easily)
+ the scout-1.0.rc2 pom in the repo. It declares a dep on an unavailable (easily)
SNAPSHOT version. -->
- <dependency org="org.apache.ws.scout" name="jaxr-api" rev="1.0rc2">
+ <dependency org="org.apache.ws.scout" name="jaxr-api" rev="1.0">
<exclude org="axis" module="axis"/>
<exclude org="geronimo-spec" module="geronimo-spec-activation"/>
</dependency>
- <dependency org="org.apache.ws.scout" name="scout" rev="1.0rc2">
+
+ <dependency org="org.apache.ws.scout" name="scout" rev="1.0">
<exclude org="axis" module="axis"/>
<exclude org="geronimo-spec" module="geronimo-spec-activation"/>
</dependency>
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/java/org/jboss/internal/soa/esb/services/registry/aspect/ScoutAspect.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.internal.soa.esb.services.registry.aspect;
-
-import javax.xml.registry.LifeCycleManager;
-import javax.xml.registry.infomodel.Organization;
-import javax.xml.registry.infomodel.Service;
-
-import org.apache.ws.scout.registry.BusinessQueryManagerImpl;
-import org.apache.ws.scout.registry.infomodel.OrganizationImpl;
-import org.apache.ws.scout.registry.infomodel.ServiceImpl;
-import org.jboss.aop.joinpoint.MethodCalledByMethodInvocation;
-
-/**
- * Aspect used to prevent scout from loading the complete service
- * graph for the registry just to return a binding.
- *
- * Updated to intercept calls for the organizational information when
- * querying a specific service.
- *
- * @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
- */
-public class ScoutAspect
-{
- public Object getRegistryObject(final MethodCalledByMethodInvocation invocation)
- throws Throwable
- {
- final BusinessQueryManagerImpl bqmImpl = (BusinessQueryManagerImpl)invocation.getCallingObject() ;
- final Object[] args = invocation.getArguments() ;
- final String id = (String)args[0] ;
- final String objectType = (String)args[1] ;
-
- if (LifeCycleManager.SERVICE.equals(objectType))
- {
- final LifeCycleManager lcm = bqmImpl.getRegistryService().getBusinessLifeCycleManager() ;
- final Service service = new ServiceImpl(lcm);
- service.setKey(lcm.createKey(id));
- return service ;
- }
- else if (LifeCycleManager.ORGANIZATION.equals(objectType))
- {
- final LifeCycleManager lcm = bqmImpl.getRegistryService().getBusinessLifeCycleManager() ;
- final Organization organization = new OrganizationImpl(lcm) ;
- organization.setKey(lcm.createKey(id)) ;
- return organization ;
- }
- else
- {
- return invocation.invokeNext() ;
- }
- }
-}
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/resources/META-INF/jboss-aop.xml 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/aop/resources/META-INF/jboss-aop.xml 2009-08-05 12:02:24 UTC (rev 28834)
@@ -4,17 +4,8 @@
"http://labs.jboss.com/portal/jbossaop/dtd/jboss-aop_1_0.dtd">
<aop>
- <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.ScoutAspect" scope="PER_VM"/>
<aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIAspect" scope="PER_VM"/>
-
- <bind pointcut="withincode(* org.apache.ws.scout.registry.BusinessQueryManagerImpl->findServiceBindings(..)) AND call(* org.apache.ws.scout.registry.BusinessQueryManagerImpl->getRegistryObject(..))">
- <advice name="getRegistryObject" aspect="org.jboss.internal.soa.esb.services.registry.aspect.ScoutAspect"/>
- </bind>
- <bind pointcut="withincode(* org.apache.ws.scout.registry.BusinessQueryManagerImpl->getServiceFromBusinessService(..)) AND call(* org.apache.ws.scout.registry.BusinessQueryManagerImpl->getRegistryObject(..))">
- <advice name="getRegistryObject" aspect="org.jboss.internal.soa.esb.services.registry.aspect.ScoutAspect"/>
- </bind>
-
<bind pointcut="execution(* org.apache.juddi.util.xml.XMLUtils->getText(..))">
<advice name="getText" aspect="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIAspect"/>
</bind>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/build.xml 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/build.xml 2009-08-05 12:02:24 UTC (rev 28834)
@@ -5,7 +5,6 @@
<property name="org.jboss.esb.rosetta.distrib.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
<property name="org.jboss.esb.rosetta.classes.dir" location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
<property name="org.jboss.esb.rosetta.aop.classes.dir" location="${org.jboss.esb.rosetta.classes.dir}-aop"/>
- <property name="org.jboss.esb.rosetta.aopc.scout.classes.dir" location="${org.jboss.esb.rosetta.classes.dir}-scout-aopc"/>
<property name="org.jboss.esb.rosetta.aopc.juddi.classes.dir" location="${org.jboss.esb.rosetta.classes.dir}-juddi-aopc"/>
<property name="org.jboss.esb.rosetta.src.dir" location="src"/>
<property name="org.jboss.esb.root.dir" location="../"/>
@@ -176,22 +175,12 @@
<target name="aop" depends="aop-jar">
<taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="aop-classpath"/>
- <delete dir="${org.jboss.esb.rosetta.aopc.scout.classes.dir}" quiet="true"/>
<delete dir="${org.jboss.esb.rosetta.aopc.juddi.classes.dir}" quiet="true"/>
- <mkdir dir="${org.jboss.esb.rosetta.aopc.scout.classes.dir}"/>
<mkdir dir="${org.jboss.esb.rosetta.aopc.juddi.classes.dir}"/>
- <unzip src="${org.jboss.esb.lib.dir}/scout-1.0rc2.jar" dest="${org.jboss.esb.rosetta.aopc.scout.classes.dir}"/>
<unzip src="${org.jboss.esb.lib.dir}/juddi-2.0rc5.jar" dest="${org.jboss.esb.rosetta.aopc.juddi.classes.dir}"/>
<aopc compilerclasspathref="aop-classpath">
- <classpath path="${org.jboss.esb.rosetta.aopc.scout.classes.dir}"/>
- <src path="${org.jboss.esb.rosetta.aopc.scout.classes.dir}"/>
- <include name="org/apache/ws/scout/registry/BusinessQueryManagerImpl.class"/>
- <aoppath path="aop/resources/META-INF/jboss-aop.xml"/>
- <aopclasspath path="${org.jboss.esb.rosetta.aop.classes.dir}"/>
- </aopc>
- <aopc compilerclasspathref="aop-classpath">
<classpath>
<pathelement path="${org.jboss.esb.rosetta.aopc.juddi.classes.dir}"/>
<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="commons-logging*.jar"/>
@@ -202,7 +191,6 @@
<aoppath path="aop/resources/META-INF/jboss-aop.xml"/>
<aopclasspath path="${org.jboss.esb.rosetta.aop.classes.dir}"/>
</aopc>
- <zip destfile="${org.jboss.esb.aoplib.dir}/scout-1.0rc2.aop.jar" basedir="${org.jboss.esb.rosetta.aopc.scout.classes.dir}"/>
<zip destfile="${org.jboss.esb.aoplib.dir}/juddi-2.0rc5.aop.jar" basedir="${org.jboss.esb.rosetta.aopc.juddi.classes.dir}"/>
</target>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/rosetta/src/org/jboss/internal/soa/esb/services/registry/JAXRRegistryImpl.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -38,6 +38,7 @@
import javax.xml.registry.RegistryService;
import javax.xml.registry.infomodel.Classification;
import javax.xml.registry.infomodel.ClassificationScheme;
+import javax.xml.registry.infomodel.Concept;
import javax.xml.registry.infomodel.EmailAddress;
import javax.xml.registry.infomodel.Key;
import javax.xml.registry.infomodel.Organization;
@@ -46,11 +47,14 @@
import javax.xml.registry.infomodel.RegistryObject;
import javax.xml.registry.infomodel.Service;
import javax.xml.registry.infomodel.ServiceBinding;
+import javax.xml.registry.infomodel.SpecificationLink;
import javax.xml.registry.infomodel.TelephoneNumber;
import javax.xml.registry.infomodel.User;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
+import org.apache.ws.scout.registry.infomodel.KeyImpl;
+import org.apache.ws.scout.registry.infomodel.SpecificationLinkImpl;
import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.MarshalException;
@@ -71,6 +75,7 @@
private static Logger logger = Logger.getLogger(JAXRRegistryImpl.class);
private JAXRConnectionFactory jaxrConnectionFactory;
private Organization jbossESBOrganization;
+ private static Concept jbossTModel;
public static final String JBOSS_ESB_CATEGORY = "org.jboss.soa.esb.:category";
public JAXRRegistryImpl() throws ConfigurationException {
@@ -134,8 +139,16 @@
*/
public void registerEPR(String category, String serviceName, String serviceDescription, EPR epr, String eprDescription)
throws RegistryException
- {
- Connection connection = jaxrConnectionFactory.getConnection();
+ {
+ Connection connection = jaxrConnectionFactory.getConnection();
+ if (jbossTModel == null) {
+ try {
+ jbossTModel = getJBossESBTModel(jaxrConnectionFactory);
+ } catch (JAXRException je) {
+ throw new RegistryException();
+ }
+ }
+
try {
//Find the service
Service service = findService(category,serviceName);
@@ -148,12 +161,16 @@
BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
BusinessQueryManager bqm = rs.getBusinessQueryManager();
ServiceBinding serviceBinding = blm.createServiceBinding();
- serviceBinding.setDescription(blm.createInternationalString(eprDescription));
String xml = EPRHelper.toXMLString(epr);
serviceBinding.setAccessURI(xml);
-
+
ArrayList<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
+ SpecificationLink sl = new SpecificationLinkImpl(blm);
+ sl.setSpecificationObject(jbossTModel);
+ serviceBinding.getSpecificationLinks().add(sl);
+ serviceBinding.setDescription(blm.createInternationalString(eprDescription));
serviceBindings.add(serviceBinding);
+
service.addServiceBindings(serviceBindings);
Collection<String> findQualifiers = new ArrayList<String>();
findQualifiers.add(FindQualifier.AND_ALL_KEYS);
@@ -161,7 +178,7 @@
ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, JBOSS_ESB_CATEGORY);
Classification classification = blm.createClassification(cScheme, "category", category);
service.addClassification(classification);
-
+
saveRegistryObject(serviceBinding, jaxrConnectionFactory);
} catch (JAXRException je) {
throw new RegistryException(je.getLocalizedMessage(), je);
@@ -270,6 +287,10 @@
Connection connection = jaxrConnectionFactory.getConnection();
try {
+ RegistryService rs = connection.getRegistryService();
+ BusinessQueryManager bqm = rs.getBusinessQueryManager();
+ BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
+
Service service = findService(category, serviceName);
if (service==null){
throw new ServiceNotFoundException("Could not find service with category=" + category + " and serviceName=" + serviceName);
@@ -279,6 +300,17 @@
//Converting them to EPRs
for (Iterator i=serviceBindings.iterator();i.hasNext();) {
ServiceBinding serviceBinding = (ServiceBinding) i.next();
+
+ Collection<String> findQualifiers = new ArrayList<String>();
+ findQualifiers.add(FindQualifier.AND_ALL_KEYS);
+ findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+ ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, JBOSS_ESB_CATEGORY);
+ Classification classification = blm.createClassification(cScheme, "category", category);
+
+ SpecificationLink sl = new SpecificationLinkImpl(blm);
+ sl.setSpecificationObject(jbossTModel);
+ serviceBinding.getSpecificationLinks().add(sl);
+
@SuppressWarnings("unused")
String eprXML = serviceBinding.getAccessURI();
EPR epr = null;
@@ -316,6 +348,10 @@
EPR epr = null ;
Connection connection = jaxrConnectionFactory.getConnection();
try {
+ RegistryService rs = connection.getRegistryService();
+ BusinessQueryManager bqm = rs.getBusinessQueryManager();
+ BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
+
Service service = findService(category, serviceName);
if (service==null){
throw new ServiceNotFoundException("Could not find service with category=" + category + " and serviceName=" + serviceName);
@@ -324,6 +360,10 @@
Collection<ServiceBinding> serviceBindings = findServiceBindings(service);
if (serviceBindings.iterator().hasNext()) {
ServiceBinding serviceBinding = (ServiceBinding) serviceBindings.iterator().next();
+ SpecificationLink sl = new SpecificationLinkImpl(blm);
+ sl.setSpecificationObject(jbossTModel);
+ serviceBinding.getSpecificationLinks().add(sl);
+
String eprXML = serviceBinding.getAccessURI();
// for backwards compatibility still have the decoder if
// unmarchalling fails
@@ -597,6 +637,41 @@
}
/**
+ * Create a jbossesb organization under which we will register all our services.
+ *
+ * @return
+ * @throws JAXRException
+ */
+ protected static Concept getJBossESBTModel(JAXRConnectionFactory jaxrConnectionFactory) throws JAXRException
+ {
+ Connection connection = jaxrConnectionFactory.getConnection();
+ Concept tmodel = null;
+ try {
+ RegistryService rs = connection.getRegistryService();
+ BusinessQueryManager bqm = rs.getBusinessQueryManager();
+ BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
+
+ Collection<String> findQualifiers = new ArrayList<String>();
+ findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
+ Collection<String> namePatterns = new ArrayList<String>();
+ namePatterns.add("%" + JBOSS_ESB_CATEGORY + "%");
+
+ BulkResponse response = bqm.findConcepts(findQualifiers, namePatterns, null, null, null);
+ if (response.getStatus()==JAXRResponse.STATUS_SUCCESS) {
+ Collection<RegistryObject> regs = (Collection<RegistryObject>) response.getCollection();
+ for (Iterator orgIter = response.getCollection().iterator(); orgIter.hasNext();)
+ {
+ tmodel = (Concept) orgIter.next();
+ }
+ }
+ } finally {
+ jaxrConnectionFactory.closeConnection(connection);
+ }
+ return tmodel;
+ }
+
+
+ /**
* Save Registry Object
*/
private static void saveRegistryObject(RegistryObject registryObject, JAXRConnectionFactory jaxrConnectionFactory) throws JAXRException
@@ -680,12 +755,14 @@
*/
private synchronized Organization getJBossESBOrganization() throws JAXRException
{
+
if (jbossESBOrganization==null) {
jbossESBOrganization = findOrganization("Red Hat/JBossESB", jaxrConnectionFactory);
if (jbossESBOrganization==null) {
jbossESBOrganization = createJBossESBOrganization(jaxrConnectionFactory);
}
}
+
return jbossESBOrganization;
}
@@ -698,17 +775,38 @@
@SuppressWarnings("unchecked")
private Collection<ServiceBinding> findServiceBindings(Service service) throws RegistryException
{
+ if (jbossTModel == null) {
+ try {
+ jbossTModel = getJBossESBTModel(jaxrConnectionFactory);
+ } catch (JAXRException je) {
+ throw new RegistryException();
+ }
+ }
+
Collection<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
Connection connection = jaxrConnectionFactory.getConnection();
try {
RegistryService rs = connection.getRegistryService();
BusinessQueryManager bqm = rs.getBusinessQueryManager();
+ BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
Collection<String> findQualifiers = null;
//Collection<String> findQualifiers = new ArrayList<String>();
//findQualifiers.add(FindQualifier.SORT_BY_DATE_ASC);
- BulkResponse bulkResponse = bqm.findServiceBindings(service.getKey(),findQualifiers,null,null);
+ ArrayList<SpecificationLink> specs = new ArrayList<SpecificationLink>();
+ SpecificationLink sl = new SpecificationLinkImpl(blm);
+ sl.setSpecificationObject(jbossTModel);
+
+ specs.add(sl);
+ BulkResponse bulkResponse = bqm.findServiceBindings(service.getKey(),findQualifiers,null,specs);
if (bulkResponse.getStatus()==JAXRResponse.STATUS_SUCCESS){
serviceBindings = (Collection<ServiceBinding>)bulkResponse.getCollection();
+ for (Iterator bindIter = serviceBindings.iterator(); bindIter.hasNext();)
+ {
+ ServiceBinding binding = (ServiceBinding) bindIter.next();
+ SpecificationLink speclink = new SpecificationLinkImpl(blm);
+ speclink.setSpecificationObject(jbossTModel);
+ binding.getSpecificationLinks().add(speclink);
+ }
}
return serviceBindings;
} catch (Exception je) {
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/SystinetIntegration.odt
===================================================================
(Binary files differ)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/SystinetIntegration.odt (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/SystinetIntegration.odt)
===================================================================
(Binary files differ)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/build.xml 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,61 +0,0 @@
-<project name="jon-build" default="deploy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
-
- <property name="build.dir" location="build"/>
- <property name="classes.dir" value="${build.dir}/classes"/>
- <property name="classpath.dir" location="../../../antlib"/>
-
- <property name="soap.classes.dir" location="${basedir}/../../services/soap/build/classes"/>
- <property name="esb.transport.jar.version" value="1.0"/>
- <property name="esb.transport.jar.name" value="jbossesb-transport-${esb.transport.jar.version}.jar"/>
- <property name="esb.transport.client.jar.name" value="jbossesb-transport-client-${esb.transport.jar.version}.jar"/>
- <property name="esb.transport.jar" location="${build.dir}/${esb.transport.jar.name}"/>
- <property name="esb.client.transport.jar" location="${build.dir}/${esb.transport.client.jar.name}"/>
-
- <property name="src.dir" location="src/main"/>
- <property name="java.dir" location="${src.dir}/java"/>
- <property name="resources.dir" location="${src.dir}/resources"/>
-
- <property file="systinet.properties"/>
-
- <target name="clean">
- <delete dir="${build.dir}"/>
- </target>
-
- <path id="classpath">
- <fileset dir="/home/tcunning/jboss-4.2.2.GA/server/default/lib"
- includes="**/*.jar"/>
- <fileset dir="${systinet.reg.dir}/lib" includes="**/*.jar"/>
- <fileset dir="${systinet.reg.dir}/app/uddi" includes="**/*.jar"/>
- </path>
-
- <target name="compile-transport">
- <mkdir dir="build"/>
- <mkdir dir="${classes.dir}"/>
- <javac deprecation="off" nowarn="on" debug="on" srcdir="${java.dir}" destdir="${classes.dir}" classpathref="classpath" source="1.5"/>
- </target>
-
- <target name="jar-transport" depends="compile-transport">
- <echo message="Plugin version is ${esb.transport.jar.version}"/>
- <jar destfile="${esb.transport.jar}">
- <fileset dir="${classes.dir}"/>
- <fileset dir="${resources.dir}"/>
- </jar>
- <jar destfile="${esb.client.transport.jar}">
- <fileset dir="${classes.dir}">
- <include name="**/Inquiry.class"/>
- <include name="**/Publish.class"/>
- </fileset>
- <fileset dir="${resources.dir}"/>
- </jar>
- </target>
-
- <target name="deploy" depends="jar-transport">
- <copy file="${esb.transport.jar}"
- overwrite="true"
- todir="/home/tcunning/jboss-4.2.2.GA/server/default/deploy/registry.war/WEB-INF/lib"/>
- <copy file="${esb.client.transport.jar}"
- overwrite="true"
- todir="/home/tcunning/jboss-4.2.2.GA/server/default/deploy/jbossesb.sar/lib"/>
- </target>
-
-</project>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/build.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/build.xml 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,61 @@
+<project name="jon-build" default="deploy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
+
+ <property name="build.dir" location="build"/>
+ <property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="classpath.dir" location="../../../antlib"/>
+
+ <property name="soap.classes.dir" location="${basedir}/../../services/soap/build/classes"/>
+ <property name="esb.transport.jar.version" value="1.0"/>
+ <property name="esb.transport.jar.name" value="jbossesb-transport-${esb.transport.jar.version}.jar"/>
+ <property name="esb.transport.client.jar.name" value="jbossesb-transport-client-${esb.transport.jar.version}.jar"/>
+ <property name="esb.transport.jar" location="${build.dir}/${esb.transport.jar.name}"/>
+ <property name="esb.client.transport.jar" location="${build.dir}/${esb.transport.client.jar.name}"/>
+
+ <property name="src.dir" location="src/main"/>
+ <property name="java.dir" location="${src.dir}/java"/>
+ <property name="resources.dir" location="${src.dir}/resources"/>
+
+ <property file="systinet.properties"/>
+
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ </target>
+
+ <path id="classpath">
+ <fileset dir="/home/tcunning/jboss-4.2.2.GA/server/default/lib"
+ includes="**/*.jar"/>
+ <fileset dir="${systinet.reg.dir}/lib" includes="**/*.jar"/>
+ <fileset dir="${systinet.reg.dir}/app/uddi" includes="**/*.jar"/>
+ </path>
+
+ <target name="compile-transport">
+ <mkdir dir="build"/>
+ <mkdir dir="${classes.dir}"/>
+ <javac deprecation="off" nowarn="on" debug="on" srcdir="${java.dir}" destdir="${classes.dir}" classpathref="classpath" source="1.5"/>
+ </target>
+
+ <target name="jar-transport" depends="compile-transport">
+ <echo message="Plugin version is ${esb.transport.jar.version}"/>
+ <jar destfile="${esb.transport.jar}">
+ <fileset dir="${classes.dir}"/>
+ <fileset dir="${resources.dir}"/>
+ </jar>
+ <jar destfile="${esb.client.transport.jar}">
+ <fileset dir="${classes.dir}">
+ <include name="**/Inquiry.class"/>
+ <include name="**/Publish.class"/>
+ </fileset>
+ <fileset dir="${resources.dir}"/>
+ </jar>
+ </target>
+
+ <target name="deploy" depends="jar-transport">
+ <copy file="${esb.transport.jar}"
+ overwrite="true"
+ todir="/home/tcunning/jboss-4.2.2.GA/server/default/deploy/registry.war/WEB-INF/lib"/>
+ <copy file="${esb.client.transport.jar}"
+ overwrite="true"
+ todir="/home/tcunning/jboss-4.2.2.GA/server/default/deploy/jbossesb.sar/lib"/>
+ </target>
+
+</project>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletRequest.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletRequest.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletRequest.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,354 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.http.mock;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.security.Principal;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-/**
- * This is an adapter used when integrating with JBossWS.
- *
- * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
- * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
- */
-public class SOAPProcessorHttpServletRequest implements HttpServletRequest
-{
- private final Map<String, List<String>> headers ;
- private Map<String, String[]> parameters = new HashMap<String, String[]>();
-
- private final byte[] content ;
-
- private Map<String, Object> attributes = new HashMap<String, Object>();
-
- private final String path ;
- private HttpSession session = null;
-
- public SOAPProcessorHttpServletRequest(final String path, final byte[] content, final Map<String, List<String>> headers)
- {
- this.path = path ;
- this.content = content ;
- this.headers = headers ;
- }
-
- public String getHeader(final String name)
- {
- final List<String> values = headers.get(name) ;
- if (values != null)
- {
- return values.get(0) ;
- }
- return null ;
- }
-
- public Enumeration getHeaderNames()
- {
- return Collections.enumeration(headers.keySet()) ;
- }
-
- public String getMethod()
- {
- // always use POST
- return "POST" ;
- }
-
- public String getPathInfo()
- {
- return null ;
- }
-
- public String getQueryString()
- {
- return null ;
- }
-
- public String getRequestURI()
- {
- return (path == null ? "/" : path) ;
- }
-
- public String getContextPath()
- {
- return "" ;
- }
-
- public HttpSession getSession(boolean arg0)
- {
- return session;
- }
-
- public String getContentType()
- {
- return getHeader("Content-Type") ;
- }
-
- public ServletInputStream getInputStream() throws IOException
- {
- return new SOAPProcessorServletInputStream(new ByteArrayInputStream(content)) ;
- }
-
- public String getParameter(final String name)
- {
- return null ;
- }
-
- public Principal getUserPrincipal()
- {
- // TODO link this is with security
- return null ;
- }
-
- public boolean isUserInRole(final String name)
- {
- // TODO link this is with security
- return false ;
- }
-
- /*
- * The following methods are not supported by this adapter.
- */
-
- public StringBuffer getRequestURL()
- {
- return new StringBuffer(getRequestURI());
- }
-
- public String getAuthType()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public Cookie[] getCookies()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public long getDateHeader(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public Enumeration getHeaders(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public int getIntHeader(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String getPathTranslated()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String getRemoteUser()
- {
- return null;
- }
-
- public String getRequestedSessionId()
- {
- return null;
- }
-
- public String getServletPath()
- {
- return "/jbossesbfakepath";
- }
-
- public HttpSession getSession()
- {
- return session;
- }
-
- public boolean isRequestedSessionIdFromCookie()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public boolean isRequestedSessionIdFromURL()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public boolean isRequestedSessionIdFromUrl()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public boolean isRequestedSessionIdValid()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public Enumeration getAttributeNames()
- {
- return Collections.enumeration(attributes.keySet());
- }
-
- public String getCharacterEncoding()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public int getContentLength()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public Locale getLocale()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public Enumeration getLocales()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public Map getParameterMap()
- {
- return parameters;
- }
-
- public Enumeration getParameterNames()
- {
- return Collections.enumeration(parameters.keySet());
- }
-
- public String[] getParameterValues(String arg0)
- {
- return parameters.get(arg0);
- }
-
- public String getProtocol()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public BufferedReader getReader() throws IOException
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String getRealPath(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String getRemoteAddr()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String getRemoteHost()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public RequestDispatcher getRequestDispatcher(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String getScheme()
- {
- return null;
- }
-
- public String getServerName()
- {
- return null;
- }
-
- public int getServerPort()
- {
- return 0;
- }
-
- public boolean isSecure()
- {
- return false;
- }
-
- public void removeAttribute(String arg0)
- {
- attributes.remove(arg0);
- }
-
- public void setAttribute(String arg0, Object arg1) {
- if (arg1 != null) {
- attributes.put(arg0, arg1);
- } else {
- attributes.remove(arg0);
- }
- }
-
- public void setCharacterEncoding(String arg0)
- throws UnsupportedEncodingException
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public Object getAttribute(String arg0)
- {
- return attributes.get(arg0);
- }
-
- public String getLocalAddr()
- {
- return null;
- }
-
- public String getLocalName()
- {
- return null;
- }
-
- public int getLocalPort()
- {
- return 0;
- }
-
- public int getRemotePort()
- {
- return 0;
- }
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletRequest.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletRequest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletRequest.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletRequest.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,354 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.http.mock;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.security.Principal;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletInputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+/**
+ * This is an adapter used when integrating with JBossWS.
+ *
+ * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+ * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
+ */
+public class SOAPProcessorHttpServletRequest implements HttpServletRequest
+{
+ private final Map<String, List<String>> headers ;
+ private Map<String, String[]> parameters = new HashMap<String, String[]>();
+
+ private final byte[] content ;
+
+ private Map<String, Object> attributes = new HashMap<String, Object>();
+
+ private final String path ;
+ private HttpSession session = null;
+
+ public SOAPProcessorHttpServletRequest(final String path, final byte[] content, final Map<String, List<String>> headers)
+ {
+ this.path = path ;
+ this.content = content ;
+ this.headers = headers ;
+ }
+
+ public String getHeader(final String name)
+ {
+ final List<String> values = headers.get(name) ;
+ if (values != null)
+ {
+ return values.get(0) ;
+ }
+ return null ;
+ }
+
+ public Enumeration getHeaderNames()
+ {
+ return Collections.enumeration(headers.keySet()) ;
+ }
+
+ public String getMethod()
+ {
+ // always use POST
+ return "POST" ;
+ }
+
+ public String getPathInfo()
+ {
+ return null ;
+ }
+
+ public String getQueryString()
+ {
+ return null ;
+ }
+
+ public String getRequestURI()
+ {
+ return (path == null ? "/" : path) ;
+ }
+
+ public String getContextPath()
+ {
+ return "" ;
+ }
+
+ public HttpSession getSession(boolean arg0)
+ {
+ return session;
+ }
+
+ public String getContentType()
+ {
+ return getHeader("Content-Type") ;
+ }
+
+ public ServletInputStream getInputStream() throws IOException
+ {
+ return new SOAPProcessorServletInputStream(new ByteArrayInputStream(content)) ;
+ }
+
+ public String getParameter(final String name)
+ {
+ return null ;
+ }
+
+ public Principal getUserPrincipal()
+ {
+ // TODO link this is with security
+ return null ;
+ }
+
+ public boolean isUserInRole(final String name)
+ {
+ // TODO link this is with security
+ return false ;
+ }
+
+ /*
+ * The following methods are not supported by this adapter.
+ */
+
+ public StringBuffer getRequestURL()
+ {
+ return new StringBuffer(getRequestURI());
+ }
+
+ public String getAuthType()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public Cookie[] getCookies()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public long getDateHeader(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public Enumeration getHeaders(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public int getIntHeader(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String getPathTranslated()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String getRemoteUser()
+ {
+ return null;
+ }
+
+ public String getRequestedSessionId()
+ {
+ return null;
+ }
+
+ public String getServletPath()
+ {
+ return "/jbossesbfakepath";
+ }
+
+ public HttpSession getSession()
+ {
+ return session;
+ }
+
+ public boolean isRequestedSessionIdFromCookie()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public boolean isRequestedSessionIdFromURL()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public boolean isRequestedSessionIdFromUrl()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public boolean isRequestedSessionIdValid()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public Enumeration getAttributeNames()
+ {
+ return Collections.enumeration(attributes.keySet());
+ }
+
+ public String getCharacterEncoding()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public int getContentLength()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public Locale getLocale()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public Enumeration getLocales()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public Map getParameterMap()
+ {
+ return parameters;
+ }
+
+ public Enumeration getParameterNames()
+ {
+ return Collections.enumeration(parameters.keySet());
+ }
+
+ public String[] getParameterValues(String arg0)
+ {
+ return parameters.get(arg0);
+ }
+
+ public String getProtocol()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public BufferedReader getReader() throws IOException
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String getRealPath(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String getRemoteAddr()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String getRemoteHost()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public RequestDispatcher getRequestDispatcher(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String getScheme()
+ {
+ return null;
+ }
+
+ public String getServerName()
+ {
+ return null;
+ }
+
+ public int getServerPort()
+ {
+ return 0;
+ }
+
+ public boolean isSecure()
+ {
+ return false;
+ }
+
+ public void removeAttribute(String arg0)
+ {
+ attributes.remove(arg0);
+ }
+
+ public void setAttribute(String arg0, Object arg1) {
+ if (arg1 != null) {
+ attributes.put(arg0, arg1);
+ } else {
+ attributes.remove(arg0);
+ }
+ }
+
+ public void setCharacterEncoding(String arg0)
+ throws UnsupportedEncodingException
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public Object getAttribute(String arg0)
+ {
+ return attributes.get(arg0);
+ }
+
+ public String getLocalAddr()
+ {
+ return null;
+ }
+
+ public String getLocalName()
+ {
+ return null;
+ }
+
+ public int getLocalPort()
+ {
+ return 0;
+ }
+
+ public int getRemotePort()
+ {
+ return 0;
+ }
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletResponse.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletResponse.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletResponse.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,319 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.http.mock;
-
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * This is an adapter used when integrating with JBossWS.
- *
- * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
- * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
- */
-public class SOAPProcessorHttpServletResponse implements HttpServletResponse
-{
- private static final String CHARSET = "charset=" ;
-
- private Map<String, List<String>> headers = new HashMap<String, List<String>>() ;
-
- private int status ;
-
- private ByteArrayOutputStream baos ;
-
- private boolean streamReturned;
- private boolean committed = false;
-
- public SOAPProcessorHttpServletResponse()
- {
- baos = new ByteArrayOutputStream() ;
- }
-
- public void addHeader(final String name, final String value)
- {
- final String normalisedName = name.toLowerCase() ;
- final List<String> values = headers.get(normalisedName) ;
- if (values != null)
- {
- values.add(value) ;
- }
- else
- {
- final List<String> newValues = new ArrayList<String>() ;
- newValues.add(value) ;
- headers.put(normalisedName, newValues) ;
- }
- }
-
- public void setHeader(final String name, final String value)
- {
- final List<String> values = new ArrayList<String>() ;
- values.add(value) ;
- headers.put(name.toLowerCase(), values) ;
- }
-
- public void setStatus(final int status)
- {
- this.status = status ;
- }
-
- public ServletOutputStream getOutputStream() throws IOException
- {
- //if (streamReturned)
- //{
- // throw new IOException("Output stream already accessed") ;
- //}
- streamReturned = true ;
- return new SOAPProcessorServletOutputStream(baos) ;
- }
-
- public PrintWriter getWriter() throws IOException
- {
- //if (streamReturned)
- //{
- // throw new IOException("Output stream already accessed") ;
- //}
- streamReturned = true ;
- final String charset = getCharset() ;
- final OutputStreamWriter osw = (charset != null ? new OutputStreamWriter(baos, charset) : new OutputStreamWriter(baos)) ;
- return new PrintWriter(new BufferedWriter(osw)) ;
- }
-
- public void setContentType(final String contentType)
- {
- setHeader("content-type", contentType) ;
- }
-
- public int getStatus()
- {
- return status ;
- }
-
- public Map<String, List<String>> getHeaders()
- {
- return headers ;
- }
-
- public byte[] getContent()
- {
- return baos.toByteArray() ;
- }
-
- public String getContentType()
- {
- final List<String> values = headers.get("content-type") ;
- if (values != null)
- {
- return values.get(0) ;
- }
- return null ;
- }
-
- public String getCharset()
- {
- final String contentType = getContentType() ;
- if (contentType != null)
- {
- final int index = contentType.indexOf(CHARSET) ;
- if (index >= 0)
- {
- final int beginIndex = index + CHARSET.length() ;
- if (beginIndex < contentType.length())
- {
- final int endIndex = contentType.indexOf(';', beginIndex) ;
- if (endIndex >= 0)
- {
- return contentType.substring(beginIndex, endIndex).trim() ;
- }
- else
- {
- return contentType.substring(beginIndex).trim();
- }
- }
- }
- }
- return null ;
- }
-
- public void setCharacterEncoding(final String charset)
- {
- final String contentType = getContentType() ;
- if (contentType != null)
- {
- final int charsetIndex = contentType.indexOf(CHARSET) ;
- if (charsetIndex == -1)
- {
- setContentType(contentType + ';' + CHARSET + charset) ;
- }
- else
- {
- final StringBuilder sb = new StringBuilder() ;
- sb.append(contentType, 0, charsetIndex) ;
- sb.append(CHARSET) ;
- sb.append(charset) ;
- final int endIndex = contentType.indexOf(';', charsetIndex) ;
- if (endIndex != -1)
- {
- sb.append(contentType, endIndex, contentType.length()) ;
- }
- setContentType(sb.toString()) ;
- }
- }
- }
-
- /*
- * The following methods are not supported by this adapter.
- */
-
- public void addCookie(Cookie arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void addDateHeader(String arg0, long arg1)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void addIntHeader(String arg0, int arg1)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public boolean containsHeader(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String encodeRedirectURL(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String encodeRedirectUrl(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String encodeURL(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String encodeUrl(String arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void sendError(int arg0) throws IOException
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void sendError(int arg0, String arg1) throws IOException
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void sendRedirect(String arg0) throws IOException
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void setDateHeader(String arg0, long arg1)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void setIntHeader(String arg0, int arg1)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void setStatus(int arg0, String arg1)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void flushBuffer() throws IOException
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public int getBufferSize()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public String getCharacterEncoding()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public Locale getLocale()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public boolean isCommitted()
- {
- return committed;
- }
-
- public void reset()
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void resetBuffer()
- {
- baos.reset();
- }
-
- public void setBufferSize(int arg0)
- {
- }
-
- public void setContentLength(int arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-
- public void setLocale(Locale arg0)
- {
- throw new UnsupportedOperationException("Not yet supported") ;
- }
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletResponse.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletResponse.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletResponse.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorHttpServletResponse.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,319 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.http.mock;
+
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * This is an adapter used when integrating with JBossWS.
+ *
+ * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+ * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
+ */
+public class SOAPProcessorHttpServletResponse implements HttpServletResponse
+{
+ private static final String CHARSET = "charset=" ;
+
+ private Map<String, List<String>> headers = new HashMap<String, List<String>>() ;
+
+ private int status ;
+
+ private ByteArrayOutputStream baos ;
+
+ private boolean streamReturned;
+ private boolean committed = false;
+
+ public SOAPProcessorHttpServletResponse()
+ {
+ baos = new ByteArrayOutputStream() ;
+ }
+
+ public void addHeader(final String name, final String value)
+ {
+ final String normalisedName = name.toLowerCase() ;
+ final List<String> values = headers.get(normalisedName) ;
+ if (values != null)
+ {
+ values.add(value) ;
+ }
+ else
+ {
+ final List<String> newValues = new ArrayList<String>() ;
+ newValues.add(value) ;
+ headers.put(normalisedName, newValues) ;
+ }
+ }
+
+ public void setHeader(final String name, final String value)
+ {
+ final List<String> values = new ArrayList<String>() ;
+ values.add(value) ;
+ headers.put(name.toLowerCase(), values) ;
+ }
+
+ public void setStatus(final int status)
+ {
+ this.status = status ;
+ }
+
+ public ServletOutputStream getOutputStream() throws IOException
+ {
+ //if (streamReturned)
+ //{
+ // throw new IOException("Output stream already accessed") ;
+ //}
+ streamReturned = true ;
+ return new SOAPProcessorServletOutputStream(baos) ;
+ }
+
+ public PrintWriter getWriter() throws IOException
+ {
+ //if (streamReturned)
+ //{
+ // throw new IOException("Output stream already accessed") ;
+ //}
+ streamReturned = true ;
+ final String charset = getCharset() ;
+ final OutputStreamWriter osw = (charset != null ? new OutputStreamWriter(baos, charset) : new OutputStreamWriter(baos)) ;
+ return new PrintWriter(new BufferedWriter(osw)) ;
+ }
+
+ public void setContentType(final String contentType)
+ {
+ setHeader("content-type", contentType) ;
+ }
+
+ public int getStatus()
+ {
+ return status ;
+ }
+
+ public Map<String, List<String>> getHeaders()
+ {
+ return headers ;
+ }
+
+ public byte[] getContent()
+ {
+ return baos.toByteArray() ;
+ }
+
+ public String getContentType()
+ {
+ final List<String> values = headers.get("content-type") ;
+ if (values != null)
+ {
+ return values.get(0) ;
+ }
+ return null ;
+ }
+
+ public String getCharset()
+ {
+ final String contentType = getContentType() ;
+ if (contentType != null)
+ {
+ final int index = contentType.indexOf(CHARSET) ;
+ if (index >= 0)
+ {
+ final int beginIndex = index + CHARSET.length() ;
+ if (beginIndex < contentType.length())
+ {
+ final int endIndex = contentType.indexOf(';', beginIndex) ;
+ if (endIndex >= 0)
+ {
+ return contentType.substring(beginIndex, endIndex).trim() ;
+ }
+ else
+ {
+ return contentType.substring(beginIndex).trim();
+ }
+ }
+ }
+ }
+ return null ;
+ }
+
+ public void setCharacterEncoding(final String charset)
+ {
+ final String contentType = getContentType() ;
+ if (contentType != null)
+ {
+ final int charsetIndex = contentType.indexOf(CHARSET) ;
+ if (charsetIndex == -1)
+ {
+ setContentType(contentType + ';' + CHARSET + charset) ;
+ }
+ else
+ {
+ final StringBuilder sb = new StringBuilder() ;
+ sb.append(contentType, 0, charsetIndex) ;
+ sb.append(CHARSET) ;
+ sb.append(charset) ;
+ final int endIndex = contentType.indexOf(';', charsetIndex) ;
+ if (endIndex != -1)
+ {
+ sb.append(contentType, endIndex, contentType.length()) ;
+ }
+ setContentType(sb.toString()) ;
+ }
+ }
+ }
+
+ /*
+ * The following methods are not supported by this adapter.
+ */
+
+ public void addCookie(Cookie arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void addDateHeader(String arg0, long arg1)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void addIntHeader(String arg0, int arg1)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public boolean containsHeader(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String encodeRedirectURL(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String encodeRedirectUrl(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String encodeURL(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String encodeUrl(String arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void sendError(int arg0) throws IOException
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void sendError(int arg0, String arg1) throws IOException
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void sendRedirect(String arg0) throws IOException
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void setDateHeader(String arg0, long arg1)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void setIntHeader(String arg0, int arg1)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void setStatus(int arg0, String arg1)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void flushBuffer() throws IOException
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public int getBufferSize()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public String getCharacterEncoding()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public Locale getLocale()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public boolean isCommitted()
+ {
+ return committed;
+ }
+
+ public void reset()
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void resetBuffer()
+ {
+ baos.reset();
+ }
+
+ public void setBufferSize(int arg0)
+ {
+ }
+
+ public void setContentLength(int arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+
+ public void setLocale(Locale arg0)
+ {
+ throw new UnsupportedOperationException("Not yet supported") ;
+ }
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletInputStream.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletInputStream.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletInputStream.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.http.mock;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.servlet.ServletInputStream;
-
-/**
- * This is an adapter used when integrating with JBossWS.
- *
- * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
- * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
- */
-public class SOAPProcessorServletInputStream extends ServletInputStream
-{
- private final InputStream is ;
-
- SOAPProcessorServletInputStream(final InputStream is)
- {
- this.is = is ;
- }
-
- @Override
- public int read() throws IOException
- {
- return is.read() ;
- }
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletInputStream.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletInputStream.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletInputStream.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletInputStream.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.http.mock;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.servlet.ServletInputStream;
+
+/**
+ * This is an adapter used when integrating with JBossWS.
+ *
+ * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+ * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
+ */
+public class SOAPProcessorServletInputStream extends ServletInputStream
+{
+ private final InputStream is ;
+
+ SOAPProcessorServletInputStream(final InputStream is)
+ {
+ this.is = is ;
+ }
+
+ @Override
+ public int read() throws IOException
+ {
+ return is.read() ;
+ }
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletOutputStream.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletOutputStream.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletOutputStream.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.http.mock;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.servlet.ServletOutputStream;
-
-/**
- * This is an adapter used when integrating with JBossWS.
- *
- * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
- * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
- */
-public class SOAPProcessorServletOutputStream extends ServletOutputStream
-{
- private final OutputStream os ;
-
- SOAPProcessorServletOutputStream(final OutputStream os)
- {
- this.os = os ;
- }
-
- @Override
- public void write(final int byteVal)
- throws IOException
- {
- os.write(byteVal) ;
- }
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletOutputStream.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletOutputStream.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletOutputStream.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/http/mock/SOAPProcessorServletOutputStream.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.http.mock;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.servlet.ServletOutputStream;
+
+/**
+ * This is an adapter used when integrating with JBossWS.
+ *
+ * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+ * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
+ */
+public class SOAPProcessorServletOutputStream extends ServletOutputStream
+{
+ private final OutputStream os ;
+
+ SOAPProcessorServletOutputStream(final OutputStream os)
+ {
+ this.os = os ;
+ }
+
+ @Override
+ public void write(final int byteVal)
+ throws IOException
+ {
+ os.write(byteVal) ;
+ }
+}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry)
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Inquiry.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Inquiry.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Inquiry.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.registry.rmi;
-
-import java.rmi.Remote;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
-* @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
-*/
-public interface Inquiry extends Remote
-{
- Node inquire (Element request) throws java.rmi.RemoteException;
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Inquiry.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Inquiry.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Inquiry.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Inquiry.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.registry.rmi;
+
+import java.rmi.Remote;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+* @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
+*/
+public interface Inquiry extends Remote
+{
+ Node inquire (Element request) throws java.rmi.RemoteException;
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,134 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.registry.rmi;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.xerces.parsers.DOMParser;
-import org.jboss.soa.esb.http.mock.SOAPProcessorHttpServletRequest;
-import org.jboss.soa.esb.http.mock.SOAPProcessorHttpServletResponse;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
-* @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
-*/
-public class InquiryService extends UnicastRemoteObject
- implements Inquiry
-{
- private static final String SOAP_OPEN_TAGS = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
- + "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
- + "<soap:Body>";
-
- private static final String SOAP_CLOSE_TAGS = "</soap:Body>"
- + "</soap:Envelope>";
-
- private static final long serialVersionUID = 1L;
-
- private RegistrationService rs = null;
-
- public RegistrationService getsetRegistrationService() {
- return rs;
- }
-
- public void setRegistrationService(RegistrationService rs) {
- this.rs = rs;
- }
-
- public InquiryService() throws RemoteException {
- super();
- }
-
- private String convertElementToSOAPRequest (Element request)
- throws TransformerConfigurationException, TransformerException {
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer trans = tf.newTransformer();
- StringWriter sw = new StringWriter();
- trans.transform(new DOMSource(request), new StreamResult(sw));
- return new String(SOAP_OPEN_TAGS
- + sw.toString()
- + SOAP_CLOSE_TAGS);
- }
-
- private Node marshalResult(String result) throws SAXException, IOException {
- DOMParser parser = new DOMParser();
- InputStream is = new ByteArrayInputStream(result.getBytes());
- parser.parse(new InputSource(is));
-
- Document document = parser.getDocument();
- Element docelement = document.getDocumentElement();
-
- Node bodyNode = docelement.getFirstChild();
-
- return bodyNode;
- }
-
- public Node inquire(Element request) throws RemoteException {
- SOAPProcessorHttpServletRequest soaprequest = null;
- SOAPProcessorHttpServletResponse soapresponse = null;
-
- try {
- String soaprequeststring = convertElementToSOAPRequest(request);
-
- Map<String, List<String>> headers = new HashMap<String, List<String>>();
-
- soaprequest = new SOAPProcessorHttpServletRequest("/",
- soaprequeststring.getBytes(), headers);
- soapresponse = new SOAPProcessorHttpServletResponse();
- soaprequest.setAttribute("org.apache.catalina.core.DISPATCHER_TYPE", Integer.valueOf(2));
-
- rs.getServletConfig().getServletContext().getRequestDispatcher("/uddi/inquiry").forward(soaprequest,soapresponse);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- Node node = null;
- try {
- String content = new String(soapresponse.getContent());
- if ((content != null) && (!"".equals(content))) {
- node = marshalResult(content);
- }
- } catch (Exception e) {
- e.printStackTrace();
- throw new RemoteException("", e.fillInStackTrace());
- }
- return node;
- }
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/InquiryService.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,134 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.registry.rmi;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.xerces.parsers.DOMParser;
+import org.jboss.soa.esb.http.mock.SOAPProcessorHttpServletRequest;
+import org.jboss.soa.esb.http.mock.SOAPProcessorHttpServletResponse;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+* @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
+*/
+public class InquiryService extends UnicastRemoteObject
+ implements Inquiry
+{
+ private static final String SOAP_OPEN_TAGS = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ + "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+ + "<soap:Body>";
+
+ private static final String SOAP_CLOSE_TAGS = "</soap:Body>"
+ + "</soap:Envelope>";
+
+ private static final long serialVersionUID = 1L;
+
+ private RegistrationService rs = null;
+
+ public RegistrationService getsetRegistrationService() {
+ return rs;
+ }
+
+ public void setRegistrationService(RegistrationService rs) {
+ this.rs = rs;
+ }
+
+ public InquiryService() throws RemoteException {
+ super();
+ }
+
+ private String convertElementToSOAPRequest (Element request)
+ throws TransformerConfigurationException, TransformerException {
+ TransformerFactory tf = TransformerFactory.newInstance();
+ Transformer trans = tf.newTransformer();
+ StringWriter sw = new StringWriter();
+ trans.transform(new DOMSource(request), new StreamResult(sw));
+ return new String(SOAP_OPEN_TAGS
+ + sw.toString()
+ + SOAP_CLOSE_TAGS);
+ }
+
+ private Node marshalResult(String result) throws SAXException, IOException {
+ DOMParser parser = new DOMParser();
+ InputStream is = new ByteArrayInputStream(result.getBytes());
+ parser.parse(new InputSource(is));
+
+ Document document = parser.getDocument();
+ Element docelement = document.getDocumentElement();
+
+ Node bodyNode = docelement.getFirstChild();
+
+ return bodyNode;
+ }
+
+ public Node inquire(Element request) throws RemoteException {
+ SOAPProcessorHttpServletRequest soaprequest = null;
+ SOAPProcessorHttpServletResponse soapresponse = null;
+
+ try {
+ String soaprequeststring = convertElementToSOAPRequest(request);
+
+ Map<String, List<String>> headers = new HashMap<String, List<String>>();
+
+ soaprequest = new SOAPProcessorHttpServletRequest("/",
+ soaprequeststring.getBytes(), headers);
+ soapresponse = new SOAPProcessorHttpServletResponse();
+ soaprequest.setAttribute("org.apache.catalina.core.DISPATCHER_TYPE", Integer.valueOf(2));
+
+ rs.getServletConfig().getServletContext().getRequestDispatcher("/uddi/inquiry").forward(soaprequest,soapresponse);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ Node node = null;
+ try {
+ String content = new String(soapresponse.getContent());
+ if ((content != null) && (!"".equals(content))) {
+ node = marshalResult(content);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RemoteException("", e.fillInStackTrace());
+ }
+ return node;
+ }
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.registry.rmi;
-
-import java.util.Properties;
-
-import javax.naming.InitialContext;
-
-/**
- * @author Tom Cunningham (tcunning at redhat.com)
- */
-public class JNDIRegistration
-{
- public static final String DEFAULT_JAVA_NAMING_FACTORY_INITIAL = "org.jnp.interfaces.NamingContextFactory";
- public static final String DEFAULT_JAVA_NAMING_PROVIDER_URL = "jnp://localhost:1099";
- public static final String DEFAULT_JAVA_NAMING_FACTORY_URL_PKGS = "org.jboss.naming";
-
- public static final String PROPNAME_JAVA_NAMING_FACTORY_INITIAL = "java.naming.factory.initial";
- public static final String PROPNAME_JAVA_NAMING_PROVIDER_URL = "java.naming.provider.url";
- public static final String PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS = "java.naming.factory.url.pkgs";
-
- public static Inquiry inquiryReg = null;
- public static Publish publishReg = null;
-
- public static String INQUIRY_SERVICE="/InquiryService";
- public static String PUBLISH_SERVICE="/PublishService";
-
- public static void register(RegistrationService regService)
- {
- try {
- String factoryInitial = System.getProperty(PROPNAME_JAVA_NAMING_FACTORY_INITIAL);
- String providerURL = System.getProperty(PROPNAME_JAVA_NAMING_PROVIDER_URL);
- String factoryURLPkgs = System.getProperty(PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS);
-
- if (factoryInitial == null) {
- factoryInitial = DEFAULT_JAVA_NAMING_FACTORY_INITIAL;
- }
- if (providerURL == null) {
- providerURL = DEFAULT_JAVA_NAMING_PROVIDER_URL;
- }
-
- if (factoryURLPkgs == null) {
- factoryURLPkgs = DEFAULT_JAVA_NAMING_FACTORY_URL_PKGS;
- }
-
- Properties env = new Properties();
- env.setProperty(PROPNAME_JAVA_NAMING_FACTORY_INITIAL, factoryInitial);
- env.setProperty(PROPNAME_JAVA_NAMING_PROVIDER_URL, providerURL);
- env.setProperty(PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS, factoryURLPkgs);
-
- InitialContext context = new InitialContext(env);
- Inquiry inquiry = new InquiryService();
-
- ((InquiryService)inquiry).setRegistrationService(regService);
- inquiryReg = inquiry;
- context.rebind(INQUIRY_SERVICE, inquiry);
- Publish publish = new PublishService();
- ((PublishService)publish).setRegistrationService(regService);
-
- publishReg = publish;
- context.rebind(PUBLISH_SERVICE, publish);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/JNDIRegistration.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.registry.rmi;
+
+import java.util.Properties;
+
+import javax.naming.InitialContext;
+
+/**
+ * @author Tom Cunningham (tcunning at redhat.com)
+ */
+public class JNDIRegistration
+{
+ public static final String DEFAULT_JAVA_NAMING_FACTORY_INITIAL = "org.jnp.interfaces.NamingContextFactory";
+ public static final String DEFAULT_JAVA_NAMING_PROVIDER_URL = "jnp://localhost:1099";
+ public static final String DEFAULT_JAVA_NAMING_FACTORY_URL_PKGS = "org.jboss.naming";
+
+ public static final String PROPNAME_JAVA_NAMING_FACTORY_INITIAL = "java.naming.factory.initial";
+ public static final String PROPNAME_JAVA_NAMING_PROVIDER_URL = "java.naming.provider.url";
+ public static final String PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS = "java.naming.factory.url.pkgs";
+
+ public static Inquiry inquiryReg = null;
+ public static Publish publishReg = null;
+
+ public static String INQUIRY_SERVICE="/InquiryService";
+ public static String PUBLISH_SERVICE="/PublishService";
+
+ public static void register(RegistrationService regService)
+ {
+ try {
+ String factoryInitial = System.getProperty(PROPNAME_JAVA_NAMING_FACTORY_INITIAL);
+ String providerURL = System.getProperty(PROPNAME_JAVA_NAMING_PROVIDER_URL);
+ String factoryURLPkgs = System.getProperty(PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS);
+
+ if (factoryInitial == null) {
+ factoryInitial = DEFAULT_JAVA_NAMING_FACTORY_INITIAL;
+ }
+ if (providerURL == null) {
+ providerURL = DEFAULT_JAVA_NAMING_PROVIDER_URL;
+ }
+
+ if (factoryURLPkgs == null) {
+ factoryURLPkgs = DEFAULT_JAVA_NAMING_FACTORY_URL_PKGS;
+ }
+
+ Properties env = new Properties();
+ env.setProperty(PROPNAME_JAVA_NAMING_FACTORY_INITIAL, factoryInitial);
+ env.setProperty(PROPNAME_JAVA_NAMING_PROVIDER_URL, providerURL);
+ env.setProperty(PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS, factoryURLPkgs);
+
+ InitialContext context = new InitialContext(env);
+ Inquiry inquiry = new InquiryService();
+
+ ((InquiryService)inquiry).setRegistrationService(regService);
+ inquiryReg = inquiry;
+ context.rebind(INQUIRY_SERVICE, inquiry);
+ Publish publish = new PublishService();
+ ((PublishService)publish).setRegistrationService(regService);
+
+ publishReg = publish;
+ context.rebind(PUBLISH_SERVICE, publish);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Publish.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Publish.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Publish.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,14 +0,0 @@
-package org.jboss.soa.esb.registry.rmi;
-
-import java.rmi.Remote;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
-* @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
-*/
-public interface Publish extends Remote
-{
- Node publish (Element request) throws java.rmi.RemoteException;
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Publish.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Publish.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Publish.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/Publish.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,14 @@
+package org.jboss.soa.esb.registry.rmi;
+
+import java.rmi.Remote;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+* @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
+*/
+public interface Publish extends Remote
+{
+ Node publish (Element request) throws java.rmi.RemoteException;
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,133 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.registry.rmi;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.xerces.parsers.DOMParser;
-import org.jboss.soa.esb.http.mock.SOAPProcessorHttpServletRequest;
-import org.jboss.soa.esb.http.mock.SOAPProcessorHttpServletResponse;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
-* @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
-*/
-public class PublishService extends UnicastRemoteObject
- implements Publish
-{
- private static final String SOAP_OPEN_TAGS = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
- + "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
- + "<soap:Body>";
-
- private static final String SOAP_CLOSE_TAGS = "</soap:Body>"
- + "</soap:Envelope>";
-
- private static final long serialVersionUID = 1L;
-
- private RegistrationService rs = null;
-
- public RegistrationService getsetRegistrationService() {
- return rs;
- }
-
- public void setRegistrationService(RegistrationService rs) {
- this.rs = rs;
- }
-
- public PublishService() throws RemoteException {
- super();
- }
-
- private String convertElementToSOAPRequest (Element request)
- throws TransformerConfigurationException, TransformerException {
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer trans = tf.newTransformer();
- StringWriter sw = new StringWriter();
- trans.transform(new DOMSource(request), new StreamResult(sw));
- return new String(SOAP_OPEN_TAGS
- + sw.toString()
- + SOAP_CLOSE_TAGS);
- }
-
- private Node marshalResult(String result) throws SAXException, IOException {
- DOMParser parser = new DOMParser();
- InputStream is = new ByteArrayInputStream(result.getBytes());
- parser.parse(new InputSource(is));
-
- Document document = parser.getDocument();
- Element docelement = document.getDocumentElement();
- Node bodyNode = docelement.getFirstChild();
-
- return bodyNode;
- }
-
- public Node publish(Element request) throws RemoteException {
- SOAPProcessorHttpServletRequest soaprequest = null;
- SOAPProcessorHttpServletResponse soapresponse = null;
-
- try {
- String soaprequeststring = convertElementToSOAPRequest(request);
-
- Map<String, List<String>> headers = new HashMap<String, List<String>>();
-
- soaprequest = new SOAPProcessorHttpServletRequest("/",
- soaprequeststring.getBytes(), headers);
- soapresponse = new SOAPProcessorHttpServletResponse();
- soaprequest.setAttribute("org.apache.catalina.core.DISPATCHER_TYPE", Integer.valueOf(2));
-
- rs.getServletConfig().getServletContext().getRequestDispatcher("/uddi/publishing").forward(soaprequest,soapresponse);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- Node node = null;
- try {
- String content = new String(soapresponse.getContent());
- if ((content != null) && (!"".equals(content))) {
- node = marshalResult(content);
- }
- } catch (Exception e) {
- e.printStackTrace();
- throw new RemoteException("", e.fillInStackTrace());
- }
- return node;
- }
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/PublishService.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.registry.rmi;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.rmi.RemoteException;
+import java.rmi.server.UnicastRemoteObject;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.xerces.parsers.DOMParser;
+import org.jboss.soa.esb.http.mock.SOAPProcessorHttpServletRequest;
+import org.jboss.soa.esb.http.mock.SOAPProcessorHttpServletResponse;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+* @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
+*/
+public class PublishService extends UnicastRemoteObject
+ implements Publish
+{
+ private static final String SOAP_OPEN_TAGS = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ + "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+ + "<soap:Body>";
+
+ private static final String SOAP_CLOSE_TAGS = "</soap:Body>"
+ + "</soap:Envelope>";
+
+ private static final long serialVersionUID = 1L;
+
+ private RegistrationService rs = null;
+
+ public RegistrationService getsetRegistrationService() {
+ return rs;
+ }
+
+ public void setRegistrationService(RegistrationService rs) {
+ this.rs = rs;
+ }
+
+ public PublishService() throws RemoteException {
+ super();
+ }
+
+ private String convertElementToSOAPRequest (Element request)
+ throws TransformerConfigurationException, TransformerException {
+ TransformerFactory tf = TransformerFactory.newInstance();
+ Transformer trans = tf.newTransformer();
+ StringWriter sw = new StringWriter();
+ trans.transform(new DOMSource(request), new StreamResult(sw));
+ return new String(SOAP_OPEN_TAGS
+ + sw.toString()
+ + SOAP_CLOSE_TAGS);
+ }
+
+ private Node marshalResult(String result) throws SAXException, IOException {
+ DOMParser parser = new DOMParser();
+ InputStream is = new ByteArrayInputStream(result.getBytes());
+ parser.parse(new InputSource(is));
+
+ Document document = parser.getDocument();
+ Element docelement = document.getDocumentElement();
+ Node bodyNode = docelement.getFirstChild();
+
+ return bodyNode;
+ }
+
+ public Node publish(Element request) throws RemoteException {
+ SOAPProcessorHttpServletRequest soaprequest = null;
+ SOAPProcessorHttpServletResponse soapresponse = null;
+
+ try {
+ String soaprequeststring = convertElementToSOAPRequest(request);
+
+ Map<String, List<String>> headers = new HashMap<String, List<String>>();
+
+ soaprequest = new SOAPProcessorHttpServletRequest("/",
+ soaprequeststring.getBytes(), headers);
+ soapresponse = new SOAPProcessorHttpServletResponse();
+ soaprequest.setAttribute("org.apache.catalina.core.DISPATCHER_TYPE", Integer.valueOf(2));
+
+ rs.getServletConfig().getServletContext().getRequestDispatcher("/uddi/publishing").forward(soaprequest,soapresponse);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ Node node = null;
+ try {
+ String content = new String(soapresponse.getContent());
+ if ((content != null) && (!"".equals(content))) {
+ node = marshalResult(content);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RemoteException("", e.fillInStackTrace());
+ }
+ return node;
+ }
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.soa.esb.registry.rmi;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-
-/**
- * @author Tom Cunningham (tcunning at redhat.com)
- */
-public class RegistrationService extends HttpServlet
-{
- public static Inquiry mInquery=null;
- public static Publish mPublish=null;
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- public void init() throws ServletException
- {
- super.init();
- JNDIRegistration.register(this);
- }
-
-}
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RegistrationService.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.soa.esb.registry.rmi;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+
+/**
+ * @author Tom Cunningham (tcunning at redhat.com)
+ */
+public class RegistrationService extends HttpServlet
+{
+ public static Inquiry mInquery=null;
+ public static Publish mPublish=null;
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ public void init() throws ServletException
+ {
+ super.init();
+ JNDIRegistration.register(this);
+ }
+
+}
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,148 +0,0 @@
-package org.jboss.soa.esb.registry.rmi;
-
-// Copyright (C) 1998 by Jason Hunter <jhunter at acm.org>. All rights reserved.
-// Use of this class is limited. Please see the LICENSE for more information.
-
-import java.io.*;
-import java.net.*;
-import java.rmi.*;
-import java.rmi.server.*;
-import java.rmi.registry.*;
-import java.util.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
-
-
-/**
- * A superclass for any HTTP servlet that wishes to act as an RMI server.
- * RemoteHttpServlet begins listening for RMI calls in its
- * <tt>init()</tt> method and stops listening in its <tt>destroy()</tt>
- * method. To register itself it uses the registry on the local machine
- * on the port determined by <tt>getRegistryPort()</tt>. It registers
- * under the name determined by <tt>getRegistryName()</tt>.
- *
- * @see com.oreilly.servlet.RemoteDaemonHttpServlet
- *
- * @author <b>Jason Hunter</b>, Copyright © 1998
- * @version 1.0, 98/09/18
- */
-public abstract class RemoteHttpServlet extends HttpServlet
- implements Remote {
- /**
- * The registry for the servlet
- */
- protected Registry registry;
-
- /**
- * Begins the servlet's RMI operations. Causes the servlet to export
- * itself and then bind itself to the registry. Logs any errors.
- * Subclasses that override this method must be sure to first call
- * <tt>super.init(config)</tt>.
- *
- * @param config the servlet config
- * @exception ServletException if a servlet exception occurs
- */
- public void init(ServletConfig config) throws ServletException {
- super.init(config);
- try {
- UnicastRemoteObject.exportObject(this);
- bind();
- }
- catch (RemoteException e) {
- log("Problem binding to RMI registry: " + e.getMessage());
- }
- }
-
- /**
- * Halts the servlet's RMI operations. Causes the servlet to
- * unbind itself from the registry. Logs any errors. Subclasses that
- * override this method must be sure to first call <tt>super.destroy()</tt>.
- */
- public void destroy() {
- unbind();
- }
-
- /**
- * Returns the name under which the servlet should be bound in the
- * registry. By default the name is the servlet's class name. This
- * can be overridden with the <tt>registryName</tt> init parameter.
- *
- * @return the name under which the servlet should be bound in the registry
- */
- protected String getRegistryName() {
- // First name choice is the "registryName" init parameter
- String name = getInitParameter("registryName");
- if (name != null) return name;
-
- // Fallback choice is the name of this class
- return this.getClass().getName();
- }
-
- /**
- * Returns the port where the registry should be running. By default
- * the port is the default registry port (1099). This can be
- * overridden with the <tt>registryPort</tt> init parameter.
- *
- * @return the port for the registry
- */
- protected int getRegistryPort() {
- // First port choice is the "registryPort" init parameter
- try { return Integer.parseInt(getInitParameter("registryPort")); }
-
- // Fallback choice is the default registry port (1099)
- catch (NumberFormatException e) { return Registry.REGISTRY_PORT; }
- }
-
- /**
- * Binds the servlet to the registry. Creates the registry if necessary.
- * Logs any errors.
- */
- protected void bind() {
- // Try to find the appropriate registry already running
- try {
- registry = LocateRegistry.getRegistry(getRegistryPort());
- registry.list(); // Verify it's alive and well
- }
- catch (Exception e) {
- // Couldn't get a valid registry
- registry = null;
- }
-
- // If we couldn't find it, we need to create it.
- // (Equivalent to running "rmiregistry")
- if (registry == null) {
- try {
- registry = LocateRegistry.createRegistry(getRegistryPort());
- }
- catch (Exception e) {
- log("Could not get or create RMI registry on port " +
- getRegistryPort() + ": " + e.getMessage());
- return;
- }
- }
-
- // If we get here, we must have a valid registry.
- // Now register this servlet instance with that registry.
- try {
- registry.rebind(getRegistryName(), this);
- }
- catch (Exception e) {
- log("Could not bind to RMI registry: " + e.getMessage());
- return;
- }
- }
-
- /**
- * Unbinds the servlet from the registry.
- * Logs any errors.
- */
- protected void unbind() {
- try {
- if (registry != null) registry.unbind(getRegistryName());
- }
- catch (Exception e) {
- log("Problem unbinding from RMI registry: " + e.getMessage());
- }
- }
-}
-
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/java/org/jboss/soa/esb/registry/rmi/RemoteHttpServlet.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,148 @@
+package org.jboss.soa.esb.registry.rmi;
+
+// Copyright (C) 1998 by Jason Hunter <jhunter at acm.org>. All rights reserved.
+// Use of this class is limited. Please see the LICENSE for more information.
+
+import java.io.*;
+import java.net.*;
+import java.rmi.*;
+import java.rmi.server.*;
+import java.rmi.registry.*;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+
+
+/**
+ * A superclass for any HTTP servlet that wishes to act as an RMI server.
+ * RemoteHttpServlet begins listening for RMI calls in its
+ * <tt>init()</tt> method and stops listening in its <tt>destroy()</tt>
+ * method. To register itself it uses the registry on the local machine
+ * on the port determined by <tt>getRegistryPort()</tt>. It registers
+ * under the name determined by <tt>getRegistryName()</tt>.
+ *
+ * @see com.oreilly.servlet.RemoteDaemonHttpServlet
+ *
+ * @author <b>Jason Hunter</b>, Copyright © 1998
+ * @version 1.0, 98/09/18
+ */
+public abstract class RemoteHttpServlet extends HttpServlet
+ implements Remote {
+ /**
+ * The registry for the servlet
+ */
+ protected Registry registry;
+
+ /**
+ * Begins the servlet's RMI operations. Causes the servlet to export
+ * itself and then bind itself to the registry. Logs any errors.
+ * Subclasses that override this method must be sure to first call
+ * <tt>super.init(config)</tt>.
+ *
+ * @param config the servlet config
+ * @exception ServletException if a servlet exception occurs
+ */
+ public void init(ServletConfig config) throws ServletException {
+ super.init(config);
+ try {
+ UnicastRemoteObject.exportObject(this);
+ bind();
+ }
+ catch (RemoteException e) {
+ log("Problem binding to RMI registry: " + e.getMessage());
+ }
+ }
+
+ /**
+ * Halts the servlet's RMI operations. Causes the servlet to
+ * unbind itself from the registry. Logs any errors. Subclasses that
+ * override this method must be sure to first call <tt>super.destroy()</tt>.
+ */
+ public void destroy() {
+ unbind();
+ }
+
+ /**
+ * Returns the name under which the servlet should be bound in the
+ * registry. By default the name is the servlet's class name. This
+ * can be overridden with the <tt>registryName</tt> init parameter.
+ *
+ * @return the name under which the servlet should be bound in the registry
+ */
+ protected String getRegistryName() {
+ // First name choice is the "registryName" init parameter
+ String name = getInitParameter("registryName");
+ if (name != null) return name;
+
+ // Fallback choice is the name of this class
+ return this.getClass().getName();
+ }
+
+ /**
+ * Returns the port where the registry should be running. By default
+ * the port is the default registry port (1099). This can be
+ * overridden with the <tt>registryPort</tt> init parameter.
+ *
+ * @return the port for the registry
+ */
+ protected int getRegistryPort() {
+ // First port choice is the "registryPort" init parameter
+ try { return Integer.parseInt(getInitParameter("registryPort")); }
+
+ // Fallback choice is the default registry port (1099)
+ catch (NumberFormatException e) { return Registry.REGISTRY_PORT; }
+ }
+
+ /**
+ * Binds the servlet to the registry. Creates the registry if necessary.
+ * Logs any errors.
+ */
+ protected void bind() {
+ // Try to find the appropriate registry already running
+ try {
+ registry = LocateRegistry.getRegistry(getRegistryPort());
+ registry.list(); // Verify it's alive and well
+ }
+ catch (Exception e) {
+ // Couldn't get a valid registry
+ registry = null;
+ }
+
+ // If we couldn't find it, we need to create it.
+ // (Equivalent to running "rmiregistry")
+ if (registry == null) {
+ try {
+ registry = LocateRegistry.createRegistry(getRegistryPort());
+ }
+ catch (Exception e) {
+ log("Could not get or create RMI registry on port " +
+ getRegistryPort() + ": " + e.getMessage());
+ return;
+ }
+ }
+
+ // If we get here, we must have a valid registry.
+ // Now register this servlet instance with that registry.
+ try {
+ registry.rebind(getRegistryName(), this);
+ }
+ catch (Exception e) {
+ log("Could not bind to RMI registry: " + e.getMessage());
+ return;
+ }
+ }
+
+ /**
+ * Unbinds the servlet from the registry.
+ * Logs any errors.
+ */
+ protected void unbind() {
+ try {
+ if (registry != null) registry.unbind(getRegistryName());
+ }
+ catch (Exception e) {
+ log("Problem unbinding from RMI registry: " + e.getMessage());
+ }
+ }
+}
+
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/src/main/resources (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/src/main/resources)
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/systinet.properties 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,2 +0,0 @@
-systinet.reg.dir=/opt/hp/registry
-jboss.home.dir=/home/tcunning/jboss-4.2.2.GA
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/systinet.properties)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/systinet.properties 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,2 @@
+systinet.reg.dir=/opt/hp/registry
+jboss.home.dir=/home/tcunning/jboss-4.2.2.GA
Deleted: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/taxonomy.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/taxonomy.xml 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/taxonomy.xml 2009-08-05 12:02:24 UTC (rev 28834)
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<taxonomy check="true" brief="false" xmlns="http://systinet.com/uddi/taxonomy/v3/5.5">
- <tModel tModelKey="uddi:org.jboss-org:jbossesb:category" deleted="false" tModelKeyV2="uuid:2a37a8d0-61b1-11de-99ab-d9552d7099aa" xmlns="http://systinet.com/uddi/taxonomy/v3/5.0">
- <name xmlns="urn:uddi-org:api_v3">org.jboss.soa.esb.:category</name>
- <description xmlns="urn:uddi-org:api_v3">org.jboss.soa.esb.:category</description>
- <overviewDoc xmlns="urn:uddi-org:api_v3">
- <overviewURL>http://uddi.org/pubs/uddi_v3.htm#GenKW</overviewURL>
- </overviewDoc>
- <categoryBag xmlns="urn:uddi-org:api_v3">
- <keyedReference tModelKey="uddi:uddi.org:categorization:types" keyName="Categorization system" keyValue="categorization"/>
- <keyedReference tModelKey="uddi:systinet.com:taxonomy:compatibility" keyName="Compatibility" keyValue="tModel"/>
- <keyedReference tModelKey="uddi:systinet.com:taxonomy:compatibility" keyName="Compatibility" keyValue="businessEntity"/>
- <keyedReference tModelKey="uddi:systinet.com:taxonomy:compatibility" keyName="Compatibility" keyValue="businessService"/>
- <keyedReference tModelKey="uddi:systinet.com:taxonomy:compatibility" keyName="Compatibility" keyValue="bindingTemplate"/>
- <keyedReference tModelKey="uddi:uddi.org:categorization:types" keyName="Checked value set" keyValue="checked"/>
- <keyedReference tModelKey="uddi:uddi.org:categorization:validatedby" keyName="" keyValue="uddi:86aca040-c380-11d8-b05c-7c163510b05c"/>
- </categoryBag>
- </tModel>
- <compatibilityBag xmlns="http://systinet.com/uddi/taxonomy/v3/5.0">
- <compatibility>tModel</compatibility>
- <compatibility>businessEntity</compatibility>
- <compatibility>businessService</compatibility>
- <compatibility>bindingTemplate</compatibility>
- </compatibilityBag>
- <categorizationBag xmlns="http://systinet.com/uddi/taxonomy/v3/5.0">
- <categorization>categorization</categorization>
- </categorizationBag>
- <validation xmlns="http://systinet.com/uddi/taxonomy/v3/5.0">
- <bindingTemplate bindingKey="uddi:86ae9c10-c380-11d8-b05c-7c163510b05c" serviceKey="uddi:86abb5e0-c380-11d8-b05c-7c163510b05c" xmlns="urn:uddi-org:api_v3">
- <accessPoint useType="endPoint">class:com.systinet.uddi.publishing.v1.validation.service.GeneralKeywordsValidator</accessPoint>
- <tModelInstanceDetails>
- <tModelInstanceInfo tModelKey="uddi:systinet.com:v1_validateValues"/>
- <tModelInstanceInfo tModelKey="uddi:uddi.org:categorization:general_keywords"/>
- </tModelInstanceDetails>
- </bindingTemplate>
- <bindingTemplate bindingKey="uddi:86adffd0-c380-11d8-b05c-7c163510b05c" serviceKey="uddi:86abb5e0-c380-11d8-b05c-7c163510b05c" xmlns="urn:uddi-org:api_v3">
- <accessPoint useType="endPoint">class:com.systinet.uddi.publishing.v2.validation.service.GeneralKeywordsValidator</accessPoint>
- <tModelInstanceDetails>
- <tModelInstanceInfo tModelKey="uddi:systinet.com:v2_validateValues"/>
- <tModelInstanceInfo tModelKey="uddi:uddi.org:categorization:general_keywords"/>
- </tModelInstanceDetails>
- </bindingTemplate>
- <bindingTemplate bindingKey="uddi:86aca040-c380-11d8-b05c-7c163510b05c" serviceKey="uddi:86abb5e0-c380-11d8-b05c-7c163510b05c" xmlns="urn:uddi-org:api_v3">
- <accessPoint useType="endPoint">class:com.systinet.uddi.publishing.v3.validation.service.GeneralKeywordsValidator</accessPoint>
- <tModelInstanceDetails>
- <tModelInstanceInfo tModelKey="uddi:uddi.org:v3_valueSetValidation"/>
- <tModelInstanceInfo tModelKey="uddi:uddi.org:categorization:general_keywords"/>
- </tModelInstanceDetails>
- </bindingTemplate>
- </validation>
-</taxonomy>
Copied: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/taxonomy.xml (from rev 28833, labs/jbossesb/tags/JBESB_4_4_GA_CP3_CR6/product/tools/systinet/taxonomy.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/taxonomy.xml (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/product/tools/systinet/taxonomy.xml 2009-08-05 12:02:24 UTC (rev 28834)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<taxonomy check="true" brief="false" xmlns="http://systinet.com/uddi/taxonomy/v3/5.5">
+ <tModel tModelKey="uddi:org.jboss-org:jbossesb:category" deleted="false" tModelKeyV2="uuid:2a37a8d0-61b1-11de-99ab-d9552d7099aa" xmlns="http://systinet.com/uddi/taxonomy/v3/5.0">
+ <name xmlns="urn:uddi-org:api_v3">org.jboss.soa.esb.:category</name>
+ <description xmlns="urn:uddi-org:api_v3">org.jboss.soa.esb.:category</description>
+ <overviewDoc xmlns="urn:uddi-org:api_v3">
+ <overviewURL>http://uddi.org/pubs/uddi_v3.htm#GenKW</overviewURL>
+ </overviewDoc>
+ <categoryBag xmlns="urn:uddi-org:api_v3">
+ <keyedReference tModelKey="uddi:uddi.org:categorization:types" keyName="Categorization system" keyValue="categorization"/>
+ <keyedReference tModelKey="uddi:systinet.com:taxonomy:compatibility" keyName="Compatibility" keyValue="tModel"/>
+ <keyedReference tModelKey="uddi:systinet.com:taxonomy:compatibility" keyName="Compatibility" keyValue="businessEntity"/>
+ <keyedReference tModelKey="uddi:systinet.com:taxonomy:compatibility" keyName="Compatibility" keyValue="businessService"/>
+ <keyedReference tModelKey="uddi:systinet.com:taxonomy:compatibility" keyName="Compatibility" keyValue="bindingTemplate"/>
+ <keyedReference tModelKey="uddi:uddi.org:categorization:types" keyName="Checked value set" keyValue="checked"/>
+ <keyedReference tModelKey="uddi:uddi.org:categorization:validatedby" keyName="" keyValue="uddi:86aca040-c380-11d8-b05c-7c163510b05c"/>
+ </categoryBag>
+ </tModel>
+ <compatibilityBag xmlns="http://systinet.com/uddi/taxonomy/v3/5.0">
+ <compatibility>tModel</compatibility>
+ <compatibility>businessEntity</compatibility>
+ <compatibility>businessService</compatibility>
+ <compatibility>bindingTemplate</compatibility>
+ </compatibilityBag>
+ <categorizationBag xmlns="http://systinet.com/uddi/taxonomy/v3/5.0">
+ <categorization>categorization</categorization>
+ </categorizationBag>
+ <validation xmlns="http://systinet.com/uddi/taxonomy/v3/5.0">
+ <bindingTemplate bindingKey="uddi:86ae9c10-c380-11d8-b05c-7c163510b05c" serviceKey="uddi:86abb5e0-c380-11d8-b05c-7c163510b05c" xmlns="urn:uddi-org:api_v3">
+ <accessPoint useType="endPoint">class:com.systinet.uddi.publishing.v1.validation.service.GeneralKeywordsValidator</accessPoint>
+ <tModelInstanceDetails>
+ <tModelInstanceInfo tModelKey="uddi:systinet.com:v1_validateValues"/>
+ <tModelInstanceInfo tModelKey="uddi:uddi.org:categorization:general_keywords"/>
+ </tModelInstanceDetails>
+ </bindingTemplate>
+ <bindingTemplate bindingKey="uddi:86adffd0-c380-11d8-b05c-7c163510b05c" serviceKey="uddi:86abb5e0-c380-11d8-b05c-7c163510b05c" xmlns="urn:uddi-org:api_v3">
+ <accessPoint useType="endPoint">class:com.systinet.uddi.publishing.v2.validation.service.GeneralKeywordsValidator</accessPoint>
+ <tModelInstanceDetails>
+ <tModelInstanceInfo tModelKey="uddi:systinet.com:v2_validateValues"/>
+ <tModelInstanceInfo tModelKey="uddi:uddi.org:categorization:general_keywords"/>
+ </tModelInstanceDetails>
+ </bindingTemplate>
+ <bindingTemplate bindingKey="uddi:86aca040-c380-11d8-b05c-7c163510b05c" serviceKey="uddi:86abb5e0-c380-11d8-b05c-7c163510b05c" xmlns="urn:uddi-org:api_v3">
+ <accessPoint useType="endPoint">class:com.systinet.uddi.publishing.v3.validation.service.GeneralKeywordsValidator</accessPoint>
+ <tModelInstanceDetails>
+ <tModelInstanceInfo tModelKey="uddi:uddi.org:v3_valueSetValidation"/>
+ <tModelInstanceInfo tModelKey="uddi:uddi.org:categorization:general_keywords"/>
+ </tModelInstanceDetails>
+ </bindingTemplate>
+ </validation>
+</taxonomy>
Modified: labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java 2009-08-05 11:47:31 UTC (rev 28833)
+++ labs/jbossesb/workspace/platform/JBESB_4_4_SOA_4_3_GA/qa/junit/src/org/jboss/soa/esb/server/aop/AOPServer.java 2009-08-05 12:02:24 UTC (rev 28834)
@@ -21,6 +21,7 @@
import java.io.PrintWriter;
import java.io.StringWriter;
+import java.lang.reflect.Field;
import java.util.Collection;
import java.util.List;
@@ -36,6 +37,7 @@
import javax.xml.registry.infomodel.Service;
import javax.xml.registry.infomodel.ServiceBinding;
+import org.apache.ws.scout.registry.infomodel.ServiceImpl;
import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
import org.jboss.internal.soa.esb.services.registry.JAXRConnectionFactory;
import org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl;
@@ -193,18 +195,56 @@
return "could not find service bindings for DeadLetterService" ;
}
- for(ServiceBinding serviceBinding: serviceBindings)
+ final Class<ServiceImpl> serviceImplClass = ServiceImpl.class ;
+ final Field field ;
+ try
{
- final Service bindingService = serviceBinding.getService() ;
- if (bindingService == null)
+ field = serviceImplClass.getDeclaredField("org") ;
+ }
+ catch (final NoSuchFieldException nsfe)
+ {
+ return "Could not locate org field" ;
+ }
+ field.setAccessible(true) ;
+ try
+ {
+ for(ServiceBinding serviceBinding: serviceBindings)
{
- return "Could not find service associated with binding" ;
+ final Service bindingService = serviceBinding.getService() ;
+ if (bindingService == null)
+ {
+ return "Could not find service associated with binding" ;
+ }
+ if (bindingService.getSubmittingOrganization() != null)
+ {
+ return "FAILED: Submitting organization is present in service binding" ;
+ }
+ if (!(bindingService instanceof ServiceImpl))
+ {
+ return "Binding service is not a ServiceImpl, need to change the test" ;
+ }
+ final ServiceImpl serviceImpl = (ServiceImpl)bindingService ;
+ if (serviceImpl.getSubmittingOrganizationKey() == null)
+ {
+ return "FAILED: Submitting organization key is not present in service binding" ;
+ }
+ try
+ {
+ if (field.get(serviceImpl) != null)
+ {
+ return "FAILED: Organization is present in service binding" ;
+ }
+ }
+ catch (final IllegalAccessException iae)
+ {
+ return "FAILED: Could not access org field in current service" ;
+ }
}
- if (bindingService.getProvidingOrganization() != null)
- {
- return "FAILED: Organization is present in service binding" ;
- }
}
+ finally
+ {
+ field.setAccessible(false) ;
+ }
return null ;
}
@@ -240,26 +280,48 @@
return "Failed to obtain service as registry object" ;
}
- final Organization organization = registryService.getProvidingOrganization() ;
- if (organization == null)
+ if (registryService.getSubmittingOrganization() != null)
{
- return "No Organization returned with service" ;
+ return "FAILED: Submitting organization is present in service binding" ;
}
-
- if (organization.getKey() == null)
+ if (!(registryService instanceof ServiceImpl))
{
- return "Organization key not populated" ;
+ return "Binding service is not a ServiceImpl, need to change the test" ;
}
+ final ServiceImpl serviceImpl = (ServiceImpl)registryService ;
+ if (serviceImpl.getSubmittingOrganizationKey() == null)
+ {
+ return "FAILED: Submitting organization key is not present in service binding" ;
+ }
- final InternationalString name = organization.getName();
- if (name != null)
+ final Field field ;
+ try
{
- final Collection localizedStrings = name.getLocalizedStrings();
- if ((localizedStrings != null) && (localizedStrings.size() > 0))
+ field = serviceImpl.getClass().getDeclaredField("org") ;
+ }
+ catch (final NoSuchFieldException nsfe)
+ {
+ return "Could not locate org field" ;
+ }
+ field.setAccessible(true) ;
+ try
+ {
+ try
{
- return "Organization returned from database rather than aspect" ;
+ if (field.get(serviceImpl) != null)
+ {
+ return "FAILED: Organization is present in service binding" ;
+ }
}
+ catch (final IllegalAccessException iae)
+ {
+ return "FAILED: Could not access org field in current service" ;
+ }
}
+ finally
+ {
+ field.setAccessible(false) ;
+ }
return null ;
}
More information about the jboss-svn-commits
mailing list