JBossWS SVN: r11864 - in stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws: tools/jaxws/impl and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-26 02:44:42 -0400 (Fri, 26 Mar 2010)
New Revision: 11864
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
Log:
[JBPAPP-3999] implementing support for protocol in wsprovide
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-03-26 06:37:26 UTC (rev 11863)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-03-26 06:44:42 UTC (rev 11864)
@@ -81,6 +81,7 @@
public class JAXWSWebServiceMetaDataBuilder extends JAXWSServerMetaDataBuilder
{
private boolean generateWsdl = true;
+ private boolean extension;
private boolean toolMode = false;
private File wsdlDirectory = null;
private PrintStream messageStream = null;
@@ -98,6 +99,11 @@
{
this.generateWsdl = generateWsdl;
}
+
+ public void setExtension(boolean extension)
+ {
+ this.extension = extension;
+ }
public ServerEndpointMetaData buildWebServiceMetaData(Deployment dep, UnifiedMetaData wsMetaData, Class<?> sepClass, String linkName)
{
@@ -371,6 +377,7 @@
try
{
WSDLGenerator generator = new JAXBWSDLGenerator(jaxbCtx);
+ generator.setExtension(extension);
if (wsdlLocation != null)
{
serviceMetaData.setWsdlLocation(wsdlLocation);
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2010-03-26 06:37:26 UTC (rev 11863)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/JBossWSProviderImpl.java 2010-03-26 06:44:42 UTC (rev 11864)
@@ -46,11 +46,12 @@
final class JBossWSProviderImpl extends WSContractProvider
{
private ClassLoader loader;
- private boolean generateWsdl = false;
- private boolean generateSource = false;
+ private boolean generateWsdl;
+ private boolean extension;
+ private boolean generateSource;
private File outputDir = new File("output");
- private File resourceDir = null;
- private File sourceDir = null;
+ private File resourceDir;
+ private File sourceDir;
private PrintStream messageStream = NullPrintStream.getInstance();
private void createDirectories(File resourceDir, File sourceDir)
@@ -95,7 +96,8 @@
builder.setGenerateWsdl(generateWsdl);
builder.setToolMode(true);
builder.setWsdlDirectory(resourceDir);
- builder.setMessageStream(messageStream);
+ builder.setMessageStream(messageStream);
+ builder.setExtension(extension);
if (generateWsdl)
messageStream.println("Generating WSDL:");
@@ -142,6 +144,12 @@
}
@Override
+ public void setExtension(boolean extension)
+ {
+ this.extension = extension;
+ }
+
+ @Override
public void setOutputDirectory(File directory)
{
outputDir = directory;
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2010-03-26 06:37:26 UTC (rev 11863)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2010-03-26 06:44:42 UTC (rev 11864)
@@ -69,6 +69,8 @@
public abstract class WSDLGenerator
{
protected WSDLDefinitions wsdl;
+
+ protected boolean extension;
protected abstract void processTypes();
@@ -98,6 +100,8 @@
QName bindingQName = new QName(interfaceQName.getNamespaceURI(), interfaceQName.getLocalPart() + "Binding");
WSDLBinding wsdlBinding = new WSDLBinding(wsdl, bindingQName);
wsdlBinding.setInterfaceName(interfaceQName);
+ if (extension)
+ endpoint.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);
wsdlBinding.setType(endpoint.getBindingId());
wsdl.addBinding(wsdlBinding);
wsdlEndpoint.setBinding(bindingQName);
@@ -379,6 +383,16 @@
wsdlService.setInterfaceName(endpoint.getPortName());
}
+
+ /**
+ * Whether to force SOAP 1.2
+ *
+ * @param extension whether to force SOAP 1.2
+ */
+ public void setExtension(boolean extension)
+ {
+ this.extension = extension;
+ }
/**
* Generate a WSDL object model from the passed in ServiceMetaData.
@@ -410,26 +424,30 @@
}
}
- String soapURI = null;
- String soapPrefix = null;
- for (EndpointMetaData ep : service.getEndpoints())
+ String soapPrefix = extension ? "soap12" : null;
+ String soapURI = extension ? Constants.NS_SOAP12 : null;
+ if (!extension)
{
- String bindingId = ep.getBindingId();
- if (bindingId.startsWith(SOAPBinding.SOAP11HTTP_BINDING))
+ for (EndpointMetaData ep : service.getEndpoints())
{
- soapPrefix = "soap";
- soapURI = Constants.NS_SOAP11;
+ String bindingId = ep.getBindingId();
+ if (bindingId.startsWith(SOAPBinding.SOAP11HTTP_BINDING))
+ {
+ soapPrefix = "soap";
+ soapURI = Constants.NS_SOAP11;
+ }
+ else if (bindingId.startsWith(SOAPBinding.SOAP12HTTP_BINDING))
+ {
+ soapPrefix = "soap12";
+ soapURI = Constants.NS_SOAP12;
+ }
+
}
- else if (bindingId.startsWith(SOAPBinding.SOAP12HTTP_BINDING))
- {
- soapPrefix = "soap12";
- soapURI = Constants.NS_SOAP12;
- }
}
if (soapURI != null && soapPrefix != null)
wsdl.registerNamespaceURI(soapURI, soapPrefix);
-
+
processTypes();
processService(service);
14 years, 9 months
JBossWS SVN: r11863 - framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-26 02:37:26 -0400 (Fri, 26 Mar 2010)
New Revision: 11863
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java
Log:
[JBPAPP-3999] implementing support for protocol in wsprovide
Modified: framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2010-03-26 06:37:07 UTC (rev 11862)
+++ framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2010-03-26 06:37:26 UTC (rev 11863)
@@ -21,6 +21,7 @@
*/
package org.jboss.test.ws.jaxws.smoke.tools;
+import org.jboss.ws.Constants;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.spi.tools.WSContractProvider;
import org.jboss.wsf.test.JBossWSTest;
@@ -86,6 +87,20 @@
}
/**
+ * Enables/Disables WSDL generation.
+ *
+ */
+ public void testGenerateWsdlWithExtension() throws Exception
+ {
+ provider.setGenerateWsdl(true);
+ provider.setExtension(true);
+ File outputDir = new File(outputDirectory.getAbsolutePath() + "-soap12");
+ provide(outputDir);
+
+ verifyWSDL(outputDir, true);
+ }
+
+ /**
* Enables/Disables Java source generation.
*
*/
@@ -190,13 +205,18 @@
provider.setResourceDirectory(directory);
provide();
- verifyWSDL(directory);
+ verifyWSDL(outputDirectory);
}
-
+
private void verifyWSDL(File directory) throws Exception
{
+ this.verifyWSDL(directory, false);
+ }
+
+ private void verifyWSDL(File directory, boolean soap12) throws Exception
+ {
File wsdl = new File(
- outputDirectory.getAbsolutePath()+
+ directory.getAbsolutePath()+
FS + "CalculatorBeanService.wsdl"
);
@@ -204,6 +224,16 @@
Element root = DOMUtils.parse( new FileInputStream(wsdl));
Element serviceElement = DOMUtils.getFirstChildElement(root, "service");
assertEquals(serviceElement.getAttribute("name"), "CalculatorBeanService");
+ Element bindingElement = DOMUtils.getFirstChildElement(root, "binding");
+ Element soapBindingElement = DOMUtils.getFirstChildElement(bindingElement,"binding");
+ if (soap12)
+ {
+ assertEquals("http://schemas.xmlsoap.org/wsdl/soap12/", soapBindingElement.getNamespaceURI());
+ }
+ else
+ {
+ assertEquals("http://schemas.xmlsoap.org/wsdl/soap/", soapBindingElement.getNamespaceURI());
+ }
}
/**
@@ -294,7 +324,11 @@
private void provide() throws Exception
{
- //provider.setGenerateSource(true);
+ this.provide(outputDirectory);
+ }
+
+ private void provide(File outputDirectory)
+ {
provider.setOutputDirectory(outputDirectory);
//JBWS-2479: using different beans because the whole smoke tools test is supposed to be run for every stack
//and we can't afford excluding it for Metro just because of JBWS-2479
Modified: framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java 2010-03-26 06:37:07 UTC (rev 11862)
+++ framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java 2010-03-26 06:37:26 UTC (rev 11863)
@@ -50,6 +50,11 @@
{
dispatch("testGenerateWsdl");
}
+
+ public void testGenerateWsdlWithExtension() throws Exception
+ {
+ dispatch("testGenerateWsdlWithExtension");
+ }
public void testGenerateSource() throws Exception
{
14 years, 9 months
JBossWS SVN: r11862 - in spi/branches/jbossws-spi-1.1.2/src: main/java/org/jboss/wsf/spi/tools/ant and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-26 02:37:07 -0400 (Fri, 26 Mar 2010)
New Revision: 11862
Modified:
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/ant/WSProvideTask.java
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java
spi/branches/jbossws-spi-1.1.2/src/test/java/org/jboss/test/wsf/spi/tools/CmdProvideTracker.java
Log:
[JBPAPP-3999] implementing support for protocol in wsprovide
Modified: spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java 2010-03-25 14:34:22 UTC (rev 11861)
+++ spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java 2010-03-26 06:37:07 UTC (rev 11862)
@@ -98,6 +98,13 @@
* @param generateWsdl whether or not to generate WSDL
*/
public abstract void setGenerateWsdl(boolean generateWsdl);
+
+ /**
+ * Enables/Disables SOAP 1.2 binding extension
+ *
+ * @param extension whether or not to enable SOAP 1.2 binding extension
+ */
+ public abstract void setExtension(boolean extension);
/**
* Enables/Disables Java source generation.
Modified: spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/ant/WSProvideTask.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/ant/WSProvideTask.java 2010-03-25 14:34:22 UTC (rev 11861)
+++ spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/ant/WSProvideTask.java 2010-03-26 06:37:07 UTC (rev 11862)
@@ -53,8 +53,9 @@
* <tr><td>resourcedestdir</td><td>The output directory for resource artifacts (WSDL/XSD).</td><td>value of destdir</td></tr>
* <tr><td>sourcedestdir</td><td>The output directory for Java source.</td><td>value of destdir</td></tr>
* <tr><td>genwsdl</td><td>Whether or not to generate WSDL.</td><td>false</td><tr>
+ * <tr><td>extension</td><td>Enable SOAP 1.2 binding extension.</td><td>false</td></tr>
* <tr><td>verbose</td><td>Enables more informational output about cmd progress.</td><td>false</td><tr>
- * <tr><td>sei*</td><td>Service Endpoint Implementation.</td><td></td><tr>
+ * <tr><td>sei</td><td>Service Endpoint Implementation.</td><td></td><tr>
* <tr><td>classpath</td><td>The classpath that contains the service endpoint implementation.</td><td>""</tr>
* </table>
* <b>* = required.</b>
@@ -73,6 +74,7 @@
* resourcedestdir="out-resource"
* sourcedestdir="out-source"
* genwsdl="true"
+ * extension="true"
* verbose="true"
* sei="org.jboss.test.ws.jaxws.jsr181.soapbinding.DocWrappedServiceImpl">
* <classpath>
@@ -83,20 +85,22 @@
* </pre>
*
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public class WSProvideTask extends Task
{
private Path classpath = new Path(getProject());
private CommandlineJava command = new CommandlineJava();
- private String sei = null;
- private File destdir = null;
- private File resourcedestdir = null;
- private File sourcedestdir = null;
- private boolean keep = false;
- private boolean genwsdl = false;
- private boolean verbose = false;
- private boolean fork = false;
- private boolean debug = false;
+ private String sei;
+ private File destdir;
+ private File resourcedestdir;
+ private File sourcedestdir;
+ private boolean keep;
+ private boolean extension;
+ private boolean genwsdl;
+ private boolean verbose;
+ private boolean fork;
+ private boolean debug;
// Not actually used right now
public void setDebug(boolean debug)
@@ -128,7 +132,20 @@
{
this.destdir = destdir;
}
+
+ public void setExtension(boolean extension)
+ {
+ this.extension = extension;
+ }
+ public void setProtocol(String protocol)
+ {
+ if (protocol != null)
+ {
+ this.extension = protocol.toLowerCase().indexOf("Xsoap1.2") != -1;
+ }
+ }
+
public void setKeep(boolean keep)
{
this.keep = keep;
@@ -208,6 +225,8 @@
gen.setMessageStream(new PrintStream(new LogOutputStream(this, Project.MSG_INFO)));
gen.setGenerateSource(keep);
gen.setGenerateWsdl(genwsdl);
+ gen.setExtension(extension);
+
if (destdir != null)
gen.setOutputDirectory(destdir);
if (resourcedestdir != null)
@@ -266,6 +285,9 @@
if (genwsdl)
command.createArgument().setValue("-w");
+ if (extension)
+ command.createArgument().setValue("-e");
+
if (destdir != null)
{
command.createArgument().setValue("-o");
Modified: spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2010-03-25 14:34:22 UTC (rev 11861)
+++ spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2010-03-26 06:37:07 UTC (rev 11862)
@@ -59,18 +59,18 @@
public class WSConsume
{
private List<File> bindingFiles = new ArrayList<File>();
- private boolean generateSource = false;
- private File catalog = null;
- private String targetPackage = null;
- private String wsdlLocation = null;
- private boolean quiet = false;
- private boolean verbose = false;
- private boolean noCompile = false;
- private boolean loadConsumer = false;
- private boolean extension = false;
private File outputDir = new File("output");
- private File sourceDir = null;
- private String target = null;
+ private boolean generateSource;
+ private File catalog;
+ private String targetPackage;
+ private String wsdlLocation;
+ private boolean quiet;
+ private boolean verbose;
+ private boolean loadConsumer;
+ private boolean extension;
+ private boolean noCompile;
+ private File sourceDir;
+ private String target;
public static final String PROGRAM_NAME = System.getProperty("program.name", WSConsume.class.getName());
Modified: spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java 2010-03-25 14:34:22 UTC (rev 11861)
+++ spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java 2010-03-26 06:37:07 UTC (rev 11862)
@@ -51,21 +51,23 @@
* -q, --quiet Be somewhat more quiet
* -t, --show-traces Show full exception stack traces
* -l, --load-provider Load the provider and exit (debug utility)
+ * -e, --extension Enable SOAP 1.2 binding extension
* </pre>
*
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
*/
public class WSProvide
{
- private boolean generateSource = false;
- private boolean generateWsdl = false;
- private boolean quiet = false;
- private boolean showTraces = false;
- private boolean loadProvider = false;
private ClassLoader loader = Thread.currentThread().getContextClassLoader();
private File outputDir = new File("output");
- private File resourceDir = null;
- private File sourceDir = null;
+ private boolean generateSource;
+ private boolean generateWsdl;
+ private boolean extension;
+ private boolean quiet;
+ private boolean showTraces;
+ private boolean loadProvider;
+ private File resourceDir;
+ private File sourceDir;
public static final String PROGRAM_NAME = System.getProperty("program.name", WSProvide.class.getSimpleName());
@@ -78,7 +80,7 @@
private String parseArguments(String[] args)
{
- String shortOpts = "hwko:r:s:c:qtl";
+ String shortOpts = "hwko:r:s:c:qtle";
LongOpt[] longOpts =
{
new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
@@ -91,6 +93,7 @@
new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
new LongOpt("load-provider", LongOpt.NO_ARGUMENT, null, 'l'),
+ new LongOpt("extension", LongOpt.NO_ARGUMENT, null, 'e'),
};
Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
@@ -126,6 +129,9 @@
case 'l':
loadProvider = true;
break;
+ case 'e':
+ extension = true;
+ break;
case 'h':
printHelp();
System.exit(0);
@@ -170,6 +176,7 @@
gen.setGenerateWsdl(generateWsdl);
gen.setGenerateSource(generateSource);
gen.setOutputDirectory(outputDir);
+ gen.setExtension(extension);
if (resourceDir != null)
gen.setResourceDirectory(resourceDir);
if (sourceDir != null)
@@ -234,9 +241,10 @@
out.println(" -o, --output=<directory> The directory to put generated artifacts");
out.println(" -r, --resource=<directory> The directory to put resource artifacts");
out.println(" -s, --source=<directory> The directory to put Java source");
+ out.println(" -e, --extension Enable SOAP 1.2 binding extension");
out.println(" -q, --quiet Be somewhat more quiet");
out.println(" -t, --show-traces Show full exception stack traces");
- out.println(" -l, --load-provider Load the provider and exit (debug utility)");
- out.flush();
+ out.println(" -l, --load-provider Load the provider and exit (debug utility)");
+ out.flush();
}
}
Modified: spi/branches/jbossws-spi-1.1.2/src/test/java/org/jboss/test/wsf/spi/tools/CmdProvideTracker.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/test/java/org/jboss/test/wsf/spi/tools/CmdProvideTracker.java 2010-03-25 14:34:22 UTC (rev 11861)
+++ spi/branches/jbossws-spi-1.1.2/src/test/java/org/jboss/test/wsf/spi/tools/CmdProvideTracker.java 2010-03-26 06:37:07 UTC (rev 11862)
@@ -39,6 +39,11 @@
LAST_EVENT += "setGenerateWsdl";
}
+ public void setExtension(boolean extension)
+ {
+ LAST_EVENT += "setExtension";
+ }
+
public void setGenerateSource(boolean generateSource)
{
LAST_EVENT += "setGenerateSource";
14 years, 9 months
JBossWS SVN: r11860 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/core/server and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-25 09:35:26 -0400 (Thu, 25 Mar 2010)
New Revision: 11860
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt
Log:
[JBPAPP-3984] rollback - the fix doesn't investigate whether null values are allowed or not (nillable='true' in schema)
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-25 11:58:46 UTC (rev 11859)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-25 13:35:26 UTC (rev 11860)
@@ -38,7 +38,6 @@
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.ws.ProtocolException;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.handler.MessageContext;
@@ -256,8 +255,10 @@
{
if (opName.equals(operationName) == false)
setOperationName(opName);
+
OperationMetaData opMetaData = getOperationMetaData();
boolean oneway = forceOneway || opMetaData.isOneWay();
+
// Associate a message context with the current thread
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setOperationMetaData(opMetaData);
@@ -283,19 +284,6 @@
epInv = new EndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
- if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral()
- && epInv.getRequestParamNames() != null)
- {
- for (QName qname : epInv.getRequestParamNames())
- {
- Object obj = epInv.getRequestParamValue(qname);
- if (obj == null)
- {
- throw new WebServiceException("The RPC/Literal Operation [" + opName + "] Parameter can not be null");
- }
- }
- }
-
// Set the required outbound properties
setOutboundContextProperties();
@@ -400,29 +388,6 @@
binding.unbindResponseMessage(opMetaData, resMessage, epInv, unboundHeaders);
}
- if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral())
- {
- if (epInv.getResponseParamNames() != null)
- {
- for (QName qname : epInv.getResponseParamNames())
- {
- Object obj = epInv.getResponsePayLoadParamValue(qname);
- if (obj == null)
- {
- throw new WebServiceException("The RPC/Literal Operation [" + opName
- + "] response parameters can not be null");
- }
- }
- //BP-2211. This should be uncommented to check the return value. Now it breaks
- //The AddressingTestCase
- /*if (opMetaData.getReturnParameter() != null && epInv.getReturnValue() == null)
- {
- throw new WebServiceException("The RPC/Literal Operation [" + opName
- + "] return value can not be null");
- }*/
-
- }
- }
retObj = syncOutputParams(inputParams, epInv);
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-25 11:58:46 UTC (rev 11859)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-25 13:35:26 UTC (rev 11860)
@@ -172,16 +172,6 @@
}
return paramValue;
}
-
- public Object getResponsePayLoadParamValue(QName xmlName) throws SOAPException
- {
- if (log.isDebugEnabled())
- log.debug("getResponseParamValue: " + xmlName);
- Object paramValue = resPayload.get(xmlName);
- ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
- paramValue = transformPayloadValue(paramMetaData, paramValue);
- return paramValue;
- }
public void setReturnValue(Object value)
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-25 11:58:46 UTC (rev 11859)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-25 13:35:26 UTC (rev 11860)
@@ -35,7 +35,6 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.http.HTTPBinding;
@@ -76,7 +75,6 @@
import org.jboss.wsf.spi.invocation.InvocationType;
import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
/** An implementation handles invocations on the endpoint
*
@@ -214,20 +212,6 @@
sepInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
- if (opMetaData.getEndpointMetaData().getType() != EndpointMetaData.Type.JAXRPC
- && opMetaData.isRPCLiteral() && sepInv.getRequestParamNames() != null)
- {
- for (QName qname : sepInv.getRequestParamNames())
- {
- Object obj = sepInv.getRequestParamValue(qname);
- if (obj == null)
- {
- throw new WebServiceException("The RPC/Literal Operation [" + opMetaData.getQName()
- + "] parameters can not be null");
- }
- }
- }
-
// Invoke an instance of the SEI implementation bean
Invocation inv = setupInvocation(endpoint, sepInv, invContext);
InvocationHandler invHandler = endpoint.getInvocationHandler();
@@ -235,7 +219,6 @@
try
{
invHandler.invoke(endpoint, inv);
-
}
catch (InvocationTargetException th)
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt 2010-03-25 11:58:46 UTC (rev 11859)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt 2010-03-25 13:35:26 UTC (rev 11860)
@@ -6,5 +6,3 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
-# [JBWS-2969] remove the BP-2211 violation test. The input parameter is null
-org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.*
14 years, 9 months
JBossWS SVN: r11859 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/core/server and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-25 07:58:46 -0400 (Thu, 25 Mar 2010)
New Revision: 11859
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt
Log:
[JBPAPP-3984]:Check RPC/Literalparameters BP-R2211 violation
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-25 11:46:52 UTC (rev 11858)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-03-25 11:58:46 UTC (rev 11859)
@@ -38,6 +38,7 @@
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.ws.ProtocolException;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.handler.MessageContext;
@@ -255,10 +256,8 @@
{
if (opName.equals(operationName) == false)
setOperationName(opName);
-
OperationMetaData opMetaData = getOperationMetaData();
boolean oneway = forceOneway || opMetaData.isOneWay();
-
// Associate a message context with the current thread
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setOperationMetaData(opMetaData);
@@ -284,6 +283,19 @@
epInv = new EndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
+ if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral()
+ && epInv.getRequestParamNames() != null)
+ {
+ for (QName qname : epInv.getRequestParamNames())
+ {
+ Object obj = epInv.getRequestParamValue(qname);
+ if (obj == null)
+ {
+ throw new WebServiceException("The RPC/Literal Operation [" + opName + "] Parameter can not be null");
+ }
+ }
+ }
+
// Set the required outbound properties
setOutboundContextProperties();
@@ -388,6 +400,29 @@
binding.unbindResponseMessage(opMetaData, resMessage, epInv, unboundHeaders);
}
+ if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC && opMetaData.isRPCLiteral())
+ {
+ if (epInv.getResponseParamNames() != null)
+ {
+ for (QName qname : epInv.getResponseParamNames())
+ {
+ Object obj = epInv.getResponsePayLoadParamValue(qname);
+ if (obj == null)
+ {
+ throw new WebServiceException("The RPC/Literal Operation [" + opName
+ + "] response parameters can not be null");
+ }
+ }
+ //BP-2211. This should be uncommented to check the return value. Now it breaks
+ //The AddressingTestCase
+ /*if (opMetaData.getReturnParameter() != null && epInv.getReturnValue() == null)
+ {
+ throw new WebServiceException("The RPC/Literal Operation [" + opName
+ + "] return value can not be null");
+ }*/
+
+ }
+ }
retObj = syncOutputParams(inputParams, epInv);
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-25 11:46:52 UTC (rev 11858)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2010-03-25 11:58:46 UTC (rev 11859)
@@ -172,6 +172,16 @@
}
return paramValue;
}
+
+ public Object getResponsePayLoadParamValue(QName xmlName) throws SOAPException
+ {
+ if (log.isDebugEnabled())
+ log.debug("getResponseParamValue: " + xmlName);
+ Object paramValue = resPayload.get(xmlName);
+ ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
+ paramValue = transformPayloadValue(paramMetaData, paramValue);
+ return paramValue;
+ }
public void setReturnValue(Object value)
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-25 11:46:52 UTC (rev 11858)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2010-03-25 11:58:46 UTC (rev 11859)
@@ -35,6 +35,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.http.HTTPBinding;
@@ -75,6 +76,7 @@
import org.jboss.wsf.spi.invocation.InvocationType;
import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
+import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
/** An implementation handles invocations on the endpoint
*
@@ -212,6 +214,20 @@
sepInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
+ if (opMetaData.getEndpointMetaData().getType() != EndpointMetaData.Type.JAXRPC
+ && opMetaData.isRPCLiteral() && sepInv.getRequestParamNames() != null)
+ {
+ for (QName qname : sepInv.getRequestParamNames())
+ {
+ Object obj = sepInv.getRequestParamValue(qname);
+ if (obj == null)
+ {
+ throw new WebServiceException("The RPC/Literal Operation [" + opMetaData.getQName()
+ + "] parameters can not be null");
+ }
+ }
+ }
+
// Invoke an instance of the SEI implementation bean
Invocation inv = setupInvocation(endpoint, sepInv, invContext);
InvocationHandler invHandler = endpoint.getInvocationHandler();
@@ -219,6 +235,7 @@
try
{
invHandler.invoke(endpoint, inv);
+
}
catch (InvocationTargetException th)
{
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt 2010-03-25 11:46:52 UTC (rev 11858)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt 2010-03-25 11:58:46 UTC (rev 11859)
@@ -6,3 +6,5 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
+# [JBWS-2969] remove the BP-2211 violation test. The input parameter is null
+org/jboss/test/ws/jaxws/jbws871/JBWS871TestCase.*
14 years, 9 months
JBossWS SVN: r11858 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-03-25 07:46:52 -0400 (Thu, 25 Mar 2010)
New Revision: 11858
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
Log:
[JBPAPP-3962]:Throw WebServiceExeptio when the clazz is not assignableFrom W3CEndpointReference
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2010-03-25 09:53:08 UTC (rev 11857)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2010-03-25 11:46:52 UTC (rev 11858)
@@ -22,6 +22,7 @@
package org.jboss.ws.core.jaxws.client;
import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.rmi.RemoteException;
import java.util.ArrayList;
@@ -100,8 +101,16 @@
String methodName = method.getName();
if (stubMethods.contains(method))
{
- Method stubMethod = ClientImpl.class.getMethod(methodName, method.getParameterTypes());
- return stubMethod.invoke(client, args);
+ try
+ {
+ Method stubMethod = ClientImpl.class.getMethod(methodName, method.getParameterTypes());
+ return stubMethod.invoke(client, args);
+ }
+ catch (InvocationTargetException ite) //unwrap the cause and re-throw as is if it's a WebServiceException (spec requirement for getEndpointReference(..) for instance)
+ {
+ Throwable cause = ite.getCause();
+ throw (cause != null && cause instanceof WebServiceException) ? cause : ite;
+ }
}
// An invocation on proxy's Object class
14 years, 9 months
JBossWS SVN: r11857 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-25 05:53:08 -0400 (Thu, 25 Mar 2010)
New Revision: 11857
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
Log:
[JBPAPP-3987] wsprovide have to accept @WebServiceProvider annotated endpoints
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-03-25 09:44:49 UTC (rev 11856)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-03-25 09:53:08 UTC (rev 11857)
@@ -32,6 +32,7 @@
import javax.jws.soap.SOAPMessageHandlers;
import javax.management.ObjectName;
import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceProvider;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
@@ -286,8 +287,9 @@
private EndpointResult processWebService(Deployment dep, UnifiedMetaData wsMetaData, Class<?> sepClass, String linkName) throws ClassNotFoundException, IOException
{
WebService anWebService = sepClass.getAnnotation(WebService.class);
- if (anWebService == null)
- throw new WSException("Cannot obtain @WebService annotation from: " + sepClass.getName());
+ WebServiceProvider anWebServiceProvider = sepClass.getAnnotation(WebServiceProvider.class);
+ if ((anWebService == null) && (anWebServiceProvider == null))
+ throw new WSException("Cannot obtain neither @WebService nor @WebServiceProvider annotation from: " + sepClass.getName());
Endpoint ep = dep.getService().getEndpointByName(linkName);
@@ -295,26 +297,26 @@
String seiName;
WSDLUtils wsdlUtils = WSDLUtils.getInstance();
- String name = anWebService.name();
+ String name = (anWebService != null) ? anWebService.name() : "";
if (name.length() == 0)
name = WSDLUtils.getJustClassName(sepClass);
- String serviceName = anWebService.serviceName();
+ String serviceName = (anWebService != null) ? anWebService.serviceName() : anWebServiceProvider.serviceName();
if (serviceName.length() == 0)
serviceName = WSDLUtils.getJustClassName(sepClass) + "Service";
- String serviceNS = anWebService.targetNamespace();
+ String serviceNS = (anWebService != null) ? anWebService.targetNamespace() : anWebServiceProvider.targetNamespace();
if (serviceNS.length() == 0)
serviceNS = wsdlUtils.getTypeNamespace(sepClass);
- String portName = anWebService.portName();
+ String portName = (anWebService != null) ? anWebService.portName() : anWebServiceProvider.portName();
if (portName.length() == 0)
portName = name + "Port";
- String wsdlLocation = anWebService.wsdlLocation();
+ String wsdlLocation = (anWebService != null) ? anWebService.wsdlLocation() : anWebServiceProvider.wsdlLocation();
String interfaceNS = serviceNS; // the default, but a SEI annotation may override this
- if (anWebService.endpointInterface().length() > 0)
+ if (anWebService != null && anWebService.endpointInterface().length() > 0)
{
seiName = anWebService.endpointInterface();
ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
14 years, 9 months
JBossWS SVN: r11856 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-25 05:44:49 -0400 (Thu, 25 Mar 2010)
New Revision: 11856
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
Log:
[JBWS-2972] wsprovide have to accept @WebServiceProvider annotated endpoints
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-03-25 07:22:45 UTC (rev 11855)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2010-03-25 09:44:49 UTC (rev 11856)
@@ -32,6 +32,7 @@
import javax.jws.soap.SOAPMessageHandlers;
import javax.management.ObjectName;
import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceProvider;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
@@ -304,8 +305,9 @@
private EndpointResult processWebService(Deployment dep, UnifiedMetaData wsMetaData, Class<?> sepClass, String linkName) throws ClassNotFoundException, IOException
{
WebService anWebService = sepClass.getAnnotation(WebService.class);
- if (anWebService == null)
- throw new WSException("Cannot obtain @WebService annotation from: " + sepClass.getName());
+ WebServiceProvider anWebServiceProvider = sepClass.getAnnotation(WebServiceProvider.class);
+ if ((anWebService == null) && (anWebServiceProvider == null))
+ throw new WSException("Cannot obtain neither @WebService nor @WebServiceProvider annotation from: " + sepClass.getName());
Endpoint ep = dep.getService().getEndpointByName(linkName);
@@ -313,26 +315,26 @@
String seiName;
WSDLUtils wsdlUtils = WSDLUtils.getInstance();
- String name = anWebService.name();
+ String name = (anWebService != null) ? anWebService.name() : "";
if (name.length() == 0)
name = WSDLUtils.getJustClassName(sepClass);
- String serviceName = anWebService.serviceName();
+ String serviceName = (anWebService != null) ? anWebService.serviceName() : anWebServiceProvider.serviceName();
if (serviceName.length() == 0)
serviceName = WSDLUtils.getJustClassName(sepClass) + "Service";
- String serviceNS = anWebService.targetNamespace();
+ String serviceNS = (anWebService != null) ? anWebService.targetNamespace() : anWebServiceProvider.targetNamespace();
if (serviceNS.length() == 0)
serviceNS = wsdlUtils.getTypeNamespace(sepClass);
- String portName = anWebService.portName();
+ String portName = (anWebService != null) ? anWebService.portName() : anWebServiceProvider.portName();
if (portName.length() == 0)
portName = name + "Port";
- String wsdlLocation = anWebService.wsdlLocation();
+ String wsdlLocation = (anWebService != null) ? anWebService.wsdlLocation() : anWebServiceProvider.wsdlLocation();
String interfaceNS = serviceNS; // the default, but a SEI annotation may override this
- if (anWebService.endpointInterface().length() > 0)
+ if (anWebService != null && anWebService.endpointInterface().length() > 0)
{
seiName = anWebService.endpointInterface();
ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
14 years, 9 months
JBossWS SVN: r11855 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-25 03:22:45 -0400 (Thu, 25 Mar 2010)
New Revision: 11855
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
Log:
[JBPAPP-3983] throw IllegalStateException if not all information is provided
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2010-03-24 18:57:36 UTC (rev 11854)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2010-03-25 07:22:45 UTC (rev 11855)
@@ -120,6 +120,11 @@
public W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation,
List<Element> referenceParameters)
{
+ if ((serviceName == null) && (address == null) && (portName == null))
+ throw new IllegalStateException();
+ if ((portName != null) && (serviceName == null))
+ throw new IllegalStateException();
+
NativeEndpointReference epr = new NativeEndpointReference();
epr.setAddress(address);
epr.setServiceName(serviceName);
14 years, 9 months
JBossWS SVN: r11854 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-03-24 14:57:36 -0400 (Wed, 24 Mar 2010)
New Revision: 11854
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
Log:
[JBPAPP-3245] don't throw IllegalStateException for WebServiceProvider endpoints without WSDL, just log warning
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2010-03-24 12:33:23 UTC (rev 11853)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2010-03-24 18:57:36 UTC (rev 11854)
@@ -101,6 +101,9 @@
for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
{
File wsdlFile = getPublishLocation(deploymentName, serviceMetaData);
+ if (wsdlFile == null)
+ continue;
+
wsdlFile.getParentFile().mkdirs();
// Get the wsdl definition and write it to the wsdl publish location
@@ -324,7 +327,10 @@
wsdlLocation = serviceMetaData.getWsdlFile();
if (wsdlLocation == null)
- throw new IllegalStateException("Cannot obtain wsdl location for: " + serviceMetaData.getServiceName());
+ {
+ log.warn("Cannot obtain wsdl location for: " + serviceMetaData.getServiceName());
+ return null;
+ }
log.debug("Publish WSDL file: " + wsdlLocation);
14 years, 9 months