[jboss-svn-commits] JBL Code SVN: r16644 - in labs/jbossesb/branches/JBESB_4_2_1_GA_CP: product and 7 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Nov 16 09:03:19 EST 2007
Author: tfennelly
Date: 2007-11-16 09:03:19 -0500 (Fri, 16 Nov 2007)
New Revision: 16644
Removed:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/jaxb.xslt
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/jbossws/
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/wsf/
Modified:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/build.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/webservice_producer/jboss-esb.xml
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/webservice_producer/src/org/jboss/soa/esb/samples/quickstart/webserviceproducer/test/SendMessage.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/lib/ext/build-time/jbossws-core.jar
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/lib/ext/build-time/jbossws-jboss42.jar
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/lib/ext/build-time/jbossws-spi.jar
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPProcessor.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
Log:
http://jira.jboss.com/jira/browse/JBESB-1336
Property changes on: labs/jbossesb/branches/JBESB_4_2_1_GA_CP
___________________________________________________________________
Name: svn:ignore
- .settings
.classpath
.project
bin
.packaging
build
junit
ObjectToFileWriter.tst
null
classes
+ .settings
.classpath
.project
bin
.packaging
build
junit
ObjectToFileWriter.tst
null
classes
ESB.ipr
ESB.iws
runci.bat
Property changes on: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product
___________________________________________________________________
Name: svn:ignore
- build
deployment.properties
javadocs
*.bat
ObjectToFileWriter.tst
*.log
test-outdir
foobar
res
skip.properties
+ build
deployment.properties
javadocs
*.bat
ObjectToFileWriter.tst
*.log
test-outdir
foobar
res
skip.properties
product.iml
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/build.xml 2007-11-16 13:18:58 UTC (rev 16643)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/build.xml 2007-11-16 14:03:19 UTC (rev 16644)
@@ -237,7 +237,9 @@
</target>
<target name="patch-jbossws" depends="check.deploy.props, dependencies" description="Deploys JAXB Intros to the application server">
- <property name="jbossws.location" location="${deploy.dir}/jbossws.sar"/>
+ <echo message="***** DEPRECATED: Patch no longer required!" />
+ <!--
+ <property name="jbossws.location" location="${deploy.dir}/jbossws.sar"/>
<property name="jbossws.beans.location" location="${jbossws.location}/jbossws.beans/META-INF/jboss-beans.xml"/>
<property name="jbossws.beans.tmp.location" location="${jbossws.location}/jbossws.beans/META-INF/jboss-beans.new.xml"/>
@@ -254,6 +256,7 @@
</copy>
<antcall target="apply-jbossws-xslt" />
+ -->
</target>
<target name="apply-jbossws-xslt" unless="jaxb.intros.exist">
Deleted: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/jaxb.xslt
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/jaxb.xslt 2007-11-16 13:18:58 UTC (rev 16643)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/install/jaxb.xslt 2007-11-16 14:03:19 UTC (rev 16644)
@@ -1,43 +0,0 @@
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:deployer="urn:jboss:bean-deployer">
- <xsl:output method="xml" encoding="UTF-8"/>
-
- <xsl:template match="deployer:deployment/deployer:bean[1]">
- <xsl:element name="bean" namespace="urn:jboss:bean-deployer">
- <xsl:attribute name="name">WSEndpointJAXBIntrosCustomizationsDeployer</xsl:attribute>
- <xsl:attribute name="class">org.jboss.wsf.spi.deployment.JAXBIntrosCustomizationsDeployer</xsl:attribute>
- </xsl:element>
- <xsl:comment>ESB Customization Deployer</xsl:comment>
- <xsl:text>
- </xsl:text>
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="deployer:bean[@name='WSMainDeployerManager']/deployer:property[@name='deployers']//deployer:inject[@bean='WSEndpointHandlerDeployer']">
- <xsl:element name="inject" namespace="urn:jboss:bean-deployer">
- <xsl:attribute name="bean">WSEndpointJAXBIntrosCustomizationsDeployer</xsl:attribute>
- </xsl:element>
- <xsl:comment>ESB Customization Deployer</xsl:comment>
- <xsl:text>
- </xsl:text>
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="deployer:bean[@name='WSWebMetaDataAdapter']">
- <xsl:element name="bean" namespace="urn:jboss:bean-deployer">
- <xsl:attribute name="name">WSWebMetaDataAdapter</xsl:attribute>
- <xsl:attribute name="class">org.jboss.soa.esb.jbossws.ESBWebMetaDataAdapter</xsl:attribute>
- </xsl:element>
- <xsl:comment>ESB Customization Deployer</xsl:comment>
- </xsl:template>
-
- <xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
- </xsl:template>
-</xsl:stylesheet>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/webservice_producer/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/webservice_producer/jboss-esb.xml 2007-11-16 13:18:58 UTC (rev 16643)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/webservice_producer/jboss-esb.xml 2007-11-16 14:03:19 UTC (rev 16644)
@@ -37,7 +37,7 @@
<jms-listener name="JMS-ESBListener" busidref="quickstartEsbChannel" maxThreads="1"/>
</listeners>
- <actions>
+ <actions mep="RequestResponse">
<action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
<property name="message"
value="[Quickstart_webservice_producer] BEFORE invoking jbossws endpoint"/>
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/webservice_producer/src/org/jboss/soa/esb/samples/quickstart/webserviceproducer/test/SendMessage.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/webservice_producer/src/org/jboss/soa/esb/samples/quickstart/webserviceproducer/test/SendMessage.java 2007-11-16 13:18:58 UTC (rev 16643)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/webservice_producer/src/org/jboss/soa/esb/samples/quickstart/webserviceproducer/test/SendMessage.java 2007-11-16 14:03:19 UTC (rev 16644)
@@ -107,11 +107,14 @@
SendMessage sm = new SendMessage();
String msg = getMessage("01");
+ sm.sendMessageToJBRListener("http", 8765, msg);
+ /*
String protocol = args[0];
if(protocol.equals("jms")) {
sm.sendMessageOverJMS(msg);
} else {
sm.sendMessageToJBRListener(protocol, Integer.parseInt(args[1]), msg);
}
+ */
}
}
\ No newline at end of file
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/lib/ext/build-time/jbossws-core.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/lib/ext/build-time/jbossws-jboss42.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/lib/ext/build-time/jbossws-spi.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPProcessor.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPProcessor.java 2007-11-16 13:18:58 UTC (rev 16643)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPProcessor.java 2007-11-16 14:03:19 UTC (rev 16644)
@@ -19,31 +19,31 @@
*/
package org.jboss.soa.esb.actions.soap;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
import org.jboss.internal.soa.esb.publish.Publish;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
import org.jboss.soa.esb.actions.ActionProcessingException;
import org.jboss.soa.esb.actions.ActionUtils;
import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.MessagePayloadProxy;
import org.jboss.soa.esb.message.ResponseHeader;
import org.jboss.soa.esb.message.body.content.BytesBody;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.BasicInvocationContext;
+import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.RequestHandler;
-import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import javax.management.ObjectName;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Set;
+
/**
* JBoss Webservices SOAP Processor.
* <p/>
@@ -136,7 +136,7 @@
messageTL.set(message);
RequestHandler requestHandler = endpoint.getRequestHandler();
- InvocationContext invocationContext = new BasicInvocationContext();
+ InvocationContext invocationContext = new InvocationContext();
ByteArrayOutputStream os = new ByteArrayOutputStream();
requestHandler.handleRequest(endpoint, new ByteArrayInputStream(soapMessage), os, invocationContext);
@@ -215,7 +215,9 @@
* @return The service endpoint, or null if the endpoint is not found.
*/
protected static Endpoint getServiceEndpoint(String endpointName) {
- EndpointRegistry registry = EndpointRegistryFactory.getEndpointRegistry();
+ SPIProvider spiProv = SPIProviderResolver.getInstance().getProvider();
+ EndpointRegistryFactory factory = spiProv.getSPI(EndpointRegistryFactory.class);
+ EndpointRegistry registry = factory.getEndpointRegistry();
Set<ObjectName> objectNames = registry.getEndpoints();
for (ObjectName objectName : objectNames) {
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java 2007-11-16 13:18:58 UTC (rev 16643)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java 2007-11-16 14:03:19 UTC (rev 16644)
@@ -19,32 +19,33 @@
*/
package org.jboss.soa.esb.actions.soap;
-import java.io.*;
-import java.net.URI;
-import java.util.List;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import javax.servlet.http.HttpServletRequest;
-
+import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
import org.jboss.internal.soa.esb.publish.ContractInfo;
+import org.jboss.internal.soa.esb.util.StreamUtils;
import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.listeners.config.xbeanmodel.ActionDocument;
import org.jboss.soa.esb.listeners.config.xbeanmodel.PropertyDocument;
-import org.jboss.soa.esb.addressing.EPR;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.InvocationContext;
-import org.jboss.wsf.spi.invocation.RequestHandler;
-import org.jboss.ws.core.server.ServletRequestContext;
-import org.xml.sax.SAXException;
-import org.apache.log4j.Logger;
import org.milyn.Smooks;
import org.milyn.container.standalone.StandaloneExecutionContext;
+import org.xml.sax.SAXException;
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.net.URI;
+import java.net.URL;
+import java.util.List;
+
/**
* Contract publisher for a Webservice endpoint.
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -103,17 +104,13 @@
String targetServiceCat = servletRequest.getParameter("serviceCat");
String targetServiceName = servletRequest.getParameter("serviceName");
String targetProtocol = servletRequest.getParameter("protocol");
- RequestHandler requestHandler = endpoint.getRequestHandler();
- ByteArrayOutputStream wsdlStream = new ByteArrayOutputStream();
- InvocationContext invocationContext;
- invocationContext = new ServletRequestContext(null, servletRequest, null);
-
try {
// Generate the WSDL...
- requestHandler.handleWSDLRequest(endpoint, wsdlStream, invocationContext);
- String wsdl = updateWsdl(new String(wsdlStream.toByteArray()), epr, targetServiceCat, targetServiceName, targetProtocol);
+ String wsdl = getEndpointWsdl(endpoint);
+ wsdl = updateWsdl(wsdl, epr, targetServiceCat, targetServiceName, targetProtocol);
+
return new ContractInfo("text/xml", wsdl);
} catch (Exception e) {
logger.error("Failed to load contract information from JBossWS Endpoint '" + endpointName + "'.", e);
@@ -126,6 +123,26 @@
}
/**
+ * Get the endpoints WSSDL from the JBossWS container.
+ * </p>
+ * See http://jira.jboss.com/jira/browse/JBWS-1909
+ *
+ * @param endpoint The endpoint.
+ * @return The WSDL.
+ * @throws IOException Error reading wsdl.
+ */
+ private String getEndpointWsdl(Endpoint endpoint) throws IOException {
+ URL endpointWsdlAddress = new URL(endpoint.getAddress() + "?wsdl");
+ InputStream wsdlStream = endpointWsdlAddress.openStream();
+
+ try {
+ return StreamUtils.readStreamString(wsdlStream, "UTF-8");
+ } finally {
+ wsdlStream.close();
+ }
+ }
+
+ /**
* Update the supplied wsdl to take account of the ESB endpoint proxying of the JBossWS
* invocation, as well as the fact that the transport may be different.
*
More information about the jboss-svn-commits
mailing list