You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by pr...@apache.org on 2008/01/21 13:20:41 UTC
svn commit: r613867 [3/4] - in
/webservices/axis2/branches/java/jaxws21/modules:
adb-codegen/src/org/apache/axis2/schema/template/ addressing/src/META-INF/
addressing/src/org/apache/axis2/handlers/addressing/
addressing/test/org/apache/axis2/handlers/a...
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/ServiceTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/ServiceTests.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/ServiceTests.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/ServiceTests.java Mon Jan 21 04:20:38 2008
@@ -110,7 +110,7 @@
assertNotNull (service1Delegate);
ServiceDescription service1Desc = service1Delegate.getServiceDescription();
assertNotNull(service1Desc);
- List<QName> service1PortsList = service1Desc.getPorts();
+ List<QName> service1PortsList = service1Desc.getPorts(service1Delegate);
assertNotNull(service1PortsList);
assertEquals(3, service1PortsList.size());
Iterator<QName> service1PortIterator = service1.getPorts();
@@ -123,7 +123,7 @@
assertNotNull (service2Delegate);
ServiceDescription service2Desc = service2Delegate.getServiceDescription();
assertNotNull(service2Desc);
- List<QName> service2PortsList = service2Desc.getPorts();
+ List<QName> service2PortsList = service2Desc.getPorts(service2Delegate);
assertNotNull(service2PortsList);
assertEquals(4, service2PortsList.size());
Iterator<QName> service2PortIterator = service2.getPorts();
@@ -140,12 +140,12 @@
assertNotNull (service1Delegate);
ServiceDescription service1Desc = service1Delegate.getServiceDescription();
assertNotNull(service1Desc);
- List<QName> service1PortsList = service1Desc.getPorts();
+ List<QName> service1PortsList = service1Desc.getPorts(service1Delegate);
assertNotNull(service1PortsList);
assertEquals(3, service1PortsList.size());
service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P1"), null, null);
service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P2"), null, null);
- service1PortsList = service1Desc.getPorts();
+ service1PortsList = service1Desc.getPorts(service1Delegate);
assertEquals(5, service1PortsList.size());
Iterator<QName> service1PortIterator = service1.getPorts();
assertQNameIteratorSameAsList(service1PortIterator, service1PortsList);
@@ -157,12 +157,12 @@
assertNotNull (service2Delegate);
ServiceDescription service2Desc = service2Delegate.getServiceDescription();
assertNotNull(service2Desc);
- List<QName> service2PortsList = service2Desc.getPorts();
+ List<QName> service2PortsList = service2Desc.getPorts(service2Delegate);
assertNotNull(service2PortsList);
assertEquals(4, service2PortsList.size());
service2.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS2P1"), null, null);
service2.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS2P2"), null, null);
- service2PortsList = service2Desc.getPorts();
+ service2PortsList = service2Desc.getPorts(service2Delegate);
assertEquals(6, service2PortsList.size());
Iterator<QName> service2PortIterator = service2.getPorts();
assertQNameIteratorSameAsList(service2PortIterator, service2PortsList);
@@ -178,17 +178,17 @@
assertNotNull (service1Delegate);
ServiceDescription service1Desc = service1Delegate.getServiceDescription();
assertNotNull(service1Desc);
- List<QName> service1PortsList = service1Desc.getPorts();
+ List<QName> service1PortsList = service1Desc.getPorts(service1Delegate);
assertNotNull(service1PortsList);
assertEquals(3, service1PortsList.size());
AddNumbersPortType addNumbersPortS1P1 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S1P1), AddNumbersPortType.class);
- service1PortsList = service1Desc.getPorts();
+ service1PortsList = service1Desc.getPorts(service1Delegate);
assertEquals(3, service1PortsList.size());
AddNumbersPortType addNumbersPortS1P3 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S1P3), AddNumbersPortType.class);
assertEquals(3, service1PortsList.size());
service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P1"), null, null);
service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P2"), null, null);
- service1PortsList = service1Desc.getPorts();
+ service1PortsList = service1Desc.getPorts(service1Delegate);
assertEquals(5, service1PortsList.size());
Iterator<QName> service1PortIterator = service1.getPorts();
assertQNameIteratorSameAsList(service1PortIterator, service1PortsList);
@@ -200,11 +200,11 @@
assertNotNull (service2Delegate);
ServiceDescription service2Desc = service2Delegate.getServiceDescription();
assertNotNull(service2Desc);
- List<QName> service2PortsList = service2Desc.getPorts();
+ List<QName> service2PortsList = service2Desc.getPorts(service2Delegate);
assertNotNull(service2PortsList);
assertEquals(4, service2PortsList.size());
AddNumbersPortType addNumbersPortS2P1 = service2.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S2P1), AddNumbersPortType.class);
- service2PortsList = service2Desc.getPorts();
+ service2PortsList = service2Desc.getPorts(service2Delegate);
assertEquals(4, service2PortsList.size());
AddNumbersPortType addNumbersPortS2P3 = service2.getPort(new QName(VALID_SERVICE_NAMESPACE, VALID_PORT_S2P3), AddNumbersPortType.class);
assertEquals(4, service2PortsList.size());
@@ -212,7 +212,7 @@
assertEquals(4, service2PortsList.size());
service2.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS2P1"), null, null);
service2.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS2P2"), null, null);
- service2PortsList = service2Desc.getPorts();
+ service2PortsList = service2Desc.getPorts(service2Delegate);
assertEquals(6, service2PortsList.size());
Iterator<QName> service2PortIterator = service2.getPorts();
assertQNameIteratorSameAsList(service2PortIterator, service2PortsList);
@@ -226,19 +226,19 @@
assertNotNull (service1Delegate);
ServiceDescription service1Desc = service1Delegate.getServiceDescription();
assertNotNull(service1Desc);
- List<QName> service1PortsList = service1Desc.getPorts();
+ List<QName> service1PortsList = service1Desc.getPorts(service1Delegate);
assertNotNull(service1PortsList);
assertTrue(service1PortsList.isEmpty());
assertEquals(0, service1PortsList.size());
AddNumbersPortType addNumbersPortS1P1 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, "dynamicPortS1P1"), AddNumbersPortType.class);
- service1PortsList = service1Desc.getPorts();
+ service1PortsList = service1Desc.getPorts(service1Delegate);
assertEquals(1, service1PortsList.size());
AddNumbersPortType addNumbersPortS1P3 = service1.getPort(new QName(VALID_SERVICE_NAMESPACE, "dynamicPortS1P2"), AddNumbersPortType.class);
- service1PortsList = service1Desc.getPorts();
+ service1PortsList = service1Desc.getPorts(service1Delegate);
assertEquals(2, service1PortsList.size());
service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P1"), null, null);
service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P2"), null, null);
- service1PortsList = service1Desc.getPorts();
+ service1PortsList = service1Desc.getPorts(service1Delegate);
assertEquals(4, service1PortsList.size());
Iterator<QName> service1PortIterator = service1.getPorts();
assertQNameIteratorSameAsList(service1PortIterator, service1PortsList);
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/WSDLDescriptionTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/WSDLDescriptionTests.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/WSDLDescriptionTests.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/test/org/apache/axis2/jaxws/description/WSDLDescriptionTests.java Mon Jan 21 04:20:38 2008
@@ -140,7 +140,7 @@
QName dispatchPortQN = new QName(VALID_NAMESPACE, "dispatchPort");
service.addPort(dispatchPortQN, null, null);
- EndpointDescription endpointDesc = serviceDescription.getEndpointDescription(dispatchPortQN);
+ EndpointDescription endpointDesc = serviceDescription.getEndpointDescription(dispatchPortQN, serviceDelegate);
assertNotNull(endpointDesc);
EndpointInterfaceDescription endpointInterfaceDesc = endpointDesc.getEndpointInterfaceDescription();
@@ -226,7 +226,7 @@
Class sei = endpointInterfaceDesc.getSEIClass();
assertEquals(EchoPort.class, sei);
- EndpointDescription endpointDescDispatch = serviceDescription.getEndpointDescription(dispatchPortQN);
+ EndpointDescription endpointDescDispatch = serviceDescription.getEndpointDescription(dispatchPortQN, serviceDelegate);
assertNotNull(endpointDescDispatch);
EndpointInterfaceDescription endpointInterfaceDescDispatch = endpointDescDispatch.getEndpointInterfaceDescription();
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java Mon Jan 21 04:20:38 2008
@@ -109,6 +109,12 @@
* WSDL to an AxisEndpoint object.
*/
static final String REFERENCE_PARAMETER_PARAMETER = "referenceParameters";
+
+ /**
+ * This parameter is used to decide whether the reference parameters in an inbound request
+ * message are to be processed or not.
+ */
+ static final String DISABLE_REF_PARAMETER_EXTRACT = "disableRefParamExtract";
static final String WSAM_INVOCATION_PATTERN_PARAMETER_NAME = "wsamInvocationPattern";
static final String WSAM_INVOCATION_PATTERN_SYNCHRONOUS = "synchronous";
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java Mon Jan 21 04:20:38 2008
@@ -67,4 +67,8 @@
public static final String XML_STREAM_EXCEPTION = "StreamException";
public static final String ERROR_LOADING_MESSAGE_BUILDER = "errorloadingbuilder";
public static final String ERROR_LOADING_MESSAGE_FORMATTER = "errorloadingformatter";
+ public static final String DEPLOYING_EXCEPTION = "deployingexception";
+ public static final String STORING_FAUTY_SERVICE = "stroringfaultyservice";
+ public static final String JAXWS_JARS_MISSING = "jaxwsjarsmissing";
+ public static final String FAULTY_SERVICE_REMOVAL = "faultyserviceremoval";
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java Mon Jan 21 04:20:38 2008
@@ -142,6 +142,7 @@
zin.close();
fin.close();
} catch (Exception e) {
+ log.debug(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_EXCEPTION,e.getMessage()),e);
throw new DeploymentException(e);
} finally {
if (zin != null) {
@@ -211,8 +212,10 @@
}
}
} catch (Exception e) {
+ log.debug(Messages.getMessage(DeploymentErrorMsgs.STORING_FAUTY_SERVICE,e.getMessage()),e);
storeFaultyService(deploymentFileData, e);
} catch (Throwable t) {
+ log.debug(Messages.getMessage(DeploymentErrorMsgs.STORING_FAUTY_SERVICE,t.getMessage()),t);
storeFaultyService(deploymentFileData, t);
} finally {
if (threadClassLoader != null) {
@@ -265,6 +268,7 @@
}
}
axisService.setElementFormDefault(false);
+ axisService.setFileName(serviceLocation);
Utils.fillAxisService(axisService,
configCtx.getAxisConfiguration(),
new ArrayList(),
@@ -273,8 +277,9 @@
//setMessageReceivers(axisService);
} catch (Exception e) {
- // Seems like the jax-ws jars missin in the class path .
- // lets tryu annogen
+ // Seems like the jax-ws jars missing in the class path .
+ // lets try with annogen
+ log.debug(Messages.getMessage(DeploymentErrorMsgs.JAXWS_JARS_MISSING,e.getMessage()),e);
axisService = createAxisServiceUsingAnnogen(className, classLoader, serviceLocation);
}
return axisService;
@@ -363,6 +368,7 @@
fileName));
} catch (AxisFault axisFault) {
//May be a faulty service
+ log.debug(Messages.getMessage(DeploymentErrorMsgs.FAULTY_SERVICE_REMOVAL,axisFault.getMessage()),axisFault);
configCtx.getAxisConfiguration().removeFaultyService(fileName);
}
} else if (fileName.endsWith(".jar")) {
@@ -374,6 +380,7 @@
fileName));
} catch (AxisFault axisFault) {
//May be a faulty service
+ log.debug(Messages.getMessage(DeploymentErrorMsgs.FAULTY_SERVICE_REMOVAL,axisFault.getMessage()),axisFault);
configCtx.getAxisConfiguration().removeFaultyService(fileName);
}
}
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/description/AxisService.java Mon Jan 21 04:20:38 2008
@@ -2036,24 +2036,19 @@
String targetNameSpace = schema.getTargetNamespace();
String prefix = schema.getNamespaceContext().getPrefix(targetNameSpace);
- boolean found = false;
- if (namespaceMap != null && namespaceMap.size() > 0) {
- Iterator itr = namespaceMap.values().iterator();
- Set keys = namespaceMap.keySet();
- while (itr.hasNext()) {
- String value = (String) itr.next();
- if (value.equals(targetNameSpace) && keys.contains(prefix)) {
- found = true;
- }
- }
- }
if (namespaceMap == null) {
namespaceMap = new NamespaceMap();
}
- if (!found) {
- namespaceMap.put("ns" + nsCount, targetNameSpace);
- nsCount++;
+
+ if (!namespaceMap.values().contains(targetNameSpace)){
+ // i.e this target namespace not exists in the namesapce map
+ // find a non exists prefix to add this target namesapce
+ while (namespaceMap.keySet().contains(prefix)){
+ prefix = "ns" + nsCount++;
+ }
+ namespaceMap.put(prefix,targetNameSpace);
}
+
}
public Map populateSchemaMappings(){
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DeployableChain.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DeployableChain.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DeployableChain.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/engine/DeployableChain.java Mon Jan 21 04:20:38 2008
@@ -27,6 +27,8 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
/**
* A DeployableChain is a container which manages dependencies between Deployables. You
@@ -109,7 +111,7 @@
if (mySuccessors != null && !mySuccessors.isEmpty()) {
Set successors = (Set)activeConstraints.get(name);
if (successors == null) {
- successors = new HashSet();
+ successors = new LinkedHashSet();
activeConstraints.put(name, successors);
}
successors.addAll(mySuccessors);
@@ -200,7 +202,7 @@
public void rebuild() throws Exception {
chain.clear();
- Set keys = new HashSet();
+ Set keys = new LinkedHashSet();
keys.addAll(deployed.keySet());
// First goes first.
@@ -222,7 +224,7 @@
while (!keys.isEmpty()) {
String name = (String)keys.iterator().next();
- getMinIndex(name, keys, new HashSet());
+ getMinIndex(name, keys, new LinkedHashSet());
}
// Now we've got a chain of names. Convert to actual things before we return.
@@ -241,7 +243,7 @@
public void addRelationship(String before, String after) {
Set successors = (Set)activeConstraints.get(before);
if (successors == null) {
- successors = new HashSet();
+ successors = new LinkedHashSet();
activeConstraints.put(before, successors);
}
successors.add(after);
Modified: webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/i18n/resource.properties?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/i18n/resource.properties (original)
+++ webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/i18n/resource.properties Mon Jan 21 04:20:38 2008
@@ -275,4 +275,8 @@
nomessagereciever=Message Receiver not found for AxisOperation: {0}
duplicaterelatesto=The message is a duplicate (has the same reply relationship value) of an already processed message. RelatesTo = {0}
getMessageContextError=The message context could not be retrieved due to the following error: {0}
-mismatchedModuleVersions=Tried to deploy (to {0}) a module ''{1}'' when ''{2}'' was already deployed - version mismatch!
\ No newline at end of file
+mismatchedModuleVersions=Tried to deploy (to {0}) a module ''{1}'' when ''{2}'' was already deployed - version mismatch!
+deployingexception=Deploying Exception Occured with {0}
+stroringfaultyservice=Exception occured and made the service faulty with {0}
+jaxwsjarsmissing=JAXWS jars are missing in the classpath with {0}, switching to annongen
+faultyserviceremoval=Predicting faulty service with {0}, and removing it
\ No newline at end of file
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/pom.xml?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/pom.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/pom.xml Mon Jan 21 04:20:38 2008
@@ -90,14 +90,16 @@
</resource>
</resources>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <compilerArgument>-Xbootclasspath/p:${basedir}/../jaxws-api/target/classes${path.separator}${basedir}/../jws-api/target/classes</compilerArgument>
+ <compilerVersion>1.5</compilerVersion>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/DescriptionFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/DescriptionFactory.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/DescriptionFactory.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/DescriptionFactory.java Mon Jan 21 04:20:38 2008
@@ -31,7 +31,7 @@
import java.util.List;
/**
- * Creates the JAX-WS metadata descritpion hierachy from some combinations of WSDL, Java class
+ * Creates the JAX-WS metadata description hierarchy from some combinations of WSDL, Java class
* information including annotations, and (in the future) deployment descriptors.
*/
public class DescriptionFactory {
@@ -51,9 +51,9 @@
}
/**
- * Create the initial ServiceDescription hierachy on the CLIENT side. This is intended to be
+ * Create the initial ServiceDescription hierarchy on the CLIENT side. This is intended to be
* called when the client creates a ServiceDelegate. Note that it will only create the
- * ServiceDescription at this point. The EndpointDescription hierachy under this
+ * ServiceDescription at this point. The EndpointDescription hierarchy under this
* ServiceDescription will be created by the updateEndpoint factory method, which will be called
* by the ServiceDelegate once the port is known (i.e. addPort, getPort, or createDispatch).
*
@@ -71,8 +71,8 @@
/**
- * Create the initial ServiceDescripton hierachy on the CLIENT side. This allows a sparse DBC
- * to be specified in addition to the service class. The sparce DBC can be used to override
+ * Create the initial ServiceDescripton hierarchy on the CLIENT side. This allows a sparse DBC
+ * to be specified in addition to the service class. The sparse DBC can be used to override
* the class annotation member values.
*
* @see #createServiceDescription(URL, QName, Class)
@@ -93,13 +93,13 @@
}
/**
- * Retrieve or create the EndpointDescription hierachy associated with an existing CLIENT side
+ * Retrieve or create the EndpointDescription hierarchy associated with an existing CLIENT side
* ServiceDescription for a particular port. If an EndpointDescritption already exists, it will
* be returned; if one does not already exist, it will be created. Note that if the SEI is null
* then the EndpointDescription returned will be for a Dispatch client only and it will not have
- * an EndpointInterfaceDescription hierachy associated with it. If, at a later point, the same
+ * an EndpointInterfaceDescription hierarchy associated with it. If, at a later point, the same
* port is requested and an SEI is provided, the existing EndpointDescription will be updated
- * with a newly-created EndpointInterfaceDescription hieracy.
+ * with a newly-created EndpointInterfaceDescription hierarchy.
*
* @param serviceDescription An existing client-side ServiceDescription. This must not be
* null.
@@ -121,8 +121,36 @@
}
/**
- * Retrieve or create an EndpointDescription hierachy associated with an existing CLIENT side
- * ServiceDescription for a particular port. Additonal metdata may be specified in a sparse
+ * Retrieve or create the EndpointDescription hierarchy associated with an existing CLIENT side
+ * ServiceDescription for a particular port. This is identical to above, but this method has a
+ * reference back to the ServiceDelegate (which invoked it) for purposes of properly caching
+ * ServiceDescriptions that contain dynamic ports
+ *
+ * @param serviceDescription An existing client-side ServiceDescription. This must not be
+ * null.
+ * @param sei The ServiceInterface class. This can be null for adding a port or
+ * creating a Dispatch; it can not be null when getting a port.
+ * @param portQName The QName of the port. If this is null, the runtime will attempt
+ * to to select an appropriate port to use.
+ * @param updateType The type of the update: adding a port, creating a dispatch, or
+ * getting an SEI-based port.
+ * @param serviceDelegateKey A reference back to the ServiceDelegate that called it
+ * @return An EndpointDescription corresponding to the port.
+ * @see #createServiceDescription(URL, QName, Class)
+ * @see DescriptionFactory.UpdateType
+ */
+ public static EndpointDescription updateEndpoint(ServiceDescription serviceDescription,
+ Class sei,
+ QName portQName,
+ DescriptionFactory.UpdateType updateType,
+ Object serviceDelegateKey) {
+ return DescriptionFactoryImpl
+ .updateEndpoint(serviceDescription, sei, portQName, updateType, serviceDelegateKey);
+ }
+
+ /**
+ * Retrieve or create an EndpointDescription hierarchy associated with an existing CLIENT side
+ * ServiceDescription for a particular port. Additional metadata may be specified in a sparse
* composite. That metadata may come from a JSR-109 client deployment descriptor, for example,
* or from resource injection of an WebServiceRef or other Resource annotation.
*
@@ -172,6 +200,34 @@
return DescriptionFactoryImpl
.updateEndpoint(serviceDescription, sei, epr, addressingNamespace, updateType);
}
+
+ /**
+ * Retrieve or create the EndpointDescription hierarchy associated with an existing CLIENT side
+ * ServiceDescription for a particular port. This is identical to above, but this method has a
+ * reference back to the ServiceDelegate (which invoked it) for purposes of properly caching
+ * ServiceDescriptions that contain dynamic ports
+ *
+ * @param serviceDescription An existing client-side ServiceDescription. This must not be
+ * null.
+ * @param sei The ServiceInterface class. This can be null for adding a port or
+ * creating a Dispatch; it can not be null when getting a port.
+ * @param epr The endpoint reference to the target port.
+ * @param addressingNamespace The addressing namespace of the endpoint reference.
+ * @param updateType The type of the update: adding a port, creating a dispatch, or
+ * getting an SEI-based port.
+ * @param serviceDelegateKey A reference back to the ServiceDelegate that called it
+ * @return An EndpointDescription corresponding to the port.
+ * @see #createServiceDescription(URL, QName, Class)
+ * @see DescriptionFactory.UpdateType
+ */
+ public static EndpointDescription updateEndpoint(ServiceDescription serviceDescription,
+ Class sei, EndpointReference epr,
+ String addressingNamespace,
+ DescriptionFactory.UpdateType updateType,
+ Object serviceDelegateKey) {
+ return DescriptionFactoryImpl
+ .updateEndpoint(serviceDescription, sei, epr, addressingNamespace, updateType, serviceDelegateKey);
+ }
/**
* Retrieve or create an EndpointDescription hierachy associated with an existing CLIENT side
@@ -199,7 +255,7 @@
}
/**
- * Create a full ServiceDescription hierachy on the SERVER side for EACH service implementation
+ * Create a full ServiceDescription hierarchy on the SERVER side for EACH service implementation
* entry in the DescriptionBuilderComposite (DBC) map. Note that the associated SERVER side
* Axis description objects are also created. To create a single ServiceDescription hierarchy
* for a single service implementation class, use the factory method that takes a single class
@@ -212,14 +268,14 @@
* other DBC entries in the map for classes and interfaces associated with the service
* implementation, such as super classes, super interfaces, fault classes, and such.
* <p/>
- * Note that map may contain > 1 service implementation DBC. A full ServiceDescriptionHierachy
+ * Note that map may contain > 1 service implementation DBC. A full ServiceDescriptionhierarchy
* will be created for each service implementation DBC entry.
* <p/>
* Note that each ServiceDescription will have exactly one EndpointDescription corresponding to
* each service implementation.
*
* @param dbcMap A HashMap keyed on class name with a value for the DBC for that classname
- * @return A List of ServiceDescriptions with the associated SERVER side hierachy created.
+ * @return A List of ServiceDescriptions with the associated SERVER side hierarchy created.
*/
public static List<ServiceDescription> createServiceDescriptionFromDBCMap(
HashMap<String, DescriptionBuilderComposite> dbcMap) {
@@ -227,9 +283,9 @@
}
/**
- * Create a full ServiceDescription hierachy on the SERVER side for a single service
+ * Create a full ServiceDescription hierarchy on the SERVER side for a single service
* implementation class. To create process more than one service implementation at one time or
- * to process them without causing the service implemenation classes to be loaded, use the
+ * to process them without causing the service implementation classes to be loaded, use the
* factory method that takes a collection of DescriptionBuilderComposite objects and returns a
* collection of ServiceDescriptions.
* <p/>
@@ -238,7 +294,7 @@
*
* @param serviceImplClass A Web Service implementation class (i.e. one that carries an
* WebService or WebServiceProvider annotation).
- * @return A ServiceDescription with the associated SERVER side hierachy created.
+ * @return A ServiceDescription with the associated SERVER side hierarchy created.
*/
public static ServiceDescription createServiceDescription(Class serviceImplClass) {
return DescriptionFactoryImpl.createServiceDescription(serviceImplClass);
@@ -266,7 +322,7 @@
* @param serviceImplClass A service implementation class with annotations
* @param axisService A FULLY POPULATED AxisService including all of the underlying
* description objects such as AxisOperations.
- * @return A ServiceDescription hierachy constructed (via Java reflection) from the service
+ * @return A ServiceDescription hierarchy constructed (via Java reflection) from the service
* implementation class and tied via properties to the existing AxisService object.
* @deprecated Use {@link #createServiceDescriptionFromDBCMap(HashMap)}
*/
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/ServiceDescription.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/ServiceDescription.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/ServiceDescription.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/ServiceDescription.java Mon Jan 21 04:20:38 2008
@@ -63,12 +63,16 @@
*/
public interface ServiceDescription {
- public abstract EndpointDescription[] getEndpointDescriptions();
+
+ public abstract EndpointDescription[] getEndpointDescriptions();
public abstract Collection<EndpointDescription> getEndpointDescriptions_AsCollection();
public abstract EndpointDescription getEndpointDescription(QName portQName);
+ // Called the client-side to retrieve defined and dynamic ports
+ public abstract EndpointDescription getEndpointDescription(QName portQName, Object serviceDelegateKey);
+
/**
* Return the EndpointDescriptions corresponding to the SEI class. Note that Dispatch endpoints
* will never be returned because they do not have an associated SEI.
@@ -80,19 +84,23 @@
public abstract ConfigurationContext getAxisConfigContext();
- public abstract ServiceClient getServiceClient(QName portQName);
+ public abstract ServiceClient getServiceClient(QName portQName, Object serviceDelegateKey);
public abstract QName getServiceQName();
public abstract HandlerChainsType getHandlerChain();
+
/**
* Returns a list of the ports for this serivce. The ports returned are the - Ports declared
* ports for this Service. They can be delcared in the WSDL or via annotations. - Dynamic ports
* added to the service
*
+ * @param serviceDelegateKey This should always be non-null when called via ServiceDelegate and is
+ * used to help retrieve dynamic ports per client
+
* @return
*/
- public List<QName> getPorts();
+ public List<QName> getPorts(Object serviceDelegateKey);
public ServiceRuntimeDescription getServiceRuntimeDesc(String name);
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java Mon Jan 21 04:20:38 2008
@@ -29,18 +29,11 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import javax.jws.HandlerChain;
import javax.wsdl.Definition;
import javax.xml.namespace.QName;
-import javax.xml.ws.BindingType;
-import javax.xml.ws.ServiceMode;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceProvider;
import java.io.InputStream;
import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.security.PrivilegedAction;
@@ -50,6 +43,7 @@
import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
+import org.apache.axis2.jaxws.i18n.Messages;
public class DescriptionBuilderComposite implements TMAnnotationComposite, TMFAnnotationComposite {
@@ -126,7 +120,6 @@
// For a service requester, this will be the client-side class associated with this composite;
// It could be the Service class or the SEI class. On the service provider this will be null
// unless the deprecated service construction logic in DescriptionFactory was used.
- // TODO: (JLB) Remove the comment about the deprecated service construction logi
private Class theCorrespondingClass;
// Service-requesters (aka clients) can specify a sprase composite that may contain annotation
@@ -327,8 +320,10 @@
+ "; Composite Annot class: " + compositeAnnotClass
+ "; Java Annot class: " + javaAnnotationClass, e);
}
- // TODO: (JLB) NLS
- throw ExceptionFactory.makeWebServiceException("Unable to create composite annotation", e);
+ String msg = Messages.getMessage("DescriptionBuilderErr1",
+ compositeAnnotClass.toString(),
+ e.toString());
+ throw ExceptionFactory.makeWebServiceException(msg, e);
}
}
}
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceClientAnnot.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceClientAnnot.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceClientAnnot.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceClientAnnot.java Mon Jan 21 04:20:38 2008
@@ -20,9 +20,11 @@
package org.apache.axis2.jaxws.description.builder;
import org.apache.axis2.jaxws.ExceptionFactory;
+import org.apache.axis2.jaxws.i18n.Messages;
import java.lang.annotation.Annotation;
+
public class WebServiceClientAnnot implements javax.xml.ws.WebServiceClient {
private String name;
@@ -125,10 +127,11 @@
// No anntotation specifed, so just return null which was initialized above
} else {
// This should never happen; all the cases are covered above
- // TODO: (JLB) RAS/NLS
- throw ExceptionFactory.makeWebServiceException("Programming error! annot = " + baseAnnotation + "; sparseAnnot = " + sparseAnnotation);
+ String msg = Messages.getMessage("DescriptionBuilderErr2",
+ (sparseAnnotation == null) ? null : sparseAnnotation.toString(),
+ (baseAnnotation == null) ? null : baseAnnotation.toString());
+ throw ExceptionFactory.makeWebServiceException(msg);
}
-
return returnAnnot;
}
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceRefAnnot.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceRefAnnot.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceRefAnnot.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceRefAnnot.java Mon Jan 21 04:20:38 2008
@@ -29,7 +29,8 @@
private Class value;
private String mappedName = "";
- // TODO: (JLB) Remove the String versions of the Class attributes?
+ // TODO: Remove the String versions of the Class attributes when the associated deprecated
+ // methods are removed.
private String typeString = "";
private String valueString = "";
@@ -51,7 +52,18 @@
this.mappedName = mappedName;
}
- // TODO: (JLB) Deprecate or remove this; has both Class and String for value and type
+ /**
+ *
+ * @deprecated The String values for type and value shouldn't be used. Use {@link #WebServiceRefAnnot(String, String, Class, Class, String)}
+ *
+ * @param name
+ * @param wsdlLocation
+ * @param type
+ * @param value
+ * @param mappedName
+ * @param typeString
+ * @param valueString
+ */
private WebServiceRefAnnot(
String name,
String wsdlLocation,
@@ -86,12 +98,22 @@
mappedName);
}
- // TODO: (JLB) Why is there both a class and String for type and value?
- // There isn't on the actual annotation, only the class is there
- // Looks like SERV1/ws/code/websvcs/src/com/ibm/ws/websvcs/annotations/adapters/WebServiceRefAdapter.java
- // only reference in WAS to the string "createWebServiceRefAnnotImpl", and it sets the String values, not the classes
- // Check with Dustin, can they give us the class (instead of string) since we may not have the right classloader
- // to create the class when the getter is called.
+ /**
+ *
+ * @deprecated The String values for type and value should not be used. Use {@link #createWebServiceRefAnnotImpl(String, String, Class, Class, String)}
+ *
+ * There shouldn't be both a class and String for type and value; there isn't on the actual
+ * annotation.
+ *
+ * @param name
+ * @param wsdlLocation
+ * @param type
+ * @param value
+ * @param mappedName
+ * @param typeString
+ * @param valueString
+ * @return
+ */
public static WebServiceRefAnnot createWebServiceRefAnnotImpl(
String name,
String wsdlLocation,
@@ -136,14 +158,17 @@
return wsdlLocation;
}
- // TODO: (JLB) Remove this?
- /** @return Returns the typeString. */
+ /**
+ * @deprecated Use {@link #type()}
+ * @return Returns the typeString.
+ */
public String getTypeString() {
return typeString;
}
- // TODO: (JLB) Remove this?
- /** @return Returns the valueString. */
+ /**
+ * @deprecated Use {@link #value()}
+ * @return Returns the valueString. */
public String getValueString() {
return valueString;
}
@@ -178,14 +203,16 @@
return wsdlLocation;
}
- // TODO: (JLB) Remove this?
- /** @param typeString The typeString to set. */
+ /**
+ * @deprecated Use {@link #setType(Class)}
+ * @param typeString The typeString to set. */
public void setTypeString(String typeString) {
this.typeString = typeString;
}
- // TODO: (JLB) Remove this?
- /** @param valueString The valueString to set. */
+ /**
+ * @deprecated {@link #setValue(Class)}
+ * @param valueString The valueString to set. */
public void setValueString(String valueString) {
this.valueString = valueString;
}
@@ -208,10 +235,14 @@
sb.append(newLine);
sb.append("@WebServiceRef.mappedName= " + mappedName);
sb.append(newLine);
- sb.append("@WebServiceRef.type= " + typeString);
+ sb.append("@WebServiceRef.typeString= " + typeString);
+ sb.append(newLine);
+ sb.append("@WebServiceRef.type= " + ((type != null) ? type.toString() : null));
+ sb.append(newLine);
+ sb.append("@WebServiceRef.valueString= " + valueString);
sb.append(newLine);
- sb.append("@WebServiceRef.value= " + valueString);
+ sb.append("@WebServiceRef.value= " + ((value != null) ? value.toString() : null));
sb.append(newLine);
- return sb.toString();
+ return sb.toString();
}
}
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java Mon Jan 21 04:20:38 2008
@@ -292,18 +292,28 @@
}
/**
+ * @see org.apache.axis2.jaxws.description.DescriptionFactory#updateEndpoint(ServiceDescription,
+ * Class, QName, org.apache.axis2.jaxws.description.DescriptionFactory.UpdateType)
+ */
+ public static EndpointDescription updateEndpoint(
+ ServiceDescription serviceDescription, Class sei, QName portQName,
+ DescriptionFactory.UpdateType updateType, Object serviceDelegateKey ) {
+ return updateEndpoint(serviceDescription, sei, portQName, updateType, null, serviceDelegateKey);
+ }
+
+ /**
* @see org.apache.axis2.jaxws.description.DescriptionFactory#updateEndpoint(ServiceDescription, Class, QName, org.apache.axis2.jaxws.description.DescriptionFactory.UpdateType, DescriptionBuilderComposite)
*/
public static EndpointDescription updateEndpoint(
ServiceDescription serviceDescription, Class sei, QName portQName,
DescriptionFactory.UpdateType updateType,
DescriptionBuilderComposite composite,
- Object compositeKey) {
+ Object serviceDelegateKey) {
EndpointDescription endpointDesc = null;
synchronized(serviceDescription) {
endpointDesc =
((ServiceDescriptionImpl)serviceDescription)
- .updateEndpointDescription(sei, portQName, updateType, composite, compositeKey);
+ .updateEndpointDescription(sei, portQName, updateType, composite, serviceDelegateKey);
}
EndpointDescriptionValidator endpointValidator = new EndpointDescriptionValidator(endpointDesc);
@@ -330,6 +340,18 @@
String addressingNamespace,
DescriptionFactory.UpdateType updateType) {
return updateEndpoint(serviceDescription, sei, epr, addressingNamespace, updateType, null, null);
+ }
+
+ /**
+ * @see org.apache.axis2.jaxws.description.DescriptionFactory#updateEndpoint(ServiceDescription,
+ * Class, EndpointReference, String, DescriptionFactory.UpdateType, Object)
+ */
+ public static EndpointDescription updateEndpoint(
+ ServiceDescription serviceDescription, Class sei, EndpointReference epr,
+ String addressingNamespace,
+ DescriptionFactory.UpdateType updateType,
+ Object sparseCompositeKey) {
+ return updateEndpoint(serviceDescription, sei, epr, addressingNamespace, updateType, null, sparseCompositeKey);
}
/**
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java Mon Jan 21 04:20:38 2008
@@ -226,15 +226,7 @@
composite.setCorrespondingClass(theClass);
composite.setClassLoader(this.getClass().getClassLoader());
composite.setIsServiceProvider(false);
- // REVIEW: setting these should probably be done in the getters! It needs to be done before we try to select a
- // port to use if one wasn't specified because we'll try to get to the annotations to get the PortType
- // TODO: (JLB) REmove commented out code
-// if (this.implOrSEIClass != null) {
-// webServiceAnnotation = (WebService)getAnnotation(implOrSEIClass,WebService.class);
-// // TODO: (JLB) Seems like the provider annotation is only for the deprecated service construction and can be removed
-// webServiceProviderAnnotation =
-// (WebServiceProvider)getAnnotation(implOrSEIClass,WebServiceProvider.class);
-// }
+
webServiceAnnotation = composite.getWebServiceAnnot();
this.isDynamicPort = dynamicPort;
@@ -570,7 +562,6 @@
// TODO: Add tests to verify this error checking
if (composite.isDeprecatedServiceProviderConstruction()) {
-// if (!getServiceDescriptionImpl().isDBCMap()) {
webServiceAnnotation = composite.getWebServiceAnnot();
webServiceProviderAnnotation = composite.getWebServiceProviderAnnot();
@@ -598,18 +589,14 @@
if (composite.isDeprecatedServiceProviderConstruction()
|| !composite.isServiceProvider()) {
-// if (!getServiceDescriptionImpl().isDBCMap()) {
Class seiClass = null;
if (DescriptionUtils.isEmpty(seiClassName)) {
- // TODO: (JLB) This is the client code path; the @WebServce will not have an endpointInterface member
- // For now, just build the EndpointInterfaceDesc based on the class itself.
- // TODO: The EID ctor doesn't correctly handle anything but an SEI at this
- // point; e.g. it doesn't publish the correct methods of just an impl.
+ // This is the client code path; the @WebServce will not have an endpointInterface member
+ // so just build the EndpointInterfaceDesc based on the class itself.
seiClass = composite.getCorrespondingClass();
} else {
- // TODO: (JLB) This is the deprecated server-side introspection code for an impl that references an SEI
+ // This is the deprecated server-side introspection code for an impl that references an SEI
try {
- // TODO: Using Class forName() is probably not the best long-term way to get the SEI class from the annotation
seiClass = ClassLoaderUtils.forName(seiClassName, false,
ClassLoaderUtils.getContextClassLoader(this.axisService != null ? this.axisService.getClassLoader() : null));
// Catch Throwable as ClassLoader can throw an NoClassDefFoundError that
@@ -622,17 +609,14 @@
}
endpointInterfaceDescription = new EndpointInterfaceDescriptionImpl(seiClass, this);
} else {
- //TODO: Determine if we need logic here to determine implied SEI or not. This logic
- // may be handled by EndpointInterfaceDescription
-
if (DescriptionUtils.isEmpty(getAnnoWebServiceEndpointInterface())) {
- //TODO: Build the EndpointInterfaceDesc based on the class itself
+ // Build the EndpointInterfaceDesc based on the class itself
endpointInterfaceDescription =
new EndpointInterfaceDescriptionImpl(composite, true, this);
} else {
- //Otherwise, build the EID based on the SEI composite
+ // Otherwise, build the EID based on the SEI composite
endpointInterfaceDescription = new EndpointInterfaceDescriptionImpl(
getServiceDescriptionImpl().getDBCMap().get(seiClassName),
false,
@@ -930,10 +914,6 @@
// WSDL to build up the hierachy since the port added to the Service by the client is not
// one that will be present in the WSDL.
- //First, check to see if we can build this with the DBC List
- //TODO: When MDQ input is the only possible input, then we can remove the check for
- // the DBC list, until that time the code in here may appear somewhat redundant
- // TODO: (JLB) Can this logic be combined?
if (composite.isServiceProvider()) {
if (!isDynamicPort && isWSDLFullySpecified())
buildEndpointDescriptionFromWSDL();
@@ -1319,7 +1299,7 @@
String className = composite.getClassName();
- // TODO: (JLB) This is using the classloader for EndpointDescriptionImpl; is that OK?
+ // REVIEW: This is using the classloader for EndpointDescriptionImpl; is that OK?
ClassLoader classLoader = (composite.isServiceProvider() && !composite.isDeprecatedServiceProviderConstruction()) ?
composite.getClassLoader() : this.getClass().getClassLoader();
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java Mon Jan 21 04:20:38 2008
@@ -66,10 +66,6 @@
private ArrayList<OperationDescription> operationDescriptions =
new ArrayList<OperationDescription>();
private Map<QName, List<OperationDescription>> dispatchableOperations = new HashMap<QName, List<OperationDescription>>();
- // This may be an actual Service Endpoint Interface -OR- it may be a service implementation class that did not
- // specify an @WebService.endpointInterface.
- // TODO: (JLB) Remove commented out code
-// private Class seiClass;
private DescriptionBuilderComposite dbc;
//Logging setup
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Mon Jan 21 04:20:38 2008
@@ -75,6 +75,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.WeakHashMap;
/** @see ../ServiceDescription */
@@ -94,9 +95,15 @@
private HandlerChain handlerChainAnnotation;
private HandlerChainsType handlerChainsType;
- private Map<QName, EndpointDescription> endpointDescriptions =
- new HashMap<QName, EndpointDescription>();
+ // EndpointDescriptions from annotations and wsdl
+ private Map<QName, EndpointDescription> definedEndpointDescriptions =
+ new HashMap<QName, EndpointDescription>();
+
+ // Endpoints for dynamic ports
+ private Map<Object, Map<QName, EndpointDescriptionImpl>> dynamicEndpointDescriptions =
+ new WeakHashMap<Object, Map<QName, EndpointDescriptionImpl>>();
+
private static final Log log = LogFactory.getLog(ServiceDescriptionImpl.class);
private HashMap<String, DescriptionBuilderComposite> dbcMap = null;
@@ -154,19 +161,15 @@
composite = new DescriptionBuilderComposite();
composite.setIsServiceProvider(false);
composite.setCorrespondingClass(serviceClass);
- composite.setSparseComposite(sparseCompositeKey, sparseComposite);
- URL sparseCompositeWsdlURL = getWsdlURL(serviceClass, sparseComposite);
// The classloader was originally gotten off this class, but it seems more logical to
// get it off the application service class.
// composite.setClassLoader(this.getClass().getClassLoader());
composite.setClassLoader(serviceClass.getClassLoader());
-
- // TODO: On the client side, we should not support partial WSDL; i.e. if the WSDL is specified it must be
- // complete and must contain the ServiceQName. This is how the Sun RI behaves on the client.
- // When this is fixed, the check in ServiceDelegate(URL, QName, Class) should be removed
+ composite.setSparseComposite(sparseCompositeKey, sparseComposite);
// If there's a WSDL URL specified in the sparse composite, that is a override, for example
// from a JSR-109 deployment descriptor, and that's the one to use.
+ URL sparseCompositeWsdlURL = getSparseCompositeWsdlURL(sparseComposite);
if (sparseCompositeWsdlURL != null) {
if (log.isDebugEnabled()) {
log.debug("Wsdl location overriden by sparse composite; overriden value: " + this.wsdlURL);
@@ -178,47 +181,27 @@
if (log.isDebugEnabled()) {
log.debug("Wsdl Location value used: " + this.wsdlURL);
}
+ // TODO: On the client side, we should not support partial WSDL; i.e. if the WSDL is specified it must be
+ // complete and must contain the ServiceQName. This is how the Sun RI behaves on the client.
+ // When this is fixed, the check in ServiceDelegate(URL, QName, Class) should be removed
+
// TODO: The serviceQName needs to be verified between the argument/WSDL/Annotation
this.serviceQName = serviceQName;
setupWsdlDefinition();
}
- URL getWsdlURL(Class clazz, DescriptionBuilderComposite sparseComposite) {
+ URL getSparseCompositeWsdlURL(DescriptionBuilderComposite sparseComposite) {
// Use the WSDL file if it is specified in the composite
- // TODO: (JLB) This logic is common with stuff Dustin put in ServiceDescriptionImpl to
- // do WSDL file reading in MDQ; refactor them into common helper class.
URL url = null;
if (sparseComposite != null) {
WebServiceClient wsc = (WebServiceClient) sparseComposite.getWebServiceClientAnnot();
if (wsc != null && wsc.wsdlLocation() != null) {
String wsdlLocation = wsc.wsdlLocation();
- // Look for the WSDL file as follows:
- // 1) As a resource on the classpath
- // 2) As a fully specified URL
- // 3) As a file on the filesystem. This is analagous to what the generated
- // Service client does. Is prepends "file:/" to whatever is specified in the
- // @WegServiceClient.wsdlLocation element.
- URL wsdlUrl = null;
- wsdlUrl = clazz.getClassLoader().getResource(wsdlLocation);
- if (wsdlUrl == null) {
- wsdlUrl = createWsdlURL(wsdlLocation);
- }
- if (wsdlUrl == null) {
- // This check is necessary because Unix/Linux file paths begin
- // with a '/'. When adding the prefix 'jar:file:/' we may end
- // up with '//' after the 'file:' part. This causes the URL
- // object to treat this like a remote resource
- if(wsdlLocation.indexOf("/") == 0) {
- wsdlLocation = wsdlLocation.substring(1, wsdlLocation.length());
- }
- wsdlUrl = createWsdlURL("file:/" + wsdlLocation);
- }
+ URL wsdlUrl = getWSDLURL(wsdlLocation);
if (wsdlUrl == null) {
- // TODO: (JLB) NLS
- throw ExceptionFactory.makeWebServiceException("Unable to access wsdlLocation: "
- + wsdlLocation);
+ throw ExceptionFactory.makeWebServiceException(Messages.getMessage("serviceDescErr4", wsdlLocation));
} else {
url = wsdlUrl;
}
@@ -226,12 +209,17 @@
}
return url;
}
+
private static URL createWsdlURL(String wsdlLocation) {
URL theUrl = null;
try {
theUrl = new URL(wsdlLocation);
} catch (Exception ex) {
// Just return a null to indicate we couldn't create a URL from the string
+ if (log.isDebugEnabled()) {
+ log.debug("Unable to obtain URL for WSDL file: " + wsdlLocation
+ + " by using File reference");
+ }
}
return theUrl;
}
@@ -250,7 +238,6 @@
composite = new DescriptionBuilderComposite();
composite.setIsDeprecatedServiceProviderConstruction(true);
composite.setIsServiceProvider(true);
- // TODO: (JLB) does the composite corresponding class AND the classloader need to be set here?
isServerSide = true;
// Create the EndpointDescription hierachy from the service impl annotations; Since the PortQName is null,
@@ -340,22 +327,33 @@
* Dispatch-based client to either a declared port or a pre-existing dynamic
* port.
* @param composite May contain sparse metadata, for example from a deployment descriptor, that
- * should be used in conjuction with the class annotations to update the
- * description hierachy. For example, it may contain a HandlerChain annotation
- * based on information in a JSR-109 deploment descriptor.
+ * should be used in conjunction with the class annotations to update the
+ * description hierarchy. For example, it may contain a HandlerChain annotation
+ * based on information in a JSR-109 deployment descriptor.
*/
- EndpointDescription updateEndpointDescription(Class sei, QName portQName,
+ EndpointDescription updateEndpointDescription(Class sei,
+ QName portQName,
DescriptionFactory.UpdateType updateType,
DescriptionBuilderComposite composite,
- Object compositeKey) {
+ Object serviceDelegateKey) {
+
+
+ EndpointDescriptionImpl endpointDescription = getEndpointDescriptionImpl(portQName);
+ boolean isPortDeclared = isPortDeclared(portQName);
+
+ // If a defined endpointDescription is not available, try and locate a dynamic endpoint.
+ // Note that a dynamic port will only be found for the client that created it, per the
+ // serviceDelegateKey
+
+ if (endpointDescription == null && serviceDelegateKey != null) {
+ endpointDescription = getDynamicEndpointDescriptionImpl(portQName, serviceDelegateKey);
+ }
- EndpointDescriptionImpl endpointDescription = getEndpointDescriptionImpl(portQName);
- boolean isPortDeclared = isPortDeclared(portQName);
// If no QName was specified in the arguments, one may have been specified in the sparse
// composite metadata when the service was created.
if (DescriptionUtils.isEmpty(portQName)) {
- QName preferredPortQN = getPreferredPort(compositeKey);
+ QName preferredPortQN = getPreferredPort(serviceDelegateKey);
if (!DescriptionUtils.isEmpty(preferredPortQN)) {
portQName = preferredPortQN;
}
@@ -365,8 +363,7 @@
case ADD_PORT:
if (composite != null) {
- // TODO: (JLB) NLS
- throw ExceptionFactory.makeWebServiceException("AddPort can not have a composite");
+ throw ExceptionFactory.makeWebServiceException(Messages.getMessage("serviceDescErr5", portQName.toString()));
}
// Port must NOT be declared (e.g. can not already exist in WSDL)
// If an EndpointDesc doesn't exist; create it as long as it doesn't exist in the WSDL
@@ -378,12 +375,20 @@
throw ExceptionFactory.makeWebServiceException(
Messages.getMessage("addPortDup", portQName.toString()));
} else if (endpointDescription == null) {
- // Use the SEI Class and its annotations to finish creating the Description hierachy. Note that EndpointInterface, Operations, Parameters, etc.
+ // Use the SEI Class and its annotations to finish creating the Description hierarchy. Note that EndpointInterface, Operations, Parameters, etc.
// are not created for dynamic ports. It would be an error to later do a getPort against a dynamic port (per the JAX-WS spec)
- endpointDescription = new EndpointDescriptionImpl(sei, portQName, true, this);
- addEndpointDescription(endpointDescription);
+ // If we can't add the dynamic port under a specific service delegate, that is an error
+
+ if (serviceDelegateKey == null) {
+ throw ExceptionFactory.makeWebServiceException("ServiceDelegate is null for AddPort");
+ }
+
+ endpointDescription = new EndpointDescriptionImpl(sei, portQName, true, this);
+
+ addDynamicEndpointDescriptionImpl(endpointDescription, serviceDelegateKey);
+
} else {
- // All error check above passed, the EndpointDescription already exists and needs no updating
+ // All error chJeck above passed, the EndpointDescription already exists and needs no updating
}
break;
@@ -411,7 +416,7 @@
Messages.getMessage("updateEPDescrErr2",(portQName != null ? portQName.toString() : "not specified")));
} else if (endpointDescription == null) {
// Use the SEI Class and its annotations to finish creating the Description hierachy: Endpoint, EndpointInterface, Operations, Parameters, etc.
- endpointDescription = new EndpointDescriptionImpl(sei, portQName, this, composite, compositeKey);
+ endpointDescription = new EndpointDescriptionImpl(sei, portQName, this, composite, serviceDelegateKey);
addEndpointDescription(endpointDescription);
/*
* We must reset the service runtime description after adding a new endpoint
@@ -435,7 +440,7 @@
// a key AND CREATE_DISPATCH and ADD_PORT will thrown an exception of a composite
// is specified, having a composite and key on the GET_PORTs shouldn't be
// a problem.
- endpointDescription.updateWithSEI(sei, composite, compositeKey);
+ endpointDescription.updateWithSEI(sei, composite, serviceDelegateKey);
} else if (getEndpointSEI(portQName) != sei) {
throw ExceptionFactory.makeWebServiceException(
Messages.getMessage("updateEPDescrErr3",portQName.toString(),
@@ -443,15 +448,15 @@
} else {
// All error check above passed, the EndpointDescription already exists and needs no updating
// Just add the sparse composite if one was specified.
- endpointDescription.getDescriptionBuilderComposite().setSparseComposite(compositeKey, composite);
+ endpointDescription.getDescriptionBuilderComposite().setSparseComposite(serviceDelegateKey, composite);
}
break;
case CREATE_DISPATCH:
if (composite != null) {
- // TODO: (JLB) NLS
- throw ExceptionFactory.makeWebServiceException("CreateDispatch can not have a composite");
+ throw ExceptionFactory.makeWebServiceException(Messages.getMessage("serviceDescErr6"));
}
+
// Port may or may not exist in WSDL.
// If an endpointDesc doesn't exist and it is in the WSDL, it can be created
// Otherwise, it is an error.
@@ -459,7 +464,7 @@
throw ExceptionFactory
.makeWebServiceException(Messages.getMessage("createDispatchFail0"));
} else if (endpointDescription != null) {
- // The EndpoingDescription already exists; nothing needs to be done
+ // The EndpointDescription already exists; nothing needs to be done
} else if (sei != null) {
// The Dispatch should not have an SEI associated with it on the update call.
// REVIEW: Is this a valid check?
@@ -467,13 +472,14 @@
Messages.getMessage("createDispatchFail3",portQName.toString()));
} else if (getWSDLWrapper() != null && isPortDeclared) {
// EndpointDescription doesn't exist and this is a declared Port, so create one
- // Use the SEI Class and its annotations to finish creating the Description hierachy. Note that EndpointInterface, Operations, Parameters, etc.
- // are not created for Dipsatch-based ports, but might be updated later if a getPort is done against the same declared port.
+ // Use the SEI Class and its annotations to finish creating the Description hierarchy. Note that EndpointInterface, Operations, Parameters, etc.
+ // are not created for Dispatch-based ports, but might be updated later if a getPort is done against the same declared port.
// TODO: Need to create the Axis Description objects after we have all the config info (i.e. from this SEI)
endpointDescription = new EndpointDescriptionImpl(sei, portQName, this);
addEndpointDescription(endpointDescription);
} else {
- // The port is not a declared port and it does not have an EndpointDescription, meaning an addPort has not been done for it
+ // The port is not a declared port and it does not have an EndpointDescription,
+ // meaning an addPort has not been done for it
// This is an error.
throw ExceptionFactory.makeWebServiceException(
Messages.getMessage("createDispatchFail1", portQName.toString()));
@@ -523,30 +529,52 @@
* @see org.apache.axis2.jaxws.description.ServiceDescription#getEndpointDescriptions()
*/
public EndpointDescription[] getEndpointDescriptions() {
- return endpointDescriptions.values().toArray(new EndpointDescriptionImpl[0]);
+ return definedEndpointDescriptions.values().toArray(new EndpointDescriptionImpl[0]);
+ }
+
+ public Collection<EndpointDescriptionImpl> getDynamicEndpointDescriptions_AsCollection(Object serviceDelegateKey) {
+ Collection <EndpointDescriptionImpl> dynamicEndpoints = null;
+ if (serviceDelegateKey != null ) {
+ if (dynamicEndpointDescriptions.get(serviceDelegateKey) != null)
+ dynamicEndpoints = dynamicEndpointDescriptions.get(serviceDelegateKey).values();
+ }
+ return dynamicEndpoints;
}
public Collection<EndpointDescription> getEndpointDescriptions_AsCollection() {
- return endpointDescriptions.values();
+ return definedEndpointDescriptions.values();
}
/* (non-Javadoc)
* @see org.apache.axis2.jaxws.description.ServiceDescription#getEndpointDescription(javax.xml.namespace.QName)
*/
public EndpointDescription getEndpointDescription(QName portQName) {
+
+ return getEndpointDescription(portQName, null);
+ }
+
+ public EndpointDescription getEndpointDescription(QName portQName, Object serviceDelegateKey) {
EndpointDescription returnDesc = null;
if (!DescriptionUtils.isEmpty(portQName)) {
- returnDesc = endpointDescriptions.get(portQName);
+ returnDesc = definedEndpointDescriptions.get(portQName);
+
+ if (returnDesc == null && serviceDelegateKey != null) {
+ returnDesc = getDynamicEndpointDescriptionImpl(portQName, serviceDelegateKey);
+ }
}
return returnDesc;
}
EndpointDescriptionImpl getEndpointDescriptionImpl(QName portQName) {
+ return (EndpointDescriptionImpl)getEndpointDescription(portQName, null);
+ }
+
+ EndpointDescriptionImpl getEndpointDescriptionImpl(QName portQName, Object serviceDelegateKey) {
return (EndpointDescriptionImpl)getEndpointDescription(portQName);
}
EndpointDescriptionImpl getEndpointDescriptionImpl(Class seiClass) {
- for (EndpointDescription endpointDescription : endpointDescriptions.values()) {
+ for (EndpointDescription endpointDescription : definedEndpointDescriptions.values()) {
EndpointInterfaceDescription endpointInterfaceDesc =
endpointDescription.getEndpointInterfaceDescription();
// Note that Dispatch endpoints will not have an endpointInterface because the do not have an associated SEI
@@ -571,7 +599,7 @@
EndpointDescription[] returnEndpointDesc = null;
ArrayList<EndpointDescriptionImpl> matchingEndpoints =
new ArrayList<EndpointDescriptionImpl>();
- for (EndpointDescription endpointDescription : endpointDescriptions.values()) {
+ for (EndpointDescription endpointDescription : definedEndpointDescriptions.values()) {
EndpointInterfaceDescription endpointInterfaceDesc =
endpointDescription.getEndpointInterfaceDescription();
// Note that Dispatch endpoints will not have an endpointInterface because the do not have an associated SEI
@@ -592,7 +620,7 @@
/*=======================================================================*/
/*=======================================================================*/
private void addEndpointDescription(EndpointDescriptionImpl endpoint) {
- endpointDescriptions.put(endpoint.getPortQName(), endpoint);
+ definedEndpointDescriptions.put(endpoint.getPortQName(), endpoint);
}
private void setupWsdlDefinition() {
@@ -764,29 +792,56 @@
}
/**
- * This method will handle obtaining a URL for the given WSDL location.
+ * This method will handle obtaining a URL for the given WSDL location. The WSDL will be
+ * looked for in the following places in this order:
+ * 1) As a resource on the classpath
+ * 2) As a fully specified URL
+ * 3) As a file on the filesystem. This is analagous to what the generated
+ * Service client does. Is prepends "file:/" to whatever is specified in the
+ * @WebServiceClient.wsdlLocation element.
+ *
+ * @param wsdlLocation The WSDL for which a URL is wanted
+ * @return A URL if the WSDL can be located, or null
*/
private URL getWSDLURL(String wsdlLocation) {
- URL url = composite.getClassLoader().getResource(wsdlLocation);
- if(url == null) {
- if(log.isDebugEnabled()) {
- log.debug("URL for wsdl file: " + wsdlLocation + " could not be " +
- "determined by classloader... looking for file reference");
- }
- File file = new File(wsdlLocation);
- if(file != null) {
- try {
- url = file.toURL();
- }
- catch(Exception e) {
- if(log.isDebugEnabled()) {
- log.debug("Unable to obtain URL for WSDL file: " + wsdlLocation +
- " by using file reference");
- }
- }
- }
- }
- return url;
+ // Look for the WSDL file as follows:
+ // 1) As a resource on the classpath
+
+ URL url = composite.getClassLoader().getResource(wsdlLocation);
+
+ // 2) As a fully specified URL
+ if (url == null) {
+ if (log.isDebugEnabled()) {
+ log.debug("URL for wsdl file: " + wsdlLocation + " could not be "
+ + "determined by classloader... looking for file reference");
+ }
+ url = createWsdlURL(wsdlLocation);
+ }
+ // 3) As a file on the filesystem. This is analagous to what the generated
+ // Service client does. Is prepends "file:/" to whatever is specified in the
+ // @WebServiceClient.wsdlLocation element.
+ if (url == null) {
+ if (log.isDebugEnabled()) {
+ log.debug("URL for wsdl file: " + wsdlLocation + " could not be "
+ + "found as local file reference... prepending file: protocol");
+ }
+ // This check is necessary because Unix/Linux file paths begin
+ // with a '/'. When adding the prefix 'jar:file:/' we may end
+ // up with '//' after the 'file:' part. This causes the URL
+ // object to treat this like a remote resource
+ if(wsdlLocation.indexOf("/") == 0) {
+ wsdlLocation = wsdlLocation.substring(1, wsdlLocation.length());
+ }
+ url = createWsdlURL("file:/" + wsdlLocation);
+
+ }
+ if (url == null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Unable to obtain URL for WSDL file: " + wsdlLocation
+ + " by using prepended file: protocol");
+ }
+ }
+ return url;
}
// TODO: Remove these and replace with appropraite get* methods for WSDL information
@@ -838,10 +893,11 @@
/* (non-Javadoc)
* @see org.apache.axis2.jaxws.description.ServiceDescription#getServiceClient(javax.xml.namespace.QName)
*/
- public ServiceClient getServiceClient(QName portQName) {
+ public ServiceClient getServiceClient(QName portQName, Object serviceDelegateKey) {
ServiceClient returnServiceClient = null;
if (!DescriptionUtils.isEmpty(portQName)) {
- EndpointDescription endpointDesc = getEndpointDescription(portQName);
+ EndpointDescription endpointDesc = getEndpointDescription(portQName, serviceDelegateKey);
+
if (endpointDesc != null) {
returnServiceClient = endpointDesc.getServiceClient();
}
@@ -1730,7 +1786,7 @@
}
}
- public List<QName> getPorts() {
+ public List<QName> getPorts(Object serviceDelegateKey) {
ArrayList<QName> portList = new ArrayList<QName>();
// Note that we don't cache these results because the list of ports can be added
// to via getPort(...) and addPort(...).
@@ -1759,6 +1815,20 @@
portList.add(endpointPortQName);
}
}
+
+ //Retrieve all the dynamic ports for this client
+ if (serviceDelegateKey != null) {
+ Collection<EndpointDescriptionImpl> dynamicEndpointDescs = getDynamicEndpointDescriptions_AsCollection(serviceDelegateKey);
+ if (dynamicEndpointDescs != null) {
+ for (EndpointDescription dynamicEndpointDesc : dynamicEndpointDescs) {
+ QName endpointPortQName = dynamicEndpointDesc
+ .getPortQName();
+ if (!portList.contains(endpointPortQName)) {
+ portList.add(endpointPortQName);
+ }
+ }
+ }
+ }
return portList;
}
@@ -1815,10 +1885,32 @@
*/
protected String getServiceClassName() {
return composite.getClassName();
- // TODO: (JLB) Remove commented out code from 1/7/08 merge
-// return (this.serviceClass != null ? this.serviceClass.getName() : null);
}
+ private EndpointDescriptionImpl getDynamicEndpointDescriptionImpl(QName portQName, Object key) {
+ Map<QName, EndpointDescriptionImpl> innerMap = null;
+ synchronized(dynamicEndpointDescriptions) {
+ innerMap = dynamicEndpointDescriptions.get(key);
+ if (innerMap != null) {
+ return innerMap.get(portQName);
+ }
+ }
+ return null;
+ }
+
+ private void addDynamicEndpointDescriptionImpl(EndpointDescriptionImpl endpointDescriptionImpl,
+ Object key) {
+ Map<QName, EndpointDescriptionImpl> innerMap = null;
+ synchronized(dynamicEndpointDescriptions) {
+ innerMap = dynamicEndpointDescriptions.get(key);
+ if (innerMap == null) {
+ innerMap = new HashMap<QName, EndpointDescriptionImpl>();
+ dynamicEndpointDescriptions.put(key, innerMap);
+ }
+ innerMap.put(endpointDescriptionImpl.getPortQName(), endpointDescriptionImpl);
+ }
+ }
+
/** Return a string representing this Description object and all the objects it contains. */
public String toString() {
final String newline = "\n";
@@ -1850,8 +1942,9 @@
}
// Ports
string.append(newline);
- List<QName> ports = getPorts();
- string.append("Number of ports: " + ports.size());
+ List<QName> ports = getPorts(null);
+ string.append("Number of defined ports: " + ports.size());
+ //TODO: Show the map that contains the dynamic ports
string.append(newline);
string.append("Port QNames: ");
for (QName port : ports) {
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties Mon Jan 21 04:20:38 2008
@@ -281,4 +281,9 @@
pDescrErr=Null Descriptor. PropertyDescriptor not found.
pDescrErr2=No read Method found to read property Value from jaxbObject: {0}
restWithSOAPErr=Expected an XML over HTTP message, but the message appears to be a SOAP message. The namespace is {0}
-noDataHandler=A data handler was not found for content id {0}
\ No newline at end of file
+noDataHandler=A data handler was not found for content id {0}
+DescriptionBuilderErr1=Unable to create composite annotation {0} due to exception {1}
+DescriptionBuilderErr2=Unable to create sparse annotation {0} from base annotation {1}
+serviceDescErr4=Unable to access wsdlLocation {0}
+serviceDescErr5=The dynamic port {0} can not specify a sparse composite.
+serviceDescErr6=Can not specify a sparse composite when calling Service.createDispatch.
\ No newline at end of file
Modified: webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java?rev=613867&r1=613866&r2=613867&view=diff
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java Mon Jan 21 04:20:38 2008
@@ -48,13 +48,13 @@
static public String getWSDLLocation(String wsdlFileName) {
String basedir = System.getProperty("basedir", ".");
- String urlString = "file://localhost/" + basedir + "/test-resources/wsdl/" + wsdlFileName;
+ String urlString = basedir + "/test-resources/wsdl/" + wsdlFileName;
return urlString;
}
static public URL getWSDLURL(String wsdlFileName) {
URL wsdlURL = null;
- String urlString = getWSDLLocation(wsdlFileName);
+ String urlString = "file://localhost/" + getWSDLLocation(wsdlFileName);
// Get the URL to the WSDL file. Note that 'basedir' is setup by Maven
try {
wsdlURL = new URL(urlString);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org