Author: jason.greene(a)jboss.com
Date: 2006-11-30 22:53:14 -0500 (Thu, 30 Nov 2006)
New Revision: 1527
Added:
trunk/src/main/java/org/jboss/ws/integration/jboss50/JBossContextServlet.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/PortComponentLinkServlet.java
Modified:
trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Writer.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL20Writer.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLDefinitions.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLTypes.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLUtils.java
trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLWriter.java
trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java
trunk/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml
trunk/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java
trunk/src/test/java/org/jboss/test/ws/jaxws/context/EndpointBean.java
trunk/src/test/java/org/jboss/test/ws/jaxws/context/EndpointInterface.java
trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointBean.java
trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointInterface.java
trunk/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1357/JBWS1357Impl.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/complex/RegistrationService.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/DocWrappedServiceImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/ExampleServiceImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpointImpl.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSEBean03.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceJSETestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
trunk/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.java
Log:
Re-add context servlets that were dropped during the merge from 1.0
Refactor WSDL11Writer to support multiple WSDL files
Fix processing of @WebService to be inline with the spec
Add support for differing namespaces on SEI and implementation bean
Added: trunk/src/main/java/org/jboss/ws/integration/jboss50/JBossContextServlet.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/integration/jboss50/JBossContextServlet.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/main/java/org/jboss/ws/integration/jboss50/JBossContextServlet.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -0,0 +1,46 @@
+/*
+ * 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.integration.jboss50;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.CommonContextServlet;
+import org.jboss.ws.server.ServiceEndpointManagerFactory;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 21-Mar-2005
+ */
+public class JBossContextServlet extends CommonContextServlet
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(JBossContextServlet.class);
+
+ protected void initServiceEndpointManager()
+ {
+ ServiceEndpointManagerFactory factory =
ServiceEndpointManagerFactory.getInstance();
+ epManager = factory.getServiceEndpointManager();
+ }
+}
Property changes on:
trunk/src/main/java/org/jboss/ws/integration/jboss50/JBossContextServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/main/java/org/jboss/ws/integration/jboss50/PortComponentLinkServlet.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/integration/jboss50/PortComponentLinkServlet.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/main/java/org/jboss/ws/integration/jboss50/PortComponentLinkServlet.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -0,0 +1,93 @@
+/*
+ * 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.integration.jboss50;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.server.ServiceEndpoint;
+import org.jboss.ws.server.ServiceEndpointManager;
+import org.jboss.ws.server.ServiceEndpointManagerFactory;
+
+/**
+ * A servlet that reports the serviceURL for a given service ID.
+ * <p/>
+ * When the web service client ENC is setup, it may contain port-component-link
+ * entries that point to service endpoints in the same top level deployment.
+ * The final serviceURL of those endpoints will become available after the
+ * reference to the javax.xml.rpc.Service is bound to JNDI.
+ * <p/>
+ * When the client does a lookup of the javax.xml.rpc.Service from JNDI the
ObjectFactory
+ * will contact this servlet for the final serviceURL. It is acceptable that the client
+ * wsdl does not contain the correct serviceURL if the client is using the
port-component-link element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 29-May-2004
+ */
+public class PortComponentLinkServlet extends HttpServlet
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(PortComponentLinkServlet.class);
+
+ protected ServiceEndpointManager epManager;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ ServiceEndpointManagerFactory factory =
ServiceEndpointManagerFactory.getInstance();
+ epManager = factory.getServiceEndpointManager();
+ }
+
+ /**
+ * Get the serviceURL as string for a given serviceID.
+ */
+ public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
+ {
+ String pcLink = req.getParameter("pcLink");
+ if (pcLink == null)
+ throw new IllegalArgumentException("Cannot obtain request parameter
'pcLink'");
+
+ ServiceEndpoint serviceEndpoint = epManager.resolvePortComponentLink(pcLink);
+ ;
+ if (serviceEndpoint == null)
+ throw new WSException("Cannot resolve port-component-link: " +
pcLink);
+
+ res.setContentType("text/plain");
+ PrintWriter out = res.getWriter();
+
+ String endpointAddress =
serviceEndpoint.getServiceEndpointInfo().getServerEndpointMetaData().getEndpointAddress();
+ out.println(endpointAddress);
+
+ log.debug("Resolved " + pcLink + " to: " + endpointAddress);
+ out.close();
+ }
+}
Property changes on:
trunk/src/main/java/org/jboss/ws/integration/jboss50/PortComponentLinkServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -88,10 +88,10 @@
import org.jboss.ws.metadata.jsr181.HandlerChainsMetaData;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.metadata.wsdl.WSDLWriter;
+import org.jboss.ws.metadata.wsdl.WSDLWriter.ResolvedWriter;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.ws.server.ServerConfig;
-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.HolderUtils;
@@ -111,216 +111,290 @@
* @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
* @since 15-Oct-2005
*/
+@SuppressWarnings("deprecation")
public class JAXWSWebServiceMetaDataBuilder extends JAXWSEndpointMetaDataBuilder
{
+ private static class EndpointResult
+ {
+ private Class<?> klass;
+ private ServerEndpointMetaData semd;
+ private ServiceMetaData smd;
+ private String wsdlLocation;
+ }
+
// provide logging
private static final Logger log =
Logger.getLogger(JAXWSWebServiceMetaDataBuilder.class);
-
- private WrapperGenerator wrapperGenerator;
private List<Class> javaTypes = new ArrayList<Class>();
+ private JAXBRIContext jaxbCtx;
private List<TypeReference> typeRefs = new ArrayList<TypeReference>();
- private JAXBRIContext jaxbCtx;
+ private WrapperGenerator wrapperGenerator;
+
public JAXWSWebServiceMetaDataBuilder()
{
}
- public ServerEndpointMetaData buildEndpoint(UnifiedMetaData wsMetaData,
UnifiedDeploymentInfo udi, Class<?> sepClass, String linkName)
+ private void addFault(OperationMetaData omd, Class<?> exception)
{
- WebService anWebService = sepClass.getAnnotation(WebService.class);
- if (anWebService == null)
- throw new WSException("Cannot obtain @WebService annotation from: " +
sepClass.getName());
+ if (omd.isOneWay())
+ throw new IllegalStateException("JSR-181 4.3.1 - A JSR-181 processor is
REQUIRED to report an error if an operation marked "
+ + "@Oneway has a return value, declares any checked exceptions or has
any INOUT or OUT parameters.");
- try
- {
- Class<?> seiClass = null;
- String seiName = null;
+ WebFault annotation = exception.getAnnotation(WebFault.class);
- if (anWebService.endpointInterface().length() > 0)
- {
- seiName = anWebService.endpointInterface();
- seiClass = udi.classLoader.loadClass(seiName);
- anWebService = seiClass.getAnnotation(WebService.class);
+ String name;
+ String namespace;
+ String faultBeanName = null;
- if (anWebService == null)
- throw new WSException("Interface does not have a @WebService
annotation: " + seiName);
- }
- else
- {
+ // Only the element name is effected by @WebFault, the type uses the same
convention
+ QName xmlType = new QName(omd.getQName().getNamespaceURI(),
exception.getSimpleName());
- WebService seiAnnotation = null;
+ /*
+ * If @WebFault is present, and the exception contains getFaultInfo, the
+ * return value should be used. Otherwise we need to generate the bean.
+ */
+ boolean generate = true;
+ if (annotation != null)
+ {
+ name = annotation.name();
+ namespace = annotation.targetNamespace();
+ if (namespace.length() == 0)
+ namespace = omd.getQName().getNamespaceURI();
- for (Class<?> potentialSEI : sepClass.getInterfaces())
- {
- if (potentialSEI.isAnnotationPresent(WebService.class))
- {
- seiClass = potentialSEI;
- seiName = seiClass.getName();
- seiAnnotation = sepClass.getAnnotation(WebService.class);
- break;
- }
- }
-
- if (seiAnnotation != null)
- anWebService = seiAnnotation;
+ Class<?> faultBean = getFaultInfo(exception);
+ if (faultBean != null)
+ {
+ generate = false;
+ faultBeanName = faultBean.getName();
}
+ }
+ else
+ {
+ name = xmlType.getLocalPart();
+ namespace = xmlType.getNamespaceURI();
+ }
- // Clear the java types, etc.
- resetMetaDataBuilder(udi.classLoader);
+ if (faultBeanName == null)
+ faultBeanName =
JavaUtils.getPackageName(omd.getEndpointMetaData().getServiceEndpointInterface()) +
".jaxws." + exception.getSimpleName() + "Bean";
- Class<?> wsClass = (seiClass != null ? seiClass : sepClass);
+ QName xmlName = new QName(namespace, name);
- WSDLUtils wsdlUtils = WSDLUtils.getInstance();
+ FaultMetaData fmd = new FaultMetaData(omd, xmlName, xmlType, exception.getName());
+ fmd.setFaultBeanName(faultBeanName);
- String name = anWebService.name();
- if (name.length() == 0)
- name = wsdlUtils.getJustClassName(wsClass);
+ if (generate)
+ wrapperGenerator.generate(fmd);
- String serviceName = anWebService.serviceName();
- if (serviceName.length() == 0)
- serviceName = name + "Service";
+ javaTypes.add(fmd.getFaultBean());
+ typeRefs.add(new TypeReference(fmd.getXmlName(), fmd.getFaultBean()));
- String targetNS = anWebService.targetNamespace();
- if (targetNS.length() == 0)
- targetNS = wsdlUtils.getTypeNamespace(wsClass);
+ omd.addFault(fmd);
+ }
- String portName = anWebService.portName();
- if (portName.length() == 0)
- portName = name + "Port";
+ private String convertToVariable(String localName)
+ {
+ return JAXBRIContext.mangleNameToVariableName(localName);
+ }
- ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, new
QName(targetNS, serviceName));
- wsMetaData.addService(serviceMetaData);
+ private String[] convertTypeArguments(Class rawType, Type type)
+ {
+ if (!Collection.class.isAssignableFrom(rawType) &&
!Map.class.isAssignableFrom(rawType))
+ return null;
- // 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);
+ if (!(type instanceof ParameterizedType))
+ return null;
- // Assign the WS-Security configuration,
- WSSecurityConfiguration securityConfiguration =
MetaDataBuilder.getWsSecurityConfiguration(udi);
- serviceMetaData.setSecurityConfiguration(securityConfiguration);
+ ParameterizedType paramType = (ParameterizedType)type;
+ Type[] arguments = paramType.getActualTypeArguments();
+ String[] ret = new String[arguments.length];
+ for (int i = 0; i < arguments.length; i++)
+ ret[i] = JavaUtils.erasure(arguments[i]).getName();
- sepMetaData.setServiceEndpointImplName(sepClass.getName());
- sepMetaData.setServiceEndpointInterfaceName(wsClass.getName());
+ return ret;
+ }
- serviceMetaData.addEndpoint(sepMetaData);
+ private ParameterMetaData createRequestWrapper(OperationMetaData operation, Method
method)
+ {
+ String requestWrapperType = null;
+ QName xmlName = operation.getQName();
+ QName xmlType = xmlName;
+ if (method.isAnnotationPresent(RequestWrapper.class))
+ {
+ RequestWrapper anReqWrapper = method.getAnnotation(RequestWrapper.class);
- // Process an optional @SOAPBinding annotation
- if (wsClass.isAnnotationPresent(SOAPBinding.class))
- processSOAPBinding(sepMetaData, wsClass);
+ String localName = anReqWrapper.localName().length() > 0 ?
anReqWrapper.localName() : xmlName.getLocalPart();
+ String targetNamespace = anReqWrapper.targetNamespace().length() > 0 ?
anReqWrapper.targetNamespace() : xmlName.getNamespaceURI();
+ xmlName = new QName(targetNamespace, localName);
- // Process an optional @BindingType annotation
- if (wsClass.isAnnotationPresent(BindingType.class))
- processBindingType(sepMetaData, wsClass);
+ if (anReqWrapper.className().length() > 0)
+ requestWrapperType = anReqWrapper.className();
+ }
- // Init the transport guarantee
- initTransportGuaranteeJSE(udi, sepMetaData, linkName);
-
- // Process web methods
- processWebMethods(sepMetaData, wsClass);
+ // Conformance 3.18, the default value must be the same as the method name
+ if (requestWrapperType == null)
+ {
+ String packageName = JavaUtils.getPackageName(method.getDeclaringClass()) +
".jaxws";
+ requestWrapperType = packageName + "." +
JavaUtils.capitalize(method.getName());
+ }
- // Initialize types
- createJAXBContext(sepMetaData);
- populateXmlTypes(sepMetaData);
+ // JAX-WS p.37 pg.1, the annotation only affects the element name, not the type
name
+ ParameterMetaData wrapperParameter = new ParameterMetaData(operation, xmlName,
xmlType, requestWrapperType);
+ wrapperParameter.setAccessorFactoryCreator(JAXBAccessor.FACTORY_CREATOR);
+ operation.addParameter(wrapperParameter);
- // Process or generate WSDL
- String wsdlLocation = anWebService.wsdlLocation();
- processOrGenerateWSDL(wsClass, serviceMetaData, wsdlLocation, sepMetaData);
+ return wrapperParameter;
+ }
- // Read the generated WSDL and initialize the schema model
- // FIXME - This should be removed
- WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
- JBossXSModel schemaModel =
WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
- serviceMetaData.getTypesMetaData().setSchemaModel(schemaModel);
+ private ParameterMetaData createResponseWrapper(OperationMetaData operation, Method
method)
+ {
+ QName operationQName = operation.getQName();
+ QName xmlName = new QName(operationQName.getNamespaceURI(),
operationQName.getLocalPart() + "Response");
+ QName xmlType = xmlName;
- // Set the endpoint address
- processPortComponent(udi, wsClass, linkName, sepMetaData);
+ String responseWrapperType = null;
+ if (method.isAnnotationPresent(ResponseWrapper.class))
+ {
+ ResponseWrapper anResWrapper = method.getAnnotation(ResponseWrapper.class);
- // Init the endpoint address
- MetaDataBuilder.initEndpointAddress(udi, sepMetaData, linkName);
+ String localName = anResWrapper.localName().length() > 0 ?
anResWrapper.localName() : xmlName.getLocalPart();
+ String targetNamespace = anResWrapper.targetNamespace().length() > 0 ?
anResWrapper.targetNamespace() : xmlName.getNamespaceURI();
+ xmlName = new QName(targetNamespace, localName);
- // replace the SOAP address
- MetaDataBuilder.replaceAddressLocation(sepMetaData);
+ if (anResWrapper.className().length() > 0)
+ responseWrapperType = anResWrapper.className();
+ }
- // Process an optional @SOAPMessageHandlers annotation
- if (sepClass.isAnnotationPresent(SOAPMessageHandlers.class) ||
wsClass.isAnnotationPresent(SOAPMessageHandlers.class))
- log.warn("@SOAPMessageHandlers is deprecated as of JSR-181 2.0 with no
replacement.");
+ if (responseWrapperType == null)
+ {
+ String packageName = JavaUtils.getPackageName(method.getDeclaringClass()) +
".jaxws";
+ responseWrapperType = packageName + "." +
JavaUtils.capitalize(method.getName()) + "Response";
+ }
- // Add pre handlers
- WSEndpointConfigJAXWS jaxrpcConfig =
(WSEndpointConfigJAXWS)sepMetaData.getEndpointConfig();
- sepMetaData.addHandlers(jaxrpcConfig.getHandlers(sepMetaData,
HandlerType.PRE));
+ ParameterMetaData retMetaData = new ParameterMetaData(operation, xmlName, xmlType,
responseWrapperType);
+ retMetaData.setAccessorFactoryCreator(JAXBAccessor.FACTORY_CREATOR);
+ operation.setReturnParameter(retMetaData);
- // Process an optional @HandlerChain annotation
- if (sepClass.isAnnotationPresent(HandlerChain.class))
- processHandlerChain(sepMetaData, sepClass);
- else if (wsClass.isAnnotationPresent(HandlerChain.class))
- processHandlerChain(sepMetaData, wsClass);
+ return retMetaData;
+ }
- // Add post handlers
- sepMetaData.addHandlers(jaxrpcConfig.getHandlers(sepMetaData,
HandlerType.POST));
+ private Class<?> getFaultInfo(Class<?> exception)
+ {
+ try
+ {
+ Method method = exception.getMethod("getFaultInfo");
+ Class<?> returnType = method.getReturnType();
+ if (returnType == void.class)
+ return null;
- // init service endpoint id
- ObjectName sepID = MetaDataBuilder.getServiceEndpointID(udi, sepMetaData);
- sepMetaData.setServiceEndpointID(sepID);
-
- return sepMetaData;
+ return returnType;
}
- catch (RuntimeException rte)
+ catch (SecurityException e)
{
- throw rte;
+ throw new WSException("Unexpected security exception: " +
e.getMessage(), e);
}
- catch (Exception ex)
+ catch (NoSuchMethodException e)
{
- throw new WSException("Cannot build meta data: " + ex.getMessage(),
ex);
+ return null;
}
}
- protected void resetMetaDataBuilder(ClassLoader loader)
+ private ParameterMode getParameterMode(WebParam anWebParam, Class javaType)
{
- wrapperGenerator = new DynamicWrapperGenerator(loader);
- javaTypes.clear();
- typeRefs.clear();
- jaxbCtx = null;
+ if (anWebParam != null)
+ {
+ if (anWebParam.mode() == WebParam.Mode.INOUT)
+ return ParameterMode.INOUT;
+ if (anWebParam.mode() == WebParam.Mode.OUT)
+ return ParameterMode.OUT;
+ }
+
+ return HolderUtils.isHolderType(javaType) ? ParameterMode.INOUT :
ParameterMode.IN;
}
- protected void createJAXBContext(EndpointMetaData epMetaData)
+ private WebParam getWebParamAnnotation(Method method, int pos)
{
- try
+ for (Annotation annotation : method.getParameterAnnotations()[pos])
+ if (annotation instanceof WebParam)
+ return (WebParam)annotation;
+
+ return null;
+ }
+
+ private QName getWebParamName(OperationMetaData opMetaData, int index, Class javaType,
WebParam webParam)
+ {
+ String namespace = null;
+ String name = null;
+ boolean header = false;
+
+ if (webParam != null)
{
- String targetNS = epMetaData.getInterfaceQName().getNamespaceURI();
- log.debug("JAXBContext [types=" + javaTypes + ",tns=" +
targetNS + "]");
- jaxbCtx = JAXBRIContext.newInstance(javaTypes.toArray(new Class[0]), typeRefs,
targetNS, false);
+ if (webParam.targetNamespace().length() > 0)
+ namespace = webParam.targetNamespace();
+
+ if (webParam.name().length() > 0)
+ name = webParam.name();
+
+ header = webParam.header();
}
- catch (JAXBException ex)
- {
- throw new IllegalStateException("Cannot build JAXB context", ex);
- }
+
+ // Bare and headers must be qualified
+ if (namespace == null && (opMetaData.isDocumentBare() || header))
+ namespace = opMetaData.getQName().getNamespaceURI();
+
+ // RPC body parts must have no namespace
+ else if (opMetaData.isRPCLiteral() && !header)
+ namespace = null;
+
+ // Bare uses the operation name as the default, everything else is generated
+ if (name == null)
+ name = opMetaData.isDocumentBare() && !header ?
opMetaData.getQName().getLocalPart() : "arg" + index;
+
+ return (namespace != null) ? new QName(namespace, name) : new QName(name);
}
- protected void populateXmlTypes(EndpointMetaData epMetaData)
+ private QName getWebResultName(OperationMetaData opMetaData, Class javaType, WebResult
anWebResult)
{
- for (OperationMetaData operation : epMetaData.getOperations())
+ String name = null;
+ String namespace = null;
+ boolean header = false;
+
+ if (anWebResult != null)
{
- // parameters
- for (ParameterMetaData paramMetaData : operation.getParameters())
- {
- populateXmlType(paramMetaData);
- }
+ if (anWebResult.targetNamespace().length() > 0)
+ namespace = anWebResult.targetNamespace();
- // return value
- ParameterMetaData returnParameter = operation.getReturnParameter();
- if (returnParameter != null)
- populateXmlType(returnParameter);
+ if (anWebResult.name().length() > 0)
+ name = anWebResult.name();
- // faults
- for (FaultMetaData faultMetaData : operation.getFaults())
- {
- populateXmlType(faultMetaData);
- }
+ header = anWebResult.header();
}
+
+ // Bare and headers must be qualified
+ if (namespace == null && (opMetaData.isDocumentBare() || header))
+ namespace = opMetaData.getQName().getNamespaceURI();
+
+ // RPC body parts must have no namespace
+ else if (opMetaData.isRPCLiteral() && !header)
+ namespace = null;
+
+ // Bare uses the operation name as the default, everything else is generated
+ if (name == null)
+ name = opMetaData.isDocumentBare() && !header ?
opMetaData.getResponseName().getLocalPart() : "return";
+
+ return (namespace != null) ? new QName(namespace, name) : new QName(name);
}
+ private void populateXmlType(FaultMetaData faultMetaData)
+ {
+ EndpointMetaData epMetaData =
faultMetaData.getOperationMetaData().getEndpointMetaData();
+ TypesMetaData types = epMetaData.getServiceMetaData().getTypesMetaData();
+
+ QName xmlType = faultMetaData.getXmlType();
+ String faultBeanName = faultMetaData.getFaultBeanName();
+
+ types.addTypeMapping(new TypeMappingMetaData(types, xmlType, faultBeanName));
+ }
+
private void populateXmlType(ParameterMetaData paramMetaData)
{
EndpointMetaData epMetaData =
paramMetaData.getOperationMetaData().getEndpointMetaData();
@@ -358,86 +432,26 @@
types.addTypeMapping(new TypeMappingMetaData(types, xmlType, javaName));
}
- private void populateXmlType(FaultMetaData faultMetaData)
+ /**
+ * Process operation meta data extensions.
+ */
+ private void processMetaExtensions(EndpointMetaData epMetaData, OperationMetaData
opMetaData)
{
- EndpointMetaData epMetaData =
faultMetaData.getOperationMetaData().getEndpointMetaData();
- TypesMetaData types = epMetaData.getServiceMetaData().getTypesMetaData();
+ // Until there is a addressing annotion we fallback to implicit action asosciation
+ // TODO: figure out a way to assign message name instead of IN and OUT
+ String tns = epMetaData.getQName().getNamespaceURI();
+ String portTypeName = epMetaData.getQName().getLocalPart();
- QName xmlType = faultMetaData.getXmlType();
- String faultBeanName = faultMetaData.getFaultBeanName();
+ AddressingProperties ADDR = new AddressingPropertiesImpl();
+ AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());
+ addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");
- types.addTypeMapping(new TypeMappingMetaData(types, xmlType, faultBeanName));
- }
+ if (!opMetaData.isOneWay())
+ addrExt.setOutboundAction(tns + "/" + portTypeName +
"/OUT");
- protected void processSOAPBinding(EndpointMetaData epMetaData, Class<?>
wsClass)
- {
- SOAPBinding anSoapBinding = (SOAPBinding)wsClass.getAnnotation(SOAPBinding.class);
-
- SOAPBinding.Style attrStyle = anSoapBinding.style();
- Style style = (attrStyle == SOAPBinding.Style.RPC ? Style.RPC : Style.DOCUMENT);
- epMetaData.setStyle(style);
-
- SOAPBinding.Use attrUse = anSoapBinding.use();
- if (attrUse == SOAPBinding.Use.ENCODED)
- throw new WSException("SOAP encoding is not supported for JSR-181
deployments");
-
- epMetaData.setEncodingStyle(Use.LITERAL);
-
- ParameterStyle paramStyle = anSoapBinding.parameterStyle();
- epMetaData.setParameterStyle(paramStyle);
+ opMetaData.addExtension(addrExt);
}
- private WebParam getWebParamAnnotation(Method method, int pos)
- {
- for (Annotation annotation : method.getParameterAnnotations()[pos])
- if (annotation instanceof WebParam)
- return (WebParam)annotation;
-
- return null;
- }
-
- // If the implementation bean does not implement a service endpoint interface and
- // there are no @WebMethod annotations in the implementation bean (excluding
- // @WebMethod annotations used to exclude inherited @WebMethods), all public
- // methods other than those inherited from java.lang.Object will be exposed as Web
- // Service operations, subject to the inheritance rules specified in Common
- // Annotations for the Java Platform [12], section 2.1.
- protected void processWebMethods(EndpointMetaData epMetaData, Class wsClass)
- {
- epMetaData.clearOperations();
-
- // Process @WebMethod annotations
- int webMethodCount = 0;
- for (Method method : wsClass.getMethods())
- {
- WebMethod annotation = method.getAnnotation(WebMethod.class);
- boolean exclude = annotation != null && annotation.exclude();
- if (!exclude && (annotation != null || wsClass.isInterface()))
- {
- processWebMethod(epMetaData, method);
- webMethodCount++;
- }
- }
-
- // @WebService should expose all inherited methods if @WebMethod is never
specified
- if (webMethodCount == 0 && !wsClass.isInterface())
- {
- for (Method method : wsClass.getMethods())
- {
- WebMethod annotation = method.getAnnotation(WebMethod.class);
- boolean exclude = annotation != null && annotation.exclude();
- if (!exclude && method.getDeclaringClass() != Object.class)
- {
- processWebMethod(epMetaData, method);
- webMethodCount++;
- }
- }
- }
-
- if (webMethodCount == 0)
- throw new WSException("No exposable methods found");
- }
-
private void processWebMethod(EndpointMetaData epMetaData, Method method)
{
String javaName = method.getName();
@@ -446,10 +460,6 @@
if (method.getName().endsWith(Constants.ASYNC_METHOD_SUFFIX))
return;
- ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
- TypesMetaData typesMetaData = serviceMetaData.getTypesMetaData();
- String targetNS = epMetaData.getQName().getNamespaceURI();
-
// reflection defaults
String soapAction = "";
String operationName = method.getName();
@@ -465,6 +475,7 @@
}
}
+ String targetNS = epMetaData.getInterfaceQName().getNamespaceURI();
OperationMetaData opMetaData = new OperationMetaData(epMetaData, new
QName(targetNS, operationName), javaName);
opMetaData.setOneWay(method.isAnnotationPresent(Oneway.class));
opMetaData.setSOAPAction(soapAction);
@@ -609,86 +620,111 @@
processMetaExtensions(epMetaData, opMetaData);
}
- private ParameterMode getParameterMode(WebParam anWebParam, Class javaType)
+ private EndpointResult processWebService(UnifiedMetaData wsMetaData, Class<?>
sepClass, ClassLoader loader) throws ClassNotFoundException
{
- if (anWebParam != null)
- {
- if (anWebParam.mode() == WebParam.Mode.INOUT)
- return ParameterMode.INOUT;
- if (anWebParam.mode() == WebParam.Mode.OUT)
- return ParameterMode.OUT;
- }
+ WebService anWebService = sepClass.getAnnotation(WebService.class);
+ if (anWebService == null)
+ throw new WSException("Cannot obtain @WebService annotation from: " +
sepClass.getName());
- return HolderUtils.isHolderType(javaType) ? ParameterMode.INOUT :
ParameterMode.IN;
- }
+ Class<?> seiClass = null;
+ String seiName = null;
+ WSDLUtils wsdlUtils = WSDLUtils.getInstance();
- private ParameterMetaData createResponseWrapper(OperationMetaData operation, Method
method)
- {
- QName operationQName = operation.getQName();
- QName xmlName = new QName(operationQName.getNamespaceURI(),
operationQName.getLocalPart() + "Response");
- QName xmlType = xmlName;
+ String name = anWebService.name();
+ if (name.length() == 0)
+ name = WSDLUtils.getJustClassName(sepClass);
- String responseWrapperType = null;
- if (method.isAnnotationPresent(ResponseWrapper.class))
+ String serviceName = anWebService.serviceName();
+ if (serviceName.length() == 0)
+ serviceName = name + "Service";
+
+ String serviceNS = anWebService.targetNamespace();
+ if (serviceNS.length() == 0)
+ serviceNS = wsdlUtils.getTypeNamespace(sepClass);
+
+ String portName = anWebService.portName();
+ if (portName.length() == 0)
+ portName = name + "Port";
+
+ String wsdlLocation = anWebService.wsdlLocation();
+ String interfaceNS = serviceNS;
+
+ if (anWebService.endpointInterface().length() > 0)
{
- ResponseWrapper anResWrapper = method.getAnnotation(ResponseWrapper.class);
+ seiName = anWebService.endpointInterface();
+ seiClass = loader.loadClass(seiName);
+ anWebService = seiClass.getAnnotation(WebService.class);
- String localName = anResWrapper.localName().length() > 0 ?
anResWrapper.localName() : xmlName.getLocalPart();
- String targetNamespace = anResWrapper.targetNamespace().length() > 0 ?
anResWrapper.targetNamespace() : xmlName.getNamespaceURI();
- xmlName = new QName(targetNamespace, localName);
+ if (anWebService == null)
+ throw new WSException("Interface does not have a @WebService annotation:
" + seiName);
- if (anResWrapper.className().length() > 0)
- responseWrapperType = anResWrapper.className();
- }
+ name = anWebService.name();
+ if (name.length() == 0)
+ name = WSDLUtils.getJustClassName(seiClass);
- if (responseWrapperType == null)
- {
- String packageName = JavaUtils.getPackageName(method.getDeclaringClass()) +
".jaxws";
- responseWrapperType = packageName + "." +
JavaUtils.capitalize(method.getName()) + "Response";
+ interfaceNS = anWebService.targetNamespace();
+ if (interfaceNS.length() == 0)
+ interfaceNS = wsdlUtils.getTypeNamespace(seiClass);
+
+ // The spec states that WSDL location should be allowed on an SEI, although it
+ // makes far more sense on the implementation bean, so we ALWAYS override the
SEI
+ // when wsdlLocation is defined on the bean
+
+ if (wsdlLocation.length() == 0)
+ wsdlLocation = anWebService.wsdlLocation();
}
- ParameterMetaData retMetaData = new ParameterMetaData(operation, xmlName, xmlType,
responseWrapperType);
- retMetaData.setAccessorFactoryCreator(JAXBAccessor.FACTORY_CREATOR);
- operation.setReturnParameter(retMetaData);
+ // Setup the ServerEndpointMetaData
+ QName portQName = new QName(serviceNS, portName);
+ QName portTypeQName = new QName(interfaceNS, name);
- return retMetaData;
+ EndpointResult result = new EndpointResult();
+ result.smd = new ServiceMetaData(wsMetaData, new QName(serviceNS, serviceName));
+ result.semd = new ServerEndpointMetaData(result.smd, portQName, portTypeQName,
EndpointMetaData.Type.JAXWS);
+ result.klass = (seiClass != null ? seiClass : sepClass);
+ result.wsdlLocation = wsdlLocation;
+
+ result.smd.addEndpoint(result.semd);
+ wsMetaData.addService(result.smd);
+
+ return result;
}
- private ParameterMetaData createRequestWrapper(OperationMetaData operation, Method
method)
+ protected void createJAXBContext(EndpointMetaData epMetaData)
{
- String requestWrapperType = null;
- QName xmlName = operation.getQName();
- QName xmlType = xmlName;
- if (method.isAnnotationPresent(RequestWrapper.class))
+ try
{
- 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();
- xmlName = new QName(targetNamespace, localName);
-
- if (anReqWrapper.className().length() > 0)
- requestWrapperType = anReqWrapper.className();
+ String targetNS = epMetaData.getInterfaceQName().getNamespaceURI();
+ log.debug("JAXBContext [types=" + javaTypes + ",tns=" +
targetNS + "]");
+ jaxbCtx = JAXBRIContext.newInstance(javaTypes.toArray(new Class[0]), typeRefs,
targetNS, false);
}
-
- // Conformance 3.18, the default value must be the same as the method name
- if (requestWrapperType == null)
+ catch (JAXBException ex)
{
- String packageName = JavaUtils.getPackageName(method.getDeclaringClass()) +
".jaxws";
- requestWrapperType = packageName + "." +
JavaUtils.capitalize(method.getName());
+ throw new IllegalStateException("Cannot build JAXB context", ex);
}
+ }
- // JAX-WS p.37 pg.1, the annotation only affects the element name, not the type
name
- ParameterMetaData wrapperParameter = new ParameterMetaData(operation, xmlName,
xmlType, requestWrapperType);
- wrapperParameter.setAccessorFactoryCreator(JAXBAccessor.FACTORY_CREATOR);
- operation.addParameter(wrapperParameter);
+ protected void populateXmlTypes(EndpointMetaData epMetaData)
+ {
+ for (OperationMetaData operation : epMetaData.getOperations())
+ {
+ // parameters
+ for (ParameterMetaData paramMetaData : operation.getParameters())
+ {
+ populateXmlType(paramMetaData);
+ }
- return wrapperParameter;
- }
+ // return value
+ ParameterMetaData returnParameter = operation.getReturnParameter();
+ if (returnParameter != null)
+ populateXmlType(returnParameter);
- private String convertToVariable(String localName)
- {
- return JAXBRIContext.mangleNameToVariableName(localName);
+ // faults
+ for (FaultMetaData faultMetaData : operation.getFaults())
+ {
+ populateXmlType(faultMetaData);
+ }
+ }
}
/**
@@ -790,222 +826,212 @@
}
}
- private QName getWebParamName(OperationMetaData opMetaData, int index, Class javaType,
WebParam webParam)
+ protected void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData,
String wsdlLocation, EndpointMetaData epMetaData)
{
- String namespace = null;
- String name = null;
- boolean header = false;
-
- if (webParam != null)
+ if (wsdlLocation.length() > 0)
{
- if (webParam.targetNamespace().length() > 0)
- namespace = webParam.targetNamespace();
+ serviceMetaData.setWsdlFile(wsdlLocation);
+ }
+ else
+ {
+ try
+ {
+ String serviceName = serviceMetaData.getServiceName().getLocalPart();
- if (webParam.name().length() > 0)
- name = webParam.name();
+ WSDLGenerator generator = new JAXBWSDLGenerator(jaxbCtx);
+ WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
- header = webParam.header();
- }
+ // Ensure that types are only in the interface qname
+
wsdlDefinitions.getWsdlTypes().setNamespace(epMetaData.getInterfaceQName().getNamespaceURI());
- // Bare and headers must be qualified
- if (namespace == null && (opMetaData.isDocumentBare() || header))
- namespace = opMetaData.getQName().getNamespaceURI();
+ final File tmpdir = IOUtils.createTempDirectory();
+ File wsdlTmpFile = File.createTempFile(serviceName, ".wsdl",
tmpdir);
+ wsdlTmpFile.deleteOnExit();
- // RPC body parts must have no namespace
- else if (opMetaData.isRPCLiteral() && !header)
- namespace = null;
+ Writer writer = IOUtils.getCharsetFileWriter(wsdlTmpFile,
Constants.DEFAULT_XML_CHARSET);
+ wsdlDefinitions.write(writer, Constants.DEFAULT_XML_CHARSET, new
WSDLWriter.WriterResolver()
+ {
+ public ResolvedWriter resolve(String suggestedFile) throws IOException
+ {
+ File newTmpFile = File.createTempFile(suggestedFile, ".wsdl",
tmpdir);
+ newTmpFile.deleteOnExit();
+ WSDLWriter.ResolvedWriter resolvedWriter = new
WSDLWriter.ResolvedWriter();
+ resolvedWriter.actualFile = newTmpFile.getName();
+ resolvedWriter.charset = Constants.DEFAULT_XML_CHARSET;
+ resolvedWriter.writer = IOUtils.getCharsetFileWriter(newTmpFile,
Constants.DEFAULT_XML_CHARSET);
+ return resolvedWriter;
+ }
+ });
+ writer.close();
- // Bare uses the operation name as the default, everything else is generated
- if (name == null)
- name = opMetaData.isDocumentBare() && !header ?
opMetaData.getQName().getLocalPart() : "arg" + index;
-
- return (namespace != null) ? new QName(namespace, name) : new QName(name);
+ serviceMetaData.setWsdlFile(wsdlTmpFile.toURL().toExternalForm());
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Cannot write generated wsdl", e);
+ }
+ }
}
- private QName getWebResultName(OperationMetaData opMetaData, Class javaType, WebResult
anWebResult)
+ protected void processSOAPBinding(EndpointMetaData epMetaData, Class<?>
wsClass)
{
- String name = null;
- String namespace = null;
- boolean header = false;
+ SOAPBinding anSoapBinding = (SOAPBinding)wsClass.getAnnotation(SOAPBinding.class);
- if (anWebResult != null)
- {
- if (anWebResult.targetNamespace().length() > 0)
- namespace = anWebResult.targetNamespace();
+ SOAPBinding.Style attrStyle = anSoapBinding.style();
+ Style style = (attrStyle == SOAPBinding.Style.RPC ? Style.RPC : Style.DOCUMENT);
+ epMetaData.setStyle(style);
- if (anWebResult.name().length() > 0)
- name = anWebResult.name();
+ SOAPBinding.Use attrUse = anSoapBinding.use();
+ if (attrUse == SOAPBinding.Use.ENCODED)
+ throw new WSException("SOAP encoding is not supported for JSR-181
deployments");
- header = anWebResult.header();
- }
+ epMetaData.setEncodingStyle(Use.LITERAL);
- // Bare and headers must be qualified
- if (namespace == null && (opMetaData.isDocumentBare() || header))
- namespace = opMetaData.getQName().getNamespaceURI();
-
- // RPC body parts must have no namespace
- else if (opMetaData.isRPCLiteral() && !header)
- namespace = null;
-
- // Bare uses the operation name as the default, everything else is generated
- if (name == null)
- name = opMetaData.isDocumentBare() && !header ?
opMetaData.getResponseName().getLocalPart() : "return";
-
- return (namespace != null) ? new QName(namespace, name) : new QName(name);
+ ParameterStyle paramStyle = anSoapBinding.parameterStyle();
+ epMetaData.setParameterStyle(paramStyle);
}
- private void addFault(OperationMetaData omd, Class<?> exception)
+ // If the implementation bean does not implement a service endpoint interface and
+ // there are no @WebMethod annotations in the implementation bean (excluding
+ // @WebMethod annotations used to exclude inherited @WebMethods), all public
+ // methods other than those inherited from java.lang.Object will be exposed as Web
+ // Service operations, subject to the inheritance rules specified in Common
+ // Annotations for the Java Platform [12], section 2.1.
+ protected void processWebMethods(EndpointMetaData epMetaData, Class wsClass)
{
- if (omd.isOneWay())
- throw new IllegalStateException("JSR-181 4.3.1 - A JSR-181 processor is
REQUIRED to report an error if an operation marked "
- + "@Oneway has a return value, declares any checked exceptions or has
any INOUT or OUT parameters.");
+ epMetaData.clearOperations();
- WebFault annotation = exception.getAnnotation(WebFault.class);
-
- String name;
- String namespace;
- String faultBeanName = null;
-
- // Only the element name is effected by @WebFault, the type uses the same
convention
- QName xmlType = new QName(omd.getQName().getNamespaceURI(),
exception.getSimpleName());
-
- /*
- * If @WebFault is present, and the exception contains getFaultInfo, the
- * return value should be used. Otherwise we need to generate the bean.
- */
- boolean generate = true;
- if (annotation != null)
+ // Process @WebMethod annotations
+ int webMethodCount = 0;
+ for (Method method : wsClass.getMethods())
{
- name = annotation.name();
- namespace = annotation.targetNamespace();
- if (namespace.length() == 0)
- namespace = omd.getQName().getNamespaceURI();
-
- Class<?> faultBean = getFaultInfo(exception);
- if (faultBean != null)
+ WebMethod annotation = method.getAnnotation(WebMethod.class);
+ boolean exclude = annotation != null && annotation.exclude();
+ if (!exclude && (annotation != null || wsClass.isInterface()))
{
- generate = false;
- faultBeanName = faultBean.getName();
+ processWebMethod(epMetaData, method);
+ webMethodCount++;
}
}
- else
+
+ // @WebService should expose all inherited methods if @WebMethod is never
specified
+ if (webMethodCount == 0 && !wsClass.isInterface())
{
- name = xmlType.getLocalPart();
- namespace = xmlType.getNamespaceURI();
+ for (Method method : wsClass.getMethods())
+ {
+ WebMethod annotation = method.getAnnotation(WebMethod.class);
+ boolean exclude = annotation != null && annotation.exclude();
+ if (!exclude && method.getDeclaringClass() != Object.class)
+ {
+ processWebMethod(epMetaData, method);
+ webMethodCount++;
+ }
+ }
}
- if (faultBeanName == null)
- faultBeanName =
JavaUtils.getPackageName(omd.getEndpointMetaData().getServiceEndpointInterface()) +
".jaxws." + exception.getSimpleName() + "Bean";
+ if (webMethodCount == 0)
+ throw new WSException("No exposable methods found");
+ }
- QName xmlName = new QName(namespace, name);
-
- FaultMetaData fmd = new FaultMetaData(omd, xmlName, xmlType, exception.getName());
- fmd.setFaultBeanName(faultBeanName);
-
- if (generate)
- wrapperGenerator.generate(fmd);
-
- javaTypes.add(fmd.getFaultBean());
- typeRefs.add(new TypeReference(fmd.getXmlName(), fmd.getFaultBean()));
-
- omd.addFault(fmd);
+ protected void resetMetaDataBuilder(ClassLoader loader)
+ {
+ wrapperGenerator = new DynamicWrapperGenerator(loader);
+ javaTypes.clear();
+ typeRefs.clear();
+ jaxbCtx = null;
}
- private Class<?> getFaultInfo(Class<?> exception)
+ public ServerEndpointMetaData buildEndpoint(UnifiedMetaData wsMetaData,
UnifiedDeploymentInfo udi, Class<?> sepClass, String linkName)
{
try
{
- Method method = exception.getMethod("getFaultInfo");
- Class<?> returnType = method.getReturnType();
- if (returnType == void.class)
- return null;
+ EndpointResult result = processWebService(wsMetaData, sepClass,
udi.classLoader);
- return returnType;
- }
- catch (SecurityException e)
- {
- throw new WSException("Unexpected security exception: " +
e.getMessage(), e);
- }
- catch (NoSuchMethodException e)
- {
- return null;
- }
- }
+ // Clear the java types, etc.
+ resetMetaDataBuilder(udi.classLoader);
- private String[] convertTypeArguments(Class rawType, Type type)
- {
- if (!Collection.class.isAssignableFrom(rawType) &&
!Map.class.isAssignableFrom(rawType))
- return null;
+ ServerEndpointMetaData sepMetaData = result.semd;
+ ServiceMetaData serviceMetaData = result.smd;
+ Class<?> wsClass = result.klass;
+ sepMetaData.setLinkName(linkName);
- if (!(type instanceof ParameterizedType))
- return null;
+ // Assign the WS-Security configuration,
+ WSSecurityConfiguration securityConfiguration =
MetaDataBuilder.getWsSecurityConfiguration(udi);
+ serviceMetaData.setSecurityConfiguration(securityConfiguration);
- ParameterizedType paramType = (ParameterizedType)type;
- Type[] arguments = paramType.getActualTypeArguments();
- String[] ret = new String[arguments.length];
- for (int i = 0; i < arguments.length; i++)
- ret[i] = JavaUtils.erasure(arguments[i]).getName();
+ sepMetaData.setServiceEndpointImplName(sepClass.getName());
+ sepMetaData.setServiceEndpointInterfaceName(wsClass.getName());
- return ret;
- }
+ // Process an optional @SOAPBinding annotation
+ if (wsClass.isAnnotationPresent(SOAPBinding.class))
+ processSOAPBinding(sepMetaData, wsClass);
- /**
- * Process operation meta data extensions.
- */
- private void processMetaExtensions(EndpointMetaData epMetaData, OperationMetaData
opMetaData)
- {
- // Until there is a addressing annotion we fallback to implicit action asosciation
- // TODO: figure out a way to assign message name instead of IN and OUT
- String tns = epMetaData.getQName().getNamespaceURI();
- String portTypeName = epMetaData.getQName().getLocalPart();
+ // Process an optional @BindingType annotation
+ if (wsClass.isAnnotationPresent(BindingType.class))
+ processBindingType(sepMetaData, wsClass);
- AddressingProperties ADDR = new AddressingPropertiesImpl();
- AddressingOpMetaExt addrExt = new AddressingOpMetaExt(ADDR.getNamespaceURI());
- addrExt.setInboundAction(tns + "/" + portTypeName + "/IN");
+ // Init the transport guarantee
+ initTransportGuaranteeJSE(udi, sepMetaData, linkName);
- if (!opMetaData.isOneWay())
- addrExt.setOutboundAction(tns + "/" + portTypeName +
"/OUT");
+ // Process web methods
+ processWebMethods(sepMetaData, wsClass);
- opMetaData.addExtension(addrExt);
- }
+ // Initialize types
+ createJAXBContext(sepMetaData);
+ populateXmlTypes(sepMetaData);
- protected void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData,
String wsdlLocation, EndpointMetaData epMetaData)
- {
- if (wsdlLocation.length() > 0)
- {
- serviceMetaData.setWsdlFile(wsdlLocation);
- }
- else
- {
- try
- {
- String serviceName = serviceMetaData.getServiceName().getLocalPart();
+ // Process or generate WSDL
+ processOrGenerateWSDL(wsClass, serviceMetaData, result.wsdlLocation,
sepMetaData);
- WSDLGenerator generator = new JAXBWSDLGenerator(jaxbCtx);
- WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
+ // Read the generated WSDL and initialize the schema model
+ // FIXME - This should be removed
+ WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
+ JBossXSModel schemaModel =
WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
+ serviceMetaData.getTypesMetaData().setSchemaModel(schemaModel);
- ServerConfigFactory factory = ServerConfigFactory.getInstance();
- ServerConfig config = factory.getServerConfig();
- File tmpdir = new File(config.getServerTempDir().getCanonicalPath() +
"/jbossws");
- tmpdir.mkdirs();
+ // Set the endpoint address
+ processPortComponent(udi, wsClass, linkName, sepMetaData);
- File wsdlTmpFile = File.createTempFile(serviceName, ".wsdl",
tmpdir);
- wsdlTmpFile.deleteOnExit();
+ // Init the endpoint address
+ MetaDataBuilder.initEndpointAddress(udi, sepMetaData, linkName);
- Writer writer = IOUtils.getCharsetFileWriter(wsdlTmpFile,
Constants.DEFAULT_XML_CHARSET);
- wsdlDefinitions.write(writer, Constants.DEFAULT_XML_CHARSET);
- writer.close();
+ // replace the SOAP address
+ MetaDataBuilder.replaceAddressLocation(sepMetaData);
- serviceMetaData.setWsdlFile(wsdlTmpFile.toURL().toExternalForm());
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (IOException e)
- {
- throw new WSException("Cannot write generated wsdl", e);
- }
+ // Process an optional @SOAPMessageHandlers annotation
+ if (sepClass.isAnnotationPresent(SOAPMessageHandlers.class) ||
wsClass.isAnnotationPresent(SOAPMessageHandlers.class))
+ log.warn("@SOAPMessageHandlers is deprecated as of JAX-WS 2.0 with no
replacement.");
+
+ // Add pre handlers
+ WSEndpointConfigJAXWS jaxrpcConfig =
(WSEndpointConfigJAXWS)sepMetaData.getEndpointConfig();
+ sepMetaData.addHandlers(jaxrpcConfig.getHandlers(sepMetaData,
HandlerType.PRE));
+
+ // Process an optional @HandlerChain annotation
+ if (sepClass.isAnnotationPresent(HandlerChain.class))
+ processHandlerChain(sepMetaData, sepClass);
+ else if (wsClass.isAnnotationPresent(HandlerChain.class))
+ processHandlerChain(sepMetaData, wsClass);
+
+ // Add post handlers
+ sepMetaData.addHandlers(jaxrpcConfig.getHandlers(sepMetaData,
HandlerType.POST));
+
+ // init service endpoint id
+ ObjectName sepID = MetaDataBuilder.getServiceEndpointID(udi, sepMetaData);
+ sepMetaData.setServiceEndpointID(sepID);
+
+ return sepMetaData;
}
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WSException("Cannot build meta data: " + ex.getMessage(),
ex);
+ }
}
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Writer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Writer.java 2006-11-30 23:35:39
UTC (rev 1526)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL11Writer.java 2006-12-01 03:53:14
UTC (rev 1527)
@@ -63,8 +63,14 @@
write(writer, null);
}
+
public void write(Writer writer, String charset) throws IOException
{
+ write(writer, charset, null);
+ }
+
+ public void write(Writer writer, String charset, WriterResolver resolver) throws
IOException
+ {
// Write out the wsdl-1.1 represention (only path to obtain is from WSDL11Reader)
if (wsdl.getWsdlOneOneDefinition() != null)
{
@@ -88,31 +94,69 @@
//Detect the WSDL Style early
wsdlStyle = utils.getWSDLStyle(wsdl);
- writtenFaultMessages.clear();
+ StringBuilder importBuffer = new StringBuilder();
+ for (WSDLImport wsdlImport : wsdl.getImports())
+ {
+ if (resolver == null)
+ continue;
- appendDefinitions(buffer);
- appendTypes(buffer);
- appendMessages(buffer);
- appendPortTypes(buffer);
- appendBindings(buffer);
- appendServices(buffer);
+ ResolvedWriter resolved = resolver.resolve(wsdlImport.getLocation());
+ if (resolved == null)
+ continue;
- buffer.append("</definitions>");
- Element element = DOMUtils.parse(buffer.toString());
+ String namespace = wsdlImport.getNamespace();
+ importBuffer.append("<import namespace='" + namespace +
"' location='" + resolved.actualFile + "'/>");
+ if (resolved != null)
+ {
+ StringBuilder builder = new StringBuilder();
- if (charset != null)
- writer.write("<?xml version=\"1.0\" encoding=\""
+ charset + "\"?>\n");
- new DOMWriter(writer).setPrettyprint(true).print(element);
+ appendDefinitions(builder, namespace);
+ appendBody(builder, namespace);
+ writeBuilder(builder, resolved.writer, resolved.charset);
+ resolved.writer.close();
+ }
+ }
+
+ appendDefinitions(buffer, wsdl.getTargetNamespace());
+ if (importBuffer.length() > 0)
+ buffer.append(importBuffer);
+
+ appendBody(buffer, wsdl.getTargetNamespace());
+ writeBuilder(buffer, writer, charset);
}
}
- protected void appendMessages(StringBuilder buffer)
+ private void writeBuilder(StringBuilder builder, Writer writer, String charset) throws
IOException
{
+ Element element = DOMUtils.parse(builder.toString());
+
+ if (charset != null)
+ writer.write("<?xml version=\"1.0\" encoding=\"" +
charset + "\"?>\n");
+ new DOMWriter(writer).setPrettyprint(true).print(element);
+ }
+
+ protected void appendBody(StringBuilder builder, String namespace)
+ {
+ writtenFaultMessages.clear();
+
+ appendTypes(builder, namespace);
+ appendMessages(builder, namespace);
+ appendInterfaces(builder, namespace);
+ appendBindings(builder, namespace);
+ appendServices(builder, namespace);
+ builder.append("</definitions>");
+ }
+
+ protected void appendMessages(StringBuilder buffer, String namespace)
+ {
WSDLInterface[] interfaces = wsdl.getInterfaces();
int len = interfaces != null ? interfaces.length : 0;
for (int i = 0; i < len; i++)
{
WSDLInterface intf = interfaces[i];
+ if (! namespace.equals(intf.getQName().getNamespaceURI()))
+ continue;
+
WSDLInterfaceOperation[] operations = intf.getSortedOperations();
int lenOps = operations.length;
for (int j = 0; j < lenOps; j++)
@@ -240,21 +284,19 @@
return null;
}
- protected void appendInterfaces(StringBuilder buffer)
+ protected void appendInterfaces(StringBuilder buffer, String namespace)
{
- }
-
- protected void appendPortTypes(StringBuilder buffer)
- {
WSDLInterface[] intfs = wsdl.getInterfaces();
for (int i = 0; i < intfs.length; i++)
{
WSDLInterface intf = intfs[i];
- if (i == 0)
- buffer.append("<portType name='" + intf.getName() +
"'>");
+ if (!namespace.equals(intf.getQName().getNamespaceURI()))
+ continue;
+
+ buffer.append("<portType name='" + intf.getName() +
"'>");
appendPortOperations(buffer, intf);
+ buffer.append("</portType>");
}
- buffer.append("</portType>");
}
private String getParameterOrder(WSDLInterfaceOperation operation)
@@ -275,7 +317,7 @@
protected void appendPortOperations(StringBuilder buffer, WSDLInterface intf)
{
- String targetPrefix = wsdl.getTargetPrefix();
+ String prefix = wsdl.getPrefix(intf.getQName().getNamespaceURI());
WSDLInterfaceOperation[] operations = intf.getSortedOperations();
for (int i = 0; i < operations.length; i++)
{
@@ -289,7 +331,7 @@
String opname = operation.getName().toString();
String interfaceName = operation.getWsdlInterface().getName().toString();
- String msgEl = targetPrefix + ":" + interfaceName + "_" +
opname;
+ String msgEl = prefix + ":" + interfaceName + "_" + opname;
buffer.append("<input message='" + msgEl +
"'>").append("</input>");
@@ -311,12 +353,14 @@
}
}
- protected void appendBindings(StringBuilder buffer)
+ protected void appendBindings(StringBuilder buffer, String namespace)
{
WSDLBinding[] bindings = wsdl.getBindings();
for (int i = 0; i < bindings.length; i++)
{
WSDLBinding binding = bindings[i];
+ if (!namespace.equals(binding.getQName().getNamespaceURI()))
+ continue;
buffer.append("<binding name='" + binding.getName() +
"' type='" + getQNameRef(binding.getInterfaceName()) +
"'>");
//TODO:Need to derive the WSDLStyle from the Style attribute of
InterfaceOperation
if (wsdlStyle == null)
@@ -438,7 +482,7 @@
return pattern;
}
- protected void appendServices(StringBuilder buffer)
+ protected void appendServices(StringBuilder buffer, String namespace)
{
WSDLService[] services = wsdl.getServices();
int len = services.length;
@@ -446,6 +490,8 @@
{
WSDLService service = services[i];
+ if (!namespace.equals(service.getQName().getNamespaceURI()))
+ continue;
buffer.append("<service name='" + service.getName() +
"'>");
WSDLEndpoint[] endpoints = service.getEndpoints();
int lenend = endpoints.length;
@@ -464,8 +510,7 @@
String name = endpoint.getName().toString();
QName endpointBinding = endpoint.getBinding();
String prefix = endpointBinding.getPrefix();
- if (prefix == null || prefix == "")
- prefix = wsdl.getTargetPrefix();
+ prefix = wsdl.getPrefix(endpointBinding.getNamespaceURI());
String ebname = prefix + ":" + endpointBinding.getLocalPart();
buffer.append("<port name='" + name + "'
binding='" + ebname + "'>");
buffer.append("<" + soapPrefix + ":address location='" +
endpoint.getAddress() + "'/>");
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL20Writer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL20Writer.java 2006-11-30 23:35:39
UTC (rev 1526)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDL20Writer.java 2006-12-01 03:53:14
UTC (rev 1527)
@@ -46,7 +46,7 @@
}
- protected void appendInterfaces(StringBuilder buffer)
+ protected void appendInterfaces(StringBuilder buffer, String namespace)
{
WSDLInterface[] interfaces = wsdl.getInterfaces();
for (int i = 0; i < interfaces.length; i++)
@@ -137,7 +137,7 @@
}
}
- protected void appendBindings(StringBuilder buffer)
+ protected void appendBindings(StringBuilder buffer, String namespace)
{
WSDLBinding[] bindings = wsdl.getBindings();
for (int i = 0; i < bindings.length; i++)
@@ -165,7 +165,7 @@
}
}
- protected void appendServices(StringBuilder buffer)
+ protected void appendServices(StringBuilder buffer, String namespace)
{
WSDLService[] services = wsdl.getServices();
for (int i = 0; i < services.length; i++)
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLDefinitions.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLDefinitions.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLDefinitions.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -38,6 +38,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.wsdl.WSDLWriter.WriterResolver;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.Document;
@@ -302,10 +303,15 @@
/** Write the wsdl definition to the given writer, clients should not care about the
wsdl version. */
public void write(Writer writer, String charset) throws IOException
{
+ write(writer, charset, null);
+ }
+
+ public void write(Writer writer, String charset, WriterResolver resolver) throws
IOException
+ {
if (Constants.NS_WSDL11.equals(wsdlNamespace))
{
WSDL11Writer wsdl11Writer = new WSDL11Writer(this);
- wsdl11Writer.write(writer, charset);
+ wsdl11Writer.write(writer, charset, resolver);
}
else if (Constants.NS_WSDL20.equals(wsdlNamespace))
{
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLTypes.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLTypes.java 2006-11-30 23:35:39 UTC
(rev 1526)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLTypes.java 2006-12-01 03:53:14 UTC
(rev 1527)
@@ -44,6 +44,7 @@
static private final Logger log = Logger.getLogger(WSDLTypes.class);
private WSDLDefinitions wsdlDefinitions;
+ private String namespace;
public abstract QName getXMLType(QName name);
@@ -56,4 +57,20 @@
{
wsdlDefinitions = parent;
}
+
+ /**
+ * Gets the namespace associate with this types declaration. Currently this is used to
filter
+ * which WSDL file receives this types definition. Null means all files.
+ *
+ * @return the namespace associated with this type definition
+ */
+ public String getNamespace()
+ {
+ return namespace;
+ }
+
+ public void setNamespace(String namespace)
+ {
+ this.namespace = namespace;
+ }
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLUtils.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLUtils.java 2006-11-30 23:35:39 UTC
(rev 1526)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLUtils.java 2006-12-01 03:53:14 UTC
(rev 1527)
@@ -535,13 +535,13 @@
* @return just the classname
*/
- public String getJustClassName(Class cls)
+ public static String getJustClassName(Class cls)
{
if (cls == null) return null;
if (cls.isArray())
{
Class c = cls.getComponentType();
- return this.getJustClassName(c.getName());
+ return getJustClassName(c.getName());
}
return getJustClassName(cls.getName());
@@ -553,7 +553,7 @@
* @param classname
* @return just the classname
*/
- public String getJustClassName(String classname)
+ public static String getJustClassName(String classname)
{
int index = classname.lastIndexOf(".");
if (index < 0)
Modified: trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLWriter.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLWriter.java 2006-11-30 23:35:39 UTC
(rev 1526)
+++ trunk/src/main/java/org/jboss/ws/metadata/wsdl/WSDLWriter.java 2006-12-01 03:53:14 UTC
(rev 1527)
@@ -59,6 +59,18 @@
*/
protected boolean includeSchemaInWSDL = true;
+ public static class ResolvedWriter
+ {
+ public String actualFile;
+ public String charset;
+ public Writer writer;
+ }
+
+ public static interface WriterResolver
+ {
+ public ResolvedWriter resolve(String suggestedFile) throws IOException;
+ }
+
/** Use WSDLDefinitions.writeWSDL instead. */
protected WSDLWriter(WSDLDefinitions wsdl)
{
@@ -73,11 +85,11 @@
StringBuilder buffer = new StringBuilder();
buffer.append(Constants.XML_HEADER);
- appendDefinitions(buffer);
- appendTypes(buffer);
- appendInterfaces(buffer);
- appendBindings(buffer);
- appendServices(buffer);
+ appendDefinitions(buffer, wsdl.getTargetNamespace());
+ appendTypes(buffer, wsdl.getTargetNamespace());
+ appendInterfaces(buffer, wsdl.getTargetNamespace());
+ appendBindings(buffer, wsdl.getTargetNamespace());
+ appendServices(buffer, wsdl.getTargetNamespace());
buffer.append("</definitions>");
@@ -85,7 +97,7 @@
new DOMWriter(writer).setPrettyprint(true).print(element);
}
- protected void appendDefinitions(StringBuilder buffer)
+ protected void appendDefinitions(StringBuilder buffer, String namespace)
{
buffer.append("<definitions");
//Append service name as done by wscompile, if there is just one
@@ -95,8 +107,9 @@
WSDLService ser = services[0];
buffer.append(" name='" + ser.getName() + "'");
}
- buffer.append(" targetNamespace='" + wsdl.getTargetNamespace() +
"'");
+ buffer.append(" targetNamespace='" + namespace + "'");
buffer.append(" xmlns='" + wsdl.getWsdlNamespace() +
"'");
+
Iterator it = wsdl.getRegisteredNamespaceURIs();
while (it.hasNext())
{
@@ -112,9 +125,13 @@
buffer.append(">");
}
- protected void appendTypes(StringBuilder buffer)
+ protected void appendTypes(StringBuilder buffer, String namespace)
{
WSDLTypes wsdlTypes = wsdl.getWsdlTypes();
+ // If the type section is bound to a particular namespace, verify it mataches,
otherwise skip
+ if (wsdlTypes.getNamespace() != null &&
!wsdlTypes.getNamespace().equals(namespace))
+ return;
+
if (wsdlTypes instanceof XSModelTypes)
{
buffer.append("<types>");
@@ -132,11 +149,11 @@
}
}
- protected abstract void appendInterfaces(StringBuilder buffer);
+ protected abstract void appendInterfaces(StringBuilder buffer, String namespace);
- protected abstract void appendBindings(StringBuilder buffer);
+ protected abstract void appendBindings(StringBuilder buffer, String namespace);
- protected abstract void appendServices(StringBuilder buffer);
+ protected abstract void appendServices(StringBuilder buffer, String namespace);
/** Get a prefixed name of form prefix:localPart */
protected String getQNameRef(QName qname)
Modified: trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java 2006-11-30 23:35:39
UTC (rev 1526)
+++ trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java 2006-12-01 03:53:14
UTC (rev 1527)
@@ -42,6 +42,7 @@
import org.jboss.ws.metadata.wsdl.WSDLBindingOperationOutput;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.metadata.wsdl.WSDLImport;
import org.jboss.ws.metadata.wsdl.WSDLInterface;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceFault;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
@@ -82,6 +83,16 @@
wsdlInterface.setName(new NCName(interfaceQName));
wsdl.addInterface(wsdlInterface);
+ // Add imports
+ if
(!interfaceQName.getNamespaceURI().equals(endpoint.getServiceMetaData().getServiceName().getNamespaceURI()))
+ {
+ WSDLImport wsdlImport = new WSDLImport(wsdl);
+ wsdlImport.setLocation(interfaceQName.getLocalPart() + "_PortType");
+ wsdlImport.setNamespace(interfaceQName.getNamespaceURI());
+ wsdl.addImport(wsdlImport);
+ wsdl.registerNamespaceURI(interfaceQName.getNamespaceURI(), null);
+ }
+
WSDLBinding wsdlBinding = new WSDLBinding(wsdl);
QName bindingQName = new QName(interfaceQName.getNamespaceURI(),
interfaceQName.getLocalPart() + "Binding");
wsdlBinding.setQName(bindingQName);
Modified: trunk/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml
===================================================================
--- trunk/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml 2006-11-30 23:35:39 UTC
(rev 1526)
+++ trunk/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml 2006-12-01 03:53:14 UTC
(rev 1527)
@@ -14,12 +14,12 @@
<servlet>
<servlet-name>ContextServlet</servlet-name>
-
<servlet-class>org.jboss.ws.integration.jboss.JBossContextServlet</servlet-class>
+
<servlet-class>org.jboss.ws.integration.jboss50.JBossContextServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>PortComponentLinkServlet</servlet-name>
-
<servlet-class>org.jboss.ws.integration.jboss.PortComponentLinkServlet</servlet-class>
+
<servlet-class>org.jboss.ws.integration.jboss50.PortComponentLinkServlet</servlet-class>
</servlet>
<!-- now the mappings -->
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/anonymous/AnonymousImpl.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -30,7 +30,7 @@
* @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
* @version $Revision$
*/
-(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.anonymous.Anonymous")
+(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.anonymous.Anonymous",
serviceName="AnonymousService")
public class AnonymousImpl implements Anonymous
{
public AnonymousResponse echoAnonymous(AnonymousRequest request)
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -38,7 +38,7 @@
import org.jboss.logging.Logger;
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.binding.SOAPEndpoint")
+@WebService(name="SOAPEndpoint",
targetNamespace="http://org.jboss.ws/jaxws/binding", endpointInterface =
"org.jboss.test.ws.jaxws.binding.SOAPEndpoint")
public class SOAPEndpointBean implements SOAPEndpoint
{
private static Logger log = Logger.getLogger(SOAPEndpointBean.class);
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/context/EndpointBean.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/context/EndpointBean.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/context/EndpointBean.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -32,7 +32,7 @@
import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.context.EndpointInterface")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.context.EndpointInterface", serviceName =
"TestService", targetNamespace = "http://org.jboss.ws/jaxws/context")
public class EndpointBean
{
@Resource
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/context/EndpointInterface.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/context/EndpointInterface.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/context/EndpointInterface.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -27,7 +27,7 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-@WebService(name = "EndpointInterface", targetNamespace =
"http://org.jboss.ws/jaxws/context", serviceName = "TestService")
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/context")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface EndpointInterface extends Remote
{
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointBean.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointBean.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointBean.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -31,7 +31,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.endpoint.EndpointInterface")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.endpoint.EndpointInterface", targetNamespace =
"http://org.jboss.ws/jaxws/endpoint", serviceName = "TestService")
public class EndpointBean implements EndpointInterface
{
public String echo(String input)
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointInterface.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointInterface.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointInterface.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -34,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
-@WebService(name = "EndpointInterface", targetNamespace =
"http://org.jboss.ws/jaxws/endpoint", serviceName = "TestService")
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/endpoint")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface EndpointInterface extends Remote
{
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionTestCase.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -54,7 +54,7 @@
{
super.setUp();
- QName serviceName = new QName(targetNS, "ExceptionEndpointService");
+ QName serviceName = new QName(targetNS, "ExceptionEndpointImplService");
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-exception/ExceptionEndpointService?wsdl");
Service service = Service.create(wsdlURL, serviceName);
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpoint.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -28,11 +28,11 @@
import javax.jws.soap.SOAPBinding;
/**
- *
+ *
* @author darran.lofthouse(a)jboss.com
* @since 19-October-2006
*/
-@WebService(serviceName = "TestService", targetNamespace =
"http://org.jboss/test/ws/jbws1190")
+@WebService(targetNamespace = "http://org.jboss/test/ws/jbws1190")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface TestEndpoint extends Remote
{
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -35,11 +35,11 @@
import org.jboss.ws.server.ServerConfigFactory;
/**
- *
+ *
* @author darran.lofthouse(a)jboss.com
* @since 19-October-2006
*/
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jbws1190.TestEndpoint")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jbws1190.TestEndpoint", targetNamespace =
"http://org.jboss/test/ws/jbws1190", name="Test")
public class TestEndpointImpl implements TestEndpoint
{
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1357/JBWS1357Impl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1357/JBWS1357Impl.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1357/JBWS1357Impl.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -23,7 +23,7 @@
import javax.jws.WebService;
-(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.jbws1357.JBWS1357")
+(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.jbws1357.JBWS1357",
name="JBWS1357")
public class JBWS1357Impl implements JBWS1357
{
public String echo(String message)
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java 2006-11-30 23:35:39
UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jbws981/EJB3Bean.java 2006-12-01 03:53:14
UTC (rev 1527)
@@ -33,12 +33,12 @@
import org.jboss.ws.annotation.PortComponent;
/**
- *
+ *
* @author darran.lofthouse(a)jboss.com
* @since Nov 2, 2006
*/
@Stateless
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jbws981.EndpointInterface")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jbws981.EndpointInterface", targetNamespace =
"http://www.jboss.org/test/ws/jaxws/jbws981", serviceName =
"TestService")
public class EJB3Bean implements EJB3RemoteInterface
{
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java 2006-11-30
23:35:39 UTC (rev 1526)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jbws981/EndpointInterface.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -14,7 +14,7 @@
import org.jboss.ws.annotation.PortComponent;
-@WebService(targetNamespace = "http://www.jboss.org/test/ws/jaxws/jbws981",
serviceName = "TestService")
+@WebService(targetNamespace = "http://www.jboss.org/test/ws/jaxws/jbws981")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@PortComponent(virtualHosts = { "localhost", "www.jboss.org" })
public interface EndpointInterface
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/complex/RegistrationService.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/complex/RegistrationService.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/complex/RegistrationService.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -40,7 +40,7 @@
* @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
* @version $Revision$
*/
-@WebService (endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.complex.Registration")
+@WebService (endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.complex.Registration",
serviceName="RegistrationService")
public class RegistrationService implements Registration
{
// Provide logging
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/DocWrappedServiceImpl.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/DocWrappedServiceImpl.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/DocWrappedServiceImpl.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -37,7 +37,7 @@
* @since 16-Oct-2005
*/
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.soapbinding.DocWrapped")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.soapbinding.DocWrapped",
name="DocWrapped")
public class DocWrappedServiceImpl implements DocWrapped
{
// Provide logging
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/ExampleServiceImpl.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/ExampleServiceImpl.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/ExampleServiceImpl.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -34,7 +34,7 @@
* @since 16-Oct-2005
*/
-(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.jsr181.soapbinding.ExampleSEI")
+(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.jsr181.soapbinding.ExampleSEI",
name="Example")
public class ExampleServiceImpl
{
// Provide logging
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpointImpl.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpointImpl.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpointImpl.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -34,7 +34,7 @@
* @since 12-Aug-2005
*/
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.webmethod.TestEndpoint")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.webmethod.TestEndpoint",
name="TestEndpoint")
public class TestEndpointImpl
{
// Provide logging
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -35,7 +35,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
-@WebService(name = "EndpointInterface", targetNamespace =
"http://www.openuri.org/2004/04/HelloWorld", serviceName =
"TestService")
+@WebService(name = "EndpointInterface", targetNamespace =
"http://foo")
@PortComponent(contextRoot="/jsr181", urlPattern="/*")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface EndpointInterface03 extends Remote
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSEBean03.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSEBean03.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSEBean03.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -25,13 +25,13 @@
/**
* Test the JSR-181 javax.jws.WebService annotation on a JSE endpoint.
- *
+ *
* Uses the endpointInterface attribute
*
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.webservice.EndpointInterface03")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jsr181.webservice.EndpointInterface03", targetNamespace
= "http://www.openuri.org/2004/04/HelloWorld", serviceName =
"TestService")
public class JSEBean03
{
public String echo(String input)
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -42,20 +42,23 @@
*/
public class JSR181WebServiceBase extends JBossWSTest
{
- private static EndpointInterface port;
private EndpointInterface getPort() throws MalformedURLException
{
- if (port == null)
- {
- QName serviceName = new
QName("http://www.openuri.org/2004/04/HelloWorld", "TestService");
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jsr181?wsdl");
+ QName serviceName = new
QName("http://www.openuri.org/2004/04/HelloWorld", "TestService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jsr181?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- port = (EndpointInterface)service.getPort(EndpointInterface.class);
- }
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(EndpointInterface.class);
+ }
- return port;
+ private EndpointInterface03 getPort03() throws MalformedURLException
+ {
+ QName serviceName = new
QName("http://www.openuri.org/2004/04/HelloWorld", "TestService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jsr181?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(EndpointInterface03.class);
}
private void sayHello() throws RemoteException, MalformedURLException
@@ -78,7 +81,10 @@
public void webServiceEndpointInterfaceTest() throws Exception
{
- sayHello();
+ assertWSDLAccess();
+ String helloWorld = "Hello Interface!";
+ Object retObj = getPort03().echo(helloWorld);
+ assertEquals(helloWorld, retObj);
}
private void assertWSDLAccess() throws MalformedURLException
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceJSETestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceJSETestCase.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceJSETestCase.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -52,7 +52,7 @@
}
}
- public void _testWebServiceWsdlLocation() throws Exception
+ public void testWebServiceWsdlLocation() throws Exception
{
deploy("jaxws-jsr181-webservice02-jse.war");
try
@@ -65,7 +65,7 @@
}
}
- public void _testWebServiceEndpointInterface() throws Exception
+ public void testWebServiceEndpointInterface() throws Exception
{
deploy("jaxws-jsr181-webservice03-jse.war");
try
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -43,7 +43,7 @@
* that offers access though RMI and SOAP
*/
@Stateless
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.OrderMgmt")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.OrderMgmt", name="OrderMgmt")
@HandlerChain(file = "META-INF/jaxws-handler.xml")
public class OrderMgmtBean implements OrderMgmt {
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -29,7 +29,7 @@
import javax.xml.ws.Response;
@Stateless
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification",
name="CCVerification")
@HandlerChain(file = "META-INF/jaxws-handler.xml")
public class CCVerificationBean implements CCVerification {
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -26,7 +26,7 @@
import javax.jws.HandlerChain;
@Stateless
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt",
name="ProfileMgmt")
@HandlerChain(file = "META-INF/jaxws-handler.xml")
public class ProfileMgmtBean implements ProfileMgmt {
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.java 2006-11-30
23:35:39 UTC (rev 1526)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.java 2006-12-01
03:53:14 UTC (rev 1527)
@@ -23,7 +23,7 @@
import javax.jws.WebService;
-(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.wrapped.accessor.Accessor")
+(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.wrapped.accessor.Accessor",
name="Accessor")
public class AccessorImpl implements Accessor
{
public String fieldAccessor(String one, int two)