Author: thomas.diesler(a)jboss.com
Date: 2006-12-06 14:08:25 -0500 (Wed, 06 Dec 2006)
New Revision: 1581
Added:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriterResolver.java
branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/
branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.jpeg
branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.txt
branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/disguised_jpeg.xcf
branches/tdiesler/trunk/src/test/resources/jaxws/xop/
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.jpeg
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.txt
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.xml
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/disguised_jpeg.xcf
Removed:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/injection/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriterResolver.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToWSDL20TestCase.java
branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.jpeg
branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.txt
branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/disguised_jpeg.xcf
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.jpeg
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.txt
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.xml
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/disguised_jpeg.xcf
Modified:
branches/tdiesler/trunk/build.xml
branches/tdiesler/trunk/src/main/java/javax/xml/rpc/ServiceFactory.java
branches/tdiesler/trunk/src/main/java/javax/xml/soap/MessageFactory.java
branches/tdiesler/trunk/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
branches/tdiesler/trunk/src/main/java/javax/xml/soap/SOAPFactory.java
branches/tdiesler/trunk/src/main/java/javax/xml/ws/addressing/JAXWSAConstants.java
branches/tdiesler/trunk/src/main/java/javax/xml/ws/spi/Provider.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ParameterMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ServiceMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSEndpointMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/XOPContext.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentMarshallerImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentUnmarshallerImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java
branches/tdiesler/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxrpc-client-config.xml
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxrpc-endpoint-config.xml
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-client-config.xml
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-endpoint-config.xml
branches/tdiesler/trunk/src/main/resources/jbossws.war/Tomcat/META-INF/jboss-beans.xml
branches/tdiesler/trunk/src/test/build.xml
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/config/WSConfigTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws958/JBWS958TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/context/WebServiceContextTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderMessageTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/DHRequest.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/DHResponse.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpoint.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpointBean.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/XOPTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java
branches/tdiesler/trunk/src/test/resources/common/config/jaxrpc-endpoint-config.xml
branches/tdiesler/trunk/src/test/resources/common/config/jaxws-endpoint-config.xml
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/sep06/wsa10/META-INF/application-client.xml
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/sep06/wsa10/WEB-INF/webservices.xml
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/wsa10/META-INF/application-client.xml
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/wsaTestService/WEB-INF/webservices.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/marshall-rpclit/WEB-INF/webservices.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/META-INF/application-client.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/jaxrpc-mapping.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/web.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/webservices.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/META-INF/application-client.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/jaxrpc-mapping.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/web.xml
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/webservices.xml
branches/tdiesler/trunk/src/test/resources/jaxws/samples/jsr181ejb/config/ServerHandlers.xml
branches/tdiesler/trunk/src/test/resources/jaxws/wsaddressing/action/META-INF/jbossws-client-config.xml
Log:
Modified: branches/tdiesler/trunk/build.xml
===================================================================
--- branches/tdiesler/trunk/build.xml 2006-12-06 15:52:34 UTC (rev 1580)
+++ branches/tdiesler/trunk/build.xml 2006-12-06 19:08:25 UTC (rev 1581)
@@ -383,7 +383,19 @@
<target name="deploy-to-server">
<copy todir="${jboss.deploy.home}/client"
file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
<copy todir="${jboss.deploy.home}/lib"
file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
- <copy todir="${jboss.deploy.home}/client"
file="${build.lib.dir}/${jbossws}-client.jar" overwrite="true"/>
+ <copy todir="${jboss.deploy.home}/client"
overwrite="true">
+ <fileset dir="${build.lib.dir}">
+ <include name="jboss-jaxrpc.jar"/>
+ <include name="jboss-saaj.jar"/>
+ <include name="${jbossws}-client.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="${jboss.deploy.home}/server/${jboss.server.instance}/lib"
overwrite="true">
+ <fileset dir="${build.lib.dir}">
+ <include name="jboss-jaxrpc.jar"/>
+ <include name="jboss-saaj.jar"/>
+ </fileset>
+ </copy>
<delete
dir="${jboss.deploy.home}/server/${jboss.server.instance}/deploy/${jbossws}.sar"/>
<mkdir
dir="${jboss.deploy.home}/server/${jboss.server.instance}/deploy/${jbossws}.sar"/>
<unjar
dest="${jboss.deploy.home}/server/${jboss.server.instance}/deploy/${jbossws}.sar"
src="${build.lib.dir}/${jbossws}.sar"/>
Modified: branches/tdiesler/trunk/src/main/java/javax/xml/rpc/ServiceFactory.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/javax/xml/rpc/ServiceFactory.java 2006-12-06
15:52:34 UTC (rev 1580)
+++ branches/tdiesler/trunk/src/main/java/javax/xml/rpc/ServiceFactory.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -54,7 +54,7 @@
/** A constant representing the property used to lookup the name of a ServiceFactory
implementation class. */
public static final String SERVICEFACTORY_PROPERTY =
"javax.xml.rpc.ServiceFactory";
- private static final String DEFAULT_SERVICE_FACTORY =
"org.jboss.ws.jaxrpc.ServiceFactoryImpl";
+ private static final String DEFAULT_SERVICE_FACTORY =
"org.jboss.ws.core.jaxrpc.ServiceFactoryImpl";
private static final String[] alternativeFactories = new String[] {};
protected ServiceFactory()
Modified: branches/tdiesler/trunk/src/main/java/javax/xml/soap/MessageFactory.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/javax/xml/soap/MessageFactory.java 2006-12-06
15:52:34 UTC (rev 1580)
+++ branches/tdiesler/trunk/src/main/java/javax/xml/soap/MessageFactory.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -62,7 +62,7 @@
// provide logging
private static Logger log = Logger.getLogger(MessageFactory.class);
- private static final String DEFAULT_MESSAGE_FACTORY =
"org.jboss.ws.soap.MessageFactoryImpl";
+ private static final String DEFAULT_MESSAGE_FACTORY =
"org.jboss.ws.core.soap.MessageFactoryImpl";
private static final String[] alternativeFactories = new String[] {
"org.jboss.axis.soap.MessageFactoryImpl" };
/** Creates a new MessageFactory object that is an instance of the default
implementation.
Modified: branches/tdiesler/trunk/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/javax/xml/soap/SOAPConnectionFactory.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/javax/xml/soap/SOAPConnectionFactory.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -42,7 +42,7 @@
// provide logging
private static Logger log = Logger.getLogger(SOAPConnectionFactory.class);
- private static final String DEFAULT_SOAP_CONNECTION_FACTORY =
"org.jboss.ws.soap.SOAPConnectionFactoryImpl";
+ private static final String DEFAULT_SOAP_CONNECTION_FACTORY =
"org.jboss.ws.core.soap.SOAPConnectionFactoryImpl";
private static final String[] alternativeFactories = new String[] {
"org.jboss.webservice.soap.SOAPConnectionFactoryImpl",
"org.jboss.axis.soap.SOAPConnectionFactoryImpl" };
Modified: branches/tdiesler/trunk/src/main/java/javax/xml/soap/SOAPFactory.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/javax/xml/soap/SOAPFactory.java 2006-12-06
15:52:34 UTC (rev 1580)
+++ branches/tdiesler/trunk/src/main/java/javax/xml/soap/SOAPFactory.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -44,7 +44,7 @@
// provide logging
private static Logger log = Logger.getLogger(SOAPFactory.class);
- private static final String DEFAULT_SOAP_FACTORY =
"org.jboss.ws.soap.SOAPFactoryImpl";
+ private static final String DEFAULT_SOAP_FACTORY =
"org.jboss.ws.core.soap.SOAPFactoryImpl";
private static final String[] alternativeFactories = new String[] {
"org.jboss.axis.soap.SOAPFactoryImpl" };
/** Creates a new instance of SOAPFactory.
Modified:
branches/tdiesler/trunk/src/main/java/javax/xml/ws/addressing/JAXWSAConstants.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/javax/xml/ws/addressing/JAXWSAConstants.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/javax/xml/ws/addressing/JAXWSAConstants.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -36,7 +36,7 @@
public static final String ADDRESSING_BUILDER_PROPERTY =
"javax.xml.ws.addressing.AddressingBuilder";
- public static final String DEFAULT_ADDRESSING_BUILDER =
"org.jboss.ws.addressing.soap.SOAPAddressingBuilderImpl";
+ public static final String DEFAULT_ADDRESSING_BUILDER =
"org.jboss.ws.extras.addressing.soap.SOAPAddressingBuilderImpl";
public static final String SOAP11_NAMESPACE_NAME =
"http://schemas.xmlsoap.org/soap/envelope/";
Modified: branches/tdiesler/trunk/src/main/java/javax/xml/ws/spi/Provider.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/javax/xml/ws/spi/Provider.java 2006-12-06
15:52:34 UTC (rev 1580)
+++ branches/tdiesler/trunk/src/main/java/javax/xml/ws/spi/Provider.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -40,7 +40,7 @@
public abstract class Provider
{
public static final String JAXWSPROVIDER_PROPERTY =
"javax.xml.ws.spi.Provider";
- private static final String DEFAULT_JAXWSPROVIDER =
"org.jboss.ws.jaxws.spi.ProviderImpl";
+ private static final String DEFAULT_JAXWSPROVIDER =
"org.jboss.ws.core.jaxws.spi.ProviderImpl";
protected Provider()
{
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -113,6 +113,9 @@
// Maps the java method to the operation meta data
private Map<Method, OperationMetaData> opMetaDataCache = new HashMap<Method,
OperationMetaData>();
+ // JAX-WS default is false
+ private boolean mtomEnabled = false;
+
public EndpointMetaData(ServiceMetaData service, QName qname, QName interfaceQName,
Type type)
{
this.serviceMetaData = service;
@@ -312,6 +315,14 @@
return type;
}
+ public boolean isMtomEnabled() {
+ return mtomEnabled;
+ }
+
+ public void setMtomEnabled(boolean mtomEnabled) {
+ this.mtomEnabled = mtomEnabled;
+ }
+
public String getAuthMethod()
{
return authMethod;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ParameterMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ParameterMetaData.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ParameterMetaData.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -43,6 +43,7 @@
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.core.metadata.acessor.ReflectiveMethodAccessor;
+import org.jboss.ws.extras.xop.jaxws.ReflectiveXOPScanner;
/**
* A request/response parameter that a given operation supports.
@@ -172,11 +173,6 @@
setMimeTypes(mimeType);
this.isSwA = true;
}
- else if(Constants.NS_SCHEMA_XSD.equals(xmlType.getNamespaceURI())
- && "base64Binary".equals(xmlType.getLocalPart()))
- {
- setXOP(true);
- }
}
public String getJavaTypeName()
@@ -386,8 +382,19 @@
javaType = getJavaType();
if (javaType == null)
throw new WSException("Cannot load java type: " + javaTypeName);
+
+ // check if the JavaType is an mtom parameter
+ // TODO: this should only apply to JAX-WS and needs to happen outside UMD
+ ReflectiveXOPScanner scanner = new ReflectiveXOPScanner();
+ String mimeType = scanner.scan(javaType);
+ if(mimeType!=null)
+ {
+ log.debug("MTOM parameter found: " + xmlName);
+ setXOP(true);
+ }
}
+
private ClassLoader getClassLoader()
{
ClassLoader loader =
opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().getClassLoader();
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ServiceMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ServiceMetaData.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ServiceMetaData.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -48,8 +48,8 @@
import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.common.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
/**
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
(from rev 1580,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/injection/ServiceObjectFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/injection/ServiceObjectFactory.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,221 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+// $Id$
+package org.jboss.ws.core.jaxws.client;
+
+// $Id$
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.spi.ObjectFactory;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.logging.Logger;
+
+/**
+ * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
+ * for a given WSDL when the webservice client does a JNDI lookup
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Oct-2004
+ */
+public class ServiceObjectFactory implements ObjectFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceObjectFactory.class);
+
+ /**
+ * Creates an object using the location or reference information specified.
+ * <p/>
+ *
+ * @param obj The possibly null object containing location or reference
+ * information that can be used in creating an object.
+ * @param name The name of this object relative to
<code>nameCtx</code>,
+ * or null if no name is specified.
+ * @param nameCtx The context relative to which the <code>name</code>
+ * parameter is specified, or null if <code>name</code>
is
+ * relative to the default initial context.
+ * @param environment The possibly null environment that is used in
+ * creating the object.
+ * @return The object created; null if an object cannot be created.
+ * @throws Exception if this object factory encountered an exception
+ * while attempting to create an object, and no other object
factories are
+ * to be tried.
+ * @see javax.naming.spi.NamingManager#getObjectInstance
+ * @see javax.naming.spi.NamingManager#getURLContext
+ */
+ public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable
environment) throws Exception
+ {
+ try
+ {
+ Reference ref = (Reference)obj;
+
+ String serviceTypeName =
(String)ref.get(ServiceReferenceable.SERVICE_TYPE).getContent();
+ String portTypeName =
(String)ref.get(ServiceReferenceable.PORT_TYPE).getContent();
+ UnifiedServiceRef serviceRef = unmarshallServiceRef(ref);
+
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ Class serviceType = ctxLoader.loadClass(serviceTypeName);
+ Class portType = (portTypeName != null ? ctxLoader.loadClass(portTypeName) :
null);
+
+ if (Service.class.isAssignableFrom(serviceType) == false)
+ throw new IllegalArgumentException("WebServiceRef type '" +
serviceType + "' is not assignable to javax.xml.ws.Service");
+
+ Object target;
+
+ URL wsdlURL = getWsdlLocationURL(serviceType, serviceRef.getWsdlLocation());
+
+ // Generic javax.xml.ws.Service
+ if (serviceType == Service.class)
+ {
+ if (wsdlURL != null)
+ {
+ target = Service.create(wsdlURL, null);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Cannot create generic
javax.xml.ws.Service without wsdlLocation");
+ }
+ }
+ // Generated javax.xml.ws.Service subclass
+ else
+ {
+ if (wsdlURL != null)
+ {
+ Constructor ctor = serviceType.getConstructor(new Class[] { URL.class,
QName.class });
+ target = (Service)ctor.newInstance(new Object[] { wsdlURL, null });
+ }
+ else
+ {
+ target = (Service)serviceType.newInstance();
+ }
+ }
+
+ if (portTypeName != null && portTypeName.equals(serviceTypeName) ==
false)
+ {
+ Object port = null;
+ for (Method method : serviceType.getMethods())
+ {
+ String methodName = method.getName();
+ Class retType = method.getReturnType();
+ if (methodName.startsWith("get") &&
portType.isAssignableFrom(retType))
+ {
+ port = method.invoke(target, new Object[0]);
+ target = port;
+ break;
+ }
+ }
+
+ if (port == null)
+ throw new WebServiceException("Cannot find getter for port type:
" + portTypeName);
+ }
+
+ return target;
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot create service", ex);
+ throw ex;
+ }
+ }
+
+ private UnifiedServiceRef unmarshallServiceRef(Reference ref) throws
ClassNotFoundException, NamingException
+ {
+ UnifiedServiceRef sref;
+ RefAddr refAddr = ref.get(ServiceReferenceable.SERVICE_REF);
+ ByteArrayInputStream bais = new
ByteArrayInputStream((byte[])refAddr.getContent());
+ try
+ {
+ ObjectInputStream ois = new ObjectInputStream(bais);
+ sref = (UnifiedServiceRef)ois.readObject();
+ ois.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot unmarshall service ref meta data, cause:
" + e.toString());
+ }
+ return sref;
+ }
+
+ private URL getWsdlLocationURL(Class type, String wsdlLocation)
+ {
+ URL wsdlURL = null;
+ if (wsdlLocation != null && wsdlLocation.length() > 0)
+ {
+ // Try the wsdlLocation as URL
+ try
+ {
+ wsdlURL = new URL(wsdlLocation);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try the filename as File
+ if (wsdlURL == null)
+ {
+ try
+ {
+ File file = new File(wsdlLocation);
+ if (file.exists())
+ wsdlURL = file.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+
+ // Try the filename as Resource
+ if (wsdlURL == null)
+ {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ wsdlURL = loader.getResource(wsdlLocation);
+ }
+
+ // Try the filename relative to class
+ if (wsdlURL == null)
+ {
+ String packagePath = type.getPackage().getName().replace('.',
'/');
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ wsdlURL = loader.getResource(packagePath + "/" + wsdlLocation);
+ }
+ }
+ return wsdlURL;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java
(from rev 1580,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/injection/ServiceReferenceable.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/injection/ServiceReferenceable.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ServiceReferenceable.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+// $Id$
+package org.jboss.ws.core.jaxws.client;
+
+// $Id$
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+
+import javax.naming.BinaryRefAddr;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.naming.Referenceable;
+import javax.naming.StringRefAddr;
+
+
+
+/**
+ * A JNDI reference to a javax.xml.ws.Service
+ *
+ * It holds the information to reconstrut the javax.xml.ws.Service
+ * when the client does a JNDI lookup.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Oct-2006
+ */
+public class ServiceReferenceable implements Referenceable
+{
+ public static final String SERVICE_REF = "SERVICE_REF";
+ public static final String SERVICE_TYPE = "SERVICE_TYPE";
+ public static final String PORT_TYPE = "PORT_TYPE";
+
+ private String serviceType;
+ private String portType;
+ private UnifiedServiceRef sref;
+
+ public ServiceReferenceable(String serviceType, String portType, UnifiedServiceRef
sref)
+ {
+ this.serviceType = serviceType;
+ this.portType = portType;
+ this.sref = sref;
+ }
+
+ /**
+ * Retrieves the Reference of this object.
+ *
+ * @return The non-null Reference of this object.
+ * @throws javax.naming.NamingException If a naming exception was encountered while
retrieving the reference.
+ */
+ public Reference getReference() throws NamingException
+ {
+ Reference myRef = new Reference(ServiceReferenceable.class.getName(),
ServiceObjectFactory.class.getName(), null);
+
+ myRef.add(new StringRefAddr(SERVICE_TYPE, serviceType));
+ myRef.add(new StringRefAddr(PORT_TYPE, portType));
+ myRef.add(new BinaryRefAddr(SERVICE_REF, marshallServiceRef()));
+
+ return myRef;
+ }
+
+ private byte[] marshallServiceRef() throws NamingException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
+ try
+ {
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(sref);
+ oos.close();
+ }
+ catch (IOException e)
+ {
+ throw new NamingException("Cannot marshall service ref, cause: " +
e.toString());
+ }
+ return baos.toByteArray();
+ }
+}
\ No newline at end of file
Added:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,103 @@
+/*
+ * 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.core.jaxws.client;
+
+//$Id$
+
+import java.io.Serializable;
+
+/**
+ * Represents a <service-ref> element of the jboss.xml, jboss-web.xml,
jboss-client.xml deployment descriptor
+ * for the 5.0 schema
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ */
+public class UnifiedServiceRef implements Serializable
+{
+ private static final long serialVersionUID = 223039007880052172L;
+
+ private String encName;
+ private String wsdlLocation;
+ private String configName;
+ private String configFile;
+
+ public UnifiedServiceRef()
+ {
+ }
+
+ public UnifiedServiceRef(String name)
+ {
+ this.encName = name;
+ }
+
+ public String getEncName()
+ {
+ return encName;
+ }
+
+ public void setEncName(String name)
+ {
+ this.encName = name;
+ }
+
+ public String getWsdlLocation()
+ {
+ return wsdlLocation;
+ }
+
+ public void setWsdlLocation(String wsdlLocation)
+ {
+ this.wsdlLocation = wsdlLocation;
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public String toString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append("[");
+ sb.append("name=").append(encName);
+ sb.append(",config-name=").append(configName);
+ sb.append(",config-file=").append(configFile);
+ sb.append(",wsdl=").append(wsdlLocation);
+ sb.append("]");
+ return sb.toString();
+ }
+}
Property changes on:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/UnifiedServiceRef.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxws.client;
+
+// $Id$
+
+import javax.naming.Context;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
+
+/**
+ * Binds a JAXWS Service object into JNDI
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Oct-2006
+ */
+public class WebServiceRefDeployer
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(WebServiceRefDeployer.class);
+
+ private WebServiceRefDeployer()
+ {
+ // Hide ctor
+ }
+
+ public static void setupWebServiceRef(Context ctx, String jndiName, Class refType,
WebServiceRef wsref, UnifiedServiceRef sref) throws Exception
+ {
+ String externalName = ctx.getNameInNamespace() + "/" + jndiName;
+ String refTypeName = (refType != null ? refType.getName() : null);
+ String wsrefString = "[name=" + wsref.name() + ",value=" +
wsref.value() + ",type=" + wsref.type() + ",wsdl=" +
wsref.wsdlLocation() + ",mapped=" + wsref.mappedName() + "]";
+ log.debug("setupWebServiceRef [jndi=" + externalName +
",refType=" + refTypeName + ",wsref=" + wsrefString +
",sref=" + sref + "]");
+
+ String serviceTypeName = null;
+ String portTypeName = null;
+
+ // #1 Use the explicit @WebServiceRef.value
+ if (wsref.value() != Object.class)
+ serviceTypeName = wsref.value().getName();
+
+ // #2 Use the target ref type
+ if (serviceTypeName == null && refType != null &&
Service.class.isAssignableFrom(refType))
+ serviceTypeName = refType.getName();
+
+ // #3 Use javax.xml.ws.Service
+ if (serviceTypeName == null)
+ serviceTypeName = Service.class.getName();
+
+ // #1 Use the explicit @WebServiceRef.type
+ if (wsref.type() != Object.class)
+ portTypeName = wsref.type().getName();
+
+ // #2 Use the target ref type
+ if (portTypeName == null && refType != null &&
Service.class.isAssignableFrom(refType) == false)
+ portTypeName = refType.getName();
+
+ // Set the wsdlLocation if there is no override already
+ if (sref.getWsdlLocation() == null && wsref.wsdlLocation().length() >
0)
+ sref.setWsdlLocation(wsref.wsdlLocation());
+
+ Util.bind(ctx, jndiName, new ServiceReferenceable(serviceTypeName, portTypeName,
sref));
+ }
+}
Property changes on:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/WebServiceRefDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -43,6 +43,7 @@
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.spi.ServiceDelegate;
+import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.umdm.ClientEndpointMetaData;
import org.jboss.ws.common.umdm.EndpointMetaData;
@@ -67,6 +68,9 @@
*/
public class ServiceDelegateImpl extends ServiceDelegate
{
+ // provide logging
+ private final Logger log = Logger.getLogger(ServiceDelegateImpl.class);
+
// The executor service
private static ExecutorService defaultExecutor = Executors.newCachedThreadPool();
@@ -159,6 +163,11 @@
metaDataBuilder.rebuildEndpointMetaData(epMetaData, seiClass);
}
}
+ else
+ {
+ // TODO: should'nt this throw an exception?
+ log.warn("SEI is missing @WebService annotation: " + seiClass);
+ }
return (T)createProxy(seiClass, epMetaData);
}
@@ -323,4 +332,4 @@
return qname;
}
}
-}
\ No newline at end of file
+}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSEndpointMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSEndpointMetaDataBuilder.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSEndpointMetaDataBuilder.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -50,7 +50,18 @@
String uri = anBindingType.value();
if (uri.length() > 0)
{
- epMetaData.setBindingId(uri);
+ // TODO: switch to JAX-WS 2.1
+ // This allows us to use constants here and reuse the orig. URI straigt away
+
if(uri.equals("http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true&q...
+ {
+ log.debug("MTOM enabled endpoint found");
+ epMetaData.setMtomEnabled(true);
+ epMetaData.setBindingId(uri.substring(0, uri.indexOf("?")));
+ }
+ else
+ {
+ epMetaData.setBindingId(uri);
+ }
}
}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -86,8 +86,6 @@
import org.jboss.ws.common.utils.IOUtils;
import org.jboss.ws.common.utils.JBossWSEntityResolver;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.common.wsdl.WSDLWriter;
-import org.jboss.ws.common.wsdl.WSDLWriterResolver;
import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.core.jaxws.WrapperGenerator;
import org.jboss.ws.core.metadata.acessor.JAXBAccessor;
@@ -98,6 +96,8 @@
import org.jboss.ws.extras.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.tools.jaxws.JAXBWSDLGenerator;
import org.jboss.ws.tools.jaxws.WSDLGenerator;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
+import org.jboss.ws.tools.wsdl.WSDLWriterResolver;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
@@ -657,6 +657,17 @@
if (anWebService == null)
throw new WSException("Interface does not have a @WebService annotation:
" + seiName);
+ else
+ {
+ if(anWebService.portName().length()>0
+ || anWebService.serviceName().length()>0
+ || anWebService.endpointInterface().length()>0
+ )
+ {
+ throw new WSException("The service endpoint interface MUST NOT
include the JSR-181 annotation" +
+ "elements portName, serviceName and endpointInterface of the
annotation @WebService.");
+ }
+ }
name = anWebService.name();
if (name.length() == 0)
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -49,7 +49,7 @@
import org.jboss.ws.common.umdm.UnifiedMetaData;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.IOUtils;
-import org.jboss.ws.common.wsdl.WSDLWriter;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -29,13 +29,9 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
-import org.jboss.logging.Logger;
import org.jboss.ws.common.NameImpl;
import org.jboss.ws.common.jaxrpc.encoding.SOAPElementDeserializer;
-import org.jboss.ws.common.utils.DOMUtils;
import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
* SOAPFactory implementation.
@@ -44,8 +40,6 @@
*/
public class SOAPFactoryImpl extends SOAPFactory
{
- private static Logger log = Logger.getLogger(SOAPFactoryImpl.class);
-
public SOAPElement createElement(Name name) throws SOAPException
{
return new SOAPElementImpl(name);
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/XOPContext.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/XOPContext.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/XOPContext.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.ws.extras.xop;
import java.io.ByteArrayInputStream;
@@ -37,6 +37,7 @@
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.NameImpl;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.JavaUtils;
import org.jboss.ws.common.utils.MimeUtils;
@@ -65,20 +66,23 @@
* @since May 10, 2006
* @version $Id$
*/
-public class XOPContext {
-
+public class XOPContext
+{
+ // provide logging
private static final Logger log = Logger.getLogger(XOPContext.class);
private static final String NS_XOP_JBOSSWS = "http://org.jboss.ws/xop";
-
+
/**
* Check if the current soap message flagged as a XOP package.
* This may differ from the wire format when jaxrpc handlers are in place.
*/
- public static boolean isXOPMessage() {
+ public static boolean isXOPMessage()
+ {
boolean isXOP = false;
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if(msgContext!=null) {
+ if (msgContext != null)
+ {
SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
isXOP = (soapMessage != null && soapMessage.isXOPMessage());
}
@@ -92,14 +96,15 @@
{
boolean isMultippartXOP = false;
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if(msgContext!=null) {
+ if (msgContext != null)
+ {
SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
String[] contentType =
soapMessage.getMimeHeaders().getHeader("content-type");
- if(contentType!=null)
+ if (contentType != null)
{
- for(String value : contentType)
+ for (String value : contentType)
{
- if(value.indexOf(MimeConstants.TYPE_APPLICATION_XOP_XML) != -1)
+ if (value.indexOf(MimeConstants.TYPE_APPLICATION_XOP_XML) != -1)
{
isMultippartXOP = true;
break;
@@ -112,15 +117,26 @@
}
/**
- * Check if MTOM is disabled through a message context property.
+ * Check if MTOM is enabled.<br>
+ *
+ * With JAX-WS is depends on a endpoint property and defaults to FALSE,
+ * opposed to JAX-RPC where it defaults to TRUE and is set through a message context
property.
* (<code>org.jboss.ws.mtom.enabled</code>)<br>
- * Defaults to TRUE if the property is not set.
*/
public static boolean isMTOMEnabled()
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- Boolean mtomEnabled =
(Boolean)msgContext.getProperty(StubExt.PROPERTY_MTOM_ENABLED);
- return Boolean.TRUE.equals(mtomEnabled) || mtomEnabled == null;
+ boolean isJAXWS = msgContext.getEndpointMetaData().getType() ==
EndpointMetaData.Type.JAXWS;
+
+ if (isJAXWS)
+ {
+ return msgContext.getEndpointMetaData().isMtomEnabled();
+ }
+ else
+ {
+ Boolean mtomEnabled =
(Boolean)msgContext.getProperty(StubExt.PROPERTY_MTOM_ENABLED);
+ return Boolean.TRUE.equals(mtomEnabled) || mtomEnabled == null;
+ }
}
public static void setMTOMEnabled(boolean b)
@@ -136,11 +152,11 @@
*/
public static void inlineXOPData(SOAPElement xopElement)
{
- String ns = xopElement.getNamespaceURI()!=null ? xopElement.getNamespaceURI():
"";
+ String ns = xopElement.getNamespaceURI() != null ? xopElement.getNamespaceURI() :
"";
String localName = xopElement.getLocalName();
// rpc/lit
- if(ns.equals(Constants.NS_XOP) && localName.equals("Include"))
+ if (ns.equals(Constants.NS_XOP) && localName.equals("Include"))
{
replaceXOPInclude(xopElement.getParentElement(), xopElement);
}
@@ -148,12 +164,12 @@
{
// doc/lit
Iterator it = DOMUtils.getChildElements(xopElement);
- while(it.hasNext())
+ while (it.hasNext())
{
SOAPElement childElement = (SOAPElement)it.next();
- String childNS = childElement.getNamespaceURI()!=null ?
childElement.getNamespaceURI(): "";
+ String childNS = childElement.getNamespaceURI() != null ?
childElement.getNamespaceURI() : "";
String childName = childElement.getLocalName();
- if(childNS.equals(Constants.NS_XOP) &&
childName.equals("Include"))
+ if (childNS.equals(Constants.NS_XOP) &&
childName.equals("Include"))
{
replaceXOPInclude(xopElement, childElement);
}
@@ -189,16 +205,16 @@
*/
public static void eagerlyCreateAttachments()
{
- if(!isXOPMessage())
+ if (!isXOPMessage())
return;
-
+
try
{
CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
SOAPMessage soapMessage = msgContext != null ? msgContext.getSOAPMessage() :
null;
- SOAPBody body = soapMessage!=null ? soapMessage.getSOAPBody() : null;
+ SOAPBody body = soapMessage != null ? soapMessage.getSOAPBody() : null;
- if(body!=null)
+ if (body != null)
{
CreateAttachmentVisitor visitor = new CreateAttachmentVisitor();
visitor.visitXOPElements((SOAPElementImpl)body);
@@ -217,7 +233,7 @@
{
try
{
- if(!isXOPMessage() && isMTOMEnabled())
+ if (!isXOPMessage() && isMTOMEnabled())
{
CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
SOAPBody body = msgContext.getSOAPMessage().getSOAPBody();
@@ -240,7 +256,7 @@
public static void restoreXOPDataDOM(SOAPElement xopElement)
{
String contentType = xopElement.getAttributeNS(NS_XOP_JBOSSWS,
"content-type");
- if(contentType != null && contentType.length()>0)
+ if (contentType != null && contentType.length() > 0)
{
replaceBase64Representation(xopElement, contentType);
xopElement.removeAttribute(new NameImpl(new QName(NS_XOP_JBOSSWS,
"content-type")));
@@ -248,7 +264,7 @@
else
{
Iterator it = DOMUtils.getChildElements(xopElement);
- while(it.hasNext())
+ while (it.hasNext())
{
SOAPElement childElement = (SOAPElement)it.next();
restoreXOPDataDOM(childElement);
@@ -256,10 +272,11 @@
}
}
- private static void replaceBase64Representation(SOAPElement xopElement, String
contentType) {
+ private static void replaceBase64Representation(SOAPElement xopElement, String
contentType)
+ {
SOAPElement parentElement = xopElement.getParentElement();
- log.debug("Replace base64 representation on element [xmlName=" +
parentElement.getLocalName()+"]");
+ log.debug("Replace base64 representation on element [xmlName=" +
parentElement.getLocalName() + "]");
String base64 = xopElement.getValue();
byte[] data = SimpleTypeBindings.unmarshalBase64(base64);
@@ -281,7 +298,7 @@
{
SOAPElement xopInclude =
xopElement.addChildElement(Constants.NAME_XOP_INCLUDE);
xopInclude.setAttribute("href", cid);
- log.debug("Restored xop:Include element on
[xmlName="+xopElement.getLocalName()+"]");
+ log.debug("Restored xop:Include element on [xmlName=" +
xopElement.getLocalName() + "]");
XOPContext.setXOPMessage(true);
}
@@ -295,7 +312,7 @@
private static void replaceXOPInclude(SOAPElement parent, SOAPElement
xopIncludeElement)
{
- log.debug("Replace xop:Include on element [xmlName=" +
parent.getLocalName() +"]");
+ log.debug("Replace xop:Include on element [xmlName=" +
parent.getLocalName() + "]");
String cid = xopIncludeElement.getAttribute("href");
byte[] data;
@@ -330,11 +347,12 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
- if(cid.startsWith("cid:")) cid = cid.substring(4);
- cid = '<'+cid+'>';
+ if (cid.startsWith("cid:"))
+ cid = cid.substring(4);
+ cid = '<' + cid + '>';
AttachmentPart removedPart = soapMessage.removeAttachmentByContentId(cid);
- if(null == removedPart)
+ if (null == removedPart)
throw new WSException("Unable to remove attachment part " + cid);
log.debug("Removed attachment part " + cid);
@@ -353,8 +371,9 @@
SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
// RFC2392 requires the 'cid:' part to be stripped from the cid
- if(cid.startsWith("cid:")) cid = cid.substring(4);
- cid = '<'+cid+'>';
+ if (cid.startsWith("cid:"))
+ cid = cid.substring(4);
+ cid = '<' + cid + '>';
AttachmentPart part = soapMessage.getAttachmentByContentId(cid);
if (part == null)
@@ -372,11 +391,11 @@
DataHandler dataHandler;
Object o = xopObject.getContent();
- if(o instanceof DataHandler)
+ if (o instanceof DataHandler)
{
dataHandler = (DataHandler)o;
}
- else if(xopObject.getContentType() != null)
+ else if (xopObject.getContentType() != null)
{
dataHandler = new DataHandler(o, xopObject.getContentType());
}
@@ -390,7 +409,7 @@
public static String getContentTypeForClazz(Class clazz)
{
- if(JavaUtils.isAssignableFrom(java.awt.Image.class, clazz))
+ if (JavaUtils.isAssignableFrom(java.awt.Image.class, clazz))
{
return "image/jpeg";
}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentMarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentMarshallerImpl.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentMarshallerImpl.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -2,45 +2,64 @@
import javax.activation.DataHandler;
import javax.xml.bind.attachment.AttachmentMarshaller;
+import javax.xml.namespace.QName;
+import javax.xml.soap.AttachmentPart;
+import org.jboss.logging.Logger;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.soap.attachment.ContentHandlerRegistry;
+import org.jboss.ws.core.soap.attachment.MimeConstants;
import org.jboss.ws.extras.xop.XOPContext;
-import org.jboss.ws.extras.xop.jaxrpc.XOPMarshallerImpl;
-import org.jboss.xb.binding.sunday.xop.XOPMarshaller;
-import org.jboss.xb.binding.sunday.xop.XOPObject;
-/**
- * Created by IntelliJ IDEA.
- * User: hbraun
- * Date: 01.12.2006
- * Time: 17:20:41
- * To change this template use File | Settings | File Templates.
- */
-public class AttachmentMarshallerImpl extends AttachmentMarshaller {
+public class AttachmentMarshallerImpl extends AttachmentMarshaller
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(AttachmentMarshallerImpl.class);
- private XOPMarshaller delegate;
+ static
+ {
+ // Load JAF content handlers
+ ContentHandlerRegistry.register();
+ }
- public AttachmentMarshallerImpl() {
- super();
- delegate = new XOPMarshallerImpl();
- }
+ public AttachmentMarshallerImpl()
+ {
+ super();
+ }
- public String addMtomAttachment(DataHandler dataHandler, String string, String
string1) {
- XOPObject xopObject = new XOPObject(dataHandler);
- xopObject.setContentType(dataHandler.getContentType());
- return delegate.addMtomAttachment(xopObject, string, string1);
- }
+ public String addMtomAttachment(DataHandler dataHandler, String string, String
string1)
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
- public String addMtomAttachment(byte[] bytes, int i, int i1, String string, String
string1, String string2) {
- throw new WSException("Not yet implemented");
- }
+ QName xmlName = new QName(string, string1);
+ log.debug("serialize: [xmlName=" + xmlName + "]");
- public String addSwaRefAttachment(DataHandler dataHandler) {
- throw new WSException("Not yet implemented");
- }
+ String cid =
soapMessage.getCidGenerator().generateFromName(xmlName.getLocalPart());
+ AttachmentPart xopPart = soapMessage.createAttachmentPart(dataHandler);
+ xopPart.addMimeHeader(MimeConstants.CONTENT_ID, '<' + cid +
'>'); // RFC2392 requirement
+ soapMessage.addAttachmentPart(xopPart);
+ log.debug("Created attachment part " + cid + ", with content-type
" + xopPart.getContentType());
- public boolean isXOPPackage() {
- return XOPContext.isXOPMessage();
- }
+ return "cid:" + cid;
+ }
+
+ public String addMtomAttachment(byte[] bytes, int i, int i1, String string, String
string1, String string2)
+ {
+ throw new WSException("Not yet implemented");
+ }
+
+ public String addSwaRefAttachment(DataHandler dataHandler)
+ {
+ throw new WSException("Not yet implemented");
+ }
+
+ public boolean isXOPPackage()
+ {
+ return XOPContext.isXOPMessage();
+ }
}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentUnmarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentUnmarshallerImpl.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentUnmarshallerImpl.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,42 +1,67 @@
package org.jboss.ws.extras.xop.jaxws;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
import javax.activation.DataHandler;
import javax.xml.bind.attachment.AttachmentUnmarshaller;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.SOAPException;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.core.soap.attachment.ContentHandlerRegistry;
import org.jboss.ws.extras.xop.XOPContext;
-import org.jboss.ws.extras.xop.jaxrpc.XOPUnmarshallerImpl;
-import org.jboss.xb.binding.sunday.xop.XOPObject;
-import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
-/**
- * Created by IntelliJ IDEA.
- * User: hbraun
- * Date: 01.12.2006
- * Time: 17:25:56
- * To change this template use File | Settings | File Templates.
- */
-public class AttachmentUnmarshallerImpl extends AttachmentUnmarshaller {
+public class AttachmentUnmarshallerImpl extends AttachmentUnmarshaller
+{
+ static
+ {
+ // Load JAF content handlers
+ ContentHandlerRegistry.register();
+ }
- private XOPUnmarshaller delegate;
+ public AttachmentUnmarshallerImpl()
+ {
+ super();
+ }
+ public boolean isXOPPackage()
+ {
+ return XOPContext.isXOPMessage();
+ }
- public AttachmentUnmarshallerImpl() {
- super();
- delegate = new XOPUnmarshallerImpl();
- }
+ public DataHandler getAttachmentAsDataHandler(String cid)
+ {
+ try
+ {
+ AttachmentPart part = XOPContext.getAttachmentByCID(cid);
+ return part.getDataHandler();
+ }
+ catch (SOAPException e)
+ {
+ throw new WSException("Failed to access attachment part", e);
+ }
+ }
- public boolean isXOPPackage() {
- return XOPContext.isXOPMessage();
- }
+ public byte[] getAttachmentAsByteArray(String cid)
+ {
+ try
+ {
+ AttachmentPart part = XOPContext.getAttachmentByCID(cid);
+ DataHandler dh = part.getDataHandler();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ dh.writeTo(bout);
- public DataHandler getAttachmentAsDataHandler(String string) {
- XOPObject xopObject = delegate.getAttachmentAsDataHandler(string);
- DataHandler dh = new DataHandler(xopObject.getContent(),
xopObject.getContentType());
- return dh;
- }
-
- public byte[] getAttachmentAsByteArray(String string) {
- return delegate.getAttachmentAsByteArray(string);
- }
+ return bout.toByteArray();
+ }
+ catch (SOAPException ex)
+ {
+ throw new WSException(ex);
+ }
+ catch (IOException e)
+ {
+ throw new WSException(e);
+ }
+ }
}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -41,10 +41,10 @@
import org.jboss.ws.common.metadata.j2ee.UnifiedServiceRefMetaData;
import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.common.wsdl.WSDL11DefinitionFactory;
import org.jboss.ws.core.jaxrpc.ServiceReferenceable;
import org.jboss.ws.core.metadata.builder.jaxrpc.JAXRPCClientDeployment;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
/**
* Binds a JAXRPC Service object in the client's ENC for every service-ref element in
the
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java 2006-12-06
15:52:34 UTC (rev 1580)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -40,9 +40,9 @@
import org.jboss.ws.common.umdm.UnifiedMetaData;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.common.wsdl.WSDLWriter;
import org.jboss.ws.tools.Configuration.OperationConfig;
import org.jboss.ws.tools.metadata.ToolsUnifiedMetaDataBuilder;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
import org.w3c.dom.Element;
/**
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2006-12-06
15:52:34 UTC (rev 1580)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -58,8 +58,8 @@
import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -55,7 +55,6 @@
import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.common.utils.IOUtils;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.common.wsdl.WSDLWriter;
import org.jboss.ws.tools.Configuration;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.JavaWriter;
@@ -69,6 +68,7 @@
import org.jboss.ws.tools.client.ServiceCreator;
import org.jboss.ws.tools.interfaces.WSDotXMLCreatorIntf;
import org.jboss.ws.tools.mapping.MappingFileGenerator;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
/**
* Helper class used by the command line tool "jbossws"
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -309,7 +309,6 @@
* Generate a WSDL object model from the passed in ServiceMetaData.
*
* @param service the service
- * @param ctx the JAXB context containing all types referenced
* @return the WSDL object model
*/
public WSDLDefinitions generate(ServiceMetaData service)
@@ -330,4 +329,4 @@
return wsdl;
}
-}
\ No newline at end of file
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl (from rev 1575,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDL11DefinitionFactory.java 2006-12-06
14:17:04 UTC (rev 1575)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,96 +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.common.wsdl;
-
-// $Id$
-
-import java.net.URL;
-
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.xml.sax.EntityResolver;
-
-import com.ibm.wsdl.xml.WSDLReaderImpl;
-
-/**
- * A factory that creates a WSDL-1.1 <code>Definition</code> from an URL.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public class WSDL11DefinitionFactory
-{
- // provide logging
- private static Logger log = Logger.getLogger(WSDL11DefinitionFactory.class);
-
- // This feature is set by default in wsdl4j, it means the object structore contains
the imported arguments
- public static final String FEATURE_IMPORT_DOCUMENTS =
"javax.wsdl.importDocuments";
- // Set this feature for additional debugging output
- public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
-
- // The WSDLReader that is used by this factory
- private WSDLReader wsdlReader;
-
- // Hide constructor
- private WSDL11DefinitionFactory() throws WSDLException
- {
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- wsdlReader = wsdlFactory.newWSDLReader();
- wsdlReader.setFeature(WSDL11DefinitionFactory.FEATURE_VERBOSE, false);
- }
-
- /** Create a new instance of a wsdl factory */
- public static WSDL11DefinitionFactory newInstance() throws WSDLException
- {
- return new WSDL11DefinitionFactory();
- }
-
- /** Set a feature on the underlying reader */
- public void setFeature(String name, boolean value) throws IllegalArgumentException
- {
- wsdlReader.setFeature(name, value);
- }
-
- /**
- * Read the wsdl document from the given URL
- */
- public Definition parse(URL wsdlLocation) throws WSDLException
- {
- if (wsdlLocation == null)
- throw new IllegalArgumentException("URL cannot be null");
-
- log.trace("parse: " + wsdlLocation.toExternalForm());
-
- EntityResolver entityResolver = new JBossWSEntityResolver();
-
- // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
- ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
-
- Definition wsdlDefinition = wsdlReader.readWSDL(new WSDLLocatorImpl(entityResolver,
wsdlLocation));
- return wsdlDefinition;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java
(from rev 1580,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDL11DefinitionFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDL11DefinitionFactory.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,96 @@
+/*
+* 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.wsdl;
+
+// $Id$
+
+import java.net.URL;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.xml.sax.EntityResolver;
+
+import com.ibm.wsdl.xml.WSDLReaderImpl;
+
+/**
+ * A factory that creates a WSDL-1.1 <code>Definition</code> from an URL.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-April-2004
+ */
+public class WSDL11DefinitionFactory
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(WSDL11DefinitionFactory.class);
+
+ // This feature is set by default in wsdl4j, it means the object structore contains
the imported arguments
+ public static final String FEATURE_IMPORT_DOCUMENTS =
"javax.wsdl.importDocuments";
+ // Set this feature for additional debugging output
+ public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
+
+ // The WSDLReader that is used by this factory
+ private WSDLReader wsdlReader;
+
+ // Hide constructor
+ private WSDL11DefinitionFactory() throws WSDLException
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ wsdlReader = wsdlFactory.newWSDLReader();
+ wsdlReader.setFeature(WSDL11DefinitionFactory.FEATURE_VERBOSE, false);
+ }
+
+ /** Create a new instance of a wsdl factory */
+ public static WSDL11DefinitionFactory newInstance() throws WSDLException
+ {
+ return new WSDL11DefinitionFactory();
+ }
+
+ /** Set a feature on the underlying reader */
+ public void setFeature(String name, boolean value) throws IllegalArgumentException
+ {
+ wsdlReader.setFeature(name, value);
+ }
+
+ /**
+ * Read the wsdl document from the given URL
+ */
+ public Definition parse(URL wsdlLocation) throws WSDLException
+ {
+ if (wsdlLocation == null)
+ throw new IllegalArgumentException("URL cannot be null");
+
+ log.trace("parse: " + wsdlLocation.toExternalForm());
+
+ EntityResolver entityResolver = new JBossWSEntityResolver();
+
+ // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
+ ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
+
+ Definition wsdlDefinition = wsdlReader.readWSDL(new WSDLLocatorImpl(entityResolver,
wsdlLocation));
+ return wsdlDefinition;
+ }
+}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDL11Reader.java 2006-12-06
14:17:04 UTC (rev 1575)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,1219 +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.common.wsdl;
-
-// $Id$
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.wsdl.Binding;
-import javax.wsdl.BindingInput;
-import javax.wsdl.BindingOperation;
-import javax.wsdl.BindingOutput;
-import javax.wsdl.Definition;
-import javax.wsdl.Fault;
-import javax.wsdl.Import;
-import javax.wsdl.Input;
-import javax.wsdl.Message;
-import javax.wsdl.Operation;
-import javax.wsdl.Output;
-import javax.wsdl.Part;
-import javax.wsdl.Port;
-import javax.wsdl.PortType;
-import javax.wsdl.Service;
-import javax.wsdl.Types;
-import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.extensions.UnknownExtensibilityElement;
-import javax.wsdl.extensions.mime.MIMEContent;
-import javax.wsdl.extensions.mime.MIMEMultipartRelated;
-import javax.wsdl.extensions.mime.MIMEPart;
-import javax.wsdl.extensions.schema.Schema;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.wsdl.extensions.soap.SOAPBinding;
-import javax.wsdl.extensions.soap.SOAPBody;
-import javax.wsdl.extensions.soap.SOAPHeader;
-import javax.wsdl.extensions.soap.SOAPOperation;
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.jaxrpc.Style;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingMessageReference;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLMIMEPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLProperty;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem;
-import org.jboss.ws.common.metadata.wsdl.WSDLSOAPHeader;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.XSModelTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.tools.JavaToXSD;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * A helper that translates a WSDL-1.1 object graph into a WSDL-2.0 object graph.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
- * @since 10-Oct-2004
- */
-public class WSDL11Reader
-{
- // provide logging
- private static final Logger log = Logger.getLogger(WSDL11Reader.class);
-
- private static QName SOAP12_BINDING = new QName(Constants.NS_SOAP12,
"binding");
- private static QName SOAP12_BODY = new QName(Constants.NS_SOAP12, "body");
- private static QName SOAP12_OPERATION = new QName(Constants.NS_SOAP12,
"operation");
- private static QName SOAP12_ADDRESS = new QName(Constants.NS_SOAP12,
"address");
-
- private WSDLDefinitions destWsdl;
-
- // Maps wsdl message parts to their corresponding element names
- private Map<String, QName> messagePartToElementMap = new HashMap<String,
QName>();
-
- // Map of <ns,URL> for schemalocation keyed by namespace
- private Map<String, URL> schemaLocationsMap = new HashMap<String, URL>();
-
- private LinkedHashMap<QName, Binding> allBindings;
- private LinkedHashMap<QName, Binding> portTypeBindings;
-
- // Temporary files used by this reader.
- private List<File> tempFiles = new ArrayList<File>();
-
- /**
- * Takes a WSDL11 Definition element and converts into
- * our object graph that has been developed for WSDL20
- *
- * @param srcWsdl The src WSDL11 definition
- * @param wsdlLoc The source location, if null we cannot process imports or includes
- */
- public WSDLDefinitions processDefinition(Definition srcWsdl, URL wsdlLoc) throws
IOException
- {
- log.trace("processDefinition: " + wsdlLoc);
-
- destWsdl = new WSDLDefinitions();
- destWsdl.setWsdlTypes(new XSModelTypes());
- destWsdl.setWsdlOneOneDefinition(srcWsdl);
- destWsdl.setWsdlNamespace(Constants.NS_WSDL11);
-
- processNamespaces(srcWsdl);
- processTypes(srcWsdl, wsdlLoc);
- processServices(srcWsdl);
-
- if (getAllDefinedBindings(srcWsdl).size() != destWsdl.getBindings().length)
- processUnreachableBindings(srcWsdl);
-
- cleanupTemporaryFiles();
-
- return destWsdl;
- }
-
- private void cleanupTemporaryFiles()
- {
- for (File current : tempFiles)
- {
- current.delete();
- }
- }
-
- // process all bindings not within service separetly
- private void processUnreachableBindings(Definition srcWsdl)
- {
- log.trace("processUnreachableBindings");
-
- Iterator it = getAllDefinedBindings(srcWsdl).values().iterator();
- while (it.hasNext())
- {
- Binding srcBinding = (Binding)it.next();
- QName srcQName = srcBinding.getQName();
-
- WSDLBinding destBinding = destWsdl.getBinding(new NCName(srcQName));
- if (destBinding == null)
- {
- processBinding(srcWsdl, srcBinding);
- }
- }
- }
-
- private void processNamespaces(Definition srcWsdl)
- {
- String targetNS = srcWsdl.getTargetNamespace();
- destWsdl.setTargetNamespace(targetNS);
-
- // Copy wsdl namespaces
- Map nsMap = srcWsdl.getNamespaces();
- Iterator iter = nsMap.entrySet().iterator();
- while (iter.hasNext())
- {
- Map.Entry entry = (Map.Entry)iter.next();
- String prefix = (String)entry.getKey();
- String nsURI = (String)entry.getValue();
- destWsdl.registerNamespaceURI(nsURI, prefix);
- }
- }
-
- private void processTypes(Definition srcWsdl, URL wsdlLoc) throws IOException
- {
- log.trace("BEGIN processTypes: " + wsdlLoc);
-
- WSDLTypes destTypes = destWsdl.getWsdlTypes();
-
- Types srcTypes = srcWsdl.getTypes();
- if (srcTypes != null && srcTypes.getExtensibilityElements().size() > 0)
- {
- List extElements = srcTypes.getExtensibilityElements();
- int len = extElements.size();
-
- for (int i = 0; i < len; i++)
- {
- ExtensibilityElement extElement = (ExtensibilityElement)extElements.get(i);
-
- Element domElement;
- if (extElement instanceof Schema)
- {
- domElement = ((Schema)extElement).getElement();
- }
- else if (extElement instanceof UnknownExtensibilityElement)
- {
- domElement = ((UnknownExtensibilityElement)extElement).getElement();
- }
- else
- {
- throw new WSException("Unsupported extensibility element: " +
extElement);
- }
-
- Element domElementClone = (Element)domElement.cloneNode(true);
- copyParentNamespaceDeclarations(domElementClone, domElement);
-
- String localname = domElementClone.getLocalName();
- try
- {
- if ("import".equals(localname))
- {
- processSchemaImport(destTypes, wsdlLoc, domElementClone);
- }
- else if ("schema".equals(localname))
- {
- processSchemaInclude(destTypes, wsdlLoc, domElementClone);
- }
- else
- {
- throw new IllegalArgumentException("Unsuported schema element:
" + localname);
- }
- }
- catch (IOException e)
- {
- throw new WSException("Cannot extract schema definition", e);
- }
- }
-
- if (len > 0)
- {
- JavaToXSD jxsd = new JavaToXSD();
- JBossXSModel xsmodel = jxsd.parseSchema(schemaLocationsMap);
- WSDLUtils.addSchemaModel(destTypes, destWsdl.getTargetNamespace(), xsmodel);
- }
- }
- else
- {
- log.trace("Empty wsdl types element, processing imports");
- Iterator it = srcWsdl.getImports().values().iterator();
- while (it.hasNext())
- {
- List<Import> srcImports = (List<Import>)it.next();
- for (Import srcImport : srcImports)
- {
- Definition impDefinition = srcImport.getDefinition();
- String impLoc = impDefinition.getDocumentBaseURI();
- processTypes(impDefinition, new URL(impLoc));
- }
- }
- }
-
- log.trace("END processTypes: " + wsdlLoc + "\n" + destTypes);
- }
-
- private void copyParentNamespaceDeclarations(Element destElement, Element srcElement)
- {
- Node parent = srcElement.getParentNode();
- while (parent != null)
- {
- if (parent.hasAttributes())
- {
- NamedNodeMap attributes = parent.getAttributes();
- for (int i = 0; i < attributes.getLength(); i++)
- {
- Attr attr = (Attr)attributes.item(i);
- String name = attr.getName();
- String value = attr.getValue();
- if (name.startsWith("xmlns:") &&
destElement.hasAttribute(name) == false)
- destElement.setAttribute(name, value);
- }
- }
- parent = parent.getParentNode();
- }
- }
-
- private void processSchemaImport(WSDLTypes types, URL wsdlLoc, Element importEl)
throws IOException
- {
- if (wsdlLoc == null)
- throw new IllegalArgumentException("Cannot process import, parent location
not set");
-
- log.trace("processSchemaImport: " + wsdlLoc);
-
- String location = getOptionalAttribute(importEl, "schemaLocation");
- if (location == null)
- throw new IllegalArgumentException("schemaLocation is null for
xsd:import");
-
- URL locationURL = getLocationURL(wsdlLoc, location);
- Element rootElement = DOMUtils.parse(locationURL.openStream());
- URL newloc = processSchemaInclude(types, locationURL, rootElement);
- if (newloc != null)
- importEl.setAttribute("schemaLocation", newloc.toExternalForm());
- }
-
- private URL processSchemaInclude(WSDLTypes types, URL wsdlLoc, Element schemaEl)
throws IOException
- {
- if (wsdlLoc == null)
- throw new IllegalArgumentException("Cannot process iclude, parent location
not set");
-
- File tmpFile = null;
- if (wsdlLoc == null)
- throw new IllegalArgumentException("Cannot process include, parent location
not set");
-
- log.trace("processSchemaInclude: " + wsdlLoc);
-
- String schemaPrefix = schemaEl.getPrefix();
-
- String importTag = (schemaPrefix == null) ? "import" : schemaPrefix +
":import";
- Element importElement =
schemaEl.getOwnerDocument().createElementNS(Constants.NS_SCHEMA_XSD, importTag);
- importElement.setAttribute("namespace", Constants.URI_SOAP11_ENC);
- schemaEl.insertBefore(importElement, DOMUtils.getFirstChildElement(schemaEl));
-
- // Handle schema includes
- Iterator it = DOMUtils.getChildElements(schemaEl, new
QName(Constants.NS_SCHEMA_XSD, "include"));
- while (it.hasNext())
- {
- Element includeEl = (Element)it.next();
- String location = getOptionalAttribute(includeEl, "schemaLocation");
- if (location == null)
- throw new IllegalArgumentException("schemaLocation is null for
xsd:include");
-
- URL locationURL = getLocationURL(wsdlLoc, location);
- Element rootElement = DOMUtils.parse(locationURL.openStream());
- URL newloc = processSchemaInclude(types, locationURL, rootElement);
- if (newloc != null)
- includeEl.setAttribute("schemaLocation", newloc.toExternalForm());
- }
-
- String targetNS = getOptionalAttribute(schemaEl, "targetNamespace");
- if (targetNS != null)
- {
- log.trace("processSchemaInclude: [targetNS=" + targetNS +
",parentURL=" + wsdlLoc + "]");
-
- tmpFile = SchemaUtils.getSchemaTempFile(targetNS);
- tempFiles.add(tmpFile);
-
- FileWriter fwrite = new FileWriter(tmpFile);
- new DOMWriter(fwrite).setPrettyprint(true).print(schemaEl);
- fwrite.close();
-
- schemaLocationsMap.put(targetNS, tmpFile.toURL());
- }
-
- // schema elements that have no target namespace are skipped
- //
- // <xsd:schema>
- // <xsd:import
namespace="http://org.jboss.webservice/example/types"
schemaLocation="Hello.xsd"/>
- // <xsd:import
namespace="http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservice/admindevel"
schemaLocation="subdir/HelloArr.xsd"/>
- // </xsd:schema>
- if (targetNS == null)
- {
- log.trace("Schema element without target namespace in: " + wsdlLoc);
- }
-
- handleSchemaImports(schemaEl, wsdlLoc);
-
- return tmpFile != null ? tmpFile.toURL() : null;
- }
-
- private void handleSchemaImports(Element schemaEl, URL wsdlLoc) throws
MalformedURLException
- {
- if (wsdlLoc == null)
- throw new IllegalArgumentException("Cannot process import, parent location
not set");
-
- Iterator it = DOMUtils.getChildElements(schemaEl, new
QName(Constants.NS_SCHEMA_XSD, "import"));
- while (it.hasNext())
- {
- Element includeEl = (Element)it.next();
- String schemaLocation = getOptionalAttribute(includeEl,
"schemaLocation");
- String namespace = getOptionalAttribute(includeEl, "namespace");
-
- log.trace("handleSchemaImport: [namespace=" + namespace +
",schemaLocation=" + schemaLocation + "]");
-
- // Skip, let the entity resolver resolve these
- if (namespace != null && schemaLocation != null)
- {
- URL currLoc = getLocationURL(wsdlLoc, schemaLocation);
- schemaLocationsMap.put(namespace, currLoc);
- }
- else
- {
- log.trace("Skip schema import: [namespace=" + namespace +
",schemaLocation=" + schemaLocation + "]");
- }
- }
- }
-
- private URL getLocationURL(URL parentURL, String location) throws
MalformedURLException
- {
- log.trace("getLocationURL: [location=" + location + ",parent="
+ parentURL + "]");
-
- URL locationURL = null;
- try
- {
- locationURL = new URL(location);
- }
- catch (MalformedURLException e)
- {
- // ignore malformed URL
- }
-
- if (locationURL == null)
- {
- String parentProtocol = parentURL.getProtocol();
- if (parentProtocol.equals("file") &&
!location.startsWith("/"))
- {
- String path = parentURL.toExternalForm();
- path = path.substring(0, path.lastIndexOf("/"));
- locationURL = new URL(path + "/" + location);
- }
- else if (parentProtocol.startsWith("http") &&
location.startsWith("/"))
- {
- String path = parentProtocol + "://" + parentURL.getHost() +
":" + parentURL.getPort();
- locationURL = new URL(path + location);
- }
- else if (parentProtocol.equals("jar") &&
!location.startsWith("/"))
- {
- String path = parentURL.toExternalForm();
- path = path.substring(0, path.lastIndexOf("/"));
- locationURL = new URL(path + "/" + location);
- }
- else
- {
- throw new WSException("Unsupported schemaLocation: " + location);
- }
- }
-
- log.trace("Modified schemaLocation: " + locationURL);
- return locationURL;
- }
-
- private void processPortType(Definition srcWsdl, PortType srcPortType)
- {
- log.trace("processPortType: " + srcPortType.getQName());
-
- QName qname = srcPortType.getQName();
- NCName ncName = new NCName(qname);
- if (destWsdl.getInterface(ncName) == null)
- {
- WSDLInterface destInterface = new WSDLInterface(destWsdl);
- destInterface.setName(ncName);
- destInterface.setQName(qname);
-
- // eventing extensions
- QName eventSourceProp =
(QName)srcPortType.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSE_EVENTSOURCE);
- if (eventSourceProp != null &&
eventSourceProp.getLocalPart().equals(Boolean.TRUE.toString()))
- {
- destInterface.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_EVENTSOURCE, eventSourceProp.getLocalPart()));
- }
-
- destWsdl.addInterface(destInterface);
-
- processPortTypeOperations(srcWsdl, destInterface, srcPortType);
- }
- }
-
- private void processPortTypeOperations(Definition srcWsdl, WSDLInterface
destInterface, PortType srcPortType)
- {
- Iterator itOperations = srcPortType.getOperations().iterator();
- while (itOperations.hasNext())
- {
- Operation srcOperation = (Operation)itOperations.next();
-
- WSDLInterfaceOperation destOperation = new
WSDLInterfaceOperation(destInterface);
- destOperation.setName(new NCName(srcOperation.getName()));
- destOperation.setStyle(getOperationStyle(srcWsdl, srcPortType, srcOperation));
-
- processOperationInput(srcWsdl, srcOperation, destOperation, srcPortType);
- processOperationOutput(srcWsdl, srcOperation, destOperation, srcPortType);
- processOperationFaults(srcOperation, destOperation, destInterface);
-
- destInterface.addOperation(destOperation);
- }
- }
-
- private void processOperationInput(Definition srcWsdl, Operation srcOperation,
WSDLInterfaceOperation destOperation, PortType srcPortType)
- {
- Input srcInput = srcOperation.getInput();
- if (srcInput != null)
- {
- Message srcMessage = srcInput.getMessage();
- log.trace("processOperationInput: " + srcMessage.getQName());
-
- QName wsaAction =
(QName)srcInput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
- if (wsaAction != null)
- destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_IN,
wsaAction.getLocalPart()));
-
- List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
- if (paramOrder != null)
- {
- for (String name : paramOrder)
- {
- if (srcMessage.getPart(name) != null)
- destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name));
- }
- }
-
- WSDLInterfaceOperationInput rpcInput = new
WSDLInterfaceOperationInput(destOperation);
- for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(paramOrder))
- {
- if (Constants.URI_STYLE_IRI == destOperation.getStyle())
- {
- WSDLInterfaceOperationInput destInput = new
WSDLInterfaceOperationInput(destOperation);
- QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
- destInput.setElement(elementName);
-
- //Lets remember the Message name
- destInput.setMessageName(srcMessage.getQName());
- destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN,
srcMessage.getQName().getLocalPart()));
-
- destInput.setPartName(srcPart.getName());
-
- destOperation.addInput(destInput);
- }
- else
- {
- // If we don't have a type then we aren't a valid RPC parameter
- // This could happen on a header element, in which case the
- // binding will pick it up
- QName xmlType = srcPart.getTypeName();
- if (xmlType != null)
- rpcInput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
- else
- messagePartToElementName(srcWsdl, srcPortType, srcOperation,
srcMessage, srcPart);
- }
- }
- if (Constants.URI_STYLE_RPC == destOperation.getStyle())
- {
- // This is really a place holder, but also the actual value used in
- // WSDL 2.0 RPC bindings
- rpcInput.setElement(destOperation.getQName());
- rpcInput.setMessageName(srcMessage.getQName());
- destOperation.addInput(rpcInput);
- }
- }
- }
-
- private void processOperationOutput(Definition srcWsdl, Operation srcOperation,
WSDLInterfaceOperation destOperation, PortType srcPortType)
- {
- Output srcOutput = srcOperation.getOutput();
- if (srcOutput == null)
- {
- destOperation.setPattern(Constants.WSDL20_PATTERN_IN_ONLY);
- return;
- }
-
- Message srcMessage = srcOutput.getMessage();
- log.trace("processOperationOutput: " + srcMessage.getQName());
-
- destOperation.setPattern(Constants.WSDL20_PATTERN_IN_OUT);
- QName wsaAction = (QName)
srcOutput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
- if (wsaAction != null)
- destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_OUT,
wsaAction.getLocalPart()));
-
- List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
- if (paramOrder != null)
- {
- for (String name : paramOrder)
- {
- if (srcMessage.getPart(name) != null)
- {
- WSDLRPCSignatureItem item = destOperation.getRpcSignatureitem(name);
- if (item != null)
- item.setDirection(Direction.INOUT);
- else
- destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name,
Direction.OUT));
- }
- }
- }
-
- WSDLInterfaceOperationOutput rpcOutput = new
WSDLInterfaceOperationOutput(destOperation);
- for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(null))
- {
- if (Constants.URI_STYLE_IRI == destOperation.getStyle())
- {
- WSDLInterfaceOperationOutput destOutput = new
WSDLInterfaceOperationOutput(destOperation);
-
- QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
- destOutput.setElement(elementName);
-
- // Lets remember the Message name
- destOutput.setMessageName(srcMessage.getQName());
- destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT, srcMessage.getQName()
- .getLocalPart()));
-
- // Remember the original part name
- destOutput.setPartName(srcPart.getName());
-
- destOperation.addOutput(destOutput);
- }
- else
- {
- // If we don't have a type then we aren't a valid RPC parameter
- // This could happen on a header element, in which case the
- // binding will pick it up
- QName xmlType = srcPart.getTypeName();
- if (xmlType != null)
- rpcOutput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
- else
- messagePartToElementName(srcWsdl, srcPortType, srcOperation, srcMessage,
srcPart);
- }
- }
-
- if (Constants.URI_STYLE_RPC == destOperation.getStyle())
- {
- // This is really a place holder, but also the actual value used in
- // WSDL 2.0 RPC bindings
- QName name = destOperation.getQName();
- rpcOutput.setElement(new QName(name.getNamespaceURI(), name.getLocalPart() +
"Response"));
- rpcOutput.setMessageName(srcMessage.getQName());
- destOperation.addOutput(rpcOutput);
- }
- }
-
- private void processOperationFaults(Operation srcOperation, WSDLInterfaceOperation
destOperation, WSDLInterface destInterface)
- {
-
- Map faults = srcOperation.getFaults();
- Iterator itFaults = faults.values().iterator();
- while (itFaults.hasNext())
- {
- Fault srcFault = (Fault)itFaults.next();
- processOperationFault(destOperation, destInterface, srcFault);
- }
- }
-
- private void processOperationFault(WSDLInterfaceOperation destOperation, WSDLInterface
destInterface, Fault srcFault)
- {
- String faultName = srcFault.getName();
- log.trace("processOperationFault: " + faultName);
-
- WSDLInterfaceFault destFault = new WSDLInterfaceFault(destInterface);
- NCName ncName = new NCName(faultName);
- destFault.setName(ncName);
-
- Message message = srcFault.getMessage();
- QName messageName = message.getQName();
-
- Map partsMap = message.getParts();
- if (partsMap.size() != 1)
- throw new WSException("Unsupported number of fault parts in message "
+ messageName);
-
- Part part = (Part)partsMap.values().iterator().next();
- QName xmlName = part.getElementName();
-
- if (xmlName != null)
- {
- destFault.setElement(xmlName);
- }
- else
- {
- destFault.setElement(messageName);
- log.warn("Unsupported fault message part in message: " +
messageName);
- }
-
- WSDLInterfaceFault prevFault = destInterface.getFault(ncName);
- if (prevFault != null && prevFault.getName().equals(ncName) == false)
- throw new WSException("Fault name must be unique: " + faultName);
-
- // Add the fault to the interface
- destInterface.addFault(destFault);
-
- // Add the fault refererence to the operation
- WSDLInterfaceOperationOutfault opOutFault = new
WSDLInterfaceOperationOutfault(destOperation);
- opOutFault.setRef(new QName(destWsdl.getTargetNamespace(), faultName));
- destOperation.addOutfault(opOutFault);
- }
-
- /** Translate the message part name into an XML element name.
- */
- private QName messagePartToElementName(Definition srcWsdl, PortType srcPortType,
Operation srcOperation, Message srcMessage, Part srcPart)
- {
- // <part name="param" element="tns:SomeType" />
- QName xmlName = srcPart.getElementName();
-
- // <part name="param" type="xsd:string" />
- if (xmlName == null)
- xmlName = new QName(srcPart.getName());
-
- xmlName = destWsdl.registerQName(xmlName);
- String key = srcMessage.getQName() + "->" + srcPart.getName();
- messagePartToElementMap.put(key, xmlName);
-
- return xmlName;
- }
-
- private BindingOperation getBindingOperation(Definition srcWsdl, PortType srcPortType,
Operation srcOperation)
- {
- Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName());
-
- if (srcBinding == null)
- throw new WSException("Cannot find binding for: " +
srcPortType.getQName());
-
- String srcOperationName = srcOperation.getName();
- BindingOperation srcBindingOperation =
srcBinding.getBindingOperation(srcOperationName, null, null);
- if (srcBindingOperation == null)
- throw new WSException("Cannot find binding operation for: " +
srcOperationName);
- return srcBindingOperation;
- }
-
- private String getOperationStyle(Definition srcWsdl, PortType srcPortType, Operation
srcOperation)
- {
- Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName());
- BindingOperation srcBindingOperation = getBindingOperation(srcWsdl, srcPortType,
srcOperation);
-
- String operationStyle = null;
- List<ExtensibilityElement> extList =
srcBindingOperation.getExtensibilityElements();
- for (ExtensibilityElement extElement : extList)
- {
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPOperation)
- {
- SOAPOperation soapOp = (SOAPOperation)extElement;
- operationStyle = soapOp.getStyle();
- }
- else if (SOAP12_OPERATION.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
- operationStyle = getOptionalAttribute(domElement, "style");
- }
- }
-
- if (operationStyle == null)
- {
- for (ExtensibilityElement extElement : (List<ExtensibilityElement>)
srcBinding.getExtensibilityElements())
- {
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPBinding)
- {
- SOAPBinding soapBinding = (SOAPBinding) extElement;
- operationStyle = soapBinding.getStyle();
- }
- else if (SOAP12_BINDING.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)
extElement).getElement();
- operationStyle = getOptionalAttribute(domElement, "style");
- }
- }
- }
-
- return ("rpc".equals(operationStyle)) ? Constants.URI_STYLE_RPC :
Constants.URI_STYLE_IRI;
- }
-
- private void processBinding(Definition srcWsdl, Binding srcBinding)
- {
- QName srcBindingQName = srcBinding.getQName();
- log.trace("processBinding: " + srcBindingQName);
-
- NCName ncName = new NCName(srcBindingQName);
- if (destWsdl.getBinding(ncName) == null)
- {
- PortType srcPortType = srcBinding.getPortType();
- if (srcPortType == null)
- throw new WSException("Cannot find port type for binding: " +
ncName);
-
- processPortType(srcWsdl, srcPortType);
-
- WSDLBinding destBinding = new WSDLBinding(destWsdl);
- destBinding.setQName(srcBindingQName);
- destBinding.setName(ncName);
- destBinding.setInterfaceName(srcPortType.getQName());
-
- String bindingStyle = Style.getDefaultStyle().toString();
- List<ExtensibilityElement> extList =
srcBinding.getExtensibilityElements();
- for (ExtensibilityElement extElement : extList)
- {
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPBinding)
- {
- destBinding.setType(Constants.NS_SOAP11);
- SOAPBinding soapBinding = (SOAPBinding)extElement;
- bindingStyle = soapBinding.getStyle();
- }
- else if (SOAP12_BINDING.equals(elementType))
- {
- destBinding.setType(Constants.NS_SOAP12);
- Element domElement =
((UnknownExtensibilityElement)extElement).getElement();
- bindingStyle = getOptionalAttribute(domElement, "style");
- }
- }
- destWsdl.addBinding(destBinding);
- processBindingOperations(destBinding, srcBinding, bindingStyle);
- }
- }
-
- private Map<QName, Binding> getPortTypeBindings(Definition srcWsdl)
- {
- getAllDefinedBindings(srcWsdl);
- return portTypeBindings;
- }
-
- private Map<QName, Binding> getAllDefinedBindings(Definition srcWsdl)
- {
- if (allBindings != null)
- return allBindings;
-
- allBindings = new LinkedHashMap<QName, Binding>();
- portTypeBindings = new LinkedHashMap<QName, Binding>();
- Map srcBindings = srcWsdl.getBindings();
- Iterator itBinding = srcBindings.values().iterator();
- while (itBinding.hasNext())
- {
- Binding srcBinding = (Binding)itBinding.next();
- allBindings.put(srcBinding.getQName(), srcBinding);
- portTypeBindings.put(srcBinding.getPortType().getQName(), srcBinding);
- }
-
- // Bindings not available when pulled in through <wsdl:import>
- //
http://sourceforge.net/tracker/index.php?func=detail&aid=1240323&...
- Iterator itService = srcWsdl.getServices().values().iterator();
- while (itService.hasNext())
- {
- Service srcService = (Service)itService.next();
- Iterator itPort = srcService.getPorts().values().iterator();
- while (itPort.hasNext())
- {
- Port srcPort = (Port)itPort.next();
- Binding srcBinding = srcPort.getBinding();
- allBindings.put(srcBinding.getQName(), srcBinding);
- portTypeBindings.put(srcBinding.getPortType().getQName(), srcBinding);
- }
- }
-
- return allBindings;
- }
-
- private void processBindingOperations(WSDLBinding destBinding, Binding srcBinding,
String bindingStyle)
- {
- Iterator it = srcBinding.getBindingOperations().iterator();
- while (it.hasNext())
- {
- BindingOperation srcBindingOperation = (BindingOperation)it.next();
- processBindingOperation(destBinding, bindingStyle, srcBindingOperation);
- }
- }
-
- private void processBindingOperation(WSDLBinding destBinding, String bindingStyle,
BindingOperation srcBindingOperation)
- {
- String srcBindingName = srcBindingOperation.getName();
- log.trace("processBindingOperation: " + srcBindingName);
-
- WSDLInterface destInterface = destBinding.getInterface();
- String namespaceURI = destInterface.getQName().getNamespaceURI();
-
- WSDLBindingOperation destBindingOperation = new WSDLBindingOperation(destBinding);
- QName refQName = new QName(namespaceURI, srcBindingName);
- destBindingOperation.setRef(refQName);
- destBinding.addOperation(destBindingOperation);
-
- String opName = srcBindingName;
- WSDLInterfaceOperation destIntfOperation = destInterface.getOperation(new
NCName(opName));
-
- // Process soap:operation@soapAction, soap:operation@style
- List<ExtensibilityElement> extList =
srcBindingOperation.getExtensibilityElements();
- for (ExtensibilityElement extElement : extList)
- {
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPOperation)
- {
- SOAPOperation soapOp = (SOAPOperation)extElement;
- destBindingOperation.setSOAPAction(soapOp.getSoapActionURI());
- }
- else if (SOAP12_OPERATION.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
- destBindingOperation.setSOAPAction(getOptionalAttribute(domElement,
"soapAction"));
- }
- }
-
- BindingInput srcBindingInput = srcBindingOperation.getBindingInput();
- if (srcBindingInput != null)
- {
- processBindingInput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingInput);
- }
-
- BindingOutput srcBindingOutput = srcBindingOperation.getBindingOutput();
- if (srcBindingOutput != null)
- {
- processBindingOutput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingOutput);
- }
- }
-
- interface ReferenceCallback
- {
- void removeReference(QName element);
- void removeRPCPart(String partName);
- QName getXmlType(String partName);
- }
-
- private void processBindingInput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingInput srcBindingInput)
- {
- log.trace("processBindingInput");
-
- QName soap11Body = new QName(Constants.NS_SOAP11, "body");
- List<ExtensibilityElement> extList =
srcBindingInput.getExtensibilityElements();
- WSDLBindingOperationInput input = new
WSDLBindingOperationInput(destBindingOperation);
- destBindingOperation.addInput(input);
-
- ReferenceCallback cb = new ReferenceCallback()
- {
- public QName getXmlType(String partName)
- {
- return
srcBindingOperation.getOperation().getInput().getMessage().getPart(partName).getTypeName();
- }
-
- public void removeReference(QName element)
- {
- WSDLInterfaceOperationInput destIntfInput =
destIntfOperation.getInput(element);
- if (destIntfInput == null)
- destIntfOperation.removeInput(element);
- }
-
- public void removeRPCPart(String partName)
- {
- WSDLInterfaceOperationInput operationInput =
destIntfOperation.getInput(destIntfOperation.getQName());
- operationInput.removeChildPart(partName);
- }
- };
-
- processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, input, cb);
- }
-
- private void processBindingOutput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingOutput srcBindingOutput)
- {
- log.trace("processBindingInput");
-
- QName soap11Body = new QName(Constants.NS_SOAP11, "body");
- List<ExtensibilityElement> extList =
srcBindingOutput.getExtensibilityElements();
- WSDLBindingOperationOutput output = new
WSDLBindingOperationOutput(destBindingOperation);
- destBindingOperation.addOutput(output);
-
- ReferenceCallback cb = new ReferenceCallback()
- {
- public QName getXmlType(String partName)
- {
- return
srcBindingOperation.getOperation().getOutput().getMessage().getPart(partName).getTypeName();
- }
-
- public void removeReference(QName element)
- {
- WSDLInterfaceOperationOutput destIntfOutput =
destIntfOperation.getOutput(element);
- if (destIntfOutput == null)
- destIntfOperation.removeInput(element);
- }
-
- public void removeRPCPart(String partName)
- {
- QName name = destIntfOperation.getQName();
- WSDLInterfaceOperationOutput operationOutput =
destIntfOperation.getOutput(new QName(name.getNamespaceURI(), name.getLocalPart() +
"Response"));
- operationOutput.removeChildPart(partName);
- }
- };
-
- processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, output, cb);
- }
-
-
- private void processBindingReference(WSDLBindingOperation destBindingOperation,
WSDLInterfaceOperation destIntfOperation,
- QName soap11Body, List<ExtensibilityElement> extList,
WSDLBindingMessageReference reference, ReferenceCallback callback)
- {
- for (ExtensibilityElement extElement : extList)
- {
- QName elementType = extElement.getElementType();
- if (soap11Body.equals(elementType) || SOAP12_BODY.equals(elementType))
- {
- processEncodingStyle(extElement, destBindingOperation);
- }
- else if (extElement instanceof SOAPHeader)
- {
- SOAPHeader header = (SOAPHeader)extElement;
- QName messageQName = header.getMessage();
- String partName = header.getPart();
-
- String key = messageQName + "->" + partName;
- QName elementName = (QName)messagePartToElementMap.get(key);
- if (elementName == null)
- throw new WSException("Could not determine element name from header:
" + partName);
-
- reference.addSoapHeader(new WSDLSOAPHeader(elementName, partName));
- if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
- {
- callback.removeReference(elementName);
- }
- else
- {
- // Just in case
- callback.removeRPCPart(partName);
- }
- }
- else if (extElement instanceof MIMEMultipartRelated)
- {
- MIMEMultipartRelated related = (MIMEMultipartRelated)extElement;
- Iterator i = related.getMIMEParts().iterator();
- while (i.hasNext())
- {
- MIMEPart part = (MIMEPart)i.next();
- Iterator j = part.getExtensibilityElements().iterator();
- String name = null;
- String types = null;
-
- while (j.hasNext())
- {
- ExtensibilityElement inner = (ExtensibilityElement)j.next();
- if (inner instanceof MIMEContent)
- {
- MIMEContent content = (MIMEContent)inner;
- name = content.getPart();
- if (types == null)
- {
- types = content.getType();
- }
- else
- {
- types += "," + content.getType();
- }
- }
- }
-
- // Found content types in this part
- if (name != null)
- {
- QName xmlType = callback.getXmlType(name);
- reference.addMimePart(new WSDLMIMEPart(name, xmlType, types));
- if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
- {
- // A mime part must be defined as <part type="">
- callback.removeReference(new QName(name));
- }
- else
- {
- callback.removeRPCPart(name);
- }
- }
- }
- }
- }
- }
-
-
- private void processEncodingStyle(ExtensibilityElement extElement,
WSDLBindingOperation destBindingOperation)
- {
- log.trace("processEncodingStyle");
-
- String encStyle = null;
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPBody)
- {
- SOAPBody body = (SOAPBody)extElement;
- List encStyleList = body.getEncodingStyles();
- if (encStyleList != null)
- {
- if (encStyleList.size() > 1)
- log.warn("Multiple encoding styles not supported: " +
encStyleList);
-
- if (encStyleList.size() > 0)
- {
- encStyle = (String)encStyleList.get(0);
- }
- }
- }
- else if (SOAP12_BODY.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
- encStyle = getOptionalAttribute(domElement, "encodingStyle");
- }
-
- if (encStyle != null)
- {
- String setStyle = destBindingOperation.getEncodingStyle();
- if (encStyle.equals(setStyle) == false)
- log.warn("Encoding style '" + encStyle + "' not
supported for: " + destBindingOperation.getRef());
-
- destBindingOperation.setEncodingStyle(encStyle);
- }
- }
-
- private void processServices(Definition srcWsdl)
- {
- log.trace("BEGIN processServices: " + srcWsdl.getDocumentBaseURI());
-
- // Each definition needs a clear binding cache
- allBindings = null;
-
- if (srcWsdl.getServices().size() > 0)
- {
- Iterator it = srcWsdl.getServices().values().iterator();
- while (it.hasNext())
- {
- Service srcService = (Service)it.next();
- QName qname = srcService.getQName();
- WSDLService destService = new WSDLService(destWsdl);
- destService.setName(new NCName(qname));
- destService.setQName(qname);
- destWsdl.addService(destService);
- processPorts(srcWsdl, destService, srcService);
- }
- }
- else
- {
- log.trace("Empty wsdl services, processing imports");
- Iterator it = srcWsdl.getImports().values().iterator();
- while (it.hasNext())
- {
- List<Import> srcImports = (List<Import>)it.next();
- for (Import srcImport : srcImports)
- {
- Definition importDefinition = srcImport.getDefinition();
- processServices(importDefinition);
- }
- }
-
- // The binding cache must be clear after imports, so that undefined bindings can
be located
- allBindings = null;
- }
-
- log.trace("END processServices: " + srcWsdl.getDocumentBaseURI());
- }
-
- private void processPorts(Definition srcWsdl, WSDLService destService, Service
srcService)
- {
- Iterator it = srcService.getPorts().values().iterator();
- while (it.hasNext())
- {
- Port srcPort = (Port)it.next();
- processPort(srcWsdl, destService, srcPort);
- }
- }
-
- private void processPort(Definition srcWsdl, WSDLService destService, Port srcPort)
- {
- log.trace("processPort: " + srcPort.getName());
-
- Binding srcBinding = srcPort.getBinding();
-
- WSDLEndpoint destEndpoint = new WSDLEndpoint(destService);
- destEndpoint.setName(new NCName(srcPort.getName()));
- destEndpoint.setBinding(srcBinding.getQName());
- destEndpoint.setQName(new QName(srcWsdl.getTargetNamespace(), srcPort.getName()));
- destEndpoint.setAddress(getSOAPAddress(srcPort));
- destService.addEndpoint(destEndpoint);
-
- processBinding(srcWsdl, srcBinding);
- }
-
- /** Get the endpoint address from the ports extensible element
- */
- private String getSOAPAddress(Port srcPort)
- {
- String soapAddress = "dummy";
-
- Iterator it = srcPort.getExtensibilityElements().iterator();
- while (it.hasNext())
- {
- ExtensibilityElement extElement = (ExtensibilityElement)it.next();
- QName elementType = extElement.getElementType();
-
- if (extElement instanceof SOAPAddress)
- {
- SOAPAddress addr = (SOAPAddress)extElement;
- soapAddress = addr.getLocationURI();
- break;
- }
- else if (SOAP12_ADDRESS.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
- soapAddress = getOptionalAttribute(domElement, "location");
- break;
- }
- else if ("address".equals(elementType.getLocalPart()))
- {
- log.warn("Unprocessed extension element: " + elementType);
- }
- }
-
- if (soapAddress == null)
- throw new WSException("Cannot obtain SOAP address");
-
- return soapAddress;
- }
-
- private String getOptionalAttribute(Element domElement, String attrName)
- {
- String attrValue = domElement.getAttribute(attrName);
- return (attrValue.length() > 0 ? attrValue : null);
- }
-}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
(from rev 1580,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDL11Reader.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDL11Reader.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,1219 @@
+/*
+ * 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.wsdl;
+
+// $Id$
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.wsdl.Binding;
+import javax.wsdl.BindingInput;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.BindingOutput;
+import javax.wsdl.Definition;
+import javax.wsdl.Fault;
+import javax.wsdl.Import;
+import javax.wsdl.Input;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.Output;
+import javax.wsdl.Part;
+import javax.wsdl.Port;
+import javax.wsdl.PortType;
+import javax.wsdl.Service;
+import javax.wsdl.Types;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.UnknownExtensibilityElement;
+import javax.wsdl.extensions.mime.MIMEContent;
+import javax.wsdl.extensions.mime.MIMEMultipartRelated;
+import javax.wsdl.extensions.mime.MIMEPart;
+import javax.wsdl.extensions.schema.Schema;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap.SOAPBody;
+import javax.wsdl.extensions.soap.SOAPHeader;
+import javax.wsdl.extensions.soap.SOAPOperation;
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.Style;
+import org.jboss.ws.common.metadata.wsdl.NCName;
+import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.common.metadata.wsdl.WSDLBindingMessageReference;
+import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationInput;
+import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationOutput;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.common.metadata.wsdl.WSDLMIMEPart;
+import org.jboss.ws.common.metadata.wsdl.WSDLProperty;
+import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem;
+import org.jboss.ws.common.metadata.wsdl.WSDLSOAPHeader;
+import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.metadata.wsdl.XSModelTypes;
+import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
+import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.tools.JavaToXSD;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * A helper that translates a WSDL-1.1 object graph into a WSDL-2.0 object graph.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @since 10-Oct-2004
+ */
+public class WSDL11Reader
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDL11Reader.class);
+
+ private static QName SOAP12_BINDING = new QName(Constants.NS_SOAP12,
"binding");
+ private static QName SOAP12_BODY = new QName(Constants.NS_SOAP12, "body");
+ private static QName SOAP12_OPERATION = new QName(Constants.NS_SOAP12,
"operation");
+ private static QName SOAP12_ADDRESS = new QName(Constants.NS_SOAP12,
"address");
+
+ private WSDLDefinitions destWsdl;
+
+ // Maps wsdl message parts to their corresponding element names
+ private Map<String, QName> messagePartToElementMap = new HashMap<String,
QName>();
+
+ // Map of <ns,URL> for schemalocation keyed by namespace
+ private Map<String, URL> schemaLocationsMap = new HashMap<String, URL>();
+
+ private LinkedHashMap<QName, Binding> allBindings;
+ private LinkedHashMap<QName, Binding> portTypeBindings;
+
+ // Temporary files used by this reader.
+ private List<File> tempFiles = new ArrayList<File>();
+
+ /**
+ * Takes a WSDL11 Definition element and converts into
+ * our object graph that has been developed for WSDL20
+ *
+ * @param srcWsdl The src WSDL11 definition
+ * @param wsdlLoc The source location, if null we cannot process imports or includes
+ */
+ public WSDLDefinitions processDefinition(Definition srcWsdl, URL wsdlLoc) throws
IOException
+ {
+ log.trace("processDefinition: " + wsdlLoc);
+
+ destWsdl = new WSDLDefinitions();
+ destWsdl.setWsdlTypes(new XSModelTypes());
+ destWsdl.setWsdlOneOneDefinition(srcWsdl);
+ destWsdl.setWsdlNamespace(Constants.NS_WSDL11);
+
+ processNamespaces(srcWsdl);
+ processTypes(srcWsdl, wsdlLoc);
+ processServices(srcWsdl);
+
+ if (getAllDefinedBindings(srcWsdl).size() != destWsdl.getBindings().length)
+ processUnreachableBindings(srcWsdl);
+
+ cleanupTemporaryFiles();
+
+ return destWsdl;
+ }
+
+ private void cleanupTemporaryFiles()
+ {
+ for (File current : tempFiles)
+ {
+ current.delete();
+ }
+ }
+
+ // process all bindings not within service separetly
+ private void processUnreachableBindings(Definition srcWsdl)
+ {
+ log.trace("processUnreachableBindings");
+
+ Iterator it = getAllDefinedBindings(srcWsdl).values().iterator();
+ while (it.hasNext())
+ {
+ Binding srcBinding = (Binding)it.next();
+ QName srcQName = srcBinding.getQName();
+
+ WSDLBinding destBinding = destWsdl.getBinding(new NCName(srcQName));
+ if (destBinding == null)
+ {
+ processBinding(srcWsdl, srcBinding);
+ }
+ }
+ }
+
+ private void processNamespaces(Definition srcWsdl)
+ {
+ String targetNS = srcWsdl.getTargetNamespace();
+ destWsdl.setTargetNamespace(targetNS);
+
+ // Copy wsdl namespaces
+ Map nsMap = srcWsdl.getNamespaces();
+ Iterator iter = nsMap.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ Map.Entry entry = (Map.Entry)iter.next();
+ String prefix = (String)entry.getKey();
+ String nsURI = (String)entry.getValue();
+ destWsdl.registerNamespaceURI(nsURI, prefix);
+ }
+ }
+
+ private void processTypes(Definition srcWsdl, URL wsdlLoc) throws IOException
+ {
+ log.trace("BEGIN processTypes: " + wsdlLoc);
+
+ WSDLTypes destTypes = destWsdl.getWsdlTypes();
+
+ Types srcTypes = srcWsdl.getTypes();
+ if (srcTypes != null && srcTypes.getExtensibilityElements().size() > 0)
+ {
+ List extElements = srcTypes.getExtensibilityElements();
+ int len = extElements.size();
+
+ for (int i = 0; i < len; i++)
+ {
+ ExtensibilityElement extElement = (ExtensibilityElement)extElements.get(i);
+
+ Element domElement;
+ if (extElement instanceof Schema)
+ {
+ domElement = ((Schema)extElement).getElement();
+ }
+ else if (extElement instanceof UnknownExtensibilityElement)
+ {
+ domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ }
+ else
+ {
+ throw new WSException("Unsupported extensibility element: " +
extElement);
+ }
+
+ Element domElementClone = (Element)domElement.cloneNode(true);
+ copyParentNamespaceDeclarations(domElementClone, domElement);
+
+ String localname = domElementClone.getLocalName();
+ try
+ {
+ if ("import".equals(localname))
+ {
+ processSchemaImport(destTypes, wsdlLoc, domElementClone);
+ }
+ else if ("schema".equals(localname))
+ {
+ processSchemaInclude(destTypes, wsdlLoc, domElementClone);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unsuported schema element:
" + localname);
+ }
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Cannot extract schema definition", e);
+ }
+ }
+
+ if (len > 0)
+ {
+ JavaToXSD jxsd = new JavaToXSD();
+ JBossXSModel xsmodel = jxsd.parseSchema(schemaLocationsMap);
+ WSDLUtils.addSchemaModel(destTypes, destWsdl.getTargetNamespace(), xsmodel);
+ }
+ }
+ else
+ {
+ log.trace("Empty wsdl types element, processing imports");
+ Iterator it = srcWsdl.getImports().values().iterator();
+ while (it.hasNext())
+ {
+ List<Import> srcImports = (List<Import>)it.next();
+ for (Import srcImport : srcImports)
+ {
+ Definition impDefinition = srcImport.getDefinition();
+ String impLoc = impDefinition.getDocumentBaseURI();
+ processTypes(impDefinition, new URL(impLoc));
+ }
+ }
+ }
+
+ log.trace("END processTypes: " + wsdlLoc + "\n" + destTypes);
+ }
+
+ private void copyParentNamespaceDeclarations(Element destElement, Element srcElement)
+ {
+ Node parent = srcElement.getParentNode();
+ while (parent != null)
+ {
+ if (parent.hasAttributes())
+ {
+ NamedNodeMap attributes = parent.getAttributes();
+ for (int i = 0; i < attributes.getLength(); i++)
+ {
+ Attr attr = (Attr)attributes.item(i);
+ String name = attr.getName();
+ String value = attr.getValue();
+ if (name.startsWith("xmlns:") &&
destElement.hasAttribute(name) == false)
+ destElement.setAttribute(name, value);
+ }
+ }
+ parent = parent.getParentNode();
+ }
+ }
+
+ private void processSchemaImport(WSDLTypes types, URL wsdlLoc, Element importEl)
throws IOException
+ {
+ if (wsdlLoc == null)
+ throw new IllegalArgumentException("Cannot process import, parent location
not set");
+
+ log.trace("processSchemaImport: " + wsdlLoc);
+
+ String location = getOptionalAttribute(importEl, "schemaLocation");
+ if (location == null)
+ throw new IllegalArgumentException("schemaLocation is null for
xsd:import");
+
+ URL locationURL = getLocationURL(wsdlLoc, location);
+ Element rootElement = DOMUtils.parse(locationURL.openStream());
+ URL newloc = processSchemaInclude(types, locationURL, rootElement);
+ if (newloc != null)
+ importEl.setAttribute("schemaLocation", newloc.toExternalForm());
+ }
+
+ private URL processSchemaInclude(WSDLTypes types, URL wsdlLoc, Element schemaEl)
throws IOException
+ {
+ if (wsdlLoc == null)
+ throw new IllegalArgumentException("Cannot process iclude, parent location
not set");
+
+ File tmpFile = null;
+ if (wsdlLoc == null)
+ throw new IllegalArgumentException("Cannot process include, parent location
not set");
+
+ log.trace("processSchemaInclude: " + wsdlLoc);
+
+ String schemaPrefix = schemaEl.getPrefix();
+
+ String importTag = (schemaPrefix == null) ? "import" : schemaPrefix +
":import";
+ Element importElement =
schemaEl.getOwnerDocument().createElementNS(Constants.NS_SCHEMA_XSD, importTag);
+ importElement.setAttribute("namespace", Constants.URI_SOAP11_ENC);
+ schemaEl.insertBefore(importElement, DOMUtils.getFirstChildElement(schemaEl));
+
+ // Handle schema includes
+ Iterator it = DOMUtils.getChildElements(schemaEl, new
QName(Constants.NS_SCHEMA_XSD, "include"));
+ while (it.hasNext())
+ {
+ Element includeEl = (Element)it.next();
+ String location = getOptionalAttribute(includeEl, "schemaLocation");
+ if (location == null)
+ throw new IllegalArgumentException("schemaLocation is null for
xsd:include");
+
+ URL locationURL = getLocationURL(wsdlLoc, location);
+ Element rootElement = DOMUtils.parse(locationURL.openStream());
+ URL newloc = processSchemaInclude(types, locationURL, rootElement);
+ if (newloc != null)
+ includeEl.setAttribute("schemaLocation", newloc.toExternalForm());
+ }
+
+ String targetNS = getOptionalAttribute(schemaEl, "targetNamespace");
+ if (targetNS != null)
+ {
+ log.trace("processSchemaInclude: [targetNS=" + targetNS +
",parentURL=" + wsdlLoc + "]");
+
+ tmpFile = SchemaUtils.getSchemaTempFile(targetNS);
+ tempFiles.add(tmpFile);
+
+ FileWriter fwrite = new FileWriter(tmpFile);
+ new DOMWriter(fwrite).setPrettyprint(true).print(schemaEl);
+ fwrite.close();
+
+ schemaLocationsMap.put(targetNS, tmpFile.toURL());
+ }
+
+ // schema elements that have no target namespace are skipped
+ //
+ // <xsd:schema>
+ // <xsd:import
namespace="http://org.jboss.webservice/example/types"
schemaLocation="Hello.xsd"/>
+ // <xsd:import
namespace="http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservice/admindevel"
schemaLocation="subdir/HelloArr.xsd"/>
+ // </xsd:schema>
+ if (targetNS == null)
+ {
+ log.trace("Schema element without target namespace in: " + wsdlLoc);
+ }
+
+ handleSchemaImports(schemaEl, wsdlLoc);
+
+ return tmpFile != null ? tmpFile.toURL() : null;
+ }
+
+ private void handleSchemaImports(Element schemaEl, URL wsdlLoc) throws
MalformedURLException
+ {
+ if (wsdlLoc == null)
+ throw new IllegalArgumentException("Cannot process import, parent location
not set");
+
+ Iterator it = DOMUtils.getChildElements(schemaEl, new
QName(Constants.NS_SCHEMA_XSD, "import"));
+ while (it.hasNext())
+ {
+ Element includeEl = (Element)it.next();
+ String schemaLocation = getOptionalAttribute(includeEl,
"schemaLocation");
+ String namespace = getOptionalAttribute(includeEl, "namespace");
+
+ log.trace("handleSchemaImport: [namespace=" + namespace +
",schemaLocation=" + schemaLocation + "]");
+
+ // Skip, let the entity resolver resolve these
+ if (namespace != null && schemaLocation != null)
+ {
+ URL currLoc = getLocationURL(wsdlLoc, schemaLocation);
+ schemaLocationsMap.put(namespace, currLoc);
+ }
+ else
+ {
+ log.trace("Skip schema import: [namespace=" + namespace +
",schemaLocation=" + schemaLocation + "]");
+ }
+ }
+ }
+
+ private URL getLocationURL(URL parentURL, String location) throws
MalformedURLException
+ {
+ log.trace("getLocationURL: [location=" + location + ",parent="
+ parentURL + "]");
+
+ URL locationURL = null;
+ try
+ {
+ locationURL = new URL(location);
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore malformed URL
+ }
+
+ if (locationURL == null)
+ {
+ String parentProtocol = parentURL.getProtocol();
+ if (parentProtocol.equals("file") &&
!location.startsWith("/"))
+ {
+ String path = parentURL.toExternalForm();
+ path = path.substring(0, path.lastIndexOf("/"));
+ locationURL = new URL(path + "/" + location);
+ }
+ else if (parentProtocol.startsWith("http") &&
location.startsWith("/"))
+ {
+ String path = parentProtocol + "://" + parentURL.getHost() +
":" + parentURL.getPort();
+ locationURL = new URL(path + location);
+ }
+ else if (parentProtocol.equals("jar") &&
!location.startsWith("/"))
+ {
+ String path = parentURL.toExternalForm();
+ path = path.substring(0, path.lastIndexOf("/"));
+ locationURL = new URL(path + "/" + location);
+ }
+ else
+ {
+ throw new WSException("Unsupported schemaLocation: " + location);
+ }
+ }
+
+ log.trace("Modified schemaLocation: " + locationURL);
+ return locationURL;
+ }
+
+ private void processPortType(Definition srcWsdl, PortType srcPortType)
+ {
+ log.trace("processPortType: " + srcPortType.getQName());
+
+ QName qname = srcPortType.getQName();
+ NCName ncName = new NCName(qname);
+ if (destWsdl.getInterface(ncName) == null)
+ {
+ WSDLInterface destInterface = new WSDLInterface(destWsdl);
+ destInterface.setName(ncName);
+ destInterface.setQName(qname);
+
+ // eventing extensions
+ QName eventSourceProp =
(QName)srcPortType.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSE_EVENTSOURCE);
+ if (eventSourceProp != null &&
eventSourceProp.getLocalPart().equals(Boolean.TRUE.toString()))
+ {
+ destInterface.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_EVENTSOURCE, eventSourceProp.getLocalPart()));
+ }
+
+ destWsdl.addInterface(destInterface);
+
+ processPortTypeOperations(srcWsdl, destInterface, srcPortType);
+ }
+ }
+
+ private void processPortTypeOperations(Definition srcWsdl, WSDLInterface
destInterface, PortType srcPortType)
+ {
+ Iterator itOperations = srcPortType.getOperations().iterator();
+ while (itOperations.hasNext())
+ {
+ Operation srcOperation = (Operation)itOperations.next();
+
+ WSDLInterfaceOperation destOperation = new
WSDLInterfaceOperation(destInterface);
+ destOperation.setName(new NCName(srcOperation.getName()));
+ destOperation.setStyle(getOperationStyle(srcWsdl, srcPortType, srcOperation));
+
+ processOperationInput(srcWsdl, srcOperation, destOperation, srcPortType);
+ processOperationOutput(srcWsdl, srcOperation, destOperation, srcPortType);
+ processOperationFaults(srcOperation, destOperation, destInterface);
+
+ destInterface.addOperation(destOperation);
+ }
+ }
+
+ private void processOperationInput(Definition srcWsdl, Operation srcOperation,
WSDLInterfaceOperation destOperation, PortType srcPortType)
+ {
+ Input srcInput = srcOperation.getInput();
+ if (srcInput != null)
+ {
+ Message srcMessage = srcInput.getMessage();
+ log.trace("processOperationInput: " + srcMessage.getQName());
+
+ QName wsaAction =
(QName)srcInput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
+ if (wsaAction != null)
+ destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_IN,
wsaAction.getLocalPart()));
+
+ List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
+ if (paramOrder != null)
+ {
+ for (String name : paramOrder)
+ {
+ if (srcMessage.getPart(name) != null)
+ destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name));
+ }
+ }
+
+ WSDLInterfaceOperationInput rpcInput = new
WSDLInterfaceOperationInput(destOperation);
+ for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(paramOrder))
+ {
+ if (Constants.URI_STYLE_IRI == destOperation.getStyle())
+ {
+ WSDLInterfaceOperationInput destInput = new
WSDLInterfaceOperationInput(destOperation);
+ QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
+ destInput.setElement(elementName);
+
+ //Lets remember the Message name
+ destInput.setMessageName(srcMessage.getQName());
+ destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN,
srcMessage.getQName().getLocalPart()));
+
+ destInput.setPartName(srcPart.getName());
+
+ destOperation.addInput(destInput);
+ }
+ else
+ {
+ // If we don't have a type then we aren't a valid RPC parameter
+ // This could happen on a header element, in which case the
+ // binding will pick it up
+ QName xmlType = srcPart.getTypeName();
+ if (xmlType != null)
+ rpcInput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
+ else
+ messagePartToElementName(srcWsdl, srcPortType, srcOperation,
srcMessage, srcPart);
+ }
+ }
+ if (Constants.URI_STYLE_RPC == destOperation.getStyle())
+ {
+ // This is really a place holder, but also the actual value used in
+ // WSDL 2.0 RPC bindings
+ rpcInput.setElement(destOperation.getQName());
+ rpcInput.setMessageName(srcMessage.getQName());
+ destOperation.addInput(rpcInput);
+ }
+ }
+ }
+
+ private void processOperationOutput(Definition srcWsdl, Operation srcOperation,
WSDLInterfaceOperation destOperation, PortType srcPortType)
+ {
+ Output srcOutput = srcOperation.getOutput();
+ if (srcOutput == null)
+ {
+ destOperation.setPattern(Constants.WSDL20_PATTERN_IN_ONLY);
+ return;
+ }
+
+ Message srcMessage = srcOutput.getMessage();
+ log.trace("processOperationOutput: " + srcMessage.getQName());
+
+ destOperation.setPattern(Constants.WSDL20_PATTERN_IN_OUT);
+ QName wsaAction = (QName)
srcOutput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
+ if (wsaAction != null)
+ destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_OUT,
wsaAction.getLocalPart()));
+
+ List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
+ if (paramOrder != null)
+ {
+ for (String name : paramOrder)
+ {
+ if (srcMessage.getPart(name) != null)
+ {
+ WSDLRPCSignatureItem item = destOperation.getRpcSignatureitem(name);
+ if (item != null)
+ item.setDirection(Direction.INOUT);
+ else
+ destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name,
Direction.OUT));
+ }
+ }
+ }
+
+ WSDLInterfaceOperationOutput rpcOutput = new
WSDLInterfaceOperationOutput(destOperation);
+ for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(null))
+ {
+ if (Constants.URI_STYLE_IRI == destOperation.getStyle())
+ {
+ WSDLInterfaceOperationOutput destOutput = new
WSDLInterfaceOperationOutput(destOperation);
+
+ QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
+ destOutput.setElement(elementName);
+
+ // Lets remember the Message name
+ destOutput.setMessageName(srcMessage.getQName());
+ destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT, srcMessage.getQName()
+ .getLocalPart()));
+
+ // Remember the original part name
+ destOutput.setPartName(srcPart.getName());
+
+ destOperation.addOutput(destOutput);
+ }
+ else
+ {
+ // If we don't have a type then we aren't a valid RPC parameter
+ // This could happen on a header element, in which case the
+ // binding will pick it up
+ QName xmlType = srcPart.getTypeName();
+ if (xmlType != null)
+ rpcOutput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
+ else
+ messagePartToElementName(srcWsdl, srcPortType, srcOperation, srcMessage,
srcPart);
+ }
+ }
+
+ if (Constants.URI_STYLE_RPC == destOperation.getStyle())
+ {
+ // This is really a place holder, but also the actual value used in
+ // WSDL 2.0 RPC bindings
+ QName name = destOperation.getQName();
+ rpcOutput.setElement(new QName(name.getNamespaceURI(), name.getLocalPart() +
"Response"));
+ rpcOutput.setMessageName(srcMessage.getQName());
+ destOperation.addOutput(rpcOutput);
+ }
+ }
+
+ private void processOperationFaults(Operation srcOperation, WSDLInterfaceOperation
destOperation, WSDLInterface destInterface)
+ {
+
+ Map faults = srcOperation.getFaults();
+ Iterator itFaults = faults.values().iterator();
+ while (itFaults.hasNext())
+ {
+ Fault srcFault = (Fault)itFaults.next();
+ processOperationFault(destOperation, destInterface, srcFault);
+ }
+ }
+
+ private void processOperationFault(WSDLInterfaceOperation destOperation, WSDLInterface
destInterface, Fault srcFault)
+ {
+ String faultName = srcFault.getName();
+ log.trace("processOperationFault: " + faultName);
+
+ WSDLInterfaceFault destFault = new WSDLInterfaceFault(destInterface);
+ NCName ncName = new NCName(faultName);
+ destFault.setName(ncName);
+
+ Message message = srcFault.getMessage();
+ QName messageName = message.getQName();
+
+ Map partsMap = message.getParts();
+ if (partsMap.size() != 1)
+ throw new WSException("Unsupported number of fault parts in message "
+ messageName);
+
+ Part part = (Part)partsMap.values().iterator().next();
+ QName xmlName = part.getElementName();
+
+ if (xmlName != null)
+ {
+ destFault.setElement(xmlName);
+ }
+ else
+ {
+ destFault.setElement(messageName);
+ log.warn("Unsupported fault message part in message: " +
messageName);
+ }
+
+ WSDLInterfaceFault prevFault = destInterface.getFault(ncName);
+ if (prevFault != null && prevFault.getName().equals(ncName) == false)
+ throw new WSException("Fault name must be unique: " + faultName);
+
+ // Add the fault to the interface
+ destInterface.addFault(destFault);
+
+ // Add the fault refererence to the operation
+ WSDLInterfaceOperationOutfault opOutFault = new
WSDLInterfaceOperationOutfault(destOperation);
+ opOutFault.setRef(new QName(destWsdl.getTargetNamespace(), faultName));
+ destOperation.addOutfault(opOutFault);
+ }
+
+ /** Translate the message part name into an XML element name.
+ */
+ private QName messagePartToElementName(Definition srcWsdl, PortType srcPortType,
Operation srcOperation, Message srcMessage, Part srcPart)
+ {
+ // <part name="param" element="tns:SomeType" />
+ QName xmlName = srcPart.getElementName();
+
+ // <part name="param" type="xsd:string" />
+ if (xmlName == null)
+ xmlName = new QName(srcPart.getName());
+
+ xmlName = destWsdl.registerQName(xmlName);
+ String key = srcMessage.getQName() + "->" + srcPart.getName();
+ messagePartToElementMap.put(key, xmlName);
+
+ return xmlName;
+ }
+
+ private BindingOperation getBindingOperation(Definition srcWsdl, PortType srcPortType,
Operation srcOperation)
+ {
+ Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName());
+
+ if (srcBinding == null)
+ throw new WSException("Cannot find binding for: " +
srcPortType.getQName());
+
+ String srcOperationName = srcOperation.getName();
+ BindingOperation srcBindingOperation =
srcBinding.getBindingOperation(srcOperationName, null, null);
+ if (srcBindingOperation == null)
+ throw new WSException("Cannot find binding operation for: " +
srcOperationName);
+ return srcBindingOperation;
+ }
+
+ private String getOperationStyle(Definition srcWsdl, PortType srcPortType, Operation
srcOperation)
+ {
+ Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName());
+ BindingOperation srcBindingOperation = getBindingOperation(srcWsdl, srcPortType,
srcOperation);
+
+ String operationStyle = null;
+ List<ExtensibilityElement> extList =
srcBindingOperation.getExtensibilityElements();
+ for (ExtensibilityElement extElement : extList)
+ {
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPOperation)
+ {
+ SOAPOperation soapOp = (SOAPOperation)extElement;
+ operationStyle = soapOp.getStyle();
+ }
+ else if (SOAP12_OPERATION.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ operationStyle = getOptionalAttribute(domElement, "style");
+ }
+ }
+
+ if (operationStyle == null)
+ {
+ for (ExtensibilityElement extElement : (List<ExtensibilityElement>)
srcBinding.getExtensibilityElements())
+ {
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPBinding)
+ {
+ SOAPBinding soapBinding = (SOAPBinding) extElement;
+ operationStyle = soapBinding.getStyle();
+ }
+ else if (SOAP12_BINDING.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)
extElement).getElement();
+ operationStyle = getOptionalAttribute(domElement, "style");
+ }
+ }
+ }
+
+ return ("rpc".equals(operationStyle)) ? Constants.URI_STYLE_RPC :
Constants.URI_STYLE_IRI;
+ }
+
+ private void processBinding(Definition srcWsdl, Binding srcBinding)
+ {
+ QName srcBindingQName = srcBinding.getQName();
+ log.trace("processBinding: " + srcBindingQName);
+
+ NCName ncName = new NCName(srcBindingQName);
+ if (destWsdl.getBinding(ncName) == null)
+ {
+ PortType srcPortType = srcBinding.getPortType();
+ if (srcPortType == null)
+ throw new WSException("Cannot find port type for binding: " +
ncName);
+
+ processPortType(srcWsdl, srcPortType);
+
+ WSDLBinding destBinding = new WSDLBinding(destWsdl);
+ destBinding.setQName(srcBindingQName);
+ destBinding.setName(ncName);
+ destBinding.setInterfaceName(srcPortType.getQName());
+
+ String bindingStyle = Style.getDefaultStyle().toString();
+ List<ExtensibilityElement> extList =
srcBinding.getExtensibilityElements();
+ for (ExtensibilityElement extElement : extList)
+ {
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPBinding)
+ {
+ destBinding.setType(Constants.NS_SOAP11);
+ SOAPBinding soapBinding = (SOAPBinding)extElement;
+ bindingStyle = soapBinding.getStyle();
+ }
+ else if (SOAP12_BINDING.equals(elementType))
+ {
+ destBinding.setType(Constants.NS_SOAP12);
+ Element domElement =
((UnknownExtensibilityElement)extElement).getElement();
+ bindingStyle = getOptionalAttribute(domElement, "style");
+ }
+ }
+ destWsdl.addBinding(destBinding);
+ processBindingOperations(destBinding, srcBinding, bindingStyle);
+ }
+ }
+
+ private Map<QName, Binding> getPortTypeBindings(Definition srcWsdl)
+ {
+ getAllDefinedBindings(srcWsdl);
+ return portTypeBindings;
+ }
+
+ private Map<QName, Binding> getAllDefinedBindings(Definition srcWsdl)
+ {
+ if (allBindings != null)
+ return allBindings;
+
+ allBindings = new LinkedHashMap<QName, Binding>();
+ portTypeBindings = new LinkedHashMap<QName, Binding>();
+ Map srcBindings = srcWsdl.getBindings();
+ Iterator itBinding = srcBindings.values().iterator();
+ while (itBinding.hasNext())
+ {
+ Binding srcBinding = (Binding)itBinding.next();
+ allBindings.put(srcBinding.getQName(), srcBinding);
+ portTypeBindings.put(srcBinding.getPortType().getQName(), srcBinding);
+ }
+
+ // Bindings not available when pulled in through <wsdl:import>
+ //
http://sourceforge.net/tracker/index.php?func=detail&aid=1240323&...
+ Iterator itService = srcWsdl.getServices().values().iterator();
+ while (itService.hasNext())
+ {
+ Service srcService = (Service)itService.next();
+ Iterator itPort = srcService.getPorts().values().iterator();
+ while (itPort.hasNext())
+ {
+ Port srcPort = (Port)itPort.next();
+ Binding srcBinding = srcPort.getBinding();
+ allBindings.put(srcBinding.getQName(), srcBinding);
+ portTypeBindings.put(srcBinding.getPortType().getQName(), srcBinding);
+ }
+ }
+
+ return allBindings;
+ }
+
+ private void processBindingOperations(WSDLBinding destBinding, Binding srcBinding,
String bindingStyle)
+ {
+ Iterator it = srcBinding.getBindingOperations().iterator();
+ while (it.hasNext())
+ {
+ BindingOperation srcBindingOperation = (BindingOperation)it.next();
+ processBindingOperation(destBinding, bindingStyle, srcBindingOperation);
+ }
+ }
+
+ private void processBindingOperation(WSDLBinding destBinding, String bindingStyle,
BindingOperation srcBindingOperation)
+ {
+ String srcBindingName = srcBindingOperation.getName();
+ log.trace("processBindingOperation: " + srcBindingName);
+
+ WSDLInterface destInterface = destBinding.getInterface();
+ String namespaceURI = destInterface.getQName().getNamespaceURI();
+
+ WSDLBindingOperation destBindingOperation = new WSDLBindingOperation(destBinding);
+ QName refQName = new QName(namespaceURI, srcBindingName);
+ destBindingOperation.setRef(refQName);
+ destBinding.addOperation(destBindingOperation);
+
+ String opName = srcBindingName;
+ WSDLInterfaceOperation destIntfOperation = destInterface.getOperation(new
NCName(opName));
+
+ // Process soap:operation@soapAction, soap:operation@style
+ List<ExtensibilityElement> extList =
srcBindingOperation.getExtensibilityElements();
+ for (ExtensibilityElement extElement : extList)
+ {
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPOperation)
+ {
+ SOAPOperation soapOp = (SOAPOperation)extElement;
+ destBindingOperation.setSOAPAction(soapOp.getSoapActionURI());
+ }
+ else if (SOAP12_OPERATION.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ destBindingOperation.setSOAPAction(getOptionalAttribute(domElement,
"soapAction"));
+ }
+ }
+
+ BindingInput srcBindingInput = srcBindingOperation.getBindingInput();
+ if (srcBindingInput != null)
+ {
+ processBindingInput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingInput);
+ }
+
+ BindingOutput srcBindingOutput = srcBindingOperation.getBindingOutput();
+ if (srcBindingOutput != null)
+ {
+ processBindingOutput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingOutput);
+ }
+ }
+
+ interface ReferenceCallback
+ {
+ void removeReference(QName element);
+ void removeRPCPart(String partName);
+ QName getXmlType(String partName);
+ }
+
+ private void processBindingInput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingInput srcBindingInput)
+ {
+ log.trace("processBindingInput");
+
+ QName soap11Body = new QName(Constants.NS_SOAP11, "body");
+ List<ExtensibilityElement> extList =
srcBindingInput.getExtensibilityElements();
+ WSDLBindingOperationInput input = new
WSDLBindingOperationInput(destBindingOperation);
+ destBindingOperation.addInput(input);
+
+ ReferenceCallback cb = new ReferenceCallback()
+ {
+ public QName getXmlType(String partName)
+ {
+ return
srcBindingOperation.getOperation().getInput().getMessage().getPart(partName).getTypeName();
+ }
+
+ public void removeReference(QName element)
+ {
+ WSDLInterfaceOperationInput destIntfInput =
destIntfOperation.getInput(element);
+ if (destIntfInput == null)
+ destIntfOperation.removeInput(element);
+ }
+
+ public void removeRPCPart(String partName)
+ {
+ WSDLInterfaceOperationInput operationInput =
destIntfOperation.getInput(destIntfOperation.getQName());
+ operationInput.removeChildPart(partName);
+ }
+ };
+
+ processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, input, cb);
+ }
+
+ private void processBindingOutput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingOutput srcBindingOutput)
+ {
+ log.trace("processBindingInput");
+
+ QName soap11Body = new QName(Constants.NS_SOAP11, "body");
+ List<ExtensibilityElement> extList =
srcBindingOutput.getExtensibilityElements();
+ WSDLBindingOperationOutput output = new
WSDLBindingOperationOutput(destBindingOperation);
+ destBindingOperation.addOutput(output);
+
+ ReferenceCallback cb = new ReferenceCallback()
+ {
+ public QName getXmlType(String partName)
+ {
+ return
srcBindingOperation.getOperation().getOutput().getMessage().getPart(partName).getTypeName();
+ }
+
+ public void removeReference(QName element)
+ {
+ WSDLInterfaceOperationOutput destIntfOutput =
destIntfOperation.getOutput(element);
+ if (destIntfOutput == null)
+ destIntfOperation.removeInput(element);
+ }
+
+ public void removeRPCPart(String partName)
+ {
+ QName name = destIntfOperation.getQName();
+ WSDLInterfaceOperationOutput operationOutput =
destIntfOperation.getOutput(new QName(name.getNamespaceURI(), name.getLocalPart() +
"Response"));
+ operationOutput.removeChildPart(partName);
+ }
+ };
+
+ processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, output, cb);
+ }
+
+
+ private void processBindingReference(WSDLBindingOperation destBindingOperation,
WSDLInterfaceOperation destIntfOperation,
+ QName soap11Body, List<ExtensibilityElement> extList,
WSDLBindingMessageReference reference, ReferenceCallback callback)
+ {
+ for (ExtensibilityElement extElement : extList)
+ {
+ QName elementType = extElement.getElementType();
+ if (soap11Body.equals(elementType) || SOAP12_BODY.equals(elementType))
+ {
+ processEncodingStyle(extElement, destBindingOperation);
+ }
+ else if (extElement instanceof SOAPHeader)
+ {
+ SOAPHeader header = (SOAPHeader)extElement;
+ QName messageQName = header.getMessage();
+ String partName = header.getPart();
+
+ String key = messageQName + "->" + partName;
+ QName elementName = (QName)messagePartToElementMap.get(key);
+ if (elementName == null)
+ throw new WSException("Could not determine element name from header:
" + partName);
+
+ reference.addSoapHeader(new WSDLSOAPHeader(elementName, partName));
+ if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
+ {
+ callback.removeReference(elementName);
+ }
+ else
+ {
+ // Just in case
+ callback.removeRPCPart(partName);
+ }
+ }
+ else if (extElement instanceof MIMEMultipartRelated)
+ {
+ MIMEMultipartRelated related = (MIMEMultipartRelated)extElement;
+ Iterator i = related.getMIMEParts().iterator();
+ while (i.hasNext())
+ {
+ MIMEPart part = (MIMEPart)i.next();
+ Iterator j = part.getExtensibilityElements().iterator();
+ String name = null;
+ String types = null;
+
+ while (j.hasNext())
+ {
+ ExtensibilityElement inner = (ExtensibilityElement)j.next();
+ if (inner instanceof MIMEContent)
+ {
+ MIMEContent content = (MIMEContent)inner;
+ name = content.getPart();
+ if (types == null)
+ {
+ types = content.getType();
+ }
+ else
+ {
+ types += "," + content.getType();
+ }
+ }
+ }
+
+ // Found content types in this part
+ if (name != null)
+ {
+ QName xmlType = callback.getXmlType(name);
+ reference.addMimePart(new WSDLMIMEPart(name, xmlType, types));
+ if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
+ {
+ // A mime part must be defined as <part type="">
+ callback.removeReference(new QName(name));
+ }
+ else
+ {
+ callback.removeRPCPart(name);
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ private void processEncodingStyle(ExtensibilityElement extElement,
WSDLBindingOperation destBindingOperation)
+ {
+ log.trace("processEncodingStyle");
+
+ String encStyle = null;
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPBody)
+ {
+ SOAPBody body = (SOAPBody)extElement;
+ List encStyleList = body.getEncodingStyles();
+ if (encStyleList != null)
+ {
+ if (encStyleList.size() > 1)
+ log.warn("Multiple encoding styles not supported: " +
encStyleList);
+
+ if (encStyleList.size() > 0)
+ {
+ encStyle = (String)encStyleList.get(0);
+ }
+ }
+ }
+ else if (SOAP12_BODY.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ encStyle = getOptionalAttribute(domElement, "encodingStyle");
+ }
+
+ if (encStyle != null)
+ {
+ String setStyle = destBindingOperation.getEncodingStyle();
+ if (encStyle.equals(setStyle) == false)
+ log.warn("Encoding style '" + encStyle + "' not
supported for: " + destBindingOperation.getRef());
+
+ destBindingOperation.setEncodingStyle(encStyle);
+ }
+ }
+
+ private void processServices(Definition srcWsdl)
+ {
+ log.trace("BEGIN processServices: " + srcWsdl.getDocumentBaseURI());
+
+ // Each definition needs a clear binding cache
+ allBindings = null;
+
+ if (srcWsdl.getServices().size() > 0)
+ {
+ Iterator it = srcWsdl.getServices().values().iterator();
+ while (it.hasNext())
+ {
+ Service srcService = (Service)it.next();
+ QName qname = srcService.getQName();
+ WSDLService destService = new WSDLService(destWsdl);
+ destService.setName(new NCName(qname));
+ destService.setQName(qname);
+ destWsdl.addService(destService);
+ processPorts(srcWsdl, destService, srcService);
+ }
+ }
+ else
+ {
+ log.trace("Empty wsdl services, processing imports");
+ Iterator it = srcWsdl.getImports().values().iterator();
+ while (it.hasNext())
+ {
+ List<Import> srcImports = (List<Import>)it.next();
+ for (Import srcImport : srcImports)
+ {
+ Definition importDefinition = srcImport.getDefinition();
+ processServices(importDefinition);
+ }
+ }
+
+ // The binding cache must be clear after imports, so that undefined bindings can
be located
+ allBindings = null;
+ }
+
+ log.trace("END processServices: " + srcWsdl.getDocumentBaseURI());
+ }
+
+ private void processPorts(Definition srcWsdl, WSDLService destService, Service
srcService)
+ {
+ Iterator it = srcService.getPorts().values().iterator();
+ while (it.hasNext())
+ {
+ Port srcPort = (Port)it.next();
+ processPort(srcWsdl, destService, srcPort);
+ }
+ }
+
+ private void processPort(Definition srcWsdl, WSDLService destService, Port srcPort)
+ {
+ log.trace("processPort: " + srcPort.getName());
+
+ Binding srcBinding = srcPort.getBinding();
+
+ WSDLEndpoint destEndpoint = new WSDLEndpoint(destService);
+ destEndpoint.setName(new NCName(srcPort.getName()));
+ destEndpoint.setBinding(srcBinding.getQName());
+ destEndpoint.setQName(new QName(srcWsdl.getTargetNamespace(), srcPort.getName()));
+ destEndpoint.setAddress(getSOAPAddress(srcPort));
+ destService.addEndpoint(destEndpoint);
+
+ processBinding(srcWsdl, srcBinding);
+ }
+
+ /** Get the endpoint address from the ports extensible element
+ */
+ private String getSOAPAddress(Port srcPort)
+ {
+ String soapAddress = "dummy";
+
+ Iterator it = srcPort.getExtensibilityElements().iterator();
+ while (it.hasNext())
+ {
+ ExtensibilityElement extElement = (ExtensibilityElement)it.next();
+ QName elementType = extElement.getElementType();
+
+ if (extElement instanceof SOAPAddress)
+ {
+ SOAPAddress addr = (SOAPAddress)extElement;
+ soapAddress = addr.getLocationURI();
+ break;
+ }
+ else if (SOAP12_ADDRESS.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ soapAddress = getOptionalAttribute(domElement, "location");
+ break;
+ }
+ else if ("address".equals(elementType.getLocalPart()))
+ {
+ log.warn("Unprocessed extension element: " + elementType);
+ }
+ }
+
+ if (soapAddress == null)
+ throw new WSException("Cannot obtain SOAP address");
+
+ return soapAddress;
+ }
+
+ private String getOptionalAttribute(Element domElement, String attrName)
+ {
+ String attrValue = domElement.getAttribute(attrName);
+ return (attrValue.length() > 0 ? attrValue : null);
+ }
+}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDL11Writer.java 2006-12-06
14:17:04 UTC (rev 1575)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,538 +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.common.wsdl;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Arrays;
-import java.util.HashSet;
-
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import javax.wsdl.factory.WSDLFactory;
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingMessageReference;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLImport;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceMessageReference;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem;
-import org.jboss.ws.common.metadata.wsdl.WSDLSOAPHeader;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.w3c.dom.Element;
-
-/**
- * A WSDL Writer that writes a WSDL 1.1 file. It works off
- * of the WSDL20 Object Graph.
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- */
-public class WSDL11Writer extends WSDLWriter
-{
- //Used Internally
- private String wsdlStyle = Constants.RPC_LITERAL;
-
- // Used to prevent duplicates
- private HashSet<String> writtenFaultMessages = new HashSet<String>();
-
- /** Use WSDLDefinitions.writeWSDL instead. */
- public WSDL11Writer(WSDLDefinitions wsdl)
- {
- super(wsdl);
- }
-
- public void write(Writer writer) throws IOException
- {
- write(writer, null);
- }
-
-
- public void write(Writer writer, String charset) throws IOException
- {
- write(writer, charset, null);
- }
-
- public void write(Writer writer, String charset, WSDLWriterResolver resolver) throws
IOException
- {
- // Write out the wsdl-1.1 represention (only path to obtain is from WSDL11Reader)
- if (wsdl.getWsdlOneOneDefinition() != null)
- {
- Definition wsdlDefinition = wsdl.getWsdlOneOneDefinition();
- try
- {
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- javax.wsdl.xml.WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
- wsdlWriter.writeWSDL(wsdlDefinition, writer);
- }
- catch (WSDLException e)
- {
- this.logException(e);
- throw new IOException(e.toString());
- }
- }
- else
- {
- StringBuilder buffer = new StringBuilder();
-
- //Detect the WSDL Style early
- wsdlStyle = utils.getWSDLStyle(wsdl);
-
- StringBuilder importBuffer = new StringBuilder();
- for (WSDLImport wsdlImport : wsdl.getImports())
- {
- if (resolver == null)
- continue;
-
- WSDLWriterResolver resolved = resolver.resolve(wsdlImport.getLocation());
- if (resolved == null)
- continue;
-
- String namespace = wsdlImport.getNamespace();
- importBuffer.append("<import namespace='" + namespace +
"' location='" + resolved.actualFile + "'/>");
- if (resolved != null)
- {
- StringBuilder builder = new StringBuilder();
-
- 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);
- }
- }
-
- 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++)
- {
- appendMessage(buffer, operations[j]);
- appendMessagesForExceptions(buffer, operations[j]);
- }
- }
- }
-
- private void appendMessage(StringBuilder buffer, WSDLInterfaceOperation operation)
- {
- String opname = operation.getName().toString();
- //Determine the style of the wsdl
- if (Constants.URI_STYLE_RPC.equals(operation.getStyle()) == false)
- wsdlStyle = Constants.DOCUMENT_LITERAL; //Not RPC/Literal
-
- String interfaceName = operation.getWsdlInterface().getName().toString();
- buffer.append("<message name='" + interfaceName + "_" +
opname + "' >");
- for (WSDLInterfaceOperationInput input : operation.getInputs())
- appendMessageParts(buffer, input);
- buffer.append("</message>");
-
- if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
- {
- buffer.append("<message name='" + interfaceName + "_"
+ opname + "Response' >");
- WSDLInterfaceOperationOutput[] outputs = operation.getOutputs();
- for (WSDLInterfaceOperationOutput output : outputs)
- appendMessageParts(buffer, output);
- buffer.append("</message>");
- }
- }
-
- private void appendMessagesForExceptions(StringBuilder buffer, WSDLInterfaceOperation
operation)
- {
- //Get the outfaults
- WSDLInterfaceOperationOutfault[] faults = operation.getOutfaults();
- int len = faults != null ? faults.length : 0;
-
- for (int i = 0; i < len; i++)
- {
- WSDLInterfaceOperationOutfault fault = faults[i];
- String exceptionName = fault.getRef().getLocalPart();
- if (writtenFaultMessages.contains(exceptionName))
- continue;
-
- WSDLInterfaceFault interfaceFault = operation.getWsdlInterface().getFault(new
NCName(exceptionName));
- QName xmlName = interfaceFault.getElement();
-
- buffer.append("<message name='" + exceptionName + "'
>");
- String prefix = wsdl.getPrefix(xmlName.getNamespaceURI());
- String xmlNameStr = prefix + ":" + xmlName.getLocalPart();
- buffer.append("<part name='" + exceptionName + "'
element='" + xmlNameStr + "' />");
- buffer.append("</message>");
-
- writtenFaultMessages.add(exceptionName);
- }
- }
-
- private String getReferenceString(QName name)
- {
- String namespaceURI = name.getNamespaceURI();
- String prefix = wsdl.getPrefix(namespaceURI);
- if (prefix == null)
- throw new WSException("Prefix not bound for namespace: " +
namespaceURI);
-
- return prefix + ":" + name.getLocalPart();
- }
-
- private void appendMessageParts(StringBuilder buffer, WSDLInterfaceMessageReference
reference)
- {
- if (wsdlStyle.equals(Constants.RPC_LITERAL))
- {
- for (WSDLRPCPart part : reference.getChildParts())
- {
- buffer.append("<part name='" +
part.getName()).append('\'');
- buffer.append(" type='" + getReferenceString(part.getType()) +
"'/>");
- }
- }
- else
- {
- QName element = reference.getElement();
- // Null represents empty message
- if (element != null)
- {
- buffer.append("<part name='" + reference.getPartName() +
'\'');
- buffer.append(" element='" + getReferenceString(element) +
"'/>");
- }
- }
-
- WSDLBindingMessageReference bindingReference = getBindingReference(reference);
- if (bindingReference == null)
- return;
-
- for (WSDLSOAPHeader header : bindingReference.getSoapHeaders())
- {
- if (header.isIncludeInSignature());
- {
- QName element = header.getElement();
- buffer.append("<part name='" + header.getPartName() +
'\'');
- buffer.append(" element='" + getReferenceString(element) +
"'/>");
- }
- }
- }
-
- private WSDLBindingMessageReference getBindingReference(WSDLInterfaceMessageReference
reference)
- {
- WSDLInterfaceOperation operation = reference.getWsdlOperation();
- WSDLInterface wsdlInterface = operation.getWsdlInterface();
- WSDLBinding binding =
wsdlInterface.getWsdlDefinitions().getBindingByInterfaceName(wsdlInterface.getQName());
- WSDLBindingOperation bindingOperation =
binding.getOperationByRef(operation.getQName());
- WSDLBindingMessageReference[] bindingReferences;
-
- if (reference instanceof WSDLInterfaceOperationInput)
- bindingReferences = bindingOperation.getInputs();
- else
- bindingReferences = bindingOperation.getOutputs();
-
- if (bindingReferences.length > 1)
- throw new IllegalArgumentException("WSDl 1.1 only supports In-Only, and
In-Out MEPS, more than reference input found");
-
- if (bindingReferences.length == 1)
- return bindingReferences[0];
-
- return null;
- }
-
- protected void appendInterfaces(StringBuilder buffer, String namespace)
- {
- WSDLInterface[] intfs = wsdl.getInterfaces();
- for (int i = 0; i < intfs.length; i++)
- {
- WSDLInterface intf = intfs[i];
- if (!namespace.equals(intf.getQName().getNamespaceURI()))
- continue;
-
- buffer.append("<portType name='" + intf.getName() +
"'>");
- appendPortOperations(buffer, intf);
- buffer.append("</portType>");
- }
- }
-
- private String getParameterOrder(WSDLInterfaceOperation operation)
- {
- StringBuilder builder = new StringBuilder();
- for (WSDLRPCSignatureItem item : operation.getRpcSignatureItems())
- {
- if (item.getDirection() != Direction.RETURN)
- {
- if (builder.length() > 0)
- builder.append(' ');
- builder.append(item.getName());
- }
- }
-
- return builder.toString();
- }
-
- protected void appendPortOperations(StringBuilder buffer, WSDLInterface intf)
- {
- String prefix = wsdl.getPrefix(intf.getQName().getNamespaceURI());
- WSDLInterfaceOperation[] operations = intf.getSortedOperations();
- for (int i = 0; i < operations.length; i++)
- {
- WSDLInterfaceOperation operation = operations[i];
- buffer.append("<operation name='" +
operation.getName().toString() + "'");
-
- String parameterOrder = getParameterOrder(operation);
- if (parameterOrder.length() > 0)
- buffer.append("
parameterOrder='").append(parameterOrder).append("'");
- buffer.append(">");
-
- String opname = operation.getName().toString();
- String interfaceName = operation.getWsdlInterface().getName().toString();
- String msgEl = prefix + ":" + interfaceName + "_" + opname;
-
- buffer.append("<input message='" + msgEl +
"'>").append("</input>");
-
- if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
- {
- buffer.append("<output message='" + msgEl +
"Response'>");
- buffer.append("</output>");
- }
-
- //Append the Faults
- for (WSDLInterfaceOperationOutfault fault : operation.getOutfaults())
- {
- QName element = fault.getRef();
- buffer.append("<fault message='" +
utils.getFormattedString(element));
- buffer.append("' name='" + element.getLocalPart() +
"'/>");
- }
-
- buffer.append("</operation>");
- }
- }
-
- 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)
- throw new IllegalArgumentException("WSDL Style is null (should be rpc or
document");
- String style = "rpc";
- if (wsdlStyle.equals(Constants.DOCUMENT_LITERAL))
- style = "document";
- buffer.append("<" + soapPrefix + ":binding
transport='http://schemas.xmlsoap.org/soap/http' style='" + style +
"'/>");
- appendBindingOperations(buffer, binding);
- buffer.append("</binding>");
- }
- }
-
- protected void appendBindingOperations(StringBuilder buffer, WSDLBinding binding)
- {
- WSDLBindingOperation[] operations = binding.getOperations();
- Arrays.sort(operations);
-
- for (int i = 0; i < operations.length; i++)
- {
- WSDLBindingOperation operation = operations[i];
- String interfaceName =
operation.getWsdlBinding().getInterfaceName().getLocalPart();
-
- WSDLInterface wsdlInterface = wsdl.getInterface(new NCName(interfaceName));
- if (wsdlInterface == null)
- throw new WSException("WSDL Interface should not be null");
- WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(new
NCName(operation.getRef().getLocalPart()));
-
- buffer.append("<operation name='" +
interfaceOperation.getName() + "'>");
- String soapAction = (operation.getSOAPAction() != null ?
operation.getSOAPAction() : "");
- buffer.append("<" + soapPrefix + ":operation
soapAction=\"" + soapAction + "\"/>");
-
- WSDLBindingOperationInput[] inputs = operation.getInputs();
- if (inputs.length != 1)
- throw new WSException("WSDl 1.1 only supports In-Only, and In-Out
MEPS.");
-
- buffer.append("<input>");
- appendSOAPBinding(buffer, wsdlInterface, operation, inputs);
- buffer.append("</input>");
-
- if (!
Constants.WSDL20_PATTERN_IN_ONLY.equals(getBindingOperationPattern(operation)))
- {
- buffer.append("<output>");
- WSDLBindingOperationOutput[] outputs = operation.getOutputs();
- appendSOAPBinding(buffer, wsdlInterface, operation, outputs);
- buffer.append("</output>");
- }
-
- //Append faults
- WSDLInterfaceOperationOutfault[] faults = interfaceOperation.getOutfaults();
- if (faults != null)
- {
- for (WSDLInterfaceOperationOutfault fault : faults)
- {
- String n = "name='" + fault.getRef().getLocalPart() +
"'";
- buffer.append("<fault " + n + ">");
- buffer.append("<" + soapPrefix + ":fault " + n +
" use='literal' />");
- buffer.append("</fault>");
- }
- buffer.append("</operation>");
- }
- }
- }
-
- private void appendSOAPBinding(StringBuilder buffer, WSDLInterface wsdlInterface,
WSDLBindingOperation operation, WSDLBindingMessageReference[] inputs)
- {
- String tns = wsdl.getTargetNamespace();
- WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(new
NCName(operation.getRef().getLocalPart()));
- WSDLInterfaceMessageReference reference = (inputs instanceof
WSDLBindingOperationInput[]) ? interfaceOperation.getInputs()[0]
- : interfaceOperation.getOutputs()[0];
-
- StringBuilder bodyParts = new StringBuilder();
- if (Constants.DOCUMENT_LITERAL == wsdlStyle)
- {
- bodyParts.append(reference.getPartName());
- }
- else
- {
- for (WSDLRPCPart part : reference.getChildParts())
- {
- if (bodyParts.length() > 0)
- bodyParts.append(" ");
- bodyParts.append(part.getName());
- }
- }
-
- StringBuilder soapHeader = new StringBuilder();
- for (WSDLSOAPHeader header : inputs[0].getSoapHeaders())
- {
- if (header.isIncludeInSignature())
- {
- String messageName = wsdlInterface.getName() + "_" +
operation.getRef().getLocalPart();
- if (reference instanceof WSDLInterfaceOperationOutput)
- messageName += "Response";
- soapHeader.append("<").append(soapPrefix).append(":header
use='literal' message='tns:").append(messageName);
- soapHeader.append("'
part='").append(header.getElement().getLocalPart()).append("'/>");
- }
- }
-
- buffer.append("<" + soapPrefix + ":body
use='literal'");
- if (wsdlStyle != Constants.DOCUMENT_LITERAL)
- buffer.append(" namespace='" + tns + "'");
- if (soapHeader.length() > 0)
- {
- buffer.append("
parts='").append(bodyParts).append("'/>");
- buffer.append(soapHeader);
- }
- else
- {
- buffer.append("/>");
- }
- }
-
- private String getBindingOperationPattern(WSDLBindingOperation operation)
- {
- WSDLBinding binding = operation.getWsdlBinding();
- String pattern = binding.getInterface().getOperation(new
NCName(operation.getRef().getLocalPart())).getPattern();
-
- return pattern;
- }
-
- protected void appendServices(StringBuilder buffer, String namespace)
- {
- WSDLService[] services = wsdl.getServices();
- int len = services.length;
- for (int i = 0; i < len; i++)
- {
-
- 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;
- for (int j = 0; j < lenend; j++)
- {
- WSDLEndpoint endpoint = endpoints[j];
- appendServicePort(buffer, endpoint);
- }
-
- buffer.append("</service>");
- }
- }
-
- protected void appendServicePort(StringBuilder buffer, WSDLEndpoint endpoint)
- {
- String name = endpoint.getName().toString();
- QName endpointBinding = endpoint.getBinding();
- String prefix = endpointBinding.getPrefix();
- prefix = wsdl.getPrefix(endpointBinding.getNamespaceURI());
- String ebname = prefix + ":" + endpointBinding.getLocalPart();
- buffer.append("<port name='" + name + "'
binding='" + ebname + "'>");
- buffer.append("<" + soapPrefix + ":address location='" +
endpoint.getAddress() + "'/>");
- buffer.append("</port>");
- }
-}
\ No newline at end of file
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
(from rev 1580,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDL11Writer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDL11Writer.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,538 @@
+/*
+* 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.wsdl;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.HashSet;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.wsdl.NCName;
+import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.common.metadata.wsdl.WSDLBindingMessageReference;
+import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationInput;
+import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationOutput;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.common.metadata.wsdl.WSDLImport;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceMessageReference;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
+import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem;
+import org.jboss.ws.common.metadata.wsdl.WSDLSOAPHeader;
+import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.w3c.dom.Element;
+
+/**
+ * A WSDL Writer that writes a WSDL 1.1 file. It works off
+ * of the WSDL20 Object Graph.
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ */
+public class WSDL11Writer extends WSDLWriter
+{
+ //Used Internally
+ private String wsdlStyle = Constants.RPC_LITERAL;
+
+ // Used to prevent duplicates
+ private HashSet<String> writtenFaultMessages = new HashSet<String>();
+
+ /** Use WSDLDefinitions.writeWSDL instead. */
+ public WSDL11Writer(WSDLDefinitions wsdl)
+ {
+ super(wsdl);
+ }
+
+ public void write(Writer writer) throws IOException
+ {
+ write(writer, null);
+ }
+
+
+ public void write(Writer writer, String charset) throws IOException
+ {
+ write(writer, charset, null);
+ }
+
+ public void write(Writer writer, String charset, WSDLWriterResolver resolver) throws
IOException
+ {
+ // Write out the wsdl-1.1 represention (only path to obtain is from WSDL11Reader)
+ if (wsdl.getWsdlOneOneDefinition() != null)
+ {
+ Definition wsdlDefinition = wsdl.getWsdlOneOneDefinition();
+ try
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ javax.wsdl.xml.WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
+ wsdlWriter.writeWSDL(wsdlDefinition, writer);
+ }
+ catch (WSDLException e)
+ {
+ this.logException(e);
+ throw new IOException(e.toString());
+ }
+ }
+ else
+ {
+ StringBuilder buffer = new StringBuilder();
+
+ //Detect the WSDL Style early
+ wsdlStyle = utils.getWSDLStyle(wsdl);
+
+ StringBuilder importBuffer = new StringBuilder();
+ for (WSDLImport wsdlImport : wsdl.getImports())
+ {
+ if (resolver == null)
+ continue;
+
+ WSDLWriterResolver resolved = resolver.resolve(wsdlImport.getLocation());
+ if (resolved == null)
+ continue;
+
+ String namespace = wsdlImport.getNamespace();
+ importBuffer.append("<import namespace='" + namespace +
"' location='" + resolved.actualFile + "'/>");
+ if (resolved != null)
+ {
+ StringBuilder builder = new StringBuilder();
+
+ 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);
+ }
+ }
+
+ 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++)
+ {
+ appendMessage(buffer, operations[j]);
+ appendMessagesForExceptions(buffer, operations[j]);
+ }
+ }
+ }
+
+ private void appendMessage(StringBuilder buffer, WSDLInterfaceOperation operation)
+ {
+ String opname = operation.getName().toString();
+ //Determine the style of the wsdl
+ if (Constants.URI_STYLE_RPC.equals(operation.getStyle()) == false)
+ wsdlStyle = Constants.DOCUMENT_LITERAL; //Not RPC/Literal
+
+ String interfaceName = operation.getWsdlInterface().getName().toString();
+ buffer.append("<message name='" + interfaceName + "_" +
opname + "' >");
+ for (WSDLInterfaceOperationInput input : operation.getInputs())
+ appendMessageParts(buffer, input);
+ buffer.append("</message>");
+
+ if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
+ {
+ buffer.append("<message name='" + interfaceName + "_"
+ opname + "Response' >");
+ WSDLInterfaceOperationOutput[] outputs = operation.getOutputs();
+ for (WSDLInterfaceOperationOutput output : outputs)
+ appendMessageParts(buffer, output);
+ buffer.append("</message>");
+ }
+ }
+
+ private void appendMessagesForExceptions(StringBuilder buffer, WSDLInterfaceOperation
operation)
+ {
+ //Get the outfaults
+ WSDLInterfaceOperationOutfault[] faults = operation.getOutfaults();
+ int len = faults != null ? faults.length : 0;
+
+ for (int i = 0; i < len; i++)
+ {
+ WSDLInterfaceOperationOutfault fault = faults[i];
+ String exceptionName = fault.getRef().getLocalPart();
+ if (writtenFaultMessages.contains(exceptionName))
+ continue;
+
+ WSDLInterfaceFault interfaceFault = operation.getWsdlInterface().getFault(new
NCName(exceptionName));
+ QName xmlName = interfaceFault.getElement();
+
+ buffer.append("<message name='" + exceptionName + "'
>");
+ String prefix = wsdl.getPrefix(xmlName.getNamespaceURI());
+ String xmlNameStr = prefix + ":" + xmlName.getLocalPart();
+ buffer.append("<part name='" + exceptionName + "'
element='" + xmlNameStr + "' />");
+ buffer.append("</message>");
+
+ writtenFaultMessages.add(exceptionName);
+ }
+ }
+
+ private String getReferenceString(QName name)
+ {
+ String namespaceURI = name.getNamespaceURI();
+ String prefix = wsdl.getPrefix(namespaceURI);
+ if (prefix == null)
+ throw new WSException("Prefix not bound for namespace: " +
namespaceURI);
+
+ return prefix + ":" + name.getLocalPart();
+ }
+
+ private void appendMessageParts(StringBuilder buffer, WSDLInterfaceMessageReference
reference)
+ {
+ if (wsdlStyle.equals(Constants.RPC_LITERAL))
+ {
+ for (WSDLRPCPart part : reference.getChildParts())
+ {
+ buffer.append("<part name='" +
part.getName()).append('\'');
+ buffer.append(" type='" + getReferenceString(part.getType()) +
"'/>");
+ }
+ }
+ else
+ {
+ QName element = reference.getElement();
+ // Null represents empty message
+ if (element != null)
+ {
+ buffer.append("<part name='" + reference.getPartName() +
'\'');
+ buffer.append(" element='" + getReferenceString(element) +
"'/>");
+ }
+ }
+
+ WSDLBindingMessageReference bindingReference = getBindingReference(reference);
+ if (bindingReference == null)
+ return;
+
+ for (WSDLSOAPHeader header : bindingReference.getSoapHeaders())
+ {
+ if (header.isIncludeInSignature());
+ {
+ QName element = header.getElement();
+ buffer.append("<part name='" + header.getPartName() +
'\'');
+ buffer.append(" element='" + getReferenceString(element) +
"'/>");
+ }
+ }
+ }
+
+ private WSDLBindingMessageReference getBindingReference(WSDLInterfaceMessageReference
reference)
+ {
+ WSDLInterfaceOperation operation = reference.getWsdlOperation();
+ WSDLInterface wsdlInterface = operation.getWsdlInterface();
+ WSDLBinding binding =
wsdlInterface.getWsdlDefinitions().getBindingByInterfaceName(wsdlInterface.getQName());
+ WSDLBindingOperation bindingOperation =
binding.getOperationByRef(operation.getQName());
+ WSDLBindingMessageReference[] bindingReferences;
+
+ if (reference instanceof WSDLInterfaceOperationInput)
+ bindingReferences = bindingOperation.getInputs();
+ else
+ bindingReferences = bindingOperation.getOutputs();
+
+ if (bindingReferences.length > 1)
+ throw new IllegalArgumentException("WSDl 1.1 only supports In-Only, and
In-Out MEPS, more than reference input found");
+
+ if (bindingReferences.length == 1)
+ return bindingReferences[0];
+
+ return null;
+ }
+
+ protected void appendInterfaces(StringBuilder buffer, String namespace)
+ {
+ WSDLInterface[] intfs = wsdl.getInterfaces();
+ for (int i = 0; i < intfs.length; i++)
+ {
+ WSDLInterface intf = intfs[i];
+ if (!namespace.equals(intf.getQName().getNamespaceURI()))
+ continue;
+
+ buffer.append("<portType name='" + intf.getName() +
"'>");
+ appendPortOperations(buffer, intf);
+ buffer.append("</portType>");
+ }
+ }
+
+ private String getParameterOrder(WSDLInterfaceOperation operation)
+ {
+ StringBuilder builder = new StringBuilder();
+ for (WSDLRPCSignatureItem item : operation.getRpcSignatureItems())
+ {
+ if (item.getDirection() != Direction.RETURN)
+ {
+ if (builder.length() > 0)
+ builder.append(' ');
+ builder.append(item.getName());
+ }
+ }
+
+ return builder.toString();
+ }
+
+ protected void appendPortOperations(StringBuilder buffer, WSDLInterface intf)
+ {
+ String prefix = wsdl.getPrefix(intf.getQName().getNamespaceURI());
+ WSDLInterfaceOperation[] operations = intf.getSortedOperations();
+ for (int i = 0; i < operations.length; i++)
+ {
+ WSDLInterfaceOperation operation = operations[i];
+ buffer.append("<operation name='" +
operation.getName().toString() + "'");
+
+ String parameterOrder = getParameterOrder(operation);
+ if (parameterOrder.length() > 0)
+ buffer.append("
parameterOrder='").append(parameterOrder).append("'");
+ buffer.append(">");
+
+ String opname = operation.getName().toString();
+ String interfaceName = operation.getWsdlInterface().getName().toString();
+ String msgEl = prefix + ":" + interfaceName + "_" + opname;
+
+ buffer.append("<input message='" + msgEl +
"'>").append("</input>");
+
+ if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
+ {
+ buffer.append("<output message='" + msgEl +
"Response'>");
+ buffer.append("</output>");
+ }
+
+ //Append the Faults
+ for (WSDLInterfaceOperationOutfault fault : operation.getOutfaults())
+ {
+ QName element = fault.getRef();
+ buffer.append("<fault message='" +
utils.getFormattedString(element));
+ buffer.append("' name='" + element.getLocalPart() +
"'/>");
+ }
+
+ buffer.append("</operation>");
+ }
+ }
+
+ 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)
+ throw new IllegalArgumentException("WSDL Style is null (should be rpc or
document");
+ String style = "rpc";
+ if (wsdlStyle.equals(Constants.DOCUMENT_LITERAL))
+ style = "document";
+ buffer.append("<" + soapPrefix + ":binding
transport='http://schemas.xmlsoap.org/soap/http' style='" + style +
"'/>");
+ appendBindingOperations(buffer, binding);
+ buffer.append("</binding>");
+ }
+ }
+
+ protected void appendBindingOperations(StringBuilder buffer, WSDLBinding binding)
+ {
+ WSDLBindingOperation[] operations = binding.getOperations();
+ Arrays.sort(operations);
+
+ for (int i = 0; i < operations.length; i++)
+ {
+ WSDLBindingOperation operation = operations[i];
+ String interfaceName =
operation.getWsdlBinding().getInterfaceName().getLocalPart();
+
+ WSDLInterface wsdlInterface = wsdl.getInterface(new NCName(interfaceName));
+ if (wsdlInterface == null)
+ throw new WSException("WSDL Interface should not be null");
+ WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(new
NCName(operation.getRef().getLocalPart()));
+
+ buffer.append("<operation name='" +
interfaceOperation.getName() + "'>");
+ String soapAction = (operation.getSOAPAction() != null ?
operation.getSOAPAction() : "");
+ buffer.append("<" + soapPrefix + ":operation
soapAction=\"" + soapAction + "\"/>");
+
+ WSDLBindingOperationInput[] inputs = operation.getInputs();
+ if (inputs.length != 1)
+ throw new WSException("WSDl 1.1 only supports In-Only, and In-Out
MEPS.");
+
+ buffer.append("<input>");
+ appendSOAPBinding(buffer, wsdlInterface, operation, inputs);
+ buffer.append("</input>");
+
+ if (!
Constants.WSDL20_PATTERN_IN_ONLY.equals(getBindingOperationPattern(operation)))
+ {
+ buffer.append("<output>");
+ WSDLBindingOperationOutput[] outputs = operation.getOutputs();
+ appendSOAPBinding(buffer, wsdlInterface, operation, outputs);
+ buffer.append("</output>");
+ }
+
+ //Append faults
+ WSDLInterfaceOperationOutfault[] faults = interfaceOperation.getOutfaults();
+ if (faults != null)
+ {
+ for (WSDLInterfaceOperationOutfault fault : faults)
+ {
+ String n = "name='" + fault.getRef().getLocalPart() +
"'";
+ buffer.append("<fault " + n + ">");
+ buffer.append("<" + soapPrefix + ":fault " + n +
" use='literal' />");
+ buffer.append("</fault>");
+ }
+ buffer.append("</operation>");
+ }
+ }
+ }
+
+ private void appendSOAPBinding(StringBuilder buffer, WSDLInterface wsdlInterface,
WSDLBindingOperation operation, WSDLBindingMessageReference[] inputs)
+ {
+ String tns = wsdl.getTargetNamespace();
+ WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(new
NCName(operation.getRef().getLocalPart()));
+ WSDLInterfaceMessageReference reference = (inputs instanceof
WSDLBindingOperationInput[]) ? interfaceOperation.getInputs()[0]
+ : interfaceOperation.getOutputs()[0];
+
+ StringBuilder bodyParts = new StringBuilder();
+ if (Constants.DOCUMENT_LITERAL == wsdlStyle)
+ {
+ bodyParts.append(reference.getPartName());
+ }
+ else
+ {
+ for (WSDLRPCPart part : reference.getChildParts())
+ {
+ if (bodyParts.length() > 0)
+ bodyParts.append(" ");
+ bodyParts.append(part.getName());
+ }
+ }
+
+ StringBuilder soapHeader = new StringBuilder();
+ for (WSDLSOAPHeader header : inputs[0].getSoapHeaders())
+ {
+ if (header.isIncludeInSignature())
+ {
+ String messageName = wsdlInterface.getName() + "_" +
operation.getRef().getLocalPart();
+ if (reference instanceof WSDLInterfaceOperationOutput)
+ messageName += "Response";
+ soapHeader.append("<").append(soapPrefix).append(":header
use='literal' message='tns:").append(messageName);
+ soapHeader.append("'
part='").append(header.getElement().getLocalPart()).append("'/>");
+ }
+ }
+
+ buffer.append("<" + soapPrefix + ":body
use='literal'");
+ if (wsdlStyle != Constants.DOCUMENT_LITERAL)
+ buffer.append(" namespace='" + tns + "'");
+ if (soapHeader.length() > 0)
+ {
+ buffer.append("
parts='").append(bodyParts).append("'/>");
+ buffer.append(soapHeader);
+ }
+ else
+ {
+ buffer.append("/>");
+ }
+ }
+
+ private String getBindingOperationPattern(WSDLBindingOperation operation)
+ {
+ WSDLBinding binding = operation.getWsdlBinding();
+ String pattern = binding.getInterface().getOperation(new
NCName(operation.getRef().getLocalPart())).getPattern();
+
+ return pattern;
+ }
+
+ protected void appendServices(StringBuilder buffer, String namespace)
+ {
+ WSDLService[] services = wsdl.getServices();
+ int len = services.length;
+ for (int i = 0; i < len; i++)
+ {
+
+ 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;
+ for (int j = 0; j < lenend; j++)
+ {
+ WSDLEndpoint endpoint = endpoints[j];
+ appendServicePort(buffer, endpoint);
+ }
+
+ buffer.append("</service>");
+ }
+ }
+
+ protected void appendServicePort(StringBuilder buffer, WSDLEndpoint endpoint)
+ {
+ String name = endpoint.getName().toString();
+ QName endpointBinding = endpoint.getBinding();
+ String prefix = endpointBinding.getPrefix();
+ prefix = wsdl.getPrefix(endpointBinding.getNamespaceURI());
+ String ebname = prefix + ":" + endpointBinding.getLocalPart();
+ buffer.append("<port name='" + name + "'
binding='" + ebname + "'>");
+ buffer.append("<" + soapPrefix + ":address location='" +
endpoint.getAddress() + "'/>");
+ buffer.append("</port>");
+ }
+}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLDefinitionsFactory.java 2006-12-06
14:17:04 UTC (rev 1575)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,196 +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.common.wsdl;
-
-// $Id$
-
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.net.ConnectException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.parsers.DocumentBuilder;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.EntityResolver;
-
-import com.ibm.wsdl.xml.WSDLReaderImpl;
-
-/**
- * A factory that creates a <code>WSDLDefinitions</code> object from an URL.
- *
- * This implementations deals with different WSDL versions so that clients of this
- * factory do need to know about WSDL version specifics. The Java object view of the
- * WSDL document (WSDLDefinitions) is modeled on WSDL-2.0
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Oct-2004
- */
-public class WSDLDefinitionsFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(WSDLDefinitionsFactory.class);
-
- // This feature is set by default in wsdl4j, it means the object structure contains
the imported arguments
- public static final String FEATURE_IMPORT_DOCUMENTS =
"javax.wsdl.importDocuments";
- // Set this feature for additional debugging output
- public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
-
- // The WSDL reader features
- private Map features = new HashMap();
-
- // Hide constructor
- private WSDLDefinitionsFactory()
- {
- }
-
- /**
- * Create a new instance of a wsdl factory
- */
- public static WSDLDefinitionsFactory newInstance()
- {
- return new WSDLDefinitionsFactory();
- }
-
- /**
- * Set a feature on the underlying reader
- */
- public void setFeature(String name, boolean value) throws IllegalArgumentException
- {
- features.put(name, new Boolean(value));
- }
-
- /**
- * Read the wsdl document from the given URL
- */
- public WSDLDefinitions parse(URL wsdlLocation) throws WSDLException
- {
- if (wsdlLocation == null)
- throw new IllegalArgumentException("URL cannot be null");
-
- log.debug("parse: " + wsdlLocation.toExternalForm());
-
- EntityResolver entityResolver = new JBossWSEntityResolver();
- WSDLDefinitions wsdlDefinitions = null;
- try
- {
- Document wsdlDoc = getDocument(wsdlLocation);
- String defaultNamespace = getDefaultNamespace(wsdlDoc);
- if (Constants.NS_WSDL11.equals(defaultNamespace))
- {
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
- wsdlReader.setFeature("javax.wsdl.verbose", false);
-
- // Setup reader features
- Iterator it = features.entrySet().iterator();
- while (it.hasNext())
- {
- Map.Entry entry = (Map.Entry)it.next();
- String key = (String)entry.getKey();
- Boolean flag = (Boolean)entry.getValue();
- wsdlReader.setFeature(key, flag.booleanValue());
- }
-
- // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
- ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
-
- Definition definition = wsdlReader.readWSDL(new
WSDLLocatorImpl(entityResolver, wsdlLocation));
- wsdlDefinitions = new WSDL11Reader().processDefinition(definition,
wsdlLocation);
- wsdlDefinitions.setWsdlDocument(wsdlDoc);
- }
- else
- throw new WSDLException("Invalid default namespace: " +
defaultNamespace);
-
- if (log.isTraceEnabled())
- {
- StringWriter stwr = new StringWriter();
- WSDL11Writer wsdlWriter = new WSDL11Writer(wsdlDefinitions);
- wsdlWriter.write(stwr);
- log.trace("\n" + stwr.toString());
- }
- }
- catch (WSDLException e)
- {
- throw e;
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new WSDLException(e);
- }
-
- return wsdlDefinitions;
- }
-
- /** Get the WSDL document.
- */
- private Document getDocument(URL wsdlLocation) throws WSDLException
- {
- try
- {
- InputStream wsdlInputStream = wsdlLocation.openStream();
- try
- {
- DocumentBuilder builder = DOMUtils.getDocumentBuilder();
- return builder.parse(wsdlInputStream);
- }
- finally
- {
- wsdlInputStream.close();
- }
- }
- catch (ConnectException ex)
- {
- throw new WSDLException("Cannot connect to: " + wsdlLocation);
- }
- catch (Exception ex)
- {
- throw new WSDLException("Cannot parse wsdlLocation: " + wsdlLocation,
ex);
- }
- }
-
- /** Get the default namespace for the given WSDL
- */
- private String getDefaultNamespace(Document wsdlDoc) throws WSDLException
- {
- Element root = wsdlDoc.getDocumentElement();
- String defaultNamespace = root.getNamespaceURI();
- return defaultNamespace;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
(from rev 1580,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLDefinitionsFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLDefinitionsFactory.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,196 @@
+/*
+* 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.wsdl;
+
+// $Id$
+
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.ConnectException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.parsers.DocumentBuilder;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLException;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.EntityResolver;
+
+import com.ibm.wsdl.xml.WSDLReaderImpl;
+
+/**
+ * A factory that creates a <code>WSDLDefinitions</code> object from an URL.
+ *
+ * This implementations deals with different WSDL versions so that clients of this
+ * factory do need to know about WSDL version specifics. The Java object view of the
+ * WSDL document (WSDLDefinitions) is modeled on WSDL-2.0
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLDefinitionsFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDLDefinitionsFactory.class);
+
+ // This feature is set by default in wsdl4j, it means the object structure contains
the imported arguments
+ public static final String FEATURE_IMPORT_DOCUMENTS =
"javax.wsdl.importDocuments";
+ // Set this feature for additional debugging output
+ public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
+
+ // The WSDL reader features
+ private Map features = new HashMap();
+
+ // Hide constructor
+ private WSDLDefinitionsFactory()
+ {
+ }
+
+ /**
+ * Create a new instance of a wsdl factory
+ */
+ public static WSDLDefinitionsFactory newInstance()
+ {
+ return new WSDLDefinitionsFactory();
+ }
+
+ /**
+ * Set a feature on the underlying reader
+ */
+ public void setFeature(String name, boolean value) throws IllegalArgumentException
+ {
+ features.put(name, new Boolean(value));
+ }
+
+ /**
+ * Read the wsdl document from the given URL
+ */
+ public WSDLDefinitions parse(URL wsdlLocation) throws WSDLException
+ {
+ if (wsdlLocation == null)
+ throw new IllegalArgumentException("URL cannot be null");
+
+ log.debug("parse: " + wsdlLocation.toExternalForm());
+
+ EntityResolver entityResolver = new JBossWSEntityResolver();
+ WSDLDefinitions wsdlDefinitions = null;
+ try
+ {
+ Document wsdlDoc = getDocument(wsdlLocation);
+ String defaultNamespace = getDefaultNamespace(wsdlDoc);
+ if (Constants.NS_WSDL11.equals(defaultNamespace))
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose", false);
+
+ // Setup reader features
+ Iterator it = features.entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Map.Entry)it.next();
+ String key = (String)entry.getKey();
+ Boolean flag = (Boolean)entry.getValue();
+ wsdlReader.setFeature(key, flag.booleanValue());
+ }
+
+ // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
+ ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
+
+ Definition definition = wsdlReader.readWSDL(new
WSDLLocatorImpl(entityResolver, wsdlLocation));
+ wsdlDefinitions = new WSDL11Reader().processDefinition(definition,
wsdlLocation);
+ wsdlDefinitions.setWsdlDocument(wsdlDoc);
+ }
+ else
+ throw new WSDLException("Invalid default namespace: " +
defaultNamespace);
+
+ if (log.isTraceEnabled())
+ {
+ StringWriter stwr = new StringWriter();
+ WSDL11Writer wsdlWriter = new WSDL11Writer(wsdlDefinitions);
+ wsdlWriter.write(stwr);
+ log.trace("\n" + stwr.toString());
+ }
+ }
+ catch (WSDLException e)
+ {
+ throw e;
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new WSDLException(e);
+ }
+
+ return wsdlDefinitions;
+ }
+
+ /** Get the WSDL document.
+ */
+ private Document getDocument(URL wsdlLocation) throws WSDLException
+ {
+ try
+ {
+ InputStream wsdlInputStream = wsdlLocation.openStream();
+ try
+ {
+ DocumentBuilder builder = DOMUtils.getDocumentBuilder();
+ return builder.parse(wsdlInputStream);
+ }
+ finally
+ {
+ wsdlInputStream.close();
+ }
+ }
+ catch (ConnectException ex)
+ {
+ throw new WSDLException("Cannot connect to: " + wsdlLocation);
+ }
+ catch (Exception ex)
+ {
+ throw new WSDLException("Cannot parse wsdlLocation: " + wsdlLocation,
ex);
+ }
+ }
+
+ /** Get the default namespace for the given WSDL
+ */
+ private String getDefaultNamespace(Document wsdlDoc) throws WSDLException
+ {
+ Element root = wsdlDoc.getDocumentElement();
+ String defaultNamespace = root.getNamespaceURI();
+ return defaultNamespace;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLLocatorImpl.java 2006-12-06
14:17:04 UTC (rev 1575)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,159 +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.common.wsdl;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.wsdl.xml.WSDLLocator;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-/* A WSDLLocator that can handle wsdl imports
- */
-class WSDLLocatorImpl implements WSDLLocator
-{
- // provide logging
- private static final Logger log = Logger.getLogger(WSDLDefinitionsFactory.class);
-
- private EntityResolver entityResolver;
- private URL wsdlURL;
- private String latestImportURI;
-
- public WSDLLocatorImpl(EntityResolver entityResolver, URL wsdlFile)
- {
- if (wsdlFile == null)
- throw new IllegalArgumentException("WSDL file argument cannot be
null");
-
- this.entityResolver = entityResolver;
- this.wsdlURL = wsdlFile;
- }
-
- public InputSource getBaseInputSource()
- {
- log.trace("getBaseInputSource [wsdlUrl=" + wsdlURL + "]");
- try
- {
- InputStream is = wsdlURL.openStream();
- if (is == null)
- throw new IllegalArgumentException("Cannot obtain wsdl from [" +
wsdlURL + "]");
-
- return new InputSource(is);
- }
- catch (IOException e)
- {
- throw new RuntimeException("Cannot access wsdl from [" + wsdlURL +
"], " + e.getMessage());
- }
- }
-
- public String getBaseURI()
- {
- return wsdlURL.toExternalForm();
- }
-
- public InputSource getImportInputSource(String parent, String resource)
- {
- log.trace("getImportInputSource [parent=" + parent +
",resource=" + resource + "]");
-
- URL parentURL = null;
- try
- {
- parentURL = new URL(parent);
- }
- catch (MalformedURLException e)
- {
- log.error("Not a valid URL: " + parent);
- return null;
- }
-
- String wsdlImport = null;
- String external = parentURL.toExternalForm();
-
- // An external URL
- if (resource.startsWith("http://") ||
resource.startsWith("https://"))
- {
- wsdlImport = resource;
- }
-
- // Absolute path
- else if (resource.startsWith("/"))
- {
- String beforePath = external.substring(0,
external.indexOf(parentURL.getPath()));
- wsdlImport = beforePath + resource;
- }
-
- // A relative path
- else
- {
- String parentDir = external.substring(0, external.lastIndexOf("/"));
-
- // remove references to current dir
- while (resource.startsWith("./"))
- resource = resource.substring(2);
-
- // remove references to parentdir
- while (resource.startsWith("../"))
- {
- parentDir = parentDir.substring(0, parentDir.lastIndexOf("/"));
- resource = resource.substring(3);
- }
-
- wsdlImport = parentDir + "/" + resource;
- }
-
- try
- {
- log.trace("Trying to resolve: " + wsdlImport);
- InputSource inputSource = entityResolver.resolveEntity(wsdlImport, wsdlImport);
- if (inputSource != null)
- {
- latestImportURI = wsdlImport;
- }
- else
- {
- throw new IllegalArgumentException("Cannot resolve imported resource:
" + wsdlImport);
- }
-
- return inputSource;
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new WSException("Cannot access imported wsdl [" + wsdlImport +
"], " + e.getMessage());
- }
- }
-
- public String getLatestImportURI()
- {
- return latestImportURI;
- }
-}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java
(from rev 1580,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLLocatorImpl.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLLocatorImpl.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,159 @@
+/*
+ * 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.wsdl;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.wsdl.xml.WSDLLocator;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.WSException;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+
+/* A WSDLLocator that can handle wsdl imports
+ */
+class WSDLLocatorImpl implements WSDLLocator
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDLDefinitionsFactory.class);
+
+ private EntityResolver entityResolver;
+ private URL wsdlURL;
+ private String latestImportURI;
+
+ public WSDLLocatorImpl(EntityResolver entityResolver, URL wsdlFile)
+ {
+ if (wsdlFile == null)
+ throw new IllegalArgumentException("WSDL file argument cannot be
null");
+
+ this.entityResolver = entityResolver;
+ this.wsdlURL = wsdlFile;
+ }
+
+ public InputSource getBaseInputSource()
+ {
+ log.trace("getBaseInputSource [wsdlUrl=" + wsdlURL + "]");
+ try
+ {
+ InputStream is = wsdlURL.openStream();
+ if (is == null)
+ throw new IllegalArgumentException("Cannot obtain wsdl from [" +
wsdlURL + "]");
+
+ return new InputSource(is);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Cannot access wsdl from [" + wsdlURL +
"], " + e.getMessage());
+ }
+ }
+
+ public String getBaseURI()
+ {
+ return wsdlURL.toExternalForm();
+ }
+
+ public InputSource getImportInputSource(String parent, String resource)
+ {
+ log.trace("getImportInputSource [parent=" + parent +
",resource=" + resource + "]");
+
+ URL parentURL = null;
+ try
+ {
+ parentURL = new URL(parent);
+ }
+ catch (MalformedURLException e)
+ {
+ log.error("Not a valid URL: " + parent);
+ return null;
+ }
+
+ String wsdlImport = null;
+ String external = parentURL.toExternalForm();
+
+ // An external URL
+ if (resource.startsWith("http://") ||
resource.startsWith("https://"))
+ {
+ wsdlImport = resource;
+ }
+
+ // Absolute path
+ else if (resource.startsWith("/"))
+ {
+ String beforePath = external.substring(0,
external.indexOf(parentURL.getPath()));
+ wsdlImport = beforePath + resource;
+ }
+
+ // A relative path
+ else
+ {
+ String parentDir = external.substring(0, external.lastIndexOf("/"));
+
+ // remove references to current dir
+ while (resource.startsWith("./"))
+ resource = resource.substring(2);
+
+ // remove references to parentdir
+ while (resource.startsWith("../"))
+ {
+ parentDir = parentDir.substring(0, parentDir.lastIndexOf("/"));
+ resource = resource.substring(3);
+ }
+
+ wsdlImport = parentDir + "/" + resource;
+ }
+
+ try
+ {
+ log.trace("Trying to resolve: " + wsdlImport);
+ InputSource inputSource = entityResolver.resolveEntity(wsdlImport, wsdlImport);
+ if (inputSource != null)
+ {
+ latestImportURI = wsdlImport;
+ }
+ else
+ {
+ throw new IllegalArgumentException("Cannot resolve imported resource:
" + wsdlImport);
+ }
+
+ return inputSource;
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot access imported wsdl [" + wsdlImport +
"], " + e.getMessage());
+ }
+ }
+
+ public String getLatestImportURI()
+ {
+ return latestImportURI;
+ }
+}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLWriter.java 2006-12-06
14:17:04 UTC (rev 1575)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,228 +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.common.wsdl;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.DOMTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.XSModelTypes;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.w3c.dom.Element;
-
-/**
- * A helper that writes out a WSDL definition
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @since 10-Oct-2004
- */
-public class WSDLWriter
-{
- // provide logging
- protected static final Logger log = Logger.getLogger(WSDLWriter.class);
-
- protected WSDLDefinitions wsdl;
- protected WSDLUtils utils = WSDLUtils.getInstance();
-
- // The soap prefix
- protected String soapPrefix = "soap";
-
- /**
- * Include or import WSDL Types
- */
- protected boolean includeSchemaInWSDL = true;
-
- /** Use WSDLDefinitions.writeWSDL instead. */
- public WSDLWriter(WSDLDefinitions wsdl)
- {
- if (wsdl == null)
- throw new IllegalArgumentException("WSDL definitions is NULL");
-
- this.wsdl = wsdl;
- }
-
- /** 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, WSDLWriterResolver resolver) throws
IOException
- {
- String wsdlNamespace = wsdl.getWsdlNamespace();
- if (Constants.NS_WSDL11.equals(wsdlNamespace))
- {
- WSDL11Writer wsdl11Writer = new WSDL11Writer(wsdl);
- wsdl11Writer.write(writer, charset, resolver);
- }
- else
- {
- throw new WSException("Unsupported wsdl version: " + wsdlNamespace);
- }
- }
-
- public void write(Writer writer) throws IOException
- {
- StringBuilder buffer = new StringBuilder();
- buffer.append(Constants.XML_HEADER);
-
- appendDefinitions(buffer, wsdl.getTargetNamespace());
- appendTypes(buffer, wsdl.getTargetNamespace());
- appendInterfaces(buffer, wsdl.getTargetNamespace());
- appendBindings(buffer, wsdl.getTargetNamespace());
- appendServices(buffer, wsdl.getTargetNamespace());
-
- buffer.append("</definitions>");
-
- Element element = DOMUtils.parse(buffer.toString());
- new DOMWriter(writer).setPrettyprint(true).print(element);
- }
-
- protected void appendDefinitions(StringBuilder buffer, String namespace)
- {
- buffer.append("<definitions");
- //Append service name as done by wscompile, if there is just one
- WSDLService[] services = wsdl.getServices();
- if (services != null && services.length == 1)
- {
- WSDLService ser = services[0];
- buffer.append(" name='" + ser.getName() + "'");
- }
- buffer.append(" targetNamespace='" + namespace + "'");
- buffer.append(" xmlns='" + wsdl.getWsdlNamespace() +
"'");
-
- Iterator it = wsdl.getRegisteredNamespaceURIs();
- while (it.hasNext())
- {
- String namespaceURI = (String)it.next();
- String prefix = wsdl.getPrefix(namespaceURI);
- if (prefix.length() > 0)
- {
- buffer.append(" xmlns:" + prefix + "='" +
namespaceURI + "'");
- if (Constants.PREFIX_SOAP11.equals(prefix) ||
Constants.PREFIX_SOAP12.equals(prefix))
- soapPrefix = prefix;
- }
- }
- buffer.append(">");
- }
-
- 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>");
- JBossXSModel xsM = WSDLUtils.getSchemaModel(wsdlTypes);
- String schema = xsM.serialize();
- buffer.append(schema);
- buffer.append("</types>");
- }
- else if (wsdlTypes instanceof DOMTypes)
- {
- synchronized (wsdlTypes)
- {
- buffer.append(DOMWriter.printNode(((DOMTypes)wsdlTypes).getElement(),
true));
- }
- }
- }
-
- protected void appendInterfaces(StringBuilder buffer, String namespace)
- {
- }
-
- protected void appendBindings(StringBuilder buffer, String namespace)
- {
- }
-
- protected void appendServices(StringBuilder buffer, String namespace)
- {
- }
-
- /** Get a prefixed name of form prefix:localPart */
- protected String getQNameRef(QName qname)
- {
- String retStr = qname.getLocalPart();
-
- String prefix = qname.getPrefix();
- String nsURI = qname.getNamespaceURI();
- if (prefix.length() == 0 && nsURI.length() > 0)
- {
- qname = wsdl.registerQName(qname);
- prefix = qname.getPrefix();
- }
-
- if (prefix.length() > 0)
- retStr = prefix + ":" + retStr;
-
- return retStr;
- }
-
- public WSDLDefinitions getWsdl()
- {
- return wsdl;
- }
-
- public void setWsdl(WSDLDefinitions wsdl)
- {
- this.wsdl = wsdl;
- }
-
- public boolean isIncludeTypesInWSDL()
- {
- return includeSchemaInWSDL;
- }
-
- public void logException(Exception e)
- {
- if (log.isTraceEnabled())
- {
- log.trace(e);
- }
- }
-
- public void logMessage(String msg)
- {
- if (log.isTraceEnabled())
- {
- log.trace(msg);
- }
- }
-}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
(from rev 1580,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLWriter.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLWriter.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,228 @@
+/*
+ * 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.wsdl;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.wsdl.DOMTypes;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.metadata.wsdl.XSModelTypes;
+import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.w3c.dom.Element;
+
+/**
+ * A helper that writes out a WSDL definition
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLWriter
+{
+ // provide logging
+ protected static final Logger log = Logger.getLogger(WSDLWriter.class);
+
+ protected WSDLDefinitions wsdl;
+ protected WSDLUtils utils = WSDLUtils.getInstance();
+
+ // The soap prefix
+ protected String soapPrefix = "soap";
+
+ /**
+ * Include or import WSDL Types
+ */
+ protected boolean includeSchemaInWSDL = true;
+
+ /** Use WSDLDefinitions.writeWSDL instead. */
+ public WSDLWriter(WSDLDefinitions wsdl)
+ {
+ if (wsdl == null)
+ throw new IllegalArgumentException("WSDL definitions is NULL");
+
+ this.wsdl = wsdl;
+ }
+
+ /** 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, WSDLWriterResolver resolver) throws
IOException
+ {
+ String wsdlNamespace = wsdl.getWsdlNamespace();
+ if (Constants.NS_WSDL11.equals(wsdlNamespace))
+ {
+ WSDL11Writer wsdl11Writer = new WSDL11Writer(wsdl);
+ wsdl11Writer.write(writer, charset, resolver);
+ }
+ else
+ {
+ throw new WSException("Unsupported wsdl version: " + wsdlNamespace);
+ }
+ }
+
+ public void write(Writer writer) throws IOException
+ {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append(Constants.XML_HEADER);
+
+ appendDefinitions(buffer, wsdl.getTargetNamespace());
+ appendTypes(buffer, wsdl.getTargetNamespace());
+ appendInterfaces(buffer, wsdl.getTargetNamespace());
+ appendBindings(buffer, wsdl.getTargetNamespace());
+ appendServices(buffer, wsdl.getTargetNamespace());
+
+ buffer.append("</definitions>");
+
+ Element element = DOMUtils.parse(buffer.toString());
+ new DOMWriter(writer).setPrettyprint(true).print(element);
+ }
+
+ protected void appendDefinitions(StringBuilder buffer, String namespace)
+ {
+ buffer.append("<definitions");
+ //Append service name as done by wscompile, if there is just one
+ WSDLService[] services = wsdl.getServices();
+ if (services != null && services.length == 1)
+ {
+ WSDLService ser = services[0];
+ buffer.append(" name='" + ser.getName() + "'");
+ }
+ buffer.append(" targetNamespace='" + namespace + "'");
+ buffer.append(" xmlns='" + wsdl.getWsdlNamespace() +
"'");
+
+ Iterator it = wsdl.getRegisteredNamespaceURIs();
+ while (it.hasNext())
+ {
+ String namespaceURI = (String)it.next();
+ String prefix = wsdl.getPrefix(namespaceURI);
+ if (prefix.length() > 0)
+ {
+ buffer.append(" xmlns:" + prefix + "='" +
namespaceURI + "'");
+ if (Constants.PREFIX_SOAP11.equals(prefix) ||
Constants.PREFIX_SOAP12.equals(prefix))
+ soapPrefix = prefix;
+ }
+ }
+ buffer.append(">");
+ }
+
+ 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>");
+ JBossXSModel xsM = WSDLUtils.getSchemaModel(wsdlTypes);
+ String schema = xsM.serialize();
+ buffer.append(schema);
+ buffer.append("</types>");
+ }
+ else if (wsdlTypes instanceof DOMTypes)
+ {
+ synchronized (wsdlTypes)
+ {
+ buffer.append(DOMWriter.printNode(((DOMTypes)wsdlTypes).getElement(),
true));
+ }
+ }
+ }
+
+ protected void appendInterfaces(StringBuilder buffer, String namespace)
+ {
+ }
+
+ protected void appendBindings(StringBuilder buffer, String namespace)
+ {
+ }
+
+ protected void appendServices(StringBuilder buffer, String namespace)
+ {
+ }
+
+ /** Get a prefixed name of form prefix:localPart */
+ protected String getQNameRef(QName qname)
+ {
+ String retStr = qname.getLocalPart();
+
+ String prefix = qname.getPrefix();
+ String nsURI = qname.getNamespaceURI();
+ if (prefix.length() == 0 && nsURI.length() > 0)
+ {
+ qname = wsdl.registerQName(qname);
+ prefix = qname.getPrefix();
+ }
+
+ if (prefix.length() > 0)
+ retStr = prefix + ":" + retStr;
+
+ return retStr;
+ }
+
+ public WSDLDefinitions getWsdl()
+ {
+ return wsdl;
+ }
+
+ public void setWsdl(WSDLDefinitions wsdl)
+ {
+ this.wsdl = wsdl;
+ }
+
+ public boolean isIncludeTypesInWSDL()
+ {
+ return includeSchemaInWSDL;
+ }
+
+ public void logException(Exception e)
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace(e);
+ }
+ }
+
+ public void logMessage(String msg)
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace(msg);
+ }
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriterResolver.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLWriterResolver.java 2006-12-06
14:17:04 UTC (rev 1575)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriterResolver.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,43 +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.common.wsdl;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * A helper that writes out a WSDL definition
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @since 10-Oct-2004
- */
-public abstract class WSDLWriterResolver
-{
- public String actualFile;
- public String charset;
- public Writer writer;
-
- public abstract WSDLWriterResolver resolve(String suggestedFile) throws IOException;
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriterResolver.java
(from rev 1580,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLWriterResolver.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/wsdl/WSDLWriterResolver.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriterResolver.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.tools.wsdl;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * A helper that writes out a WSDL definition
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public abstract class WSDLWriterResolver
+{
+ public String actualFile;
+ public String charset;
+ public Writer writer;
+
+ public abstract WSDLWriterResolver resolve(String suggestedFile) throws IOException;
+}
Modified:
branches/tdiesler/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
---
branches/tdiesler/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -4,7 +4,7 @@
xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="ServiceEndpointManager"
class="org.jboss.ws.server.ServiceEndpointManager">
+ <bean name="ServiceEndpointManager"
class="org.jboss.ws.core.server.ServiceEndpointManager">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a
<soap:address>
@@ -20,7 +20,7 @@
<property name="webServicePort">8080</property>
<property name="alwaysModifySOAPAddress">true</property>
- <property
name="serviceEndpointInvokerJSE">org.jboss.ws.server.ServiceEndpointInvokerJSE</property>
+ <property
name="serviceEndpointInvokerJSE">org.jboss.ws.core.server.ServiceEndpointInvokerJSE</property>
<property
name="serviceEndpointInvokerEJB3">org.jboss.ws.integration.jboss50.ServiceEndpointInvokerEJB3</property>
<!-- Not implemented
<property
name="serviceEndpointInvokerEJB21">org.jboss.ws.integration.jboss50.ServiceEndpointInvokerEJB21</property>
@@ -28,7 +28,7 @@
-->
</bean>
- <bean name="ServiceEndpointDeployer"
class="org.jboss.ws.deployment.ServiceEndpointDeployer">
+ <bean name="ServiceEndpointDeployer"
class="org.jboss.ws.core.server.ServiceEndpointDeployer">
<property name="serviceEndpointManager">
<inject bean="ServiceEndpointManager"/>
</property>
@@ -43,11 +43,11 @@
<bean name="ServiceRefHandler"
class="org.jboss.ws.integration.jboss50.ServiceRefHandler"/>
<!-- A subscription manager for WS-Eventing -->
- <bean name="SubscriptionManager"
class="org.jboss.ws.eventing.mgmt.SubscriptionManager"/>
+ <bean name="SubscriptionManager"
class="org.jboss.ws.extras.eventing.mgmt.SubscriptionManager"/>
<bean name="ServerConfig"
class="org.jboss.ws.integration.jboss50.ServerConfigImpl"/>
- <bean name="KernelLocator"
class="org.jboss.ws.server.KernelLocator">
+ <bean name="KernelLocator"
class="org.jboss.ws.core.server.KernelLocator">
<!--property name="kernel">
<inject bean="jboss.kernel:service=Kernel"/>
</property-->
Modified:
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
===================================================================
---
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -3,47 +3,7 @@
<!-- $Id$ -->
<server>
-
- <!--
- A deployer service for WS clients.
- <mbean name="jboss.ws:service=WebServiceClientDeployer"
code="org.jboss.ws.integration.jboss.WebServiceClientDeployer">
- <depends>jboss:service=Naming</depends>
- </mbean>
- -->
-
- <!--
- A deployer service for JSE endpoints.
- <mbean name="jboss.ws:service=WebServiceDeployerJSE"
code="org.jboss.ws.integration.jboss.DeployerInterceptorJSE">
- <depends-list optional-attribute-name="Interceptables">
-
<depends-list-element>jboss.web:service=WebServer</depends-list-element>
- </depends-list>
- </mbean>
- -->
-
- <!--
- A deployer service for EJB2.1 endpoints.
- <mbean name="jboss.ws:service=DeployerInterceptorEJB21"
code="org.jboss.ws.integration.jboss.DeployerInterceptorEJB21">
- <depends-list optional-attribute-name="Interceptables">
-
<depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
- </depends-list>
- </mbean>
- -->
-
- <!--
- A deployer service for EJB3 endpoints.
- <mbean name="jboss.ws:service=DeployerInterceptorEJB3"
code="org.jboss.ws.integration.jboss.DeployerInterceptorEJB3">
- <depends-list optional-attribute-name="Interceptables">
-
<depends-list-element>jboss.ejb3:service=EJB3Deployer</depends-list-element>
- </depends-list>
- </mbean>
- -->
-
- <!--
- A deployer service for JSE endpoints that are nested in service archives (sar).
- <mbean name="jboss.ws:service=DeployerInterceptorNestedJSE"
code="org.jboss.ws.integration.jboss.DeployerInterceptorNestedJSE">
- <depends optional-attribute-name="MainDeployer"
proxy-type="attribute">jboss.system:service=MainDeployer</depends>
- <depends>jboss.ws:service=WebServiceDeployerJSE</depends>
- </mbean>
- -->
-
+
+ <!-- no mbeans, this is a pojo service -->
+
</server>
Modified:
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxrpc-client-config.xml
===================================================================
---
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxrpc-client-config.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxrpc-client-config.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -15,7 +15,7 @@
<handler-chain-name>MTOM handler</handler-chain-name>
<handler>
<j2ee:handler-name>DisableMTOMHandler</j2ee:handler-name>
-
<j2ee:handler-class>org.jboss.ws.xop.DisableMTOMHandler</j2ee:handler-class>
+
<j2ee:handler-class>org.jboss.ws.extras.xop.DisableMTOMHandler</j2ee:handler-class>
</handler>
</post-handler-chain>
</client-config>
@@ -26,7 +26,7 @@
<handler-chain-name>WSAddressing Handlers</handler-chain-name>
<handler>
<j2ee:handler-name>WSAddressingClientHandler</j2ee:handler-name>
-
<j2ee:handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</j2ee:handler-class>
+
<j2ee:handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingClientHandler</j2ee:handler-class>
</handler>
</post-handler-chain>
</client-config>
@@ -37,7 +37,7 @@
<handler-chain-name>WSSecurity Handlers</handler-chain-name>
<handler>
<j2ee:handler-name>WSSecurityHandlerOutbound</j2ee:handler-name>
-
<j2ee:handler-class>org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerOutbound</j2ee:handler-class>
+
<j2ee:handler-class>org.jboss.ws.extras.security.jaxrpc.WSSecurityHandlerOutbound</j2ee:handler-class>
</handler>
</post-handler-chain>
</client-config>
Modified:
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxrpc-endpoint-config.xml
===================================================================
---
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxrpc-endpoint-config.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxrpc-endpoint-config.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -15,7 +15,7 @@
<handler-chain-name>MTOM handlers</handler-chain-name>
<handler>
<j2ee:handler-name>DisableMTOMHandler</j2ee:handler-name>
-
<j2ee:handler-class>org.jboss.ws.xop.DisableMTOMHandler</j2ee:handler-class>
+
<j2ee:handler-class>org.jboss.ws.extras.xop.DisableMTOMHandler</j2ee:handler-class>
</handler>
</pre-handler-chain>
</endpoint-config>
@@ -26,7 +26,7 @@
<handler-chain-name>WSAddressing Handlers</handler-chain-name>
<handler>
<j2ee:handler-name>WSAddressing Handler</j2ee:handler-name>
-
<j2ee:handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</j2ee:handler-class>
+
<j2ee:handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingServerHandler</j2ee:handler-class>
</handler>
</pre-handler-chain>
</endpoint-config>
@@ -37,7 +37,7 @@
<handler-chain-name>WSSecurity Handlers</handler-chain-name>
<handler>
<j2ee:handler-name>WSSecurityHandlerInbound</j2ee:handler-name>
-
<j2ee:handler-class>org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerInbound</j2ee:handler-class>
+
<j2ee:handler-class>org.jboss.ws.extras.security.jaxrpc.WSSecurityHandlerInbound</j2ee:handler-class>
</handler>
</pre-handler-chain>
</endpoint-config>
Modified:
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-client-config.xml
===================================================================
---
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-client-config.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-client-config.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -16,7 +16,7 @@
<javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
<javaee:handler>
<javaee:handler-name>WSAddressing Handler</javaee:handler-name>
-
<javaee:handler-class>org.jboss.ws.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
+
<javaee:handler-class>org.jboss.ws.extras.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</post-handler-chains>
@@ -29,7 +29,7 @@
<javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
<javaee:handler>
<javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name>
-
<javaee:handler-class>org.jboss.ws.wsse.jaxws.WSSecurityHandlerOutbound</javaee:handler-class>
+
<javaee:handler-class>org.jboss.ws.extras.security.jaxws.WSSecurityHandlerOutbound</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</post-handler-chains>
Modified:
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-endpoint-config.xml
===================================================================
---
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-endpoint-config.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/resources/jbossws.sar/META-INF/standard-jaxws-endpoint-config.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -16,7 +16,7 @@
<javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
<javaee:handler>
<javaee:handler-name>WSAddressing Handler</javaee:handler-name>
-
<javaee:handler-class>org.jboss.ws.addressing.jaxws.WSAddressingServerHandler</javaee:handler-class>
+
<javaee:handler-class>org.jboss.ws.extras.addressing.jaxws.WSAddressingServerHandler</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</pre-handler-chains>
@@ -29,7 +29,7 @@
<javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
<javaee:handler>
<javaee:handler-name>WSSecurity Handler</javaee:handler-name>
-
<javaee:handler-class>org.jboss.ws.wsse.jaxws.WSSecurityHandlerInbound</javaee:handler-class>
+
<javaee:handler-class>org.jboss.ws.extras.security.jaxws.WSSecurityHandlerInbound</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</pre-handler-chains>
Modified:
branches/tdiesler/trunk/src/main/resources/jbossws.war/Tomcat/META-INF/jboss-beans.xml
===================================================================
---
branches/tdiesler/trunk/src/main/resources/jbossws.war/Tomcat/META-INF/jboss-beans.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/main/resources/jbossws.war/Tomcat/META-INF/jboss-beans.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -4,7 +4,7 @@
xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
xmlns="urn:jboss:bean-deployer">
- <bean name="ServiceEndpointManager"
class="org.jboss.ws.server.ServiceEndpointManager">
+ <bean name="ServiceEndpointManager"
class="org.jboss.ws.core.server.ServiceEndpointManager">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a
<soap:address>
element which points to the location of the endpoint. JBossWS supports rewriting of
that SOAP address.
@@ -16,10 +16,10 @@
<property name="webServiceHost">localhost</property>
<property name="webServiceSecurePort">8443</property>
<property name="webServicePort">8080</property>
- <property
name="serviceEndpointInvokerJSE">org.jboss.ws.server.ServiceEndpointInvokerJSE</property>
+ <property
name="serviceEndpointInvokerJSE">org.jboss.ws.core.server.ServiceEndpointInvokerJSE</property>
</bean>
- <bean name="ServiceEndpointDeployer"
class="org.jboss.ws.deployment.ServiceEndpointDeployer">
+ <bean name="ServiceEndpointDeployer"
class="org.jboss.ws.core.server.ServiceEndpointDeployer">
<property name="serviceEndpointManager"><inject
bean="ServiceEndpointManager"/></property>
</bean>
@@ -33,10 +33,10 @@
<!--
A subscription manager for WS-Eventing
-->
- <bean name="SubscriptionManager"
class="org.jboss.ws.eventing.mgmt.SubscriptionManager"/>
+ <bean name="SubscriptionManager"
class="org.jboss.ws.extras.eventing.mgmt.SubscriptionManager"/>
<bean name="ServerConfig"
class="org.jboss.ws.integration.tomcat.ServerConfigImpl"/>
- <bean name="KernelLocator"
class="org.jboss.ws.server.KernelLocator"/>
+ <bean name="KernelLocator"
class="org.jboss.ws.core.server.KernelLocator"/>
</deployment>
Modified: branches/tdiesler/trunk/src/test/build.xml
===================================================================
--- branches/tdiesler/trunk/src/test/build.xml 2006-12-06 15:52:34 UTC (rev 1580)
+++ branches/tdiesler/trunk/src/test/build.xml 2006-12-06 19:08:25 UTC (rev 1581)
@@ -163,6 +163,9 @@
<pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
<pathelement location="${jboss.client}/jboss-logging-log4j.jar"/>
<pathelement location="${jboss.client}/${jbossws.client.jar}"/>
+ <pathelement location="${jboss.client}/jboss-jaxrpc.jar"/>
+ <pathelement location="${jboss.client}/jboss-jaxws.jar"/>
+ <pathelement location="${jboss.client}/jboss-saaj.jar"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/config/WSConfigTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/config/WSConfigTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/config/WSConfigTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -71,6 +71,6 @@
assertEquals(1, preChain.getHandlers().size());
UnifiedHandlerMetaData h1 = (UnifiedHandlerMetaData)preChain.getHandlers().get(0);
assertEquals("WSSecurityHandlerInbound", h1.getHandlerName());
- assertEquals("org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerInbound",
h1.getHandlerClass());
+
assertEquals("org.jboss.ws.extras.security.jaxrpc.WSSecurityHandlerInbound",
h1.getHandlerClass());
}
}
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -27,7 +27,7 @@
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Tests WSDL11Reader ability to parse WSDL Files
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -27,7 +27,7 @@
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the XSModel, and how it handles multiple schemas
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -31,7 +31,7 @@
import org.jboss.net.protocol.URLStreamHandlerFactory;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.wsdl.WSDL11DefinitionFactory;
+import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
/**
* Test a wsdl import functionality.
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -38,8 +38,8 @@
import org.jboss.ws.common.metadata.wsdl.WSDLService;
import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.extras.eventing.EventingConstants;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the unmarshalling of wsdl-1.1 into the unified wsdl structure
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -28,7 +28,7 @@
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* The WSDL may contain or import XSD schema definitions.
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -25,7 +25,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Cannot handle xsd:import of xml schema
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -30,7 +30,7 @@
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
*
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws958/JBWS958TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws958/JBWS958TestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws958/JBWS958TestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -26,7 +26,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* XML entity usage in wsdl contained schema
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -35,8 +35,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXRPC <service-ref>
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXRPC <service-ref>
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -35,8 +35,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXRPC <service-ref>
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -44,7 +44,6 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.ServiceExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.StubExt;
@@ -59,6 +58,7 @@
import org.jboss.ws.extras.eventing.element.SubscribeRequest;
import org.jboss.ws.extras.eventing.element.SubscribeResponse;
import org.jboss.ws.extras.eventing.element.UnsubscribeRequest;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* @author Heiko Braun, <heiko(a)openj.net>
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -36,7 +36,6 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extras.addressing.AddressingClientUtil;
import org.jboss.ws.extras.eventing.EventSourceEndpoint;
@@ -47,6 +46,7 @@
import org.jboss.ws.extras.eventing.element.FilterType;
import org.jboss.ws.extras.eventing.element.SubscribeRequest;
import org.jboss.ws.extras.eventing.element.SubscribeResponse;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Eventing test case support.
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/context/WebServiceContextTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/context/WebServiceContextTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/context/WebServiceContextTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test JAXWS WebServiceContext
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -43,7 +43,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test JAXWS Endpoint deployment
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -32,7 +32,7 @@
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
*
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Investigate "Is Not A Servlet" error with multiple servlets in the web.xml
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* EJB3 jmx name is incorrectly derrived
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -30,7 +30,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
// $Id$
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -48,7 +48,7 @@
import org.jboss.test.ws.jaxws.jsr181.soapbinding.SubmitBareRequest;
import org.jboss.test.ws.jaxws.jsr181.soapbinding.SubmitBareResponse;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderMessageTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderMessageTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderMessageTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -37,7 +37,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test a Provider<SOAPMessage>
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -37,7 +37,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test a Provider<SOAPMessage>
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the JSR-181 annotation: javax.jws.WebService
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the JSR-181 annotation: javax.jws.WebService
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -25,7 +25,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import javax.xml.namespace.QName;
import java.net.MalformedURLException;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXWS annotation: javax.xml.ws.WebServiceref
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXWS annotation: javax.xml.ws.WebServiceref
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXWS annotation: javax.xml.ws.WebServiceref
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/DHRequest.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/DHRequest.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/DHRequest.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -23,21 +23,23 @@
import javax.activation.DataHandler;
import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
-/**
- * @author Heiko Braun <heiko.braun(a)jboss.com>
- * @version $Id$
- * @since 05.12.2006
- */
+@XmlType(name="request", namespace =
"http://org.jboss.ws/xop/doclit")
public class DHRequest {
public DHRequest() {
}
+
+ public DHRequest(DataHandler dataHandler) {
+ this.dataHandler = dataHandler;
+ }
+
private DataHandler dataHandler;
- @XmlMimeType("text/xml")
+ @XmlMimeType("image/jpeg")
public DataHandler getDataHandler() {
return dataHandler;
}
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/DHResponse.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/DHResponse.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/DHResponse.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -23,12 +23,9 @@
import javax.activation.DataHandler;
import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
-/**
- * @author Heiko Braun <heiko.braun(a)jboss.com>
- * @version $Id$
- * @since 05.12.2006
- */
+@XmlType(name="response", namespace =
"http://org.jboss.ws/xop/doclit")
public class DHResponse {
@@ -42,7 +39,7 @@
this.dataHandler = dataHandler;
}
- @XmlMimeType("text/xml")
+ @XmlMimeType("image/jpeg")
public DataHandler getDataHandler() {
return dataHandler;
}
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpoint.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpoint.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpoint.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,15 +1,16 @@
package org.jboss.test.ws.jaxws.xop.doclit;
+import javax.ejb.Remote;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import javax.ejb.Remote;
+import javax.xml.ws.BindingType;
@Remote
-@WebService(name = "MTOMEndpoint", targetNamespace =
"http://org.jboss.ws/xop/doclit", serviceName = "MTOMService")
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+@WebService(targetNamespace = "http://org.jboss.ws/xop/doclit")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle =
SOAPBinding.ParameterStyle.BARE)
+@BindingType(value="http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
public interface MTOMEndpoint {
- @WebMethod
public DHResponse echoDataHandler(DHRequest request);
}
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpointBean.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpointBean.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpointBean.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -21,18 +21,35 @@
*/
package org.jboss.test.ws.jaxws.xop.doclit;
+import org.jboss.ws.annotation.PortComponent;
+import org.jboss.ws.WSException;
+
import javax.jws.WebMethod;
import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
import javax.ejb.Stateless;
+import javax.xml.ws.BindingType;
+import javax.activation.DataHandler;
+import java.io.IOException;
@Stateless
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.xop.doclit.MTOMEndpoint",
name="MTOMEndpoint")
+@WebService(name="MTOMEndpoint", serviceName = "MTOMService",
endpointInterface = "org.jboss.test.ws.jaxws.xop.doclit.MTOMEndpoint")
public class MTOMEndpointBean implements MTOMEndpoint {
+
+ public DHResponse echoDataHandler(DHRequest request) {
+ DataHandler dataHandler = request.getDataHandler();
- @WebMethod
- public DHResponse echoDataHandler(DHRequest request) {
- System.out.println("Recv " + request.getDataHandler().getContentType());
+ try
+ {
+ System.out.println("Recv " + dataHandler.getContentType());
+ System.out.println("Content is "+ dataHandler.getContent());
+ }
+ catch (IOException e)
+ {
+ throw new WSException(e);
+ }
+
return new DHResponse(
request.getDataHandler()
);
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/XOPTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/XOPTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/XOPTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -26,7 +26,13 @@
import junit.framework.Test;
import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Binding;
+import javax.xml.ws.soap.SOAPBinding;
+import javax.activation.DataHandler;
import java.net.URL;
+import java.util.Map;
+import java.awt.image.BufferedImage;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
@@ -47,15 +53,31 @@
protected void setUp() throws Exception
{
- QName serviceName = new QName("http://org.jboss.ws/xop/doclit",
"MTOMEndpointService");
+ QName serviceName = new QName("http://org.jboss.ws/xop/doclit",
"MTOMService");
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS+"?wsdl");
javax.xml.ws.Service service = javax.xml.ws.Service.create(wsdlURL, serviceName);
mtomWS = service.getPort(MTOMEndpoint.class);
+
+ // enable MTOM
+ SOAPBinding binding = (SOAPBinding)((BindingProvider)mtomWS).getBinding();
+ binding.setMTOMEnabled(true);
+
+ // debug request/reponse
+ /*
+ BindingProvider bp = (BindingProvider)mtomWS;
+ Map<String,Object> context = bp.getRequestContext();
+ context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8081/jaxws-xop-doclit/MTOMEndpointBean");
+ */
}
public void testRequestResponseOptimized() throws Exception
{
-
+ URL url = new URL("file:resources/jaxws/xop/shared/attach.jpeg");
+ DataHandler dh = new DataHandler(url);
+ DHResponse response = mtomWS.echoDataHandler(new DHRequest(dh));
+ assertNotNull(response);
+ assertEquals(response.getDataHandler().getContentType(), "image/jpeg");
+ assertTrue(response.getDataHandler().getContent() instanceof BufferedImage);
}
}
\ No newline at end of file
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -41,6 +41,7 @@
import org.jboss.ws.common.utils.IOUtils;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.WSToolsConstants;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
import org.w3c.dom.Element;
/**
@@ -129,7 +130,7 @@
WSDLDefinitions wsdl = jwsdl.generate(seiClass);
Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath),
Constants.DEFAULT_XML_CHARSET);
- wsdl.write(fw, Constants.DEFAULT_XML_CHARSET);
+ new WSDLWriter(wsdl).write(fw, Constants.DEFAULT_XML_CHARSET);
fw.close();
//Validate the generated WSDL
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -33,9 +33,9 @@
import org.jboss.test.ws.tools.validation.WSDLValidator;
import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDL20Writer;
import org.jboss.ws.tools.WSDLToJava;
import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
/**
* Test jbossws WSDL11 -> Java
@@ -86,14 +86,14 @@
File wsdlDir = new File("./tools/wsdl-out");
wsdlDir.mkdirs();
FileWriter writer = new FileWriter(new File(wsdlDir + "/" + fname));
- new WSDL20Writer(wsdl).write(writer);
+ new WSDLWriter(wsdl).write(writer);
writer.close();
}
private String getWSDLAsString(WSDLDefinitions wsdl) throws IOException
{
StringWriter strwr = new StringWriter();
- new WSDL20Writer(wsdl).write(strwr);
+ new WSDLWriter(wsdl).write(strwr);
return strwr.toString();
}
Deleted:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToWSDL20TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToWSDL20TestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToWSDL20TestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,134 +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.test.ws.tools;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.StringWriter;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.tools.sei.PrimitiveTypes;
-import org.jboss.test.ws.tools.sei.StandardJavaTypes;
-import org.jboss.test.ws.tools.validation.WSDL11Validator;
-import org.jboss.test.ws.tools.validation.WSDLValidator;
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDL20Writer;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
-import org.jboss.ws.tools.WSDLToJava;
-import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
-
-/**
- * Test jbossws WSDL11 -> Java -> WSDL20
- *
- * @author anil.saldhana(a)jboss.org
- * @since January 26,2005
- */
-public class WSDL11ToWSDL20TestCase extends JBossWSTest
-{
- /** Test a SEI that contains JAXRPC primitive types */
- public void testPrimitiveTypes() throws Exception
- {
- Class seiClass = PrimitiveTypes.class;
- WSDLDefinitions wsdlDefinitions = getWSDLDefinitions(seiClass,
"PrimitiveTypesService_RPC_11.wsdl");
- String wsdlString = getWSDLAsString(wsdlDefinitions);
- //System.out.println(wsdlString);
- writeWSDL(wsdlDefinitions, "PrimitiveTypesService_RPC_20.wsdl");
- }
-
- /** Test a SEI that contains JAXRPC java standard types */
- public void testStandardJavaTypes() throws Exception
- {
- Class seiClass = StandardJavaTypes.class;
- WSDLDefinitions wsdlDefinitions = getWSDLDefinitions(seiClass,
"StandardJavaTypesService_RPC_11.wsdl");
- String wsdlString = getWSDLAsString(wsdlDefinitions);
- //System.out.println(wsdlString);
- writeWSDL(wsdlDefinitions, "StandardJavaTypesService_RPC_20.wsdl");
- }
-
- /** Test a SEI that contains JAXRPC java standard types */
- public void testStandardDocJavaTypes() throws Exception
- {
- Class seiClass = StandardJavaTypes.class;
- WSDLDefinitions wsdlDefinitions = getWSDLDefinitions(seiClass,
"StandardJavaTypesService_DOC_11.wsdl");
- String wsdlString = getWSDLAsString(wsdlDefinitions);
- //System.out.println(wsdlString);
- writeWSDL(wsdlDefinitions, "StandardJavaTypesService_DOC_20.wsdl");
- }
-
- /** Test a SEI that contains JAXRPC java standard types */
- public void testWSDLSpecExample() throws Exception
- {
- WSDLDefinitions wsdl = doWSDLTest("W3CExample_DOC_11.wsdl");
- //System.out.println(wsdlString);
- writeWSDL(wsdl, "W3CExample_DOC_20.wsdl");
- }
-
- private void writeWSDL(WSDLDefinitions wsdl, String fname) throws Exception
- {
- String wsdlWrite = "tools";
-
- FileWriter writer = new FileWriter(wsdlWrite + "/" + fname);
- new WSDL20Writer(wsdl).write(writer);
- writer.close();
- }
-
- private String getWSDLAsString(WSDLDefinitions wsdl) throws IOException
- {
- StringWriter strwr = new StringWriter();
- new WSDL20Writer(wsdl).write(strwr);
- return strwr.toString();
- }
-
- private WSDLDefinitions getWSDLDefinitions(Class seiClass, String wsdlFileName) throws
Exception
- {
- File wsdlFile = new File("resources/tools/wsdlfixture/" + wsdlFileName);
- assertTrue(wsdlFile.exists());
-
- WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = wsdlFactory.parse(wsdlFile.toURL());
-
- WSDLValidator validator = new WSDL11Validator();
- if (validator.validate(seiClass, wsdlDefinitions) == false)
- System.err.println("FIXME: " + validator.getErrorList().toString());
-
- return wsdlDefinitions;
- }
-
- /**
- * The idea here is that the WSDLReader reads in the <definition> element
- * and looks at the default namespace. If it is wsdl-1.1, it delegates to
- * wsdl4j which parses the same wsdl again and builds the wsdl4j object graph.
- * TODO:Reading the wsdl4j graph and copying to jbossws/wsdl objects
- * @param wsdlFileName
- * @throws Exception
- */
- private WSDLDefinitions doWSDLTest(String wsdlFileName) throws Exception
- {
- File wsdlFile = new File("resources/tools/wsdlfixture/" + wsdlFileName);
- assertTrue(wsdlFile.exists());
- WSDLToJavaIntf wsdljava = new WSDLToJava();
- wsdljava.setTypeMapping(new LiteralTypeMapping());
- return wsdljava.convertWSDL2Java(wsdlFile.toURL());
- }
-}
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -47,13 +47,13 @@
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.JavaToXSD;
import org.jboss.ws.tools.WSToolsConstants;
import org.jboss.ws.tools.client.ServiceCreator;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
import org.jboss.ws.tools.mapping.MappingFileGenerator;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -32,6 +32,7 @@
import org.jboss.ws.common.utils.IOUtils;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.WSToolsConstants;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
import org.w3c.dom.Element;
/**
@@ -57,7 +58,7 @@
WSDLDefinitions wsdl = jwsdl.generate(seiClass);
Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath),
Constants.DEFAULT_XML_CHARSET);
- wsdl.write(fw, Constants.DEFAULT_XML_CHARSET);
+ new WSDLWriter(wsdl).write(fw, Constants.DEFAULT_XML_CHARSET);
fw.close();
String fixturefile =
"resources/tools/doc-lit/trivial/wsdl/SampleService.wsdl";
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -35,12 +35,13 @@
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.IOUtils;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.WSDLToJava;
import org.jboss.ws.tools.WSToolsConstants;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.tools.wsdl.WSDLWriter;
import org.w3c.dom.Element;
@@ -85,7 +86,7 @@
String wsdlDir = "tools/";
String wsdlPath = wsdlDir+ "/HolderService.wsdl";
Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath),
Constants.DEFAULT_XML_CHARSET);
- wsdl.write(fw, Constants.DEFAULT_XML_CHARSET);
+ new WSDLWriter(wsdl).write(fw, Constants.DEFAULT_XML_CHARSET);
fw.close();
//Now validate the wsdl file
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java 2006-12-06
19:08:25 UTC (rev 1581)
@@ -26,8 +26,8 @@
import junit.framework.TestCase;
import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
* Testcase to test the WSDL Validator
Modified:
branches/tdiesler/trunk/src/test/resources/common/config/jaxrpc-endpoint-config.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/common/config/jaxrpc-endpoint-config.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/common/config/jaxrpc-endpoint-config.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -17,7 +17,7 @@
<handler-chain-name>PreHandlerChain</handler-chain-name>
<handler>
<j2ee:handler-name>WSSecurityHandlerInbound</j2ee:handler-name>
-
<j2ee:handler-class>org.jboss.ws.wsse.jaxrpc.WSSecurityHandlerInbound</j2ee:handler-class>
+
<j2ee:handler-class>org.jboss.ws.extras.security.jaxrpc.WSSecurityHandlerInbound</j2ee:handler-class>
</handler>
</pre-handler-chain>
</endpoint-config>
Modified:
branches/tdiesler/trunk/src/test/resources/common/config/jaxws-endpoint-config.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/common/config/jaxws-endpoint-config.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/common/config/jaxws-endpoint-config.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -18,7 +18,7 @@
<javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
<javaee:handler>
<javaee:handler-name>WSSecurityHandlerInbound</javaee:handler-name>
-
<javaee:handler-class>org.jboss.ws.wsse.jaxws.WSSecurityHandlerInbound</javaee:handler-class>
+
<javaee:handler-class>org.jboss.ws.extras.security.jaxws.WSSecurityHandlerInbound</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</pre-handler-chains>
Modified:
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/sep06/wsa10/META-INF/application-client.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/sep06/wsa10/META-INF/application-client.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/sep06/wsa10/META-INF/application-client.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -26,7 +26,7 @@
<handler>
<handler-name>client.notify.handler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
<!--init-param>
<param-name>javax.xml.ws.addressing.to.inbound</param-name>
<
param-value>http://example.org/node/A</param-value>
@@ -37,7 +37,7 @@
<handler>
<handler-name>client.echo.handler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
<!--init-param>
<param-name>javax.xml.ws.addressing.to.inbound</param-name>
<
param-value>http://example.org/node/A</param-value>
Modified:
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/sep06/wsa10/WEB-INF/webservices.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/sep06/wsa10/WEB-INF/webservices.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/sep06/wsa10/WEB-INF/webservices.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -22,7 +22,7 @@
<handler>
<handler-name>addressing handler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
<init-param>
<param-name>validate</param-name>
<param-value>false</param-value>
@@ -45,7 +45,7 @@
<handler>
<handler-name>addressing handler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
<init-param>
<param-name>validate</param-name>
<param-value>false</param-value>
Modified:
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/wsa10/META-INF/application-client.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/wsa10/META-INF/application-client.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/wsa10/META-INF/application-client.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -26,7 +26,7 @@
<handler>
<handler-name>client.notify.handler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
<!--init-param>
<param-name>javax.xml.ws.addressing.to.inbound</param-name>
<
param-value>http://example.org/node/A</param-value>
@@ -37,7 +37,7 @@
<handler>
<handler-name>client.echo.handler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
<!--init-param>
<param-name>javax.xml.ws.addressing.to.inbound</param-name>
<
param-value>http://example.org/node/A</param-value>
Modified:
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/wsaTestService/WEB-INF/webservices.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/wsaTestService/WEB-INF/webservices.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/interop/microsoft/addressing/wsaTestService/WEB-INF/webservices.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -29,7 +29,7 @@
<handler>
<handler-name>addressing handler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
<init-param>
<param-name>validate</param-name>
<param-value>false</param-value>
Modified:
branches/tdiesler/trunk/src/test/resources/jaxrpc/marshall-rpclit/WEB-INF/webservices.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxrpc/marshall-rpclit/WEB-INF/webservices.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxrpc/marshall-rpclit/WEB-INF/webservices.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -19,7 +19,7 @@
</service-impl-bean>
<handler>
<handler-name>MTOM disabled handler</handler-name>
- <handler-class>org.jboss.ws.xop.DisableMTOMHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.xop.DisableMTOMHandler</handler-class>
</handler>
</port-component>
</webservice-description>
Modified:
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/META-INF/application-client.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/META-INF/application-client.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/META-INF/application-client.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -8,21 +8,21 @@
<service-ref>
<service-ref-name>service/SysmonService</service-ref-name>
-
<service-interface>org.jboss.ws.eventing.EventingService</service-interface>
+
<service-interface>org.jboss.ws.extras.eventing.EventingService</service-interface>
<wsdl-file>META-INF/wsdl/sysmon.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
-
<service-endpoint-interface>org.jboss.ws.eventing.EventSourceEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.EventSourceEndpoint</service-endpoint-interface>
</port-component-ref>
<port-component-ref>
-
<service-endpoint-interface>org.jboss.ws.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
</port-component-ref>
<handler>
<handler-name>WSAddressingHandler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
</handler>
</service-ref>
Modified:
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/jaxrpc-mapping.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/jaxrpc-mapping.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/jaxrpc-mapping.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -3,19 +3,19 @@
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.ws.eventing</package-type>
+ <package-type>org.jboss.ws.extras.eventing</package-type>
<
namespaceURI>http://schemas.xmlsoap.org/ws/2004/08/eventing</namesp...
</package-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.SubscribeRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscribeRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:Subscribe</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.SubscribeRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscribeRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Subscribe</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -42,7 +42,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.FilterType</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.FilterType</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:FilterType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -57,7 +57,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.DeliveryType</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.DeliveryType</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:DeliveryType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -76,14 +76,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.SubscriptionEndRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscriptionEndRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:SubscriptionEnd</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.SubscriptionEndRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscriptionEndRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>SubscriptionEnd</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -102,14 +102,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.SubscribeResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscribeResponse</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:SubscribeResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.SubscribeResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscribeResponse</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>SubscribeResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -124,13 +124,13 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.EndpointReference</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.EndpointReference</java-type>
<root-type-qname
xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:E...
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.EndpointReference</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.EndpointReference</java-type>
<root-type-qname
xmlns:typeNS="http://www.w3.org/2005/08/addressing">
typeNS:EndpointReferenceType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -149,13 +149,13 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.MetaData</java-type>
+ <java-type>org.jboss.ws.extras.eventing.element.MetaData</java-type>
<root-type-qname
xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:M...
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<!--java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.MetaData</java-type>
+ <java-type>org.jboss.ws.extras.eventing.element.MetaData</java-type>
<root-type-qname
xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:M...
<qname-scope>complexType</qname-scope>
<variable-mapping>
@@ -165,13 +165,13 @@
</java-xml-type-mapping-->
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.RenewRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.RenewRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"&g...
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.RenewRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.RenewRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Renew</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -182,14 +182,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.RenewResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.RenewResponse</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:RenewResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.RenewResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.RenewResponse</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>RenewResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -200,7 +200,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.StatusRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.StatusRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:GetStatus</root-type-qname>
<qname-scope>element</qname-scope>
@@ -211,21 +211,21 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.StatusRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.StatusRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>GetStatus</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.StatusResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.StatusResponse</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:GetStatusResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.StatusResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.StatusResponse</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>GetStatusResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -236,7 +236,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.UnsubscribeRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.UnsubscribeRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:Unsubscribe</root-type-qname>
<qname-scope>element</qname-scope>
@@ -247,14 +247,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.UnsubscribeRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.UnsubscribeRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Unsubscribe</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<service-interface-mapping>
-
<service-interface>org.jboss.ws.eventing.EventingService</service-interface>
+
<service-interface>org.jboss.ws.extras.eventing.EventingService</service-interface>
<wsdl-service-name
xmlns:serviceNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
serviceNS:EventingService</wsdl-service-name>
<port-mapping>
@@ -268,7 +268,7 @@
</service-interface-mapping>
<service-endpoint-interface-mapping>
-
<service-endpoint-interface>org.jboss.ws.eventing.EventSourceEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.EventSourceEndpoint</service-endpoint-interface>
<wsdl-port-type
xmlns:portTypeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing&quo...
portTypeNS:EventSource</wsdl-port-type>
<wsdl-binding
xmlns:bindingNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
@@ -278,7 +278,7 @@
<wsdl-operation>SubscribeOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
-
<param-type>org.jboss.ws.eventing.element.SubscribeRequest</param-type>
+
<param-type>org.jboss.ws.extras.eventing.element.SubscribeRequest</param-type>
<wsdl-message-mapping>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:SubscribeMsg</wsdl-message>
@@ -287,7 +287,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
-
<method-return-value>org.jboss.ws.eventing.element.SubscribeResponse</method-return-value>
+
<method-return-value>org.jboss.ws.extras.eventing.element.SubscribeResponse</method-return-value>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:SubscribeResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -298,7 +298,7 @@
<java-method-name>subscriptionEnd</java-method-name>
<wsdl-operation>SubscriptionEnd</wsdl-operation>
<wsdl-return-value-mapping>
-
<method-return-value>org.jboss.ws.eventing.element.SubscriptionEndRequest</method-return-value>
+
<method-return-value>org.jboss.ws.extras.eventing.element.SubscriptionEndRequest</method-return-value>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:SubscriptionEnd</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -308,7 +308,7 @@
</service-endpoint-interface-mapping>
<service-endpoint-interface-mapping>
-
<service-endpoint-interface>org.jboss.ws.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
<wsdl-port-type
xmlns:portTypeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing&quo...
portTypeNS:SubscriptionManager</wsdl-port-type>
@@ -320,7 +320,7 @@
<wsdl-operation>GetStatusOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
-
<param-type>org.jboss.ws.eventing.element.StatusRequest</param-type>
+
<param-type>org.jboss.ws.extras.eventing.element.StatusRequest</param-type>
<wsdl-message-mapping>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:GetStatusMsg</wsdl-message>
@@ -329,7 +329,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
-
<method-return-value>org.jboss.ws.eventing.element.StatusResponse</method-return-value>
+
<method-return-value>org.jboss.ws.extras.eventing.element.StatusResponse</method-return-value>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:GetStatusResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -341,7 +341,7 @@
<wsdl-operation>RenewOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
-
<param-type>org.jboss.ws.eventing.element.RenewRequest</param-type>
+
<param-type>org.jboss.ws.extras.eventing.element.RenewRequest</param-type>
<wsdl-message-mapping>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:RenewMsg</wsdl-message>
@@ -350,7 +350,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
-
<method-return-value>org.jboss.ws.eventing.element.RenewResponse</method-return-value>
+
<method-return-value>org.jboss.ws.extras.eventing.element.RenewResponse</method-return-value>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:RenewResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -362,7 +362,7 @@
<wsdl-operation>UnsubscribeOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
-
<param-type>org.jboss.ws.eventing.element.UnsubscribeRequest</param-type>
+
<param-type>org.jboss.ws.extras.eventing.element.UnsubscribeRequest</param-type>
<wsdl-message-mapping>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:UnsubscribeMsg</wsdl-message>
Modified:
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/web.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/web.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/web.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -6,11 +6,11 @@
<servlet>
<servlet-name>EventSourceServlet</servlet-name>
-
<servlet-class>org.jboss.ws.eventing.EventSourceEndpointImpl</servlet-class>
+
<servlet-class>org.jboss.ws.extras.eventing.EventSourceEndpointImpl</servlet-class>
</servlet>
<servlet>
<servlet-name>SubscriptionManagerServlet</servlet-name>
-
<servlet-class>org.jboss.ws.eventing.SubscriptionManagerEndpointImpl</servlet-class>
+
<servlet-class>org.jboss.ws.extras.eventing.SubscriptionManagerEndpointImpl</servlet-class>
</servlet>
<servlet-mapping>
Modified:
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/webservices.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/webservices.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxrpc/samples/wseventing/WEB-INF/webservices.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -15,14 +15,14 @@
<port-component>
<port-component-name>SubscriptionManagerPort</port-component-name>
<wsdl-port>wsdl:SubscriptionManagerPort</wsdl-port>
-
<service-endpoint-interface>org.jboss.ws.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
<service-impl-bean>
<servlet-link>SubscriptionManagerServlet</servlet-link>
</service-impl-bean>
<handler>
<handler-name>WSAddressingHandler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
</handler>
</port-component>
@@ -30,14 +30,14 @@
<port-component>
<port-component-name>EventSourcePort</port-component-name>
<wsdl-port>wsdl:EventSourcePort</wsdl-port>
-
<service-endpoint-interface>org.jboss.ws.eventing.EventSourceEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.EventSourceEndpoint</service-endpoint-interface>
<service-impl-bean>
<servlet-link>EventSourceServlet</servlet-link>
</service-impl-bean>
<handler>
<handler-name>WSAddressingHandler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
</handler>
</port-component>
Modified:
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/META-INF/application-client.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/META-INF/application-client.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/META-INF/application-client.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -8,21 +8,21 @@
<service-ref>
<service-ref-name>service/EventingService</service-ref-name>
-
<service-interface>org.jboss.ws.eventing.EventingService</service-interface>
+
<service-interface>org.jboss.ws.extras.eventing.EventingService</service-interface>
<wsdl-file>META-INF/wsdl/wind.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
-
<service-endpoint-interface>org.jboss.ws.eventing.EventSourceEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.EventSourceEndpoint</service-endpoint-interface>
</port-component-ref>
<port-component-ref>
-
<service-endpoint-interface>org.jboss.ws.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
</port-component-ref>
<handler>
<handler-name>SOAPOutboundHandler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingClientHandler</handler-class>
</handler>
</service-ref>
Modified:
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/jaxrpc-mapping.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/jaxrpc-mapping.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/jaxrpc-mapping.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -3,19 +3,19 @@
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.ws.eventing</package-type>
+ <package-type>org.jboss.ws.extras.eventing</package-type>
<
namespaceURI>http://schemas.xmlsoap.org/ws/2004/08/eventing</namesp...
</package-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.SubscribeRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscribeRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:Subscribe</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.SubscribeRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscribeRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Subscribe</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -42,7 +42,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.FilterType</java-type>
+ <java-type>org.jboss.ws.extras.eventing.element.FilterType</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:FilterType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -57,7 +57,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.DeliveryType</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.DeliveryType</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:DeliveryType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -76,14 +76,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.SubscriptionEndRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscriptionEndRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:SubscriptionEnd</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.SubscriptionEndRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscriptionEndRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>SubscriptionEnd</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -102,14 +102,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.SubscribeResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscribeResponse</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:SubscribeResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.SubscribeResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.SubscribeResponse</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>SubscribeResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -124,13 +124,13 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.EndpointReference</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.EndpointReference</java-type>
<root-type-qname
xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:E...
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.EndpointReference</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.EndpointReference</java-type>
<root-type-qname
xmlns:typeNS="http://www.w3.org/2005/08/addressing">
typeNS:EndpointReferenceType</root-type-qname>
<qname-scope>complexType</qname-scope>
@@ -149,13 +149,13 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.MetaData</java-type>
+ <java-type>org.jboss.ws.extras.eventing.element.MetaData</java-type>
<root-type-qname
xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:M...
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<!--java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.MetaData</java-type>
+ <java-type>org.jboss.ws.extras.eventing.element.MetaData</java-type>
<root-type-qname
xmlns:typeNS="http://www.w3.org/2005/08/addressing">typeNS:M...
<qname-scope>complexType</qname-scope>
<variable-mapping>
@@ -165,13 +165,13 @@
</java-xml-type-mapping-->
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.RenewRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.RenewRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"&g...
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.RenewRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.RenewRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Renew</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -182,14 +182,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.RenewResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.RenewResponse</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:RenewResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.RenewResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.RenewResponse</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>RenewResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -200,7 +200,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.StatusRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.StatusRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:GetStatus</root-type-qname>
<qname-scope>element</qname-scope>
@@ -211,21 +211,21 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.StatusRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.StatusRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>GetStatus</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.StatusResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.StatusResponse</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:GetStatusResponse</root-type-qname>
<qname-scope>element</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
- <java-type>org.jboss.ws.eventing.element.StatusResponse</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.StatusResponse</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>GetStatusResponse</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
@@ -236,7 +236,7 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.UnsubscribeRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.UnsubscribeRequest</java-type>
<root-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:Unsubscribe</root-type-qname>
<qname-scope>element</qname-scope>
@@ -247,14 +247,14 @@
</java-xml-type-mapping>
<java-xml-type-mapping>
-
<java-type>org.jboss.ws.eventing.element.UnsubscribeRequest</java-type>
+
<java-type>org.jboss.ws.extras.eventing.element.UnsubscribeRequest</java-type>
<anonymous-type-qname
xmlns:typeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing">
typeNS:>Unsubscribe</anonymous-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<service-interface-mapping>
-
<service-interface>org.jboss.ws.eventing.EventingService</service-interface>
+
<service-interface>org.jboss.ws.extras.eventing.EventingService</service-interface>
<wsdl-service-name
xmlns:serviceNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
serviceNS:EventingService</wsdl-service-name>
<port-mapping>
@@ -268,7 +268,7 @@
</service-interface-mapping>
<service-endpoint-interface-mapping>
-
<service-endpoint-interface>org.jboss.ws.eventing.EventSourceEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.EventSourceEndpoint</service-endpoint-interface>
<wsdl-port-type
xmlns:portTypeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing&quo...
portTypeNS:EventSource</wsdl-port-type>
<wsdl-binding
xmlns:bindingNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
@@ -278,7 +278,7 @@
<wsdl-operation>SubscribeOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
-
<param-type>org.jboss.ws.eventing.element.SubscribeRequest</param-type>
+
<param-type>org.jboss.ws.extras.eventing.element.SubscribeRequest</param-type>
<wsdl-message-mapping>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:SubscribeMsg</wsdl-message>
@@ -287,7 +287,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
-
<method-return-value>org.jboss.ws.eventing.element.SubscribeResponse</method-return-value>
+
<method-return-value>org.jboss.ws.extras.eventing.element.SubscribeResponse</method-return-value>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:SubscribeResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -298,7 +298,7 @@
<java-method-name>subscriptionEnd</java-method-name>
<wsdl-operation>SubscriptionEnd</wsdl-operation>
<wsdl-return-value-mapping>
-
<method-return-value>org.jboss.ws.eventing.element.SubscriptionEndRequest</method-return-value>
+
<method-return-value>org.jboss.ws.extras.eventing.element.SubscriptionEndRequest</method-return-value>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:SubscriptionEnd</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -308,7 +308,7 @@
</service-endpoint-interface-mapping>
<service-endpoint-interface-mapping>
-
<service-endpoint-interface>org.jboss.ws.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
<wsdl-port-type
xmlns:portTypeNS="http://schemas.xmlsoap.org/ws/2004/08/eventing&quo...
portTypeNS:SubscriptionManager</wsdl-port-type>
@@ -320,7 +320,7 @@
<wsdl-operation>GetStatusOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
-
<param-type>org.jboss.ws.eventing.element.StatusRequest</param-type>
+
<param-type>org.jboss.ws.extras.eventing.element.StatusRequest</param-type>
<wsdl-message-mapping>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:GetStatusMsg</wsdl-message>
@@ -329,7 +329,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
-
<method-return-value>org.jboss.ws.eventing.element.StatusResponse</method-return-value>
+
<method-return-value>org.jboss.ws.extras.eventing.element.StatusResponse</method-return-value>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:GetStatusResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -341,7 +341,7 @@
<wsdl-operation>RenewOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
-
<param-type>org.jboss.ws.eventing.element.RenewRequest</param-type>
+
<param-type>org.jboss.ws.extras.eventing.element.RenewRequest</param-type>
<wsdl-message-mapping>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:RenewMsg</wsdl-message>
@@ -350,7 +350,7 @@
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
-
<method-return-value>org.jboss.ws.eventing.element.RenewResponse</method-return-value>
+
<method-return-value>org.jboss.ws.extras.eventing.element.RenewResponse</method-return-value>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:RenewResponseMsg</wsdl-message>
<wsdl-message-part-name>body</wsdl-message-part-name>
@@ -362,7 +362,7 @@
<wsdl-operation>UnsubscribeOp</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
-
<param-type>org.jboss.ws.eventing.element.UnsubscribeRequest</param-type>
+
<param-type>org.jboss.ws.extras.eventing.element.UnsubscribeRequest</param-type>
<wsdl-message-mapping>
<wsdl-message
xmlns:wsdlMsgNS="http://schemas.xmlsoap.org/ws/2004/08/eventing"...
wsdlMsgNS:UnsubscribeMsg</wsdl-message>
Modified: branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/web.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/web.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/web.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -6,7 +6,7 @@
<display-name>Eventing Service App</display-name>
<servlet>
<servlet-name>EventSourceServlet</servlet-name>
-
<servlet-class>org.jboss.ws.eventing.EventSourceEndpointImpl</servlet-class>
+
<servlet-class>org.jboss.ws.extras.eventing.EventSourceEndpointImpl</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
@@ -16,7 +16,7 @@
<servlet>
<servlet-name>SubscriptionManagerServlet</servlet-name>
-
<servlet-class>org.jboss.ws.eventing.SubscriptionManagerEndpointImpl</servlet-class>
+
<servlet-class>org.jboss.ws.extras.eventing.SubscriptionManagerEndpointImpl</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
Modified:
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/webservices.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/webservices.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxrpc/wseventing/WEB-INF/webservices.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -15,14 +15,14 @@
<port-component>
<port-component-name>SubscriptionManagerPort</port-component-name>
<wsdl-port>wsdl:SubscriptionManagerPort</wsdl-port>
-
<service-endpoint-interface>org.jboss.ws.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.SubscriptionManagerEndpoint</service-endpoint-interface>
<service-impl-bean>
<servlet-link>SubscriptionManagerServlet</servlet-link>
</service-impl-bean>
<handler>
-
<handler-name>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
+ <handler-name>WSAddressingServerHandler</handler-name>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
</handler>
</port-component>
@@ -30,13 +30,13 @@
<port-component>
<port-component-name>EventSourcePort</port-component-name>
<wsdl-port>wsdl:EventSourcePort</wsdl-port>
-
<service-endpoint-interface>org.jboss.ws.eventing.EventSourceEndpoint</service-endpoint-interface>
+
<service-endpoint-interface>org.jboss.ws.extras.eventing.EventSourceEndpoint</service-endpoint-interface>
<service-impl-bean>
<servlet-link>EventSourceServlet</servlet-link>
</service-impl-bean>
<handler>
-
<handler-name>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</handler-name>
-
<handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
+ <handler-name>WSAddressingServerHandler</handler-name>
+
<handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingServerHandler</handler-class>
</handler>
</port-component>
Copied: branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared (from rev 1580,
trunk/src/test/resources/jaxrpc/xop/shared)
Deleted: branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.jpeg
===================================================================
(Binary files differ)
Copied: branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.jpeg (from rev
1580, trunk/src/test/resources/jaxrpc/xop/shared/attach.jpeg)
Deleted: branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.txt
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/shared/attach.txt 2006-12-06 15:52:34 UTC (rev
1580)
+++ branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.txt 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1 +0,0 @@
-This is a plain text attachment.
Copied: branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.txt (from rev
1580, trunk/src/test/resources/jaxrpc/xop/shared/attach.txt)
Deleted: branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/xop/shared/attach.xml 2006-12-06 15:52:34 UTC (rev
1580)
+++ branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<mime-message>This is an xml attachment.</mime-message>
Copied: branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/attach.xml (from rev
1580, trunk/src/test/resources/jaxrpc/xop/shared/attach.xml)
Deleted: branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/disguised_jpeg.xcf
===================================================================
(Binary files differ)
Copied: branches/tdiesler/trunk/src/test/resources/jaxrpc/xop/shared/disguised_jpeg.xcf
(from rev 1580, trunk/src/test/resources/jaxrpc/xop/shared/disguised_jpeg.xcf)
Modified:
branches/tdiesler/trunk/src/test/resources/jaxws/samples/jsr181ejb/config/ServerHandlers.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxws/samples/jsr181ejb/config/ServerHandlers.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxws/samples/jsr181ejb/config/ServerHandlers.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -5,7 +5,7 @@
<handler-chain-name>SecureHandlerChain</handler-chain-name>
<handler>
<handler-name>WSSecurityHandlerInbound</handler-name>
-
<handler-class>org.jboss.ws.wsse.WSSecurityHandlerInbound</handler-class>
+
<handler-class>org.jboss.ws.extras.security.WSSecurityHandlerInbound</handler-class>
</handler>
</handler-chain>
</handler-config>
Modified:
branches/tdiesler/trunk/src/test/resources/jaxws/wsaddressing/action/META-INF/jbossws-client-config.xml
===================================================================
---
branches/tdiesler/trunk/src/test/resources/jaxws/wsaddressing/action/META-INF/jbossws-client-config.xml 2006-12-06
15:52:34 UTC (rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxws/wsaddressing/action/META-INF/jbossws-client-config.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -13,7 +13,7 @@
<handler-chain-name>PostHandlerChain</handler-chain-name>
<handler>
<j2ee:handler-name>SOAPClientHandler</j2ee:handler-name>
-
<j2ee:handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</j2ee:handler-class>
+
<j2ee:handler-class>org.jboss.ws.extras.addressing.jaxrpc.WSAddressingClientHandler</j2ee:handler-class>
</handler>
</post-handler-chain>
</client-config>
Copied: branches/tdiesler/trunk/src/test/resources/jaxws/xop (from rev 1580,
trunk/src/test/resources/jaxws/xop)
Copied: branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared (from rev 1580,
trunk/src/test/resources/jaxws/xop/shared)
Deleted: branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.jpeg
===================================================================
--- trunk/src/test/resources/jaxws/xop/shared/attach.jpeg 2006-12-06 15:52:34 UTC (rev
1580)
+++ branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.jpeg 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,113 +0,0 @@
-����
-��
-%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���������������������������������������������������������������������������
-��
-$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������
t}������~�:!���?�]3�f��~$����&O]x�ís�֯�CL����Bà�/ǯ������O����_�}���
-�g����o��O���j������iZf�a����}��P[G�{_
-��
-��
-��
-��
-��
-O��Gƿ�_��K�
|8���|@��4�
�_����o�Mmb�
���~�:�
~�b����7�7����
������KJ�Ѭ~�_��]���1�|Z�?h|V��/����� |_�~��i�����7�U�� >=���
-<+���~��
-���
-x;T�e֣c�]7�_>x�����-���k������}z��Y���=gQ�ӣ���J�nR+9�>`���
-��|@�����
-��/g�3��'��D�
-��+*�������*�����3����G�/ك���e�>/��~�#��?mo�^ �+�C|Z��^���
-��G�o�'Lҭ��_�J�пik�_TռA�Oٺ�ş��CĿ�w��k���d���g����[~�^���?إ�?�/ڧT����?�������G�_���>(���G]
ׁ�
-��
� ���2_��zg�+�o
�V��
��~�/�??��|��
-�O¾ӭ�xk�^������gg���6�gk�izu������E�o�E�C��_��
?U�ֽS�{[�t�N�K��t���5�
-�
-�
-�
�M>���g��Լ7gm�\h�wl�v&���
-�WFӭ��؛g�{�����
-��
-M�S|^��������_��|1��
-<ς^>��4���|����,~8���3L���{�;�
{W���5�gT���uMF�����{�啀0���t?���
����������>�2���
i^,�
x�Z�ŏ�� ��?�.����_�'�&<��.�~.|\�M��
k?�>��C�cş�W���<�ȟ
-|1���
sſo�
-�:����L� ~��
-|]�����
-x��l> �J����
��ᛯ|-�e����6_~Z�_��
-�5������3Oo����Y�;����
-4��zj3�zߎu���
-������3�V�izV�r� ռ��:_��e��N��U�c�j��q}�i�O�_�'��R���0��
-_�� ��Xo�Jw�?��?c�
�O�_�c�x��߳��Y�ᯉuKO �
-�sN[}#��6����YA��
-Gg��|y�
-��
-5���
-����L�G��%�3��
-��O�~��s�K�/��
wP��Th^,Կh��w�?�%�> j�_�
-�'�O�(��+���
-���|@���K��
|>�|[��gş x���/ ~�o>�����3�_�G���
�T���[@�����_ >O��@�G��o�?i��
�f��Ws�
-���
-3��[^�� ��}x���xW��c�����ĺGſ��
-�
-�
�?|+���t��+�_�L����"��
��^7���⯌�
-5O���+�k��u~��Q�ښ����q�Xǂ4���}��]'F����>мi�������/��s�o��(�����
-��㟃�'~����Ӥ�1��
x�]�|Y�ox���o�$��>.���>x������������_���O
-�WPO��?��&���f�V�7¸>|3�Ɯ�v���~�m����<o�x}-�a�}r��O�o��*�>!x��ڎ��_
|;��/�χ��E
^���?�����c�/�g/��?����
-����Go���[�
-��E�
O��
-����_j��
-��g�O�ڟ۟���;���_a�����
-(��
-���k�\�
Tּ3�K.��Ԭ��B�4���_8���
��_
_�Oÿ������x_��
-|U�};�:dž�5�'�:������t��uMF�=旨��w��}amqm�
-[�_�� ѿি�M���,�<=�
�i��犼5�[?�������xs��^7m�������Ş��W-��]�נxO�����{�_
x��������Ox�����=�;�>����~�g�����LJ��k�:?�/4�w����^Y�7�M.��ƚ��um}c��m<R���QE
-�C����O�O����
�|L�����O�t�o�����_��������=��~?��^o��#�^Ѿ0h�)���uK��}�E~p���
-A�x/�?V��[���s�;�7���w�j�M�/�.�!j��|-�᷇u��oB��>:x���|j�
-(��
-(��
-(��
-(��
-������`����/gi�_��
�
-O�n��Z���>
|`��_��Ǐ���>�~�������n5�/Kҵ�D~���l��8��$����
-7�x�V������jٚ����
5�;K�g���͏���
-�T�^��Xx��G�
-(��>`��~
-x������k�������|o���`���S�ڧ�.�
-�*������
�V�
-���xC�?�|9��gL��?�������m�����:��| �n���|7��m?F��������υ~���d?�%������@�!�����>9�J��
�������
~|+�Οa�/�O�
-(��
-(��
-(��
-(��
-(��
-(��
-�����;���
S���=�
��E�'o�
��E�'o�
��E�'o�
��E�'o�
��E�'o�
��E�'o�
-��o�L�;�
-��.�o�"_�7�?�
-���
�
-����
-��
-�>���>���0~Қ���h��)�|мU�i�3�{7�5��3��I���:�H����c�x��wJ���W�L:橣
�
-Y_W�?�O��_�w���
-Y@QE
-k?�?�<+�?
-�h����?��/�i/گ�}��?j������������izu��5��Ϋ
�s�
7�J ����B�
�<�%�4����
-a�
-+�y��?�o�n�)��$����
-a�
-+�y��?�o�n�)��$����
-a�
-+�y��?�o�n�)��$����
-a�
-+�y��?�o�n�)��$����
-a�
-+�y��?�o�������gĿ�����
-����"�'�j^�v�������I������_P��
-��y��
-�� ;�
-(��>`�/���/�%�������`��y� �N��O�~>�)о2]x�ǰh�^�շ�
SŖ�6��4����<'�E����85�m��=Rŧ�F�g�|G���G���|?�j�����u���Ν�j>�U�|5�?
x����{�x���4�w�m�mb+=F
-���^!�ٴ�wK���a�o�U��2�����
���~Ŀ5/x���
-�m�xV���ӵ؛kk�:)>��
ľ��t����U��
-�z7�
w����y����(��
-��
-~�u��_�_�pw���
���|%��>���?5�?� ���
-���ڏ���h];�f���A��
-|Q�߇>(�����
x~�����
-��!�R����W�=�7�/�3F��ƺ��;�u��j��ğx�Ě���PEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP�c
sǿ|G�F|5��?i�
-��¿�i��_���K�T���}3�^��A|F���iڦ�u�C�Os�Cx�
\ No newline at end of file
Copied: branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.jpeg (from rev
1580, trunk/src/test/resources/jaxws/xop/shared/attach.jpeg)
Deleted: branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.txt
===================================================================
--- trunk/src/test/resources/jaxws/xop/shared/attach.txt 2006-12-06 15:52:34 UTC (rev
1580)
+++ branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.txt 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1 +0,0 @@
-This is a plain text attachment.
Copied: branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.txt (from rev
1580, trunk/src/test/resources/jaxws/xop/shared/attach.txt)
Deleted: branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.xml
===================================================================
--- trunk/src/test/resources/jaxws/xop/shared/attach.xml 2006-12-06 15:52:34 UTC (rev
1580)
+++ branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.xml 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<mime-message>This is an xml attachment.</mime-message>
Copied: branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/attach.xml (from rev
1580, trunk/src/test/resources/jaxws/xop/shared/attach.xml)
Deleted: branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/disguised_jpeg.xcf
===================================================================
--- trunk/src/test/resources/jaxws/xop/shared/disguised_jpeg.xcf 2006-12-06 15:52:34 UTC
(rev 1580)
+++
branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/disguised_jpeg.xcf 2006-12-06
19:08:25 UTC (rev 1581)
@@ -1,22 +0,0 @@
-����
-
-
$.' ",#(7),01444'9=82<.342��
2!!22222222222222222222222222222222222222222222222222��
-�U��UA�TT*��QF���G�"IQ����*��x^�O�x}/ϭF��)��(�p������l%%����I�t/�R����w4�Y���g�c��y^�_Lk�z-S��cO_���\�������^S�dZ�NQ���T^oo�C�я��ج&��U�?L�K�a��P��td�����.�Q�4[ftoѽ�.�َi�ggvr�6_q|�T�����Wk��x��\9����&~i���Gg�W!��խ�W�\A�n��C;�.�N�zG�Q��jS�C�ϨUP�h6Ӷ�ݡ������k:F�Y�j��
-W�
-R����(_��
�N��>|��^]3&e�LYE�ot�����
-#��
-��wL���ۚ-�Syi�
-��T�U7we�[n�a٨S�ɜ��V�����py>҅JM�q�����CŎ���k�wxH���u�L�M����͛�-�CТ.��4���Ux�Iͱuܲ=�-?Ԡݼ��}�O��y�<��Nm�wf%ds�h?x}3�l�i-=?��
-'�1��N�J�*W����H�p�,y"�gٴʕ+J��J�*V�+�j���?�Fܨ4G�K��� �Jӽ�D��?�?�%��YOw�2�@�g�2l@�C��\3m���D�{��[
�&�� ���Pa��?$;��Ϙ��̅&)C*l�<@=�gܝ9�pz#���;��#y̜J@�ܼ�(�&_�Gæ��SѦ��T���f^�
�L�Y#�1�R���
�1�Z ��yX��8��ʕ�"/���1J�3��Z���T����˃;X�p�
-�����`"�.Y]"�w
-���o�J�t(}����6Dm6RW�.b���ZLN>0�l4���)S���O�[��w[��K��c�˗.\�^�Җ�pGm�^������Uۍv�2����1bot�<���9�H����iㇼe-*K��ߕ�I�3\߷�_��~�t���x�贎�
dCb$�e�O
[��:N�L����@.Q����?��F� �ɀAC5��q�
-�!B� �Х- Sk�����]zA>�=CP�!��c��%�J���%-����T�̢����}���Z[=��A ==7�9���Cv�'*����8��:e��n��+�YNp�l!p������\�k�s���� *�n�=Ɠ�/m��4�~�&]V����0v��w2����A6D�
-}���.��(���C�hV�\
-�uA���
-->L������@w_D[�V#��B����a�ҭ� ��� t[)�0<���yT
��M9
��lt�ە�;�03Q`���&
��֕��<g�-������9��2���r[g��|������Q1�4�\XX���$g-� `��y��ļٍL�Y��f�F,�q6ZPܶ�"C�yʤ0
-���o��a�R8���A;%��l4:���]_5Ԇӭ��,�7��FE-U�5��c_���%��)�ĵ#��8D�N8��d�'l<����Z�am�E*��c��{Gco��1.�R��=���?�[_�v�
��
"d��%:w�����D]+���t z�l�k�i�����
�F)��[=S��p�.+��"�Sޏ��Zr��!c�
-&W�M[z��9V�� �
-�"����z��'��P�wU�
-�;P!�[�n}nP~�8�-�QVcN�n]H(�pO����bܹq�[Z�%Y\N`W�q�rR�:�t�^��hxa��n�),�LM�/�.��0���
-���h�k�!^�l&���\
-���Kr���;�����DE�8Lnl��[����?��
\ No newline at end of file
Copied: branches/tdiesler/trunk/src/test/resources/jaxws/xop/shared/disguised_jpeg.xcf
(from rev 1580, trunk/src/test/resources/jaxws/xop/shared/disguised_jpeg.xcf)