Author: thomas.diesler(a)jboss.com
Date: 2007-01-12 07:48:02 -0500 (Fri, 12 Jan 2007)
New Revision: 1943
Added:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WebservicesXMLCreatorImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/interfaces/WebservicesXMLCreator.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/InvokeAttachType.java
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/InOutParameters/service/InOutParameters_Service.java
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/OutParameters/service/OutParameters_Service.java
Removed:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSDotXMLCreator.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/interfaces/WSDotXMLCreatorIntf.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/ParaListType.java
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/InOutParameters/service/InOutParametersService_Service.java
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/OutParameters/service/OutParametersService_Service.java
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManagerMBean.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/ResponseType.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/TranslatorBean.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/TransmulatorInterface.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1259/JBWS1259TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1260/JBWS1260TestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws_206/tests/InOutParameters/InOutParametersWSDL2JavaTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws_206/tests/OutParameters/OutParametersWSDL2JavaTestCase.java
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/jaxrpc-mapping.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/web.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/webservices.xml
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/wsdl/ExampleService.wsdl
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/wstools-config.xml
Log:
[JBWS-1384] - Attachment parts with doclit message
Change generate service interface name to end with 'Service'
Fix WSTools public API
Format generated webservices.xml
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-01-12
12:38:06 UTC (rev 1942)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -242,6 +242,9 @@
// Bind the request message
SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData,
epInv, unboundHeaders);
+
+ // Add possible attachment parts
+ addAttachmentParts(reqMessage);
setOutboundContextProperties();
@@ -295,7 +298,7 @@
// at pivot the message context might be replaced
msgContext = processPivot(msgContext);
- // Associate current message with message context
+ // Associate response message with message context
msgContext.setSOAPMessage(resMessage);
}
@@ -342,6 +345,11 @@
}
}
+ protected void addAttachmentParts(SOAPMessage reqMessage)
+ {
+ // By default do nothing
+ }
+
protected abstract CommonMessageContext processPivot(CommonMessageContext
requestContext);
protected CommonBindingProvider getCommonBindingProvider()
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-12
12:38:06 UTC (rev 1942)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -42,7 +42,10 @@
import javax.xml.rpc.Stub;
import javax.xml.rpc.encoding.SerializerFactory;
import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -85,6 +88,8 @@
private Map<QName, UnboundHeader> unboundHeaders = new LinkedHashMap<QName,
UnboundHeader>();
// A Map<String,Object> of Call properties
private Map<String, Object> properties = new HashMap<String, Object>();
+ // A List<AttachmentPart> of attachment parts set through the proxy
+ private List<AttachmentPart> attachmentParts = new
ArrayList<AttachmentPart>();
// The set of supported properties
private static final Set<String> standardProperties = new
HashSet<String>();
@@ -219,7 +224,40 @@
{
return unboundHeaders.keySet().iterator();
}
+
+ /**
+ * Adds the given AttachmentPart object to the outgoing SOAPMessage.
+ * An AttachmentPart object must be created before it can be added to a message.
+ */
+ public void addAttachmentPart(AttachmentPart part)
+ {
+ attachmentParts.add(part);
+ }
+ /**
+ * Clears the list of attachment parts.
+ */
+ public void clearAttachmentParts()
+ {
+ attachmentParts.clear();
+ }
+
+ /**
+ * Creates a new empty AttachmentPart object.
+ */
+ public AttachmentPart createAttachmentPart()
+ {
+ try
+ {
+ MessageFactory factory = MessageFactory.newInstance();
+ return factory.createMessage().createAttachmentPart();
+ }
+ catch (SOAPException ex)
+ {
+ throw new JAXRPCException("Cannot create attachment part");
+ }
+ }
+
/** Gets the address of a target service endpoint.
*/
public String getTargetEndpointAddress()
@@ -590,6 +628,16 @@
}
@Override
+ protected void addAttachmentParts(SOAPMessage reqMessage)
+ {
+ for (AttachmentPart part : attachmentParts)
+ {
+ log.debug("Adding attachment part: " + part.getContentId());
+ reqMessage.addAttachmentPart(part);
+ }
+ }
+
+ @Override
protected boolean callRequestHandlerChain(QName portName, HandlerType type)
{
SOAPMessageContextJAXRPC msgContext =
(SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java 2007-01-12
12:38:06 UTC (rev 1942)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -25,6 +25,7 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
+import javax.xml.soap.AttachmentPart;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -109,7 +110,23 @@
* A propriatory extension, that is not part of JAXRPC.
*/
Iterator getUnboundHeaders();
+
+ /**
+ * Adds the given AttachmentPart object to the outgoing SOAPMessage.
+ * An AttachmentPart object must be created before it can be added to a message.
+ */
+ void addAttachmentPart(AttachmentPart attachmentpart);
+ /**
+ * Clears the list of attachment parts.
+ */
+ void clearAttachmentParts();
+
+ /**
+ * Creates a new empty AttachmentPart object.
+ */
+ AttachmentPart createAttachmentPart();
+
/**
* Get the current port configuration file
* A propriatory extension, that is not part of JAXRPC.
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -200,6 +200,11 @@
this.serviceEndpointInvokerJSE = invoker;
}
+ public String getImplementationVersion()
+ {
+ return UnifiedMetaData.getImplementationVersion();
+ }
+
public List<ObjectName> getServiceEndpoints()
{
ArrayList<ObjectName> list = new ArrayList<ObjectName>();
@@ -616,7 +621,7 @@
public void create() throws Exception
{
- log.info(UnifiedMetaData.getImplementationVersion());
+ log.info(getImplementationVersion());
MBeanServer server = getJMXServer();
if (server != null)
{
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManagerMBean.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManagerMBean.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManagerMBean.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -38,6 +38,8 @@
// default object name
static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=ServiceEndpointManager");
+ String getImplementationVersion();
+
String getWebServiceHost();
void setWebServiceHost(String host) throws UnknownHostException;
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -386,15 +386,20 @@
pmd.setInHeader(true);
}
- for (WSDLMIMEPart mimePart : bindingInput.getMimeParts())
+ // we don't support swa binding parameters in document style
+ //
http://jira.jboss.org/jira/browse/JBWS-1384
+ if (opMetaData.getStyle() == Style.RPC)
{
- String partName = mimePart.getPartName();
- QName xmlName = new QName(partName);
- QName xmlType = mimePart.getXmlType();
+ for (WSDLMIMEPart mimePart : bindingInput.getMimeParts())
+ {
+ String partName = mimePart.getPartName();
+ QName xmlName = new QName(partName);
+ QName xmlType = mimePart.getXmlType();
- ParameterMetaData pmd = buildInputParameter(opMetaData, wsdlOperation,
seiMethodMapping, typeMapping, partName, xmlName, xmlType, wsdlPosition++, false);
- pmd.setSwA(true);
- pmd.setMimeTypes(mimePart.getMimeTypes());
+ ParameterMetaData pmd = buildInputParameter(opMetaData, wsdlOperation,
seiMethodMapping, typeMapping, partName, xmlName, xmlType, wsdlPosition++, false);
+ pmd.setSwA(true);
+ pmd.setMimeTypes(mimePart.getMimeTypes());
+ }
}
return wsdlPosition;
@@ -638,7 +643,7 @@
throw new IllegalArgumentException("wsdl-message-message mapping
required for document/literal wrapped");
String elementName = wsdlMessageMapping.getWsdlMessagePartName();
- String variable =
variableMap.get(wsdlMessageMapping.getWsdlMessagePartName());
+ String variable = variableMap.get(elementName);
if (variable == null)
throw new IllegalArgumentException("Could not determine variable name
for element: " + elementName);
Deleted: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSDotXMLCreator.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSDotXMLCreator.java 2007-01-12
12:38:06 UTC (rev 1942)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSDotXMLCreator.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -1,231 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.tools;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.metadata.webservices.PortComponentMetaData;
-import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.ws.metadata.webservices.WebservicesFactory;
-import org.jboss.ws.metadata.webservices.WebservicesMetaData;
-import org.jboss.ws.tools.interfaces.WSDotXMLCreatorIntf;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-
-/**
- * Creates the webservices.xml deployment descriptor
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jun 20, 2005
- */
-public class WSDotXMLCreator implements WSDotXMLCreatorIntf
-{
- // provide logging
- protected static final Logger log = Logger.getLogger(WSDotXMLCreator.class);
- protected String targetNamespace = null;
-
- protected String seiName = null;
-
- protected String portName = null;
-
- protected String serviceName = null;
-
- protected String servletLink = null;
-
- protected String ejbLink = null;
-
- protected String wsdlFile = null;
- protected String mappingFile = null;
-
- protected boolean append = false;
-
- public WSDotXMLCreator()
- {
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDotXMLCreatorIntf#setTargetNamespace(java.lang.String)
- */
- public void setTargetNamespace(String targetNamespace)
- {
- this.targetNamespace = targetNamespace;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDotXMLCreatorIntf#setSeiName(java.lang.String)
- */
- public void setSeiName(String seiName)
- {
- this.seiName = seiName;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDotXMLCreatorIntf#setPortName(java.lang.String)
- */
- public void setPortName(String portName)
- {
- this.portName = portName;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDotXMLCreatorIntf#setServiceName(java.lang.String)
- */
- public void setServiceName(String serviceName)
- {
- this.serviceName = serviceName;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDotXMLCreatorIntf#setEjbLink(java.lang.String)
- */
- public void setEjbLink(String ejbLink)
- {
- this.ejbLink = ejbLink;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDotXMLCreatorIntf#setServletLink(java.lang.String)
- */
- public void setServletLink(String servletLink)
- {
- this.servletLink = servletLink;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDotXMLCreatorIntf#setMappingFile(java.lang.String)
- */
- public void setMappingFile(String mappingFile)
- {
- this.mappingFile = mappingFile;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDotXMLCreatorIntf#setWsdlFile(java.lang.String)
- */
- public void setWsdlFile(String wsdlFile)
- {
- this.wsdlFile = wsdlFile;
- }
-
- public void setAppend(boolean append)
- {
- this.append = append;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDotXMLCreatorIntf#generateWSXMLDescriptor(java.io.File)
- */
- public void generateWSXMLDescriptor(File wsXmlFile) throws IOException
- {
- WebservicesMetaData webservices = constructWSMetaData();
-
- // handle append flag
- if (append && wsXmlFile.exists())
- {
- WebservicesMetaData existingWebservices;
-
- // parse existing webservices descriptor
- InputStream wsXmlStream = new FileInputStream(wsXmlFile);
- try
- {
- Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
- ObjectModelFactory factory = new WebservicesFactory(wsXmlFile.toURL());
- existingWebservices =
(WebservicesMetaData)unmarshaller.unmarshal(wsXmlStream, factory, null);
- }
- catch (JBossXBException e)
- {
- throw new WSException("Could not unmarshal existing webservices
descriptor: " + wsXmlFile, e);
- }
- finally
- {
- wsXmlStream.close();
- }
-
- // append generated webservice-descriptions to existing descriptor
- for (WebserviceDescriptionMetaData webserviceDescription :
webservices.getWebserviceDescriptions())
- existingWebservices.addWebserviceDescription(webserviceDescription);
-
- webservices = existingWebservices;
- }
-
- // (re-)write generated webservices descriptor to file
- FileWriter fw = new FileWriter(wsXmlFile);
- fw.write(webservices.serialize());
- fw.close();
- }
-
- //PRIVATE METHODS
-
- private WebservicesMetaData constructWSMetaData()
- {
- WebservicesMetaData wm = new WebservicesMetaData();
- WebserviceDescriptionMetaData wsdm = new WebserviceDescriptionMetaData(wm);
- populateWebserviceDescriptionMetaData(wsdm);
- wm.addWebserviceDescription(wsdm);
- return wm;
- }
-
- private void populateWebserviceDescriptionMetaData(WebserviceDescriptionMetaData
wsdm)
- {
- checkEssentials();
- wsdm.setWebserviceDescriptionName(this.serviceName);
- wsdm.setWsdlFile(this.wsdlFile);
- wsdm.setJaxrpcMappingFile(this.mappingFile);
- PortComponentMetaData pm1 = new PortComponentMetaData(wsdm);
- pm1.setPortComponentName(portName);
- pm1.setWsdlPort(new QName(this.targetNamespace, portName, "portNS"));
- pm1.setServiceEndpointInterface(seiName);
- if (this.servletLink != null && this.servletLink.length() > 0)
- pm1.setServletLink(this.servletLink);
- else pm1.setEjbLink(this.ejbLink);
- wsdm.addPortComponent(pm1);
- }
-
- private void checkEssentials()
- {
- if (serviceName == null)
- throw new WSException("serviceName is null");
- if (wsdlFile == null)
- throw new WSException("wsdlFile is null");
- if (mappingFile == null)
- throw new WSException("mappingFile is null");
- if (targetNamespace == null)
- throw new WSException("targetNamespace is null");
- if (portName == null)
- throw new WSException("portName is null");
- if (seiName == null)
- throw new WSException("seiName is null");
- if (servletLink == null && ejbLink == null)
- throw new WSException("Either servletLink or ejbLink should not be
null");
- if (servletLink != null && ejbLink != null)
- throw new WSException("One of servletLink or ejbLink should be
null");
- }
-}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java 2007-01-12 12:38:06
UTC (rev 1942)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WSTools.java 2007-01-12 12:48:02
UTC (rev 1943)
@@ -45,9 +45,6 @@
{
private static Logger log = Logger.getLogger(WSTools.class);
- private Configuration config;
- private String outputDir = ".";
-
/**
* Entry point for the command line scripts.
* Just passes the arguments to
@@ -63,28 +60,35 @@
/**
* Entry point for the programmatic use
- *
- * @param args
- * @throws IOException
*/
- public void generate(String[] args) throws IOException
+ public boolean generate(String configLocation, String outputDir) throws IOException
{
- boolean knownArgument = false;
+ ToolsSchemaConfigReader configReader = new ToolsSchemaConfigReader();
+ Configuration config = configReader.readConfig(configLocation);
+
+ return process(config, outputDir);
+ }
+
+ /**
+ * Entry point for the programmatic use
+ */
+ public boolean generate(String[] args) throws IOException
+ {
+ String configLocation = null;
+ String outputDir = null;
for (int i = 0; i < args.length; i++)
{
String arg = args[i];
if ("-config".equals(arg))
{
- readToolsConfiguration(args[i + 1]);
- knownArgument = true;
+ configLocation = args[i + 1];
i++;
}
else if ("-dest".equals(arg))
{
outputDir = args[i + 1];
- knownArgument = true;
i++;
}
@@ -94,7 +98,7 @@
int tokens = st.countTokens();
URL[] urls = new URL[tokens];
- for(int j = 0; j < tokens; j++)
+ for (int j = 0; j < tokens; j++)
{
String token = st.nextToken();
urls[j] = new File(token).toURL();
@@ -103,50 +107,39 @@
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
URLClassLoader urlLoader = new URLClassLoader(urls, ctxLoader);
Thread.currentThread().setContextClassLoader(urlLoader);
- knownArgument = true;
i++;
}
+ else
+ {
+ System.out.println("Usage: wstools (-classpath|-cp) <classpath>
-config <config> [-dest <destination path>]");
+ System.exit(1);
+ }
}
- if (! knownArgument)
- {
- System.out.println("Usage: wstools (-classpath|-cp) <classpath>
-config <config> [-dest <destination path>]");
- System.exit(1);
- }
-
- if (config == null)
- throw new IllegalArgumentException("wstools config not found");
-
- process();
+ return generate(configLocation, outputDir);
}
- private void process() throws IOException
+ private boolean process(Configuration config, String outputDir) throws IOException
{
- ToolsHelper helper = new ToolsHelper();
if (config == null)
- throw new WSException("Configuration is null");
-
- boolean processed = false;
+ throw new IllegalArgumentException("Configuration is null");
+
+ if (outputDir == null)
+ outputDir = ".";
+
+ ToolsHelper helper = new ToolsHelper();
if (config.getJavaToWSDLConfig(false) != null)
{
helper.handleJavaToWSDLGeneration(config, outputDir);
- processed = true;
}
-
- if (config.getWSDLToJavaConfig(false) != null)
+ else if (config.getWSDLToJavaConfig(false) != null)
{
helper.handleWSDLToJavaGeneration(config, outputDir);
- processed = true;
}
-
- if (!processed)
+ else
+ {
throw new WSException("Nothing done, Configuration source must have
JavaToWSDL or WSDLToJava specified");
+ }
+ return true;
}
-
- private void readToolsConfiguration(String filename) throws IOException
- {
- log.debug("Config file name=" + filename);
- ToolsSchemaConfigReader configReader = new ToolsSchemaConfigReader();
- config = configReader.readConfig(filename);
- }
}
Copied: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WebservicesXMLCreatorImpl.java
(from rev 1938,
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/WebservicesXMLCreatorImpl.java)
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -210,9 +210,12 @@
private void generateServiceFile(WSDLService wsdlService) throws IOException
{
String serviceName = wsdlService.getName().toString();
+ if (serviceName.endsWith("Service") == false)
+ serviceName = serviceName + "Service";
+
//Check if the serviceName conflicts with a portType or interface name
if(wsdl.getInterface(new NCName(serviceName)) != null )
- serviceName += "_Service";
+ serviceName = new
StringBuilder(serviceName).insert(serviceName.lastIndexOf("Service"),
'_').toString();
StringBuilder buf = new StringBuilder();
generateHeader(buf);
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -60,13 +60,13 @@
import org.jboss.ws.tools.JavaWriter;
import org.jboss.ws.tools.NamespacePackageMapping;
import org.jboss.ws.tools.WSDLToJava;
-import org.jboss.ws.tools.WSDotXMLCreator;
+import org.jboss.ws.tools.WebservicesXMLCreatorImpl;
import org.jboss.ws.tools.Configuration.GlobalConfig;
import org.jboss.ws.tools.Configuration.JavaToWSDLConfig;
import org.jboss.ws.tools.Configuration.WSDLToJavaConfig;
import org.jboss.ws.tools.XSDTypeToJava.VAR;
import org.jboss.ws.tools.client.ServiceCreator;
-import org.jboss.ws.tools.interfaces.WSDotXMLCreatorIntf;
+import org.jboss.ws.tools.interfaces.WebservicesXMLCreator;
import org.jboss.ws.tools.mapping.MappingFileGenerator;
import org.jboss.ws.tools.wsdl.WSDLWriter;
@@ -145,7 +145,7 @@
//Generate the webservices.xml file
if (j2wc.wsxmlFileNeeded)
{
- WSDotXMLCreatorIntf wscr = new WSDotXMLCreator();
+ WebservicesXMLCreator wscr = new WebservicesXMLCreatorImpl();
wscr.setTargetNamespace(j2wc.targetNamespace);
//wscr.setLocation(new File(outDir).toURL());
wscr.setSeiName(j2wc.endpointName);
@@ -336,7 +336,7 @@
seiName = seiPackage + "." +
wsdlToJava.getServiceEndpointInterfaceName(wsdl.getInterfaces()[0]);
}
- WSDotXMLCreatorIntf wscr = new WSDotXMLCreator();
+ WebservicesXMLCreator wscr = new WebservicesXMLCreatorImpl();
wscr.setTargetNamespace(wsdl.getTargetNamespace());
wscr.setSeiName(seiName);
wscr.setServiceName(serviceName);
Deleted:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/interfaces/WSDotXMLCreatorIntf.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/interfaces/WSDotXMLCreatorIntf.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/interfaces/WSDotXMLCreatorIntf.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.tools.interfaces;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Defines the contract for webservices.xml creating agents
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jul 23, 2005
- */
-
-public interface WSDotXMLCreatorIntf
-{
-
- /**
- * Generate the webservices.xml file
- * @throws IOException
- */
- public void generateWSXMLDescriptor(File file) throws IOException;
-
- /**
- * @param targetNamespace The targetNamespace to set.
- */
- public void setTargetNamespace(String targetNamespace);
-
- /**
- * @param seiName The seiName to set.
- */
- public void setSeiName(String seiName);
-
- /**
- * @param portName The portName to set.
- */
- public void setPortName(String portName);
-
- /**
- * @param serviceName The serviceName to set.
- */
- public void setServiceName(String serviceName);
-
- /**
- * @param ejbLink The ejbLink to set.
- */
- public void setEjbLink(String ejbLink);
-
- /**
- * @param servletLink The servletLink to set.
- */
- public void setServletLink(String servletLink);
-
- /**
- * @param mappingFileEntry The mapping file entry
- */
- public void setMappingFile(String mappingFileEntry);
-
- /**
- *
- * @param wsdlFileEntry The wsdl-file entry
- */
- public void setWsdlFile(String wsdlFileEntry);
-
- /**
- *
- * @param append add ws descriptions to existing webservices.xml file, if any
- */
- public void setAppend(boolean append);
-}
Copied:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/interfaces/WebservicesXMLCreator.java
(from rev 1938,
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/tools/interfaces/WebservicesXMLCreator.java)
Copied:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/InvokeAttachType.java
(from rev 1938,
branches/tdiesler/trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/InvokeAttachType.java)
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -28,15 +28,18 @@
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Stub;
+import javax.xml.soap.AttachmentPart;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.tools.WSTools;
/**
- * Cannot obtain java/xml type mapping for attachment part
+ * Attachment parts with doclit message
*
*
http://jira.jboss.org/jira/browse/JBWS-1384
*
@@ -55,7 +58,7 @@
protected void setUp() throws Exception
{
super.setUp();
- if (port == null && false)
+ if (port == null)
{
ServiceFactoryImpl factory = (ServiceFactoryImpl)ServiceFactory.newInstance();
URL wsdlURL = new
File("resources/jaxrpc/jbws1384/WEB-INF/wsdl/ExampleService.wsdl").toURL();
@@ -67,15 +70,21 @@
}
}
+ public void testWsdlToJava() throws Exception
+ {
+ WSTools wstools = new WSTools();
+ boolean ret =
wstools.generate("resources/jaxrpc/jbws1384/wstools-config.xml",
"./wstools/jbws1384");
+ assertTrue("wstools success", ret);
+ }
+
public void testEndpoint() throws Exception
{
- if (true)
- {
- System.out.println("FIXME: [JBWS-1384] - Cannot obtain java/xml type
mapping for attachment part");
- return;
- }
+ StubExt stub = (StubExt)port;
+ AttachmentPart part = stub.createAttachmentPart();
+ part.setContent("attached-string", "text/plain");
+ stub.addAttachmentPart(part);
- String retStr = port.invokeAttach("user", "pass",
"op", "<root/>", "attach");
- assertEquals("attach", retStr);
+ String retStr = port.invokeAttach("user", "pass",
"op", "<root/>");
+ assertEquals("[user=user,pass=pass,op=op,xml=<root/>]
attached-string", retStr);
}
}
Deleted:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/ParaListType.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/ParaListType.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/ParaListType.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -1,56 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.ws.jaxrpc.jbws1384;
-
-
-public class ParaListType {
- protected java.lang.String username;
- protected java.lang.String password;
- protected java.lang.String operationName;
- protected java.lang.String inputXML;
-
- public ParaListType() {
- }
-
- public ParaListType(java.lang.String username, java.lang.String password,
java.lang.String operationName, java.lang.String inputXML) {
- this.username = username;
- this.password = password;
- this.operationName = operationName;
- this.inputXML = inputXML;
- }
-
- public java.lang.String getUsername() {
- return username;
- }
-
- public void setUsername(java.lang.String username) {
- this.username = username;
- }
-
- public java.lang.String getPassword() {
- return password;
- }
-
- public void setPassword(java.lang.String password) {
- this.password = password;
- }
-
- public java.lang.String getOperationName() {
- return operationName;
- }
-
- public void setOperationName(java.lang.String operationName) {
- this.operationName = operationName;
- }
-
- public java.lang.String getInputXML() {
- return inputXML;
- }
-
- public void setInputXML(java.lang.String inputXML) {
- this.inputXML = inputXML;
- }
-}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/ResponseType.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/ResponseType.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/ResponseType.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -1,26 +1,27 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Fri Jan 12 10:48:13 CET 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
package org.jboss.test.ws.jaxrpc.jbws1384;
-public class ResponseType {
- protected java.lang.String result;
-
- public ResponseType() {
- }
-
- public ResponseType(java.lang.String result) {
- this.result = result;
- }
-
- public java.lang.String getResult() {
- return result;
- }
-
- public void setResult(java.lang.String result) {
- this.result = result;
- }
+public class ResponseType
+{
+
+protected java.lang.String result;
+public ResponseType(){}
+
+public ResponseType(java.lang.String result){
+this.result=result;
}
+public java.lang.String getResult() { return result ;}
+
+public void setResult(java.lang.String result){ this.result=result; }
+
+}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/TranslatorBean.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/TranslatorBean.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/TranslatorBean.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -21,15 +21,48 @@
*/
package org.jboss.test.ws.jaxrpc.jbws1384;
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.rpc.server.ServletEndpointContext;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.SOAPException;
+
import org.jboss.logging.Logger;
-public class TranslatorBean implements TransmulatorInterface
+public class TranslatorBean implements TransmulatorInterface, ServiceLifecycle
{
private Logger log = Logger.getLogger(TranslatorBean.class);
- public String invokeAttach(String username, String password, String operationName,
String inputXML, String attachmentContents)
+ private ServletEndpointContext sepCtx;
+
+ public String invokeAttach(String username, String password, String operationName,
String inputXML)
{
- log.info("[user=" + username + ",pass=" + password +
",op=" + operationName + ",xml=" + inputXML + ",attach=" +
attachmentContents + "]");
- return attachmentContents;
+ String reqMessage = "[user=" + username + ",pass=" + password +
",op=" + operationName + ",xml=" + inputXML + "]";
+
+ // Get attached string
+ String attachedStr = null;
+ try
+ {
+ SOAPMessageContext msgContext = (SOAPMessageContext)sepCtx.getMessageContext();
+ AttachmentPart part =
(AttachmentPart)msgContext.getMessage().getAttachments().next();
+ attachedStr = (String)part.getContent();
+ }
+ catch (SOAPException ex)
+ {
+ throw new RuntimeException(ex);
+ }
+
+ log.info(reqMessage + " " + attachedStr);
+ return reqMessage + " " + attachedStr;
}
+
+ public void init(Object context) throws ServiceException
+ {
+ this.sepCtx = (ServletEndpointContext)context;
+ }
+
+ public void destroy()
+ {
+ }
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/TransmulatorInterface.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/TransmulatorInterface.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1384/TransmulatorInterface.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -1,14 +1,15 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Fri Jan 12 10:48:13 CET 2007
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
package org.jboss.test.ws.jaxrpc.jbws1384;
+public interface TransmulatorInterface extends java.rmi.Remote
+{
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-public interface TransmulatorInterface extends Remote
-{
- public String invokeAttach(String username, String password, String operationName,
String inputXML, String attachmentContents) throws RemoteException;
+ public java.lang.String invokeAttach(java.lang.String username, java.lang.String
password, java.lang.String operationName, java.lang.String inputXML) throws
java.rmi.RemoteException;
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1259/JBWS1259TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1259/JBWS1259TestCase.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1259/JBWS1259TestCase.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -162,7 +162,7 @@
{
String currentFile = generatedFiles[i];
- boolean matched = "PhoneBook_Service.java".equals(currentFile);
+ boolean matched = "PhoneBookService.java".equals(currentFile);
for (int j = 0; j < expectedFiles.length && (matched == false); j++)
matched = currentFile.equals(expectedFiles[j]);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1260/JBWS1260TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1260/JBWS1260TestCase.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws1260/JBWS1260TestCase.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -877,7 +877,7 @@
{
String currentFile = generatedFiles[i];
- boolean matched = "PhoneBook_Service.java".equals(currentFile);
+ boolean matched = "PhoneBookService.java".equals(currentFile);
for (int j = 0; j < expectedFiles.length && (matched == false); j++)
matched = currentFile.equals(expectedFiles[j]);
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws_206/tests/InOutParameters/InOutParametersWSDL2JavaTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws_206/tests/InOutParameters/InOutParametersWSDL2JavaTestCase.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws_206/tests/InOutParameters/InOutParametersWSDL2JavaTestCase.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -48,7 +48,7 @@
public String getServiceName()
{
- return "InOutParametersService_Service";
+ return "InOutParameters_Service";
}
public void checkGeneratedUserTypes()
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws_206/tests/OutParameters/OutParametersWSDL2JavaTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws_206/tests/OutParameters/OutParametersWSDL2JavaTestCase.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jbws_206/tests/OutParameters/OutParametersWSDL2JavaTestCase.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -47,7 +47,7 @@
public String getServiceName()
{
- return "OutParametersService_Service";
+ return "OutParameters_Service";
}
public void checkGeneratedUserTypes() throws Exception
Modified:
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/jaxrpc-mapping.xml
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/jaxrpc-mapping.xml 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/jaxrpc-mapping.xml 2007-01-12
12:48:02 UTC (rev 1943)
@@ -1,110 +1,99 @@
-<?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.jaxrpc.jbws1384</package-type>
- <namespaceURI>http://org.jboss.test.webservice/samples2</namespaceURI>
- </package-mapping>
- <package-mapping>
- <package-type>org.jboss.test.ws.jaxrpc.jbws1384</package-type>
-
<namespaceURI>http://org.jboss.test.webservice/samples2/types</namespaceURI>
- </package-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.jaxrpc.jbws1384.ParaListType</java-type>
- <root-type-qname
xmlns:typeNS="http://org.jboss.test.webservice/samples2/types">typeNS:paraListType</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>username</java-variable-name>
- <xml-element-name>username</xml-element-name>
- </variable-mapping>
- <variable-mapping>
- <java-variable-name>password</java-variable-name>
- <xml-element-name>password</xml-element-name>
- </variable-mapping>
- <variable-mapping>
- <java-variable-name>operationName</java-variable-name>
- <xml-element-name>operationName</xml-element-name>
- </variable-mapping>
- <variable-mapping>
- <java-variable-name>inputXML</java-variable-name>
- <xml-element-name>inputXML</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.jaxrpc.jbws1384.ResponseType</java-type>
- <root-type-qname
xmlns:typeNS="http://org.jboss.test.webservice/samples2/types">typeNS:responseType</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>result</java-variable-name>
- <xml-element-name>result</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <service-interface-mapping>
-
<service-interface>org.jboss.test.ws.jaxrpc.jbws1384.Gasherbrum</service-interface>
- <wsdl-service-name
xmlns:serviceNS="http://org.jboss.test.webservice/samples2">serviceNS:Gasherbrum</wsdl-service-name>
- <port-mapping>
- <port-name>TransmulatorInterfacePort</port-name>
- <java-port-name>TransmulatorInterfacePort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
-
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1384.TransmulatorInterface</service-endpoint-interface>
- <wsdl-port-type
xmlns:portTypeNS="http://org.jboss.test.webservice/samples2">portTypeNS:TransmulatorInterface</wsdl-port-type>
- <wsdl-binding
xmlns:bindingNS="http://org.jboss.test.webservice/samples2">bindingNS:TransmulatorInterfaceBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>invokeAttach</java-method-name>
- <wsdl-operation>invokeAttach</wsdl-operation>
- <wrapped-element/>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.test.webservice/samples2">wsdlMsgNS:attachRequest</wsdl-message>
- <wsdl-message-part-name>username</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <method-param-parts-mapping>
- <param-position>1</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.test.webservice/samples2">wsdlMsgNS:attachRequest</wsdl-message>
- <wsdl-message-part-name>password</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <method-param-parts-mapping>
- <param-position>2</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.test.webservice/samples2">wsdlMsgNS:attachRequest</wsdl-message>
- <wsdl-message-part-name>operationName</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <method-param-parts-mapping>
- <param-position>3</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.test.webservice/samples2">wsdlMsgNS:attachRequest</wsdl-message>
- <wsdl-message-part-name>inputXML</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <method-param-parts-mapping>
- <param-position>4</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message
xmlns:wsdlMsgNS="http://org.jboss.test.webservice/samples2">wsdlMsgNS:attachRequest</wsdl-message>
-
<wsdl-message-part-name>attachmentContents</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.webservice/samples2">wsdlMsgNS:attachResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
+<?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.jbws1384</package-type>
+
<namespaceURI>http://org.jboss.test.webservice/samples2/types</namespaceURI>
+ </package-mapping>
+ <package-mapping>
+ <package-type>org.jboss.test.ws.jaxrpc.jbws1384</package-type>
+ <namespaceURI>http://org.jboss.test.webservice/samples2</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.jbws1384.InvokeAttachType</java-type>
+ <root-type-qname
xmlns:typeNS='http://org.jboss.test.webservice/samples2/types'>typeNS:invokeAttachType</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>username</java-variable-name>
+ <xml-element-name>username</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>password</java-variable-name>
+ <xml-element-name>password</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>operationName</java-variable-name>
+ <xml-element-name>operationName</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>inputXML</java-variable-name>
+ <xml-element-name>inputXML</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <java-type>org.jboss.test.ws.jaxrpc.jbws1384.ResponseType</java-type>
+ <root-type-qname
xmlns:typeNS='http://org.jboss.test.webservice/samples2/types'>typeNS:responseType</root-type-qname>
+ <qname-scope>complexType</qname-scope>
+ <variable-mapping>
+ <java-variable-name>result</java-variable-name>
+ <xml-element-name>result</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <service-interface-mapping>
+
<service-interface>org.jboss.test.ws.jaxrpc.jbws1384.Gasherbrum</service-interface>
+ <wsdl-service-name
xmlns:serviceNS='http://org.jboss.test.webservice/samples2'>serviceNS:Gasherbrum</wsdl-service-name>
+ <port-mapping>
+ <port-name>TransmulatorInterfacePort</port-name>
+ <java-port-name>TransmulatorInterfacePort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1384.TransmulatorInterface</service-endpoint-interface>
+ <wsdl-port-type
xmlns:portTypeNS='http://org.jboss.test.webservice/samples2'>portTypeNS:TransmulatorInterface</wsdl-port-type>
+ <wsdl-binding
xmlns:bindingNS='http://org.jboss.test.webservice/samples2'>bindingNS:TransmulatorInterfaceBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>invokeAttach</java-method-name>
+ <wsdl-operation>invokeAttach</wsdl-operation>
+ <wrapped-element/>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.webservice/samples2'>wsdlMsgNS:attachRequest</wsdl-message>
+ <wsdl-message-part-name>username</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <method-param-parts-mapping>
+ <param-position>1</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.webservice/samples2'>wsdlMsgNS:attachRequest</wsdl-message>
+ <wsdl-message-part-name>password</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <method-param-parts-mapping>
+ <param-position>2</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.webservice/samples2'>wsdlMsgNS:attachRequest</wsdl-message>
+ <wsdl-message-part-name>operationName</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <method-param-parts-mapping>
+ <param-position>3</param-position>
+ <param-type>java.lang.String</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message
xmlns:wsdlMsgNS='http://org.jboss.test.webservice/samples2'>wsdlMsgNS:attachRequest</wsdl-message>
+ <wsdl-message-part-name>inputXML</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.webservice/samples2'>wsdlMsgNS:attachResponse</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
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/web.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/web.xml 2007-01-12
12:38:06 UTC (rev 1942)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/web.xml 2007-01-12
12:48:02 UTC (rev 1943)
@@ -4,12 +4,12 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
- <servlet-name>TestEndpoint</servlet-name>
+ <servlet-name>ExampleService</servlet-name>
<servlet-class>org.jboss.test.ws.jaxrpc.jbws1384.TranslatorBean</servlet-class>
</servlet>
<servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
+ <servlet-name>ExampleService</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/webservices.xml
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/webservices.xml 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/webservices.xml 2007-01-12
12:48:02 UTC (rev 1943)
@@ -1,7 +1,7 @@
<webservices
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'
version='1.1'>
<webservice-description>
-
<webservice-description-name>ExampleService</webservice-description-name>
+ <webservice-description-name>Gasherbrum</webservice-description-name>
<wsdl-file>WEB-INF/wsdl/ExampleService.wsdl</wsdl-file>
<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component>
@@ -9,7 +9,7 @@
<wsdl-port
xmlns:portNS='http://org.jboss.test.webservice/samples2'>portNS:TransmulatorInterfacePort</wsdl-port>
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1384.TransmulatorInterface</service-endpoint-interface>
<service-impl-bean>
- <servlet-link>TestEndpoint</servlet-link>
+ <servlet-link>ExampleService</servlet-link>
</service-impl-bean>
</port-component>
</webservice-description>
Modified:
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/wsdl/ExampleService.wsdl
===================================================================
---
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/wsdl/ExampleService.wsdl 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/WEB-INF/wsdl/ExampleService.wsdl 2007-01-12
12:48:02 UTC (rev 1943)
@@ -5,7 +5,7 @@
<schema
targetNamespace="http://org.jboss.test.webservice/samples2/types"
xmlns:tns="http://org.jboss.test.webservice/samples2/types"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://www.w3.org/2001/XMLSchema">
- <complexType name="paraListType">
+ <complexType name="invokeAttachType">
<sequence>
<element name="username" type="string"
nillable="true"/>
<element name="password" type="string"
nillable="true"/>
@@ -18,12 +18,12 @@
<element name="result" type="string"
nillable="true"/>
</sequence>
</complexType>
- <element name="paraList2" type="tns:paraListType"/>
+ <element name="invokeAttach"
type="tns:invokeAttachType"/>
<element name="responseXML" type="tns:responseType"/>
</schema>
</types>
<message name="attachRequest">
- <part name="parameters" element="ns2:paraList2"/>
+ <part name="parameters" element="ns2:invokeAttach"/>
<part name="attachmentContents" type="xsd:string"/>
</message>
<message name="attachResponse">
Modified: trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/wstools-config.xml
===================================================================
--- trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/wstools-config.xml 2007-01-12
12:38:06 UTC (rev 1942)
+++ trunk/jbossws-tests/src/main/resources/jaxrpc/jbws1384/wstools-config.xml 2007-01-12
12:48:02 UTC (rev 1943)
@@ -13,7 +13,7 @@
<package-namespace package="org.jboss.test.ws.jaxrpc.jbws1384"
namespace="http://org.jboss.test.webservice/samples2"/>
</global>
- <wsdl-java location="./WEB-INF/wsdl/ExampleService.wsdl">
+ <wsdl-java
location="resources/jaxrpc/jbws1384/WEB-INF/wsdl/ExampleService.wsdl">
<mapping file="jaxrpc-mapping.xml" />
<webservices servlet-link="ExampleService" />
</wsdl-java>
Deleted:
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/InOutParameters/service/InOutParametersService_Service.java
===================================================================
---
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/InOutParameters/service/InOutParametersService_Service.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/InOutParameters/service/InOutParametersService_Service.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -1,12 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.webservice.inoutparameters;
-
-import javax.xml.rpc.*;
-
-public interface InOutParametersService_Service extends javax.xml.rpc.Service {
- public org.jboss.test.webservice.inoutparameters.InOutParametersService_PortType
getInOutParametersServicePort() throws ServiceException;
-}
Copied:
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/InOutParameters/service/InOutParameters_Service.java
(from rev 1941,
branches/tdiesler/trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/InOutParameters/service/InOutParameters_Service.java)
Deleted:
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/OutParameters/service/OutParametersService_Service.java
===================================================================
---
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/OutParameters/service/OutParametersService_Service.java 2007-01-12
12:38:06 UTC (rev 1942)
+++
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/OutParameters/service/OutParametersService_Service.java 2007-01-12
12:48:02 UTC (rev 1943)
@@ -1,12 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.3, build R1)
-// Generated source version: 1.1.3
-
-package org.jboss.test.webservice.outparameters;
-
-import javax.xml.rpc.*;
-
-public interface OutParametersService_Service extends javax.xml.rpc.Service {
- public org.jboss.test.webservice.outparameters.OutParametersService_PortType
getOutParametersServicePort() throws ServiceException;
-}
Copied:
trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/OutParameters/service/OutParameters_Service.java
(from rev 1941,
branches/tdiesler/trunk/jbossws-tests/src/main/resources/tools/jbws-206/wscompileArtifacts/OutParameters/service/OutParameters_Service.java)