JBossWS SVN: r1276 - in branches/jbossws-1.0/src/test: . ant
by jbossws-commits@lists.jboss.org
Author: alex.guizar(a)jboss.com
Date: 2006-10-20 17:06:39 -0400 (Fri, 20 Oct 2006)
New Revision: 1276
Modified:
branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml
branches/jbossws-1.0/src/test/build.xml
Log:
JBWS-868
Modified: branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml
===================================================================
--- branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml 2006-10-20 21:05:40 UTC (rev 1275)
+++ branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml 2006-10-20 21:06:39 UTC (rev 1276)
@@ -1372,7 +1372,7 @@
</metainf>
</jar>
- <!-- jaxrpc-samples-wsbpel - ->
+ <!-- jaxrpc-samples-wsbpel -->
<war warfile="${build.test.dir}/libs/jaxrpc-samples-wsbpel-hello.war"
webxml="${build.test.dir}/resources/jaxrpc/samples/wsbpel/hello/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
@@ -1402,7 +1402,6 @@
<include name="jaxrpc-mapping.xml" />
</metainf>
</jar>
- -->
<!-- jaxrpc-samples-wseventing.war -->
<war warfile="${build.test.dir}/libs/jaxrpc-samples-wseventing.war" webxml="${build.test.dir}/resources/jaxrpc/samples/wseventing/WEB-INF/web.xml">
Modified: branches/jbossws-1.0/src/test/build.xml
===================================================================
--- branches/jbossws-1.0/src/test/build.xml 2006-10-20 21:05:40 UTC (rev 1275)
+++ branches/jbossws-1.0/src/test/build.xml 2006-10-20 21:06:39 UTC (rev 1276)
@@ -295,7 +295,6 @@
Generate samples sources
-->
<target name="generate-sources" depends="compile" description="Generate the deployment resources.">
- <!--
<zip destfile="${build.test.dir}/libs/jaxrpc-samples-wsbpel-hello-process.zip">
<fileset dir="${build.test.dir}/resources/jaxrpc/samples/wsbpel/hello/bpel" />
</zip>
@@ -304,7 +303,7 @@
</taskdef>
<servicegen processfile="${build.test.dir}/libs/jaxrpc-samples-wsbpel-hello-process.zip"
outputdir="${build.test.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF/wsdl" />
- -->
+
<taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
<classpath refid="jbossws.client.classpath"/>
<classpath location="${build.test.dir}/classes"/>
@@ -329,7 +328,7 @@
<wstools dest="${build.test.dir}/wstools/resources/jaxrpc/samples/oneway/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/oneway/wstools-config.xml"/>
<wstools dest="${build.test.dir}/wstools/resources/jaxrpc/samples/rpcstyle/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/rpcstyle/wstools-config.xml"/>
<wstools dest="${build.test.dir}/wstools/resources/jaxrpc/samples/secureejb/META-INF" config="${test.resources.dir}/jaxrpc/samples/secureejb/wstools-config.xml"/>
- <!--wstools dest="${build.test.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/wsbpel/hello/wstools-config.xml" /-->
+ <wstools dest="${build.test.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/wsbpel/hello/wstools-config.xml" />
<wstools dest="${build.test.dir}/wstools/resources/jaxrpc/samples/wssecurity/WEB-INF" config="${test.resources.dir}/jaxrpc/samples/wssecurity/wstools-config.xml"/>
<wstools dest="${build.test.dir}/wstools/resources/jaxws/samples/jsr181ejb/META-INF" config="${test.resources.dir}/jaxws/samples/jsr181ejb/wstools-config.xml"/>
<wstools dest="${build.test.dir}/wstools/resources/jaxws/samples/jsr181pojo/META-INF" config="${test.resources.dir}/jaxws/samples/jsr181pojo/wstools-config.xml"/>
@@ -339,7 +338,7 @@
<fileset dir="${build.test.dir}/wstools/resources/jaxrpc/jbws718/WEB-INF" includes="org/**"/>
<fileset dir="${build.test.dir}/wstools/resources/jaxrpc/jbws1303/WEB-INF" includes="org/**"/>
<fileset dir="${build.test.dir}/wstools/resources/jaxrpc/samples/docstyle/wrapped/WEB-INF" includes="org/**"/>
- <!--fileset dir="${build.test.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF" includes="org/**" /-->
+ <fileset dir="${build.test.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF" includes="org/**"/>
</move>
</target>
18 years, 4 months
JBossWS SVN: r1275 - branches
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-10-20 17:05:40 -0400 (Fri, 20 Oct 2006)
New Revision: 1275
Added:
branches/jbossws-1.0.3.GA-JBWS-1311/
Log:
Create patch branch for JBWS-1311
Copied: branches/jbossws-1.0.3.GA-JBWS-1311 (from rev 1274, tags/jbossws-1.0.3.GA)
18 years, 4 months
JBossWS SVN: r1274 - in trunk/src: main/java/org/jboss/ws main/java/org/jboss/ws/deployment main/java/org/jboss/ws/metadata/jsr109 main/java/org/jboss/ws/metadata/wsdl main/java/org/jboss/ws/metadata/wsdl/xmlschema main/java/org/jboss/ws/tools/jaxws main/java/org/jboss/ws/utils test test/ant test/etc test/java/org/jboss/test/ws/common/wsdl11 test/java/org/jboss/test/ws/jaxws/jsr181/complex/client test/java/org/jboss/test/ws/jaxws/jsr181/webparam test/resources/jaxws/jsr181/webparam test/re
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-10-20 08:12:17 -0400 (Fri, 20 Oct 2006)
New Revision: 1274
Removed:
trunk/src/test/resources/jaxws/jsr181/webparam/jaxrpc-mapping.xml
Modified:
trunk/src/main/java/org/jboss/ws/Constants.java
trunk/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/metadata/jsr109/WebserviceDescriptionMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/jsr109/WebservicesMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/WSSchemaUtils.java
trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java
trunk/src/main/java/org/jboss/ws/utils/DOMWriter.java
trunk/src/test/ant/build-jars-jaxws.xml
trunk/src/test/build.xml
trunk/src/test/etc/log4j.xml
trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/complex/client/JSR181ComplexTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/PingService.java
trunk/src/test/resources/jaxws/jsr181/webparam/WEB-INF/web.xml
Log:
Remove JAXRPC API from JAXWS clients.
More to come.
Modified: trunk/src/main/java/org/jboss/ws/Constants.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/Constants.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/Constants.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -77,7 +77,7 @@
static final String URI_LITERAL_ENC = "";
/** WSDL 2.0 Encoding Rules */
static final String URI_STYLE_RPC = "http://www.w3.org/2004/03/wsdl/style/rpc";
- static final String URI_STYLE_IRI = "http://www.w3.org/2004/03/wsdl/style/iri"; //represents doc
+ static final String URI_STYLE_DOC = "http://www.w3.org/2004/03/wsdl/style/iri";
/**Style of WSDL */
static final String RPC_LITERAL = "RPC/Literal";
static final String DOCUMENT_LITERAL = "Document/Literal";
@@ -241,8 +241,6 @@
static final String WSDL_PROPERTY_EVENTSOURCE = "http://www.jboss.org/jbossws/wse/isEventSource";
- /** The key to the original message part name */
- static final String WSDL_PROPERTY_PART_NAME = "http://www.jboss.org/jbossws/partname";
/** The key to the message part type in case a part does not reference an element; http://www.jboss.org/jbossws/rpc/xmltype */
static final String WSDL_PROPERTY_RPC_XMLTYPE = "http://www.jboss.org/jbossws/rpc/xmltype";
/** Used as WSDL 2.0 property string to provide support for WSDL 1.1 mime types */
Modified: trunk/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/deployment/AnnotationsMetaDataBuilder.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -23,26 +23,13 @@
// $Id:AnnotationsMetaDataBuilder.java 732 2006-08-12 18:40:21Z thomas.diesler(a)jboss.com $
-import java.io.File;
-import java.io.IOException;
-import java.io.Writer;
-
import javax.xml.ws.BindingType;
import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
import org.jboss.ws.annotation.PortComponent;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.ServerEndpointMetaData;
-import org.jboss.ws.metadata.ServiceMetaData;
-import org.jboss.ws.metadata.UnifiedMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.server.ServerConfig;
-import org.jboss.ws.server.ServerConfigFactory;
-import org.jboss.ws.tools.JavaToWSDL;
-import org.jboss.ws.utils.IOUtils;
/** An abstract annotation meta data builder.
*
@@ -68,56 +55,6 @@
}
}
- protected void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData, String wsdlLocation, EndpointMetaData endpointMetaData)
- {
- if (wsdlLocation.length() > 0)
- {
- serviceMetaData.setWsdlFile(wsdlLocation);
- }
- else
- {
- // Generate the wsdl
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- UnifiedMetaData wsMetaData = serviceMetaData.getUnifiedMetaData();
- Thread.currentThread().setContextClassLoader(wsMetaData.getClassLoader());
- String serviceName = serviceMetaData.getQName().getLocalPart();
-
- JavaToWSDL javaToWSDL = new JavaToWSDL(Constants.NS_WSDL11);
- javaToWSDL.setUnifiedMetaData(wsMetaData);
- javaToWSDL.setQualifiedElements(true);
- WSDLDefinitions wsdlDefinitions = javaToWSDL.generate(wsClass);
-
- ServerConfigFactory factory = ServerConfigFactory.getInstance();
- ServerConfig config = factory.getServerConfig();
- File tmpdir = new File(config.getServerTempDir().getCanonicalPath() + "/jbossws");
- tmpdir.mkdirs();
-
- File wsdlTmpFile = File.createTempFile(serviceName, ".wsdl", tmpdir);
- wsdlTmpFile.deleteOnExit();
-
- Writer writer = IOUtils.getCharsetFileWriter(wsdlTmpFile, Constants.DEFAULT_XML_CHARSET);
- wsdlDefinitions.write(writer, Constants.DEFAULT_XML_CHARSET);
- writer.close();
-
- serviceMetaData.setWsdlFile(wsdlTmpFile.toURL().toExternalForm());
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (IOException e)
- {
- throw new WSException("Cannot write generated wsdl", e);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
- }
- }
-
protected void processPortComponent(UnifiedDeploymentInfo udi, Class wsClass, String linkName, ServerEndpointMetaData epMetaData)
{
String contextRoot = null;
Modified: trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -28,21 +28,16 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
-import javax.xml.rpc.encoding.TypeMappingRegistry;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.jaxrpc.Style;
-import org.jboss.ws.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.jaxrpc.TypeMappingRegistryImpl;
import org.jboss.ws.metadata.ClientEndpointMetaData;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
import org.jboss.ws.metadata.ServiceMetaData;
-import org.jboss.ws.metadata.TypeMappingMetaData;
-import org.jboss.ws.metadata.TypesMetaData;
import org.jboss.ws.metadata.UnifiedMetaData;
import org.jboss.ws.metadata.EndpointMetaData.Type;
import org.jboss.ws.metadata.wsdl.NCName;
@@ -54,6 +49,7 @@
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInput;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.metadata.wsdl.WSDLRPCPart;
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
@@ -169,7 +165,7 @@
// Set the operation style
String style = wsdlOperation.getStyle();
- epMetaData.setStyle((Constants.URI_STYLE_IRI.equals(style) ? Style.DOCUMENT : Style.RPC));
+ epMetaData.setStyle((Constants.URI_STYLE_DOC.equals(style) ? Style.DOCUMENT : Style.RPC));
// Set the operation MEP
if (Constants.WSDL20_PATTERN_IN_ONLY.equals(wsdlOperation.getPattern()))
@@ -181,109 +177,75 @@
if (wsdlBindingOperation != null)
opMetaData.setSOAPAction(wsdlBindingOperation.getSOAPAction());
- // Get the type mapping for the encoding style
- String encStyle = epMetaData.getEncodingStyle().toURI();
- TypeMappingRegistry tmRegistry = new TypeMappingRegistryImpl();
- TypeMappingImpl typeMapping = (TypeMappingImpl)tmRegistry.getTypeMapping(encStyle);
-//
-// // Build the parameter meta data
-// if (opMetaData.getStyle() == Style.RPC)
-// {
-// buildParameterMetaDataRpc(opMetaData, wsdlOperation, typeMapping);
-// }
-// else
-// {
-// buildParameterMetaDataDoc(opMetaData, wsdlOperation, typeMapping);
-// }
-//
-// // Build operation faults
-// buildFaultMetaData(opMetaData, wsdlOperation);
+ // Build the parameter meta data
+ if (opMetaData.getStyle() == Style.RPC)
+ {
+ buildParameterMetaDataRpc(opMetaData, wsdlOperation);
+ }
+ else
+ {
+ buildParameterMetaDataDoc(opMetaData, wsdlOperation);
+ }
+ // Build operation faults
+ buildFaultMetaData(opMetaData, wsdlOperation);
+
// process further operation extensions
processOpMetaExtensions(opMetaData, wsdlOperation);
}
}
- private void buildParameterMetaDataRpc(OperationMetaData opMetaData, WSDLInterfaceOperation wsdlOperation, TypeMappingImpl typeMapping)
+ private void buildParameterMetaDataRpc(OperationMetaData opMetaData, WSDLInterfaceOperation wsdlOperation)
{
log.trace("buildParameterMetaDataRpc: " + opMetaData.getQName());
- TypesMetaData typesMetaData = opMetaData.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
-
for (WSDLInterfaceOperationInput opInput : wsdlOperation.getInputs())
{
- QName xmlName = opInput.getElement();
- QName xmlType = opInput.getXMLType();
- String javaTypeName = typeMapping.getJavaTypeName(xmlType);
-
- ParameterMetaData inMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
- opMetaData.addParameter(inMetaData);
-
- boolean inHeader = opInput.getProperty(Constants.WSDL_PROPERTY_APPLICATION_DATA) != null;
- inMetaData.setInHeader(inHeader);
+ for (WSDLRPCPart childPart : opInput.getChildParts())
+ {
+ QName xmlName = new QName(childPart.getName());
+ QName xmlType = childPart.getType();
+ ParameterMetaData inMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, null);
+ opMetaData.addParameter(inMetaData);
+ }
}
for (WSDLInterfaceOperationOutput opOutput : wsdlOperation.getOutputs())
{
- String partName = opOutput.getProperty(Constants.WSDL_PROPERTY_PART_NAME).getValue();
- QName xmlName = opOutput.getElement();
-
- ParameterMetaData outMetaData = opMetaData.getParameter(xmlName);
- if (outMetaData != null && wsdlOperation.getInputByPartName(partName) != null)
+ for (WSDLRPCPart childPart : opOutput.getChildParts())
{
- outMetaData.setMode(ParameterMode.INOUT);
- }
- else
- {
- QName xmlType = opOutput.getXMLType();
- String javaTypeName = typeMapping.getJavaTypeName(xmlType);
+ QName xmlName = new QName(childPart.getName());
+ QName xmlType = childPart.getType();
- boolean inHeader = opOutput.getProperty(Constants.WSDL_PROPERTY_APPLICATION_DATA) != null;
- boolean hasReturnMapping = (inHeader == false);
-
- if (hasReturnMapping)
+ ParameterMetaData outMetaData = opMetaData.getParameter(xmlName);
+ if (outMetaData != null)
{
- outMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
- opMetaData.setReturnParameter(outMetaData);
+ outMetaData.setMode(ParameterMode.INOUT);
}
else
{
- outMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
- outMetaData.setMode(ParameterMode.OUT);
- opMetaData.addParameter(outMetaData);
-
- outMetaData.setInHeader(inHeader);
+ outMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, null);
+ opMetaData.setReturnParameter(outMetaData);
}
}
}
}
- private void buildParameterMetaDataDoc(OperationMetaData opMetaData, WSDLInterfaceOperation wsdlOperation, TypeMappingImpl typeMapping)
+ private void buildParameterMetaDataDoc(OperationMetaData opMetaData, WSDLInterfaceOperation wsdlOperation)
{
log.trace("buildParameterMetaDataDoc: " + opMetaData.getQName());
- EndpointMetaData epMetaData = opMetaData.getEndpointMetaData();
- ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
- TypesMetaData typesMetaData = serviceMetaData.getTypesMetaData();
-
for (WSDLInterfaceOperationInput opInput : wsdlOperation.getInputs())
{
QName xmlName = opInput.getElement();
- QName xmlType = opInput.getXMLType();
- String javaTypeName = typeMapping.getJavaTypeName(xmlType);
-
- TypeMappingMetaData typeMetaData = typesMetaData.getTypeMappingByXMLType(xmlType);
- if (typeMetaData != null)
- javaTypeName = typeMetaData.getJavaTypeName();
-
- ParameterMetaData inMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
+ ParameterMetaData inMetaData = new ParameterMetaData(opMetaData, xmlName, null);
inMetaData.setInHeader(opInput.getProperty(Constants.WSDL_PROPERTY_APPLICATION_DATA) != null);
opMetaData.addParameter(inMetaData);
}
for (WSDLInterfaceOperationOutput opOutput : wsdlOperation.getOutputs())
{
- String partName = opOutput.getProperty(Constants.WSDL_PROPERTY_PART_NAME).getValue();
+ String partName = opOutput.getPartName();
QName xmlName = opOutput.getElement();
ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
@@ -293,23 +255,17 @@
}
else
{
- QName xmlType = opOutput.getXMLType();
- String javaTypeName = typeMapping.getJavaTypeName(xmlType);
-
boolean inHeader = opOutput.getProperty(Constants.WSDL_PROPERTY_APPLICATION_DATA) != null;
boolean hasReturnMapping = (inHeader == false);
- if (typesMetaData.getTypeMappingByXMLType(xmlType) != null)
- javaTypeName = typesMetaData.getTypeMappingByXMLType(xmlType).getJavaTypeName();
-
if (hasReturnMapping)
{
- ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
+ ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, null);
opMetaData.setReturnParameter(retMetaData);
}
else
{
- ParameterMetaData outMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
+ ParameterMetaData outMetaData = new ParameterMetaData(opMetaData, xmlName, null);
opMetaData.addParameter(outMetaData);
outMetaData.setMode(ParameterMode.OUT);
Modified: trunk/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -178,7 +178,7 @@
// Set the operation style
String style = wsdlOperation.getStyle();
- epMetaData.setStyle((Constants.URI_STYLE_IRI.equals(style) ? Style.DOCUMENT : Style.RPC));
+ epMetaData.setStyle((Constants.URI_STYLE_DOC.equals(style) ? Style.DOCUMENT : Style.RPC));
// Set the operation MEP
if (Constants.WSDL20_PATTERN_IN_ONLY.equals(wsdlOperation.getPattern()))
Modified: trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -24,6 +24,7 @@
// $Id$
import java.io.File;
+import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Writer;
@@ -91,6 +92,8 @@
import org.jboss.ws.server.ServerConfigFactory;
import org.jboss.ws.tools.jaxws.JAXBWSDLGenerator;
import org.jboss.ws.tools.jaxws.WSDLGenerator;
+import org.jboss.ws.utils.DOMUtils;
+import org.jboss.ws.utils.DOMWriter;
import org.jboss.ws.utils.HolderUtils;
import org.jboss.ws.utils.IOUtils;
import org.jboss.ws.utils.JBossWSEntityResolver;
@@ -98,6 +101,7 @@
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
+import org.w3c.dom.Element;
import com.sun.xml.bind.api.JAXBRIContext;
import com.sun.xml.bind.api.TypeReference;
@@ -368,8 +372,6 @@
private void processWebMethod(EndpointMetaData epMetaData, Method method)
{
- ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
- TypesMetaData typesMetaData = serviceMetaData.getTypesMetaData();
String targetNS = epMetaData.getQName().getNamespaceURI();
// reflection defaults
@@ -873,7 +875,7 @@
opMetaData.addExtension(addrExt);
}
- protected void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData, String wsdlLocation, EndpointMetaData epMetaData)
+ private void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData, String wsdlLocation, EndpointMetaData epMetaData)
{
if (wsdlLocation.length() > 0)
{
@@ -900,6 +902,11 @@
wsdlDefinitions.write(writer, Constants.DEFAULT_XML_CHARSET);
writer.close();
+ // Write generated wsdl to debug log
+ Element root = DOMUtils.parse(new FileInputStream (wsdlTmpFile));
+ String wsdl = DOMWriter.printNode(root, true);
+ log.debug("Generated wsdl:\n" + wsdl);
+
serviceMetaData.setWsdlFile(wsdlTmpFile.toURL().toExternalForm());
}
catch (RuntimeException rte)
Modified: trunk/src/main/java/org/jboss/ws/metadata/jsr109/WebserviceDescriptionMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/jsr109/WebserviceDescriptionMetaData.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/metadata/jsr109/WebserviceDescriptionMetaData.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
package org.jboss.ws.metadata.jsr109;
// $Id$
@@ -78,7 +78,7 @@
portComponents.toArray(array);
return array;
}
-
+
/**
* Get the QNames of the port components to be declared
* in the namespaces
@@ -90,15 +90,15 @@
//TODO:Check if there is just one QName that drives all portcomponents
//or each port component can have a distinct QName (namespace/prefix)
//Maintain uniqueness of the QName
- Map map = new HashMap();
+ Map map = new HashMap();
Iterator iter = portComponents.iterator();
- while (iter != null && iter.hasNext())
+ while(iter != null && iter.hasNext())
{
PortComponentMetaData pcm = (PortComponentMetaData)iter.next();
QName qname = pcm.getWsdlPort();
- map.put(qname.getPrefix(), qname);
+ map.put(qname.getPrefix(),qname);
}
- return map.values();
+ return map.values();
}
/**
@@ -155,7 +155,7 @@
{
this.jaxrpcMappingFile = jaxrpcMappingFile;
}
-
+
/**
* Serialize as a String
*
@@ -166,10 +166,10 @@
StringBuilder buffer = new StringBuilder("<webservice-description> <webservice-description-name>");
buffer.append(this.webserviceDescriptionName);
buffer.append("</webservice-description-name>");
- buffer.append("<wsdl-file>" + wsdlFile + "</wsdl-file>");
- buffer.append("<jaxrpc-mapping-file>" + jaxrpcMappingFile + "</jaxrpc-mapping-file>");
- for (PortComponentMetaData pm : portComponents)
- buffer.append(pm.serialize());
+ buffer.append("<wsdl-file>"+wsdlFile+"</wsdl-file>");
+ buffer.append("<jaxrpc-mapping-file>"+jaxrpcMappingFile+"</jaxrpc-mapping-file>");
+ for(PortComponentMetaData pm:portComponents)
+ buffer.append(pm.serialize());
buffer.append("</webservice-description>");
return buffer.toString();
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/jsr109/WebservicesMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/jsr109/WebservicesMetaData.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/metadata/jsr109/WebservicesMetaData.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
// $Id$
package org.jboss.ws.metadata.jsr109;
@@ -47,9 +47,10 @@
// The URL to the webservices.xml descriptor
private URL descriptorURL;
- /**
- * Construct webservices meta data, with a given resource class loader.
- */
+ public WebservicesMetaData()
+ {
+ }
+
public WebservicesMetaData(URL descriptorURL)
{
this.descriptorURL = descriptorURL;
@@ -71,7 +72,7 @@
webserviceDescriptions.toArray(array);
return array;
}
-
+
//Serialize as a String
public String serialize()
{
@@ -79,30 +80,30 @@
//Construct the webservices.xml definitions
List qnames = new ArrayList();
Iterator iter = webserviceDescriptions.iterator();
- while (iter != null && iter.hasNext())
+ while(iter != null && iter.hasNext())
{
WebserviceDescriptionMetaData wmd = (WebserviceDescriptionMetaData)iter.next();
qnames.addAll(wmd.getPortComponentQNames());
- }
- createHeader(buffer, qnames);
- for (WebserviceDescriptionMetaData wm : webserviceDescriptions)
- buffer.append(wm.serialize());
+ }
+ createHeader( buffer,qnames );
+ for(WebserviceDescriptionMetaData wm:webserviceDescriptions)
+ buffer.append(wm.serialize());
buffer.append("</webservices>");
- return buffer.toString();
+ return buffer.toString();
}
-
- private void createHeader(StringBuilder buf, List qnames)
- {
+
+ private void createHeader( StringBuilder buf, List qnames)
+ {
buf.append("<webservices xmlns='http://java.sun.com/xml/ns/j2ee'");
- buf.append(" xmlns:xsi='" + Constants.NS_SCHEMA_XSI + "'");
+ buf.append(" xmlns:xsi='"+Constants.NS_SCHEMA_XSI+"'");
//Lets append the port type namespaces
Iterator iter = qnames.iterator();
- while (iter != null && iter.hasNext())
+ while(iter != null && iter.hasNext())
{
QName qn = (QName)iter.next();
buf.append(" xmlns:").append(qn.getPrefix()).append("='").append(qn.getNamespaceURI()).append("'");
- }
+ }
buf.append(" xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'");
- buf.append(" version='1.1' >");
+ buf.append(" version='1.1' >");
}
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Reader.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -142,10 +142,10 @@
private void cleanupTemporaryFiles()
{
- for (File current : tempFiles)
- {
- current.delete();
- }
+ for (File current : tempFiles)
+ {
+ current.delete();
+ }
}
// process all bindings not within service separetly
@@ -496,7 +496,7 @@
if (wsaAction != null)
destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_IN, wsaAction.getLocalPart()));
- List<String> paramOrder = (List<String>) srcOperation.getParameterOrdering();
+ List<String> paramOrder = (List<String>)srcOperation.getParameterOrdering();
if (paramOrder != null)
{
for (String name : paramOrder)
@@ -506,12 +506,24 @@
}
}
- WSDLInterfaceOperationInput rpcInput = new WSDLInterfaceOperationInput(destOperation);
- for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(paramOrder))
+ WSDLInterfaceOperationInput rpcInput = null;
+ if (Constants.URI_STYLE_RPC == destOperation.getStyle())
{
- if (Constants.URI_STYLE_IRI == destOperation.getStyle())
+ rpcInput = new WSDLInterfaceOperationInput(destOperation);;
+
+ // This is really a place holder, but also the actual value used in WSDL-2.0 RPC bindings
+ rpcInput.setElement(destOperation.getQName());
+ rpcInput.setMessageName(srcMessage.getQName());
+ destOperation.addInput(rpcInput);
+ }
+
+ for (Part srcPart : (List<Part>)srcMessage.getOrderedParts(paramOrder))
+ {
+ if (Constants.URI_STYLE_DOC == destOperation.getStyle())
{
WSDLInterfaceOperationInput destInput = new WSDLInterfaceOperationInput(destOperation);
+ destInput.setPartName(srcPart.getName());
+
QName elementName = messagePartToElementName(srcWsdl, srcPortType, srcOperation, srcMessage, srcPart);
destInput.setElement(elementName);
@@ -519,30 +531,19 @@
destInput.setMessageName(srcMessage.getQName());
destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN, srcMessage.getQName().getLocalPart()));
- destInput.setPartName(srcPart.getName());
-
destOperation.addInput(destInput);
}
else
{
// If we don't have a type then we aren't a valid RPC parameter
- // This could happen on a header element, in which case the
- // binding will pick it up
+ // This could happen on a header element, in which case the binding will pick it up later
QName xmlType = srcPart.getTypeName();
if (xmlType != null)
rpcInput.addChildPart(new WSDLRPCPart(srcPart.getName(), destWsdl.registerQName(xmlType)));
- else
+ else
messagePartToElementName(srcWsdl, srcPortType, srcOperation, srcMessage, srcPart);
}
}
- if (Constants.URI_STYLE_RPC == destOperation.getStyle())
- {
- // This is really a place holder, but also the actual value used in
- // WSDL 2.0 RPC bindings
- rpcInput.setElement(destOperation.getQName());
- rpcInput.setMessageName(srcMessage.getQName());
- destOperation.addInput(rpcInput);
- }
}
}
@@ -559,11 +560,11 @@
log.trace("processOperationOutput: " + srcMessage.getQName());
destOperation.setPattern(Constants.WSDL20_PATTERN_IN_OUT);
- QName wsaAction = (QName) srcOutput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
+ QName wsaAction = (QName)srcOutput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
if (wsaAction != null)
destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_OUT, wsaAction.getLocalPart()));
- List<String> paramOrder = (List<String>) srcOperation.getParameterOrdering();
+ List<String> paramOrder = (List<String>)srcOperation.getParameterOrdering();
if (paramOrder != null)
{
for (String name : paramOrder)
@@ -573,30 +574,36 @@
WSDLRPCSignatureItem item = destOperation.getRpcSignatureitem(name);
if (item != null)
item.setDirection(Direction.INOUT);
- else
- destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name, Direction.OUT));
+ else destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name, Direction.OUT));
}
}
}
- WSDLInterfaceOperationOutput rpcOutput = new WSDLInterfaceOperationOutput(destOperation);
- for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(null))
+ WSDLInterfaceOperationOutput rpcOutput = null;
+ if (Constants.URI_STYLE_RPC == destOperation.getStyle())
{
- if (Constants.URI_STYLE_IRI == destOperation.getStyle())
+ rpcOutput = new WSDLInterfaceOperationOutput(destOperation);
+ // This is really a place holder, but also the actual value used in WSDL-2.0 RPC bindings
+ QName name = destOperation.getQName();
+ rpcOutput.setElement(new QName(name.getNamespaceURI(), name.getLocalPart() + "Response"));
+ rpcOutput.setMessageName(srcMessage.getQName());
+ destOperation.addOutput(rpcOutput);
+ }
+
+ for (Part srcPart : (List<Part>)srcMessage.getOrderedParts(null))
+ {
+ if (Constants.URI_STYLE_DOC == destOperation.getStyle())
{
WSDLInterfaceOperationOutput destOutput = new WSDLInterfaceOperationOutput(destOperation);
+ destOutput.setPartName(srcPart.getName());
QName elementName = messagePartToElementName(srcWsdl, srcPortType, srcOperation, srcMessage, srcPart);
destOutput.setElement(elementName);
// Lets remember the Message name
destOutput.setMessageName(srcMessage.getQName());
- destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT, srcMessage.getQName()
- .getLocalPart()));
+ destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT, srcMessage.getQName().getLocalPart()));
- // Remember the original part name
- destOutput.setPartName(srcPart.getName());
-
destOperation.addOutput(destOutput);
}
else
@@ -607,20 +614,10 @@
QName xmlType = srcPart.getTypeName();
if (xmlType != null)
rpcOutput.addChildPart(new WSDLRPCPart(srcPart.getName(), destWsdl.registerQName(xmlType)));
- else
+ else
messagePartToElementName(srcWsdl, srcPortType, srcOperation, srcMessage, srcPart);
}
}
-
- if (Constants.URI_STYLE_RPC == destOperation.getStyle())
- {
- // This is really a place holder, but also the actual value used in
- // WSDL 2.0 RPC bindings
- QName name = destOperation.getQName();
- rpcOutput.setElement(new QName(name.getNamespaceURI(), name.getLocalPart() + "Response"));
- rpcOutput.setMessageName(srcMessage.getQName());
- destOperation.addOutput(rpcOutput);
- }
}
private void processOperationFaults(Operation srcOperation, WSDLInterfaceOperation destOperation, WSDLInterface destInterface)
@@ -733,23 +730,23 @@
if (operationStyle == null)
{
- for (ExtensibilityElement extElement : (List<ExtensibilityElement>) srcBinding.getExtensibilityElements())
+ for (ExtensibilityElement extElement : (List<ExtensibilityElement>)srcBinding.getExtensibilityElements())
{
QName elementType = extElement.getElementType();
if (extElement instanceof SOAPBinding)
{
- SOAPBinding soapBinding = (SOAPBinding) extElement;
+ SOAPBinding soapBinding = (SOAPBinding)extElement;
operationStyle = soapBinding.getStyle();
}
else if (SOAP12_BINDING.equals(elementType))
{
- Element domElement = ((UnknownExtensibilityElement) extElement).getElement();
+ Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
operationStyle = getOptionalAttribute(domElement, "style");
}
}
}
- return ("rpc".equals(operationStyle)) ? Constants.URI_STYLE_RPC : Constants.URI_STYLE_IRI;
+ return ("rpc".equals(operationStyle)) ? Constants.URI_STYLE_RPC : Constants.URI_STYLE_DOC;
}
private void processBinding(Definition srcWsdl, Binding srcBinding)
@@ -894,11 +891,14 @@
interface ReferenceCallback
{
void removeReference(QName element);
+
void removeRPCPart(String partName);
+
QName getXmlType(String partName);
}
- private void processBindingInput(WSDLBindingOperation destBindingOperation, final WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation, BindingInput srcBindingInput)
+ private void processBindingInput(WSDLBindingOperation destBindingOperation, final WSDLInterfaceOperation destIntfOperation,
+ final BindingOperation srcBindingOperation, BindingInput srcBindingInput)
{
log.trace("processBindingInput");
@@ -907,8 +907,7 @@
WSDLBindingOperationInput input = new WSDLBindingOperationInput(destBindingOperation);
destBindingOperation.addInput(input);
- ReferenceCallback cb = new ReferenceCallback()
- {
+ ReferenceCallback cb = new ReferenceCallback() {
public QName getXmlType(String partName)
{
return srcBindingOperation.getOperation().getInput().getMessage().getPart(partName).getTypeName();
@@ -931,7 +930,8 @@
processBindingReference(destBindingOperation, destIntfOperation, soap11Body, extList, input, cb);
}
- private void processBindingOutput(WSDLBindingOperation destBindingOperation, final WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation, BindingOutput srcBindingOutput)
+ private void processBindingOutput(WSDLBindingOperation destBindingOperation, final WSDLInterfaceOperation destIntfOperation,
+ final BindingOperation srcBindingOperation, BindingOutput srcBindingOutput)
{
log.trace("processBindingInput");
@@ -940,8 +940,7 @@
WSDLBindingOperationOutput output = new WSDLBindingOperationOutput(destBindingOperation);
destBindingOperation.addOutput(output);
- ReferenceCallback cb = new ReferenceCallback()
- {
+ ReferenceCallback cb = new ReferenceCallback() {
public QName getXmlType(String partName)
{
return srcBindingOperation.getOperation().getOutput().getMessage().getPart(partName).getTypeName();
@@ -965,9 +964,8 @@
processBindingReference(destBindingOperation, destIntfOperation, soap11Body, extList, output, cb);
}
-
- private void processBindingReference(WSDLBindingOperation destBindingOperation, WSDLInterfaceOperation destIntfOperation,
- QName soap11Body, List<ExtensibilityElement> extList, WSDLBindingMessageReference reference, ReferenceCallback callback)
+ private void processBindingReference(WSDLBindingOperation destBindingOperation, WSDLInterfaceOperation destIntfOperation, QName soap11Body,
+ List<ExtensibilityElement> extList, WSDLBindingMessageReference reference, ReferenceCallback callback)
{
for (ExtensibilityElement extElement : extList)
{
@@ -988,7 +986,7 @@
throw new WSException("Could not determine element name from header: " + partName);
reference.addSoapHeader(new WSDLSOAPHeader(elementName, partName));
- if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
+ if (Constants.URI_STYLE_DOC == destIntfOperation.getStyle())
{
callback.removeReference(elementName);
}
@@ -1030,9 +1028,9 @@
// Found content types in this part
if (name != null)
{
- QName xmlType = callback.getXmlType(name);
+ QName xmlType = callback.getXmlType(name);
reference.addMimePart(new WSDLMIMEPart(name, xmlType, types));
- if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
+ if (Constants.URI_STYLE_DOC == destIntfOperation.getStyle())
{
// A mime part must be defined as <part type="">
callback.removeReference(new QName(name));
@@ -1047,7 +1045,6 @@
}
}
-
private void processEncodingStyle(ExtensibilityElement extElement, WSDLBindingOperation destBindingOperation)
{
log.trace("processEncodingStyle");
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -193,8 +193,6 @@
/**
* Gets the WSDL 1.1 part name.
- *
- * @return the part name
*/
public String getPartName()
{
@@ -202,6 +200,14 @@
}
/**
+ * Sets the WSDL 1.1 part name.
+ */
+ public void setPartName(String partName)
+ {
+ this.partName = partName;
+ }
+
+ /**
* Sets the WSDL 1.1 message name.
*
* @param messageName The part name
@@ -221,16 +227,6 @@
return messageName;
}
- /**
- * Sets the WSDL 1.1 part name.
- *
- * @param partName The part name
- */
- public void setPartName(String partName)
- {
- this.partName = partName;
- }
-
public int compareTo(Object o)
{
int c = -1;
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -167,8 +167,7 @@
WSDLInterfaceOperationInput opInput = null;
for (WSDLInterfaceOperationInput auxInput : inputs.values())
{
- WSDLProperty property = auxInput.getProperty(Constants.WSDL_PROPERTY_PART_NAME);
- if (property != null && property.getValue().equals(partName))
+ if (partName.equals(auxInput.getPartName()))
opInput = auxInput;
}
return opInput;
@@ -200,8 +199,7 @@
WSDLInterfaceOperationOutput opOutput = null;
for (WSDLInterfaceOperationOutput auxOutput : outputs.values())
{
- WSDLProperty property = auxOutput.getProperty(Constants.WSDL_PROPERTY_PART_NAME);
- if (property != null && property.getValue().equals(partName))
+ if (partName.equals(auxOutput.getPartName()))
opOutput = auxOutput;
}
return opOutput;
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/WSSchemaUtils.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/WSSchemaUtils.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/WSSchemaUtils.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -48,6 +48,7 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.utils.DOMWriter;
import org.jboss.xb.binding.NamespaceRegistry;
/**
@@ -569,7 +570,10 @@
buf.append("<restriction base='" + baseType + "'>");
StringList list = ((XSSimpleTypeDefinition)xstype).getLexicalEnumeration();
for (int i = 0; i < list.getLength(); i++)
- buf.append("<enumeration value='" + list.item(i) +"'/>");
+ {
+ String listItem = DOMWriter.normalize(list.item(i), false);
+ buf.append("<enumeration value='" + listItem +"'/>");
+ }
buf.append("</restriction>");
}
buf.append("</simpleType>");
Modified: trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -158,7 +158,7 @@
protected void processOperationDOC(WSDLInterfaceOperation interfaceOperation, WSDLBindingOperation bindingOperation, OperationMetaData operation)
{
- interfaceOperation.setStyle(Constants.URI_STYLE_IRI);
+ interfaceOperation.setStyle(Constants.URI_STYLE_DOC);
WSDLInterfaceOperationInput input = new WSDLInterfaceOperationInput(interfaceOperation);
WSDLBindingOperationInput bindingInput = new WSDLBindingOperationInput(bindingOperation);
Modified: trunk/src/main/java/org/jboss/ws/utils/DOMWriter.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/utils/DOMWriter.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/main/java/org/jboss/ws/utils/DOMWriter.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -98,12 +98,21 @@
private boolean wroteXMLDeclaration;
// The node that started the write
private Node rootNode;
-
+ // True if we want namespace completion
+ private boolean completeNamespaces = true;
+
public DOMWriter(Writer w)
{
this.out = new PrintWriter(w);
}
+ public DOMWriter(Writer w, String charsetName)
+ {
+ this.out = new PrintWriter(w);
+ this.charsetName = charsetName;
+ this.writeXMLDeclaration = true;
+ }
+
public DOMWriter(OutputStream stream)
{
try
@@ -157,6 +166,17 @@
return this;
}
+ /**
+ * Set wheter subelements should have their namespaces completed.
+ * Setting this to false may lead to invalid XML fragments.
+ * The default is true.
+ */
+ public DOMWriter setCompleteNamespaces(boolean complete)
+ {
+ this.completeNamespaces = complete;
+ return this;
+ }
+
public boolean isPrettyprint()
{
return prettyprint;
@@ -181,9 +201,9 @@
* Set wheter the XML declaration should be written.
* The default is false.
*/
- public DOMWriter setWriteXMLDeclaration(boolean writeXMLDeclaration)
+ public DOMWriter setWriteXMLDeclaration(boolean flag)
{
- this.writeXMLDeclaration = writeXMLDeclaration;
+ this.writeXMLDeclaration = flag;
return this;
}
@@ -210,7 +230,10 @@
if (charsetName != null)
out.print(" encoding='" + charsetName + "'");
- out.println("?>");
+ out.print("?>");
+ if (prettyprint)
+ out.println();
+
wroteXMLDeclaration = true;
}
@@ -232,7 +255,7 @@
break;
}
- // print element with attributes
+ // print element with attributes
case Node.ELEMENT_NODE:
{
Element element = (Element)node;
@@ -247,7 +270,7 @@
out.print('<');
out.print(nodeName);
-
+
Map nsMap = new HashMap();
String elPrefix = node.getPrefix();
if (elPrefix != null)
@@ -255,15 +278,15 @@
String nsURI = getNamespaceURI(elPrefix, element, rootNode);
nsMap.put(elPrefix, nsURI);
}
-
+
Attr attrs[] = sortAttributes(node.getAttributes());
for (int i = 0; i < attrs.length; i++)
{
Attr attr = attrs[i];
String atPrefix = attr.getPrefix();
String atName = attr.getNodeName();
- String atValue = normalize(attr.getNodeValue());
-
+ String atValue = normalize(attr.getNodeValue(), canonical);
+
if (atPrefix != null && !atPrefix.equals("xmlns") && !atPrefix.equals("xml"))
{
String nsURI = getNamespaceURI(atPrefix, element, rootNode);
@@ -277,20 +300,23 @@
nsMap.put(typePrefix, typeURI);
}
}
-
+
out.print(" " + atName + "='" + atValue + "'");
}
-
+
// Add missing namespace declaration
- Iterator itPrefix = nsMap.keySet().iterator();
- while (itPrefix.hasNext())
+ if (completeNamespaces)
{
- String prefix = (String)itPrefix.next();
- String nsURI = (String)nsMap.get(prefix);
- if (nsURI == null)
+ Iterator itPrefix = nsMap.keySet().iterator();
+ while (itPrefix.hasNext())
{
- nsURI = getNamespaceURI(prefix, element, null);
- out.print(" xmlns:" + prefix + "='" + nsURI + "'");
+ String prefix = (String)itPrefix.next();
+ String nsURI = (String)nsMap.get(prefix);
+ if (nsURI == null)
+ {
+ nsURI = getNamespaceURI(prefix, element, null);
+ out.print(" xmlns:" + prefix + "='" + nsURI + "'");
+ }
}
}
@@ -346,7 +372,7 @@
{
if (canonical)
{
- out.print(normalize(node.getNodeValue()));
+ out.print(normalize(node.getNodeValue(), canonical));
}
else
{
@@ -360,7 +386,7 @@
// print text
case Node.TEXT_NODE:
{
- String text = normalize(node.getNodeValue());
+ String text = normalize(node.getNodeValue(), canonical);
if (prettyprint == false || text.trim().length() > 0)
out.print(text);
break;
@@ -500,7 +526,7 @@
}
/** Normalizes the given string. */
- private String normalize(String s)
+ public static String normalize(String s, boolean canonical)
{
StringBuffer str = new StringBuffer();
Modified: trunk/src/test/ant/build-jars-jaxws.xml
===================================================================
--- trunk/src/test/ant/build-jars-jaxws.xml 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/test/ant/build-jars-jaxws.xml 2006-10-20 12:12:17 UTC (rev 1274)
@@ -169,6 +169,7 @@
<war warfile="${build.test.dir}/libs/jaxws-jsr181-webparam.war" webxml="${build.test.dir}/resources/jaxws/jsr181/webparam/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webparam/PingService.class"/>
+ <include name="org/jboss/test/ws/jaxws/jsr181/webparam/PingServiceImpl.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webparam/PingDocument*.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webparam/SecurityHeader.class"/>
</classes>
Modified: trunk/src/test/build.xml
===================================================================
--- trunk/src/test/build.xml 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/test/build.xml 2006-10-20 12:12:17 UTC (rev 1274)
@@ -140,6 +140,7 @@
<!-- The jbossws client classpath -->
<path id="jbossws.client.classpath">
+ <pathelement location="${build.lib.dir}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/activation.jar"/>
<pathelement location="${jboss.client}/commons-logging.jar"/>
<pathelement location="${jboss.client}/javassist.jar"/>
@@ -149,7 +150,6 @@
<pathelement location="${jboss.client}/jbossall-client.jar"/>
<pathelement location="${jboss.client}/jbossretro-rt.jar"/>
<pathelement location="${jboss.client}/jboss-backport-concurrent.jar"/>
- <pathelement location="${jboss.client}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
</path>
Modified: trunk/src/test/etc/log4j.xml
===================================================================
--- trunk/src/test/etc/log4j.xml 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/test/etc/log4j.xml 2006-10-20 12:12:17 UTC (rev 1274)
@@ -53,7 +53,7 @@
<!-- ================ -->
<category name="org.jboss.ws">
- <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ <priority value="DEBUG"/>
</category>
<category name="org.jboss.remoting">
Modified: trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -66,7 +66,7 @@
// check the echoString operation
WSDLInterfaceOperation wsdlOperation = wsdlInterface.getOperation(new NCName("echoString"));
- assertEquals(Constants.URI_STYLE_IRI, wsdlOperation.getStyle());
+ assertEquals(Constants.URI_STYLE_DOC, wsdlOperation.getStyle());
WSDLInterfaceOperationInput wsdlInput = wsdlOperation.getInput(new QName(TARGET_NAMESPACE, "echoString"));
assertEquals(new QName(TARGET_NAMESPACE, "echoString"), wsdlInput.getXMLType());
@@ -75,7 +75,7 @@
// check the echoSimpleUserType operation
wsdlOperation = wsdlInterface.getOperation(new NCName("echoSimpleUserType"));
- assertEquals(Constants.URI_STYLE_IRI, wsdlOperation.getStyle());
+ assertEquals(Constants.URI_STYLE_DOC, wsdlOperation.getStyle());
wsdlInput = wsdlOperation.getInput(new QName(TARGET_NAMESPACE, "echoSimpleUserType"));
assertEquals(new QName(TARGET_NAMESPACE, "echoSimpleUserType"), wsdlInput.getXMLType());
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/complex/client/JSR181ComplexTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/complex/client/JSR181ComplexTestCase.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/complex/client/JSR181ComplexTestCase.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -21,18 +21,13 @@
*/
package org.jboss.test.ws.jaxws.jsr181.complex.client;
-import java.io.File;
-import java.net.URL;
import java.util.Arrays;
import java.util.Calendar;
-import javax.xml.rpc.Service;
-
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
/**
*
@@ -48,18 +43,6 @@
return JBossWSTestSetup.newTestSetup(JSR181ComplexTestCase.class, /* "jaxws-jsr181-complex.war" */ "");
}
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-// URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jsr181-complex/RegistrationService?wsdl");
-// File mappingFile = new File("resources/jaxws/jsr181/complex/jaxrpc-mapping.xml");
-// ServiceFactoryImpl factory = new ServiceFactoryImpl();
- //Service service = factory.createService(wsdlURL, null, mappingFile.toURL());
- //port = (RegistrationService) service.getPort(RegistrationService.class);
- }
-
-
public void testRegistration() throws Exception
{
System.out.println("FIXME: JBWS-1297");
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -21,21 +21,15 @@
*/
package org.jboss.test.ws.jaxws.jsr181.webparam;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.rpc.Service;
+import javax.xml.ws.Service;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.jaxrpc.CallImpl;
-import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.metadata.OperationMetaData;
-import org.jboss.ws.metadata.ParameterMetaData;
/**
* Test the JSR-181 annotation: javax.jws.WebParam
@@ -56,21 +50,17 @@
public void testEcho() throws Exception
{
QName serviceName = new QName(targetNS, "PingServiceService");
- QName portName = new QName(targetNS, "PingServicePort");
URL wsdlURL = new URL(endpointURL + "?wsdl");
- File mappingFile = new File("resources/jaxws/jsr181/webparam/jaxrpc-mapping.xml");
- assertTrue(mappingFile.exists());
+ Service service = Service.create(wsdlURL, serviceName);
+ PingService port = (PingService)service.getPort(PingService.class);
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- Service service = factory.createService(wsdlURL, serviceName, mappingFile.toURL());
- CallImpl call = (CallImpl)service.createCall(portName, "echo");
-
PingDocument doc = new PingDocument("Hello Kermit");
- Object retObj = call.invoke(new Object[]{doc});
- assertEquals(doc, retObj);
+ PingDocument ret = port.echo(doc);
+ assertEquals(doc, ret);
}
+ /*
public void testPingOneWay() throws Exception
{
QName serviceName = new QName(targetNS, "PingServiceService");
@@ -145,4 +135,5 @@
Object retObj = call.invoke(new Object[]{doc, secHeader});
assertNull("Expected null return", retObj);
}
+ */
}
\ No newline at end of file
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/PingService.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/PingService.java 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/PingService.java 2006-10-20 12:12:17 UTC (rev 1274)
@@ -28,8 +28,6 @@
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.Holder;
-import org.jboss.logging.Logger;
-
/**
* Test the JSR-181 annotation: javax.jws.WebParam
*
@@ -38,36 +36,19 @@
*/
@WebService(targetNamespace = "http://www.openuri.org/jsr181/WebParamExample")
@SOAPBinding(style = SOAPBinding.Style.RPC)
-public class PingService
+public interface PingService
{
- // Provide logging
- private static Logger log = Logger.getLogger(PingService.class);
-
@WebMethod
- public PingDocument echo(PingDocument p)
- {
- log.info("echo: " + p);
- return p;
- }
+ public PingDocument echo(PingDocument p);
@Oneway
@WebMethod(operationName = "PingOneWay")
- public void ping(@WebParam(name = "Ping") PingDocument p)
- {
- log.info("ping: " + p);
- }
+ public void ping(@WebParam(name = "Ping") PingDocument p);
@WebMethod(operationName = "PingTwoWay")
- public void ping(@WebParam(name = "Ping", mode = WebParam.Mode.INOUT) Holder<PingDocument> p)
- {
- log.info("ping: " + p.value);
- p.value = new PingDocument(p.value.getContent() + " Response");
- }
+ public void ping(@WebParam(name = "Ping", mode = WebParam.Mode.INOUT) Holder<PingDocument> p);
@Oneway
@WebMethod(operationName = "SecurePing")
- public void ping(@WebParam(name = "Ping") PingDocument p, @WebParam(name = "SecHeader", header = true) SecurityHeader secHdr)
- {
- log.info("ping: " + p + "," + secHdr);
- }
+ public void ping(@WebParam(name = "Ping") PingDocument p, @WebParam(name = "SecHeader", header = true) SecurityHeader secHdr);
}
\ No newline at end of file
Modified: trunk/src/test/resources/jaxws/jsr181/webparam/WEB-INF/web.xml
===================================================================
--- trunk/src/test/resources/jaxws/jsr181/webparam/WEB-INF/web.xml 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/test/resources/jaxws/jsr181/webparam/WEB-INF/web.xml 2006-10-20 12:12:17 UTC (rev 1274)
@@ -7,7 +7,7 @@
<servlet>
<servlet-name>TestService</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jsr181.webparam.PingService</servlet-class>
+ <servlet-class>org.jboss.test.ws.jaxws.jsr181.webparam.PingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
Deleted: trunk/src/test/resources/jaxws/jsr181/webparam/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/jaxws/jsr181/webparam/jaxrpc-mapping.xml 2006-10-19 15:10:32 UTC (rev 1273)
+++ trunk/src/test/resources/jaxws/jsr181/webparam/jaxrpc-mapping.xml 2006-10-20 12:12:17 UTC (rev 1274)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
-
- <package-mapping>
- <package-type>org.jboss.test.ws.jaxws.jsr181.webparam</package-type>
- <namespaceURI>http://www.openuri.org/jsr181/WebParamExample</namespaceURI>
- </package-mapping>
-
-</java-wsdl-mapping>
18 years, 4 months
JBossWS SVN: r1273 - in branches/dlofthouse/JBWS-1190/src/test: ant java/org/jboss/test/ws/jaxws java/org/jboss/test/ws/jaxws/jbws1190 resources/jaxws resources/jaxws/jbws1190 resources/jaxws/jbws1190/WEB-INF
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-10-19 11:10:32 -0400 (Thu, 19 Oct 2006)
New Revision: 1273
Added:
branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/
branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/ConfidentialEndpoint.java
branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190Exception.java
branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190TestCase.java
branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.java
branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
branches/dlofthouse/JBWS-1190/src/test/resources/jaxws/jbws1190/
branches/dlofthouse/JBWS-1190/src/test/resources/jaxws/jbws1190/WEB-INF/
branches/dlofthouse/JBWS-1190/src/test/resources/jaxws/jbws1190/WEB-INF/web.xml
Modified:
branches/dlofthouse/JBWS-1190/src/test/ant/build-jars-jaxws.xml
Log:
JBWS-1190 - Test Case
Modified: branches/dlofthouse/JBWS-1190/src/test/ant/build-jars-jaxws.xml
===================================================================
--- branches/dlofthouse/JBWS-1190/src/test/ant/build-jars-jaxws.xml 2006-10-19 15:07:59 UTC (rev 1272)
+++ branches/dlofthouse/JBWS-1190/src/test/ant/build-jars-jaxws.xml 2006-10-19 15:10:32 UTC (rev 1273)
@@ -82,6 +82,16 @@
</classes>
</war>
+ <!-- jaxws-jbws1190 -->
+ <war destfile="${build.test.dir}/libs/jaxws-jbws1190.war" webxml="${build.test.dir}/resources/jaxws/jbws1190/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1190/ConfidentialEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws1190/JBWS1190Exception.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-jsr181-complex -->
<war warfile="${build.test.dir}/libs/jaxws-jsr181-complex.war" webxml="${build.test.dir}/resources/jaxws/jsr181/complex/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Added: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/ConfidentialEndpoint.java
===================================================================
--- branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/ConfidentialEndpoint.java 2006-10-19 15:07:59 UTC (rev 1272)
+++ branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/ConfidentialEndpoint.java 2006-10-19 15:10:32 UTC (rev 1273)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1190;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 19-October-2006
+ */
+@WebService(targetNamespace = "http://org.jboss/test/ws/jbws1190")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class ConfidentialEndpoint
+{
+
+ public String helloWorld(final String message)
+ {
+ return message;
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/ConfidentialEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190Exception.java
===================================================================
--- branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190Exception.java 2006-10-19 15:07:59 UTC (rev 1272)
+++ branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190Exception.java 2006-10-19 15:10:32 UTC (rev 1273)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1190;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 19-October-2006
+ */
+public class JBWS1190Exception extends RuntimeException
+{
+
+ public JBWS1190Exception()
+ {
+ super();
+ }
+
+ public JBWS1190Exception(final String message, final Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public JBWS1190Exception(final String message)
+ {
+ super(message);
+ }
+
+ public JBWS1190Exception(final Throwable cause)
+ {
+ super(cause);
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190Exception.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190TestCase.java
===================================================================
--- branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190TestCase.java 2006-10-19 15:07:59 UTC (rev 1272)
+++ branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190TestCase.java 2006-10-19 15:10:32 UTC (rev 1273)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1190;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 19-October-2006
+ */
+public class JBWS1190TestCase extends JBossWSTest
+{
+
+ private static final String ARCHIVE_NAME = "jaxws-jbws1190.war";
+
+ private static Service service;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1190TestCase.class, ARCHIVE_NAME);
+ }
+
+ protected void setUp() throws Exception
+ {
+ if (service == null)
+ {
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1190/TestEndpoint?wsdl");
+
+ QName qname = new QName("http://org.jboss/test/ws/jbws1190", "TestEndpointService");
+ service = factory.createService(wsdlURL, qname);
+ }
+ }
+
+ public void testTestEndpoint() throws Exception
+ {
+ QName portName = new QName("http://org.jboss/test/ws/jbws1190", "TestEndpointPort");
+ QName methodName = new QName("http://org.jboss/test/ws/jbws1190", "testAddress");
+
+ Call call = service.createCall(portName);
+ call.setOperationName(methodName);
+ call.invoke(new Object[] { ARCHIVE_NAME, "TestEndpointService", "http", "8080" });
+ }
+
+ public void testConfidentialEndpoint() throws Exception
+ {
+ QName portName = new QName("http://org.jboss/test/ws/jbws1190", "TestEndpointPort");
+ QName methodName = new QName("http://org.jboss/test/ws/jbws1190", "testAddress");
+
+ Call call = service.createCall(portName);
+ call.setOperationName(methodName);
+ call.invoke(new Object[] { ARCHIVE_NAME, "TestEndpointService", "https", "8484" });
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/JBWS1190TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.java
===================================================================
--- branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.java 2006-10-19 15:07:59 UTC (rev 1272)
+++ branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.java 2006-10-19 15:10:32 UTC (rev 1273)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1190;
+
+import java.rmi.Remote;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 19-October-2006
+ */
+@WebService(targetNamespace = "http://org.jboss/test/ws/jbws1190")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface TestEndpoint extends Remote
+{
+
+ @WebMethod
+ public void testAddress(final String archive, final String service, final String scheme, final String port);
+
+}
Property changes on: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
===================================================================
--- branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2006-10-19 15:07:59 UTC (rev 1272)
+++ branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2006-10-19 15:10:32 UTC (rev 1273)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1190;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.net.MalformedURLException;
+
+import javax.jws.WebService;
+
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.metadata.wsdl.WSDLService;
+import org.jboss.ws.server.ServerConfig;
+import org.jboss.ws.server.ServerConfigFactory;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 19-October-2006
+ */
+@WebService(name = "TestEndpoint", endpointInterface = "org.jboss.test.ws.jaxws.jbws1190.TestEndpoint")
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ public void testAddress(final String archive, final String service, final String scheme, final String port)
+ {
+ ServerConfigFactory serverConfigFactory = ServerConfigFactory.getInstance();
+ ServerConfig serverConfig = serverConfigFactory.getServerConfig();
+
+ File dataDir = serverConfig.getServerDataDir();
+ File wsdlDir = new File(dataDir.getAbsolutePath() + File.separator + "wsdl" + File.separator + archive);
+
+ if (wsdlDir.exists() == false)
+ {
+ throw new JBWS1190Exception(wsdlDir.getAbsolutePath() + " does not exist.");
+ }
+
+ File[] wsdls = wsdlDir.listFiles(new FilenameFilter() {
+ public boolean accept(File dir, String name)
+ {
+ return name.startsWith(service);
+ }
+ });
+
+ assertEquals("WSDL files found", 1, wsdls.length);
+
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ WSDLDefinitions wsdl;
+ try
+ {
+ wsdl = factory.parse(wsdls[0].toURL());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new JBWS1190Exception("Error readin WSDL", e);
+ }
+
+ WSDLService[] services = wsdl.getServices();
+ assertEquals("No of services", 1, services.length);
+
+ WSDLEndpoint[] endpoints = services[0].getEndpoints();
+ assertEquals("No of endpoints", 1, endpoints.length);
+
+ String address = endpoints[0].getAddress();
+ assertTrue("Expected Scheme '" + scheme + "'", address.startsWith(scheme + "://"));
+ assertTrue("Expected Port '" + port + "'", address.contains(":" + port + "/"));
+ }
+
+ private void assertEquals(final String message, final int expected, final int actual)
+ {
+ if (expected != actual)
+ {
+ throw new JBWS1190Exception(message + " expected=" + expected + " actual=" + actual);
+ }
+ }
+
+ private void assertTrue(final String message, final boolean value)
+ {
+ if (value == false)
+ {
+ throw new JBWS1190Exception(message);
+ }
+ }
+}
Property changes on: branches/dlofthouse/JBWS-1190/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1190/src/test/resources/jaxws/jbws1190/WEB-INF/web.xml
===================================================================
--- branches/dlofthouse/JBWS-1190/src/test/resources/jaxws/jbws1190/WEB-INF/web.xml 2006-10-19 15:07:59 UTC (rev 1272)
+++ branches/dlofthouse/JBWS-1190/src/test/resources/jaxws/jbws1190/WEB-INF/web.xml 2006-10-19 15:10:32 UTC (rev 1273)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>ConfidentialEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1190.ConfidentialEndpoint</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1190.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ConfidentialEndpoint</servlet-name>
+ <url-pattern>/ConfidentialEndpoint</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>ConfidentialEndpoint</web-resource-name>
+ <url-pattern>/ConfidentialEndpoint</url-pattern>
+ </web-resource-collection>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+</web-app>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1190/src/test/resources/jaxws/jbws1190/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 4 months
JBossWS SVN: r1272 - branches/dlofthouse
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-10-19 11:07:59 -0400 (Thu, 19 Oct 2006)
New Revision: 1272
Added:
branches/dlofthouse/JBWS-1190/
Log:
JBWS-1190 - Branch for JBWS-1190
Copied: branches/dlofthouse/JBWS-1190 (from rev 1271, branches/jbossws-1.0)
18 years, 4 months
JBossWS SVN: r1271 - trunk/src/main/java/org/jboss/ws/deployment
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-10-19 07:49:39 -0400 (Thu, 19 Oct 2006)
New Revision: 1271
Modified:
trunk/src/main/java/org/jboss/ws/deployment/JSR181ClientMetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
Log:
Lazily construct JAXBContext
Modified: trunk/src/main/java/org/jboss/ws/deployment/JSR181ClientMetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JSR181ClientMetaDataBuilder.java 2006-10-19 11:06:38 UTC (rev 1270)
+++ trunk/src/main/java/org/jboss/ws/deployment/JSR181ClientMetaDataBuilder.java 2006-10-19 11:49:39 UTC (rev 1271)
@@ -76,8 +76,7 @@
// Process @WebMethod
processWebMethods(epMetaData, wsClass, true);
- // Build JAXB Context
- createJAXBContext(epMetaData.getInterfaceQName().getNamespaceURI());
+ // Populate parameter xmlTypes
populateXmlTypes(epMetaData);
// Eager initialization
Modified: trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-10-19 11:06:38 UTC (rev 1270)
+++ trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-10-19 11:49:39 UTC (rev 1271)
@@ -193,8 +193,7 @@
boolean includeAllMethods = (wsClass == seiClass);
processWebMethods(sepMetaData, wsClass, includeAllMethods);
- // Build JAXB Context
- createJAXBContext(sepMetaData.getInterfaceQName().getNamespaceURI());
+ // Populate parameter xmlTypes
populateXmlTypes(sepMetaData);
// Process or generate WSDL
@@ -250,49 +249,57 @@
typeRefs.clear();
}
- protected void createJAXBContext(String targetNamespace)
+ protected JAXBRIContext getJAXBContext(EndpointMetaData epMetaData)
{
- try
+ if (jaxbCtx == null)
{
- log.debug("createJAXBContext [types=" + javaTypes + ",refs=" + typeRefs + ",tns=" + targetNamespace + "]");
- jaxbCtx = JAXBRIContext.newInstance(javaTypes.toArray(new Class[0]), typeRefs, targetNamespace, false);
+ try
+ {
+ String targetNS = epMetaData.getInterfaceQName().getNamespaceURI();
+ log.debug("JAXBContext [types=" + javaTypes + ",tns=" + targetNS + "]");
+ jaxbCtx = JAXBRIContext.newInstance(javaTypes.toArray(new Class[0]), typeRefs, targetNS, false);
+ }
+ catch (JAXBException ex)
+ {
+ log.error("Cannot build JAXB context", ex);
+ }
}
- catch (JAXBException ex)
- {
- throw new WSException("Could not create JAXB Context: " + ex.getMessage(), ex);
- }
+ return jaxbCtx;
}
- protected void populateXmlTypes(EndpointMetaData endpoint)
+ protected void populateXmlTypes(EndpointMetaData epMetaData)
{
- TypesMetaData types = endpoint.getServiceMetaData().getTypesMetaData();
- for (OperationMetaData operation : endpoint.getOperations())
+ for (OperationMetaData operation : epMetaData.getOperations())
{
- for (ParameterMetaData parameter : operation.getParameters())
+ for (ParameterMetaData paramMetaData : operation.getParameters())
{
- populateXmlType(types, parameter);
+ populateXmlType(paramMetaData);
}
ParameterMetaData returnParameter = operation.getReturnParameter();
if (returnParameter != null)
- populateXmlType(types, returnParameter);
+ populateXmlType(returnParameter);
}
}
- private void populateXmlType(TypesMetaData types, ParameterMetaData parameter)
+ private void populateXmlType(ParameterMetaData paramMetaData)
{
+ EndpointMetaData epMetaData = paramMetaData.getOperationMetaData().getEndpointMetaData();
+ TypesMetaData types = epMetaData.getServiceMetaData().getTypesMetaData();
+ JAXBRIContext jaxbCtx = getJAXBContext(epMetaData);
+
try
{
- QName xmlName = parameter.getXmlName();
- QName xmlType = jaxbCtx.getTypeName(new TypeReference(xmlName, parameter.getJavaType()));
+ QName xmlName = paramMetaData.getXmlName();
+ QName xmlType = jaxbCtx.getTypeName(new TypeReference(xmlName, paramMetaData.getJavaType()));
if (xmlType != null)
{
- parameter.setXmlType(xmlType);
- types.addTypeMapping(new TypeMappingMetaData(types, xmlType, parameter.getJavaTypeName()));
+ paramMetaData.setXmlType(xmlType);
+ types.addTypeMapping(new TypeMappingMetaData(types, xmlType, paramMetaData.getJavaTypeName()));
}
}
catch (Exception ex)
{
- log.warn("Could not load type: " + parameter.getXmlName());
+ log.warn("Cannot obtain xmlType for: " + paramMetaData.getXmlName());
}
}
@@ -866,7 +873,7 @@
opMetaData.addExtension(addrExt);
}
- protected void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData, String wsdlLocation, EndpointMetaData endpointMetaData)
+ protected void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData, String wsdlLocation, EndpointMetaData epMetaData)
{
if (wsdlLocation.length() > 0)
{
@@ -876,10 +883,9 @@
{
try
{
- UnifiedMetaData wsMetaData = serviceMetaData.getUnifiedMetaData();
String serviceName = serviceMetaData.getQName().getLocalPart();
- WSDLGenerator generator = new JAXBWSDLGenerator(jaxbCtx);
+ WSDLGenerator generator = new JAXBWSDLGenerator(getJAXBContext(epMetaData));
WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
ServerConfigFactory factory = ServerConfigFactory.getInstance();
18 years, 4 months
JBossWS SVN: r1270 - in branches/dlofthouse/JBWS-1188/src/test: ant java/org/jboss/test/ws/jaxrpc java/org/jboss/test/ws/jaxrpc/jbws1188 resources/jaxrpc resources/jaxrpc/jbws1188 resources/jaxrpc/jbws1188/META-INF resources/jaxrpc/jbws1188/WEB-INF resources/jaxrpc/jbws1188/WEB-INF/wsdl
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-10-19 07:06:38 -0400 (Thu, 19 Oct 2006)
New Revision: 1270
Added:
branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/
branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/JBWS1188TestCase.java
branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpoint.java
branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpointImpl.java
branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/UsernameHandler.java
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/application-client.xml
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/jboss-client.xml
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jaxrpc-mapping.xml
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jboss-wsse-server.xml
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/web.xml
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/webservices.xml
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/wsdl/
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/wsdl/TestService.wsdl
branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/wstools-config.xml
Modified:
branches/dlofthouse/JBWS-1188/src/test/ant/build-jars-jaxrpc.xml
Log:
JBWS-1188 - Test Case
Modified: branches/dlofthouse/JBWS-1188/src/test/ant/build-jars-jaxrpc.xml
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/ant/build-jars-jaxrpc.xml 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/ant/build-jars-jaxrpc.xml 2006-10-19 11:06:38 UTC (rev 1270)
@@ -731,6 +731,34 @@
</webinf>
</war>
+ <!-- jaxrpc-jbws1188 -->
+ <war warfile="${build.test.dir}/libs/jaxrpc-jbws1188.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1188/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1188/TestEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1188/TestEndpoint.class"/>
+ </classes>
+ <webinf dir="${build.test.dir}/resources/jaxrpc/jbws1188/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ <include name="jboss-wsse-server.xml"/>
+ </webinf>
+ </war>
+ <jar jarfile="${build.test.dir}/libs/jaxrpc-jbws1188-client.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1188/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1188/UsernameHanlder.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1188/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1188/WEB-INF">
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jaxrpcws-jbws1205 -->
<war warfile="${build.test.dir}/libs/jaxrpc-jbws1205-simple.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1205/SimpleEndpoint/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Added: branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/JBWS1188TestCase.java
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/JBWS1188TestCase.java 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/JBWS1188TestCase.java 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1188;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
+
+/**
+ * Test case to test the UsernameToken can be sent without an id.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 19-October-2006
+ */
+public class JBWS1188TestCase extends JBossWSTest
+{
+
+ private static TestEndpoint port;
+
+ public static Test suite() throws Exception
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1188TestCase.class, "jaxrpc-jbws1188.war, jaxrpc-jbws1188-client.jar");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ if (port == null)
+ {
+ if (isTargetServerJBoss())
+ {
+ InitialContext iniCtx = getInitialContext();
+ Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ }
+ else
+ {
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new File("resources/jaxrpc/jbws1188/WEB-INF/wsdl/TestService.wsdl").toURL();
+ URL mappingURL = new File("resources/jaxrpc/jbws1188/WEB-INF/jaxrpc-mapping.xml").toURL();
+ QName qname = new QName("http://org.jboss.test.ws/jbws1188", "TestService");
+ Service service = factory.createService(wsdlURL, qname, mappingURL);
+ port = (TestEndpoint)service.getPort(TestEndpoint.class);
+ }
+ }
+ }
+
+ public void testUsernameTokenNoID() throws Exception
+ {
+ assertEquals("kermit-thefrog", port.echoString("Hello"));
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/JBWS1188TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpoint.java
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpoint.java 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpoint.java 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1188;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @author darran.lofthouse(a)jboss.com
+ * @since 19-October-2006
+ */
+public interface TestEndpoint extends Remote
+{
+
+ public String echoString(final String message) throws RemoteException;
+
+}
Property changes on: branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpointImpl.java
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpointImpl.java 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpointImpl.java 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1188;
+
+import java.rmi.RemoteException;
+import java.security.Principal;
+
+import org.jboss.security.SecurityAssociation;
+
+/**
+ * @author darran.lofthouse(a)jboss.com
+ * @since 19-October-2006
+ */
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ public String echoString(String message) throws RemoteException
+ {
+ Principal principal = SecurityAssociation.getPrincipal();
+ Object credential = SecurityAssociation.getCredential();
+
+ return principal.getName() + "-" + credential;
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/UsernameHandler.java
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/UsernameHandler.java 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/UsernameHandler.java 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxrpc.jbws1188;
+
+import java.io.ByteArrayInputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
+
+import org.jboss.ws.soap.SOAPFactoryImpl;
+import org.jboss.ws.wsse.Util;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Test case handler to test the UsernameToken can be sent without an id.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 19-October-2006
+ */
+public class UsernameHandler extends GenericHandler
+{
+
+ private static final String SECURITY_HEADER = "<wsse:Security env:mustUnderstand='1' xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext...' xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...'>"
+ + "<wsse:UsernameToken>"
+ + "<wsse:Username xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext...'>kermit</wsse:Username>"
+ + "<wsse:Password xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext...'>thefrog</wsse:Password>"
+ + "</wsse:UsernameToken>" + "</wsse:Security>";
+
+ public QName[] getHeaders()
+ {
+ return null;
+ }
+
+ public boolean handleRequest(final MessageContext msgContext)
+ {
+ try
+ {
+ SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
+ SOAPPart soapPart = soapMessage.getSOAPPart();
+ Element soapHeader = Util.findOrCreateSoapHeader(soapPart.getDocumentElement());
+
+ SOAPFactoryImpl factory = (SOAPFactoryImpl)SOAPFactory.newInstance();
+
+ DocumentBuilder builder = getDocumentBuilder();
+ Document doc = builder.parse(new ByteArrayInputStream(SECURITY_HEADER.getBytes()));
+
+ soapHeader.insertBefore(factory.createElement(doc.getDocumentElement(), true), soapHeader.getFirstChild());
+
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("handleRequest", e);
+ }
+ }
+
+ private DocumentBuilder getDocumentBuilder() throws ParserConfigurationException
+ {
+ // Setup document builder
+ DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
+ docBuilderFactory.setNamespaceAware(true);
+
+ DocumentBuilder builder = docBuilderFactory.newDocumentBuilder();
+ return builder;
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1188/src/test/java/org/jboss/test/ws/jaxrpc/jbws1188/UsernameHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/application-client.xml
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/application-client.xml 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/application-client.xml 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
+ version="1.4">
+
+ <display-name>TestService</display-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1188.TestEndpoint</service-endpoint-interface>
+ </port-component-ref>
+ <handler>
+ <handler-name>UsernameHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxrpc.jbws1188.UsernameHandler</handler-class>
+ </handler>
+ </service-ref>
+
+</application-client>
+
Property changes on: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/jboss-client.xml
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/jboss-client.xml 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/jboss-client.xml 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!DOCTYPE jboss-client PUBLIC
+ "-//JBoss//DTD Application Client 4.0//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
+
+<jboss-client>
+ <jndi-name>jbossws-client</jndi-name>
+
+ <service-ref>
+ <service-ref-name>service/TestService</service-ref-name>
+ <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-jbws1188/TestEndpoint?wsdl</wsdl-override>
+ </service-ref>
+
+</jboss-client>
Property changes on: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jaxrpc-mapping.xml 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jaxrpc-mapping.xml 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1188</package-type>
+ <namespaceURI>http://org.jboss.test.ws/jbws1188/types</namespaceURI>
+ </package-mapping>
+ <service-interface-mapping>
+ <service-interface>org.jboss.test.ws.jaxrpc.jbws1188.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1188'>serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestEndpointPort</port-name>
+ <java-port-name>TestEndpointPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1188.TestEndpoint</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1188'>portTypeNS:TestEndpoint</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1188'>bindingNS:TestEndpointBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>echoString</java-method-name>
+ <wsdl-operation>echoString</wsdl-operation>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1188'>wsdlMsgNS:TestEndpoint_echoString</wsdl-message>
+ <wsdl-message-part-name>String_1</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>java.lang.String</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1188'>wsdlMsgNS:TestEndpoint_echoStringResponse</wsdl-message>
+ <wsdl-message-part-name>result</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jaxrpc-mapping.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jboss-wsse-server.xml
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jboss-wsse-server.xml 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jboss-wsse-server.xml 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+</jboss-ws-security>
Property changes on: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/jboss-wsse-server.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/web.xml
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/web.xml 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/web.xml 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <context-param>
+ <param-name>jbossws-config-name</param-name>>
+ <param-value>Standard WSSecurity Endpoint</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxrpc.jbws1188.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/webservices.xml
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/webservices.xml 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/webservices.xml 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,15 @@
+<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://org.jboss.test.ws/jbws1188' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
+ <webservice-description>
+ <webservice-description-name>TestService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>TestEndpointPort</port-component-name>
+ <wsdl-port>impl:TestEndpointPort</wsdl-port>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1188.TestEndpoint</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>TestEndpoint</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/webservices.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/wsdl/TestService.wsdl 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/wsdl/TestService.wsdl 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1188' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1188' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoString'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoStringResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoString' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoString'/>
+ <output message='tns:TestEndpoint_echoStringResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoString'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1188' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1188' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/WEB-INF/wsdl/TestService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/wstools-config.xml
===================================================================
--- branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/wstools-config.xml 2006-10-19 11:04:38 UTC (rev 1269)
+++ branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/wstools-config.xml 2006-10-19 11:06:38 UTC (rev 1270)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ wstools -cp ../../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
+-->
+
+<!-- Set the soap:address location to 'http://localhost:8080//jbossws-jbws1188/TestEndpoint?wsdl' to run with Tomcat -->
+
+<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <java-wsdl>
+ <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1188.TestEndpoint" style="rpc">
+ </service>
+ <namespaces target-namespace="http://org.jboss.test.ws/jbws1188" type-namespace="http://org.jboss.test.ws/jbws1188/types"/>
+ <mapping file="jaxrpc-mapping.xml"/>
+ <webservices servlet-link="TestEndpoint"/>
+ </java-wsdl>
+</configuration>
Property changes on: branches/dlofthouse/JBWS-1188/src/test/resources/jaxrpc/jbws1188/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 4 months
JBossWS SVN: r1269 - branches/dlofthouse
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-10-19 07:04:38 -0400 (Thu, 19 Oct 2006)
New Revision: 1269
Added:
branches/dlofthouse/JBWS-1188/
Log:
JBWS-1188 - Branch for JBWS-1188
Copied: branches/dlofthouse/JBWS-1188 (from rev 1268, branches/jbossws-1.0)
18 years, 4 months
JBossWS SVN: r1268 - trunk/src/main/java/org/jboss/ws/deployment
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-10-19 06:29:20 -0400 (Thu, 19 Oct 2006)
New Revision: 1268
Modified:
trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
Log:
Add debugging
Modified: trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-10-19 10:26:21 UTC (rev 1267)
+++ trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-10-19 10:29:20 UTC (rev 1268)
@@ -167,17 +167,16 @@
ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, new QName(targetNS, serviceName));
wsMetaData.addService(serviceMetaData);
- // Setup the ServerEndpointMetaData
- QName portQName = new QName(targetNS, portName);
- QName portTypeQName = new QName(targetNS, name);
- ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, portQName, portTypeQName, EndpointMetaData.Type.JAXWS);
- sepMetaData.setLinkName(linkName);
+ // Setup the ServerEndpointMetaData
+ QName portQName = new QName(targetNS, portName);
+ QName portTypeQName = new QName(targetNS, name);
+ ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, portQName, portTypeQName, EndpointMetaData.Type.JAXWS);
+ sepMetaData.setLinkName(linkName);
// Assign the WS-Security configuration,
WSSecurityConfiguration securityConfiguration = getWsSecurityConfiguration(udi);
serviceMetaData.setSecurityConfiguration(securityConfiguration);
-
sepMetaData.setServiceEndpointImplName(sepClass.getName());
sepMetaData.setServiceEndpointInterfaceName(wsClass.getName());
@@ -255,11 +254,12 @@
{
try
{
+ log.debug("createJAXBContext [types=" + javaTypes + ",refs=" + typeRefs + ",tns=" + targetNamespace + "]");
jaxbCtx = JAXBRIContext.newInstance(javaTypes.toArray(new Class[0]), typeRefs, targetNamespace, false);
}
catch (JAXBException ex)
{
- throw new WSException("Could not create JAXB Context: " + ex.getMessage(), ex);
+ throw new WSException("Could not create JAXB Context: " + ex.getMessage(), ex);
}
}
@@ -423,8 +423,7 @@
// Assert one-way
if (opMetaData.isOneWay() && mode != ParameterMode.IN)
- throw new IllegalArgumentException("A one-way operation can not have output parameters [" + "method = "
- + method.getName() + ", parameter = " + i + "]");
+ throw new IllegalArgumentException("A one-way operation can not have output parameters [" + "method = " + method.getName() + ", parameter = " + i + "]");
if (HolderUtils.isHolderType(javaType))
{
@@ -515,7 +514,6 @@
}
}
-
// Add faults
for (Class exClass : method.getExceptionTypes())
if (!RemoteException.class.isAssignableFrom(exClass))
@@ -579,8 +577,7 @@
RequestWrapper anReqWrapper = method.getAnnotation(RequestWrapper.class);
String localName = anReqWrapper.localName().length() > 0 ? anReqWrapper.localName() : xmlName.getLocalPart();
- String targetNamespace = anReqWrapper.targetNamespace().length() > 0 ? anReqWrapper.targetNamespace()
- : xmlName.getNamespaceURI();
+ String targetNamespace = anReqWrapper.targetNamespace().length() > 0 ? anReqWrapper.targetNamespace() : xmlName.getNamespaceURI();
xmlName = new QName(targetNamespace, localName);
if (anReqWrapper.className().length() > 0)
@@ -745,8 +742,7 @@
{
if (opMetaData.getStyle() != Style.RPC || anWebResult.header())
xmlName = new QName(namespaceURI, anWebResult.name());
- else
- xmlName = new QName(anWebResult.name());
+ else xmlName = new QName(anWebResult.name());
}
}
if (xmlName == null && opMetaData.isDocumentBare())
@@ -796,8 +792,7 @@
}
if (faultBeanName == null)
- faultBeanName = JavaUtils.getPackageName(omd.getEndpointMetaData().getServiceEndpointInterface())
- + ".jaxws." + exception.getSimpleName() + "Bean";
+ faultBeanName = JavaUtils.getPackageName(omd.getEndpointMetaData().getServiceEndpointInterface()) + ".jaxws." + exception.getSimpleName() + "Bean";
QName xmlName = new QName(omd.getQName().getNamespaceURI(), name);
@@ -842,7 +837,7 @@
if (!(type instanceof ParameterizedType))
return null;
- ParameterizedType paramType = (ParameterizedType) type;
+ ParameterizedType paramType = (ParameterizedType)type;
Type[] arguments = paramType.getActualTypeArguments();
String[] ret = new String[arguments.length];
for (int i = 0; i < arguments.length; i++)
@@ -912,6 +907,4 @@
}
}
-
-
}
18 years, 4 months
JBossWS SVN: r1267 - trunk
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-10-19 06:26:21 -0400 (Thu, 19 Oct 2006)
New Revision: 1267
Modified:
trunk/build.xml
Log:
Disable deploy-thirdparty
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2006-10-19 10:19:03 UTC (rev 1266)
+++ trunk/build.xml 2006-10-19 10:26:21 UTC (rev 1267)
@@ -526,9 +526,11 @@
<!-- Deploy to jboss/thirdparty -->
<target name="deploy-to-thirdparty" if="jboss.source.dist.available">
+ <!-- Only needed for the JBossAS webservice testsuite
<copy todir="${jboss.deploy.home}/../../../thirdparty/jboss/jbossxb/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
<copy todir="${jboss.deploy.home}/../../../thirdparty/jboss/${jbossws}/lib" file="${build.lib.dir}/${jbossws}-client.jar" overwrite="true"/>
<copy todir="${jboss.deploy.home}/../../../thirdparty/jboss/${jbossws}/lib" file="${build.lib.dir}/${jbossws}.sar" overwrite="true"/>
+ -->
</target>
<!-- Deploy to Tomcat -->
18 years, 4 months