You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2007/02/25 20:57:05 UTC
svn commit: r511585 [1/10] - in /webservices/axis2/trunk/java/modules/kernel:
src/org/apache/axis2/addressing/ src/org/apache/axis2/addressing/wsdl/
src/org/apache/axis2/builder/ src/org/apache/axis2/cluster/
src/org/apache/axis2/context/ src/org/apach...
Author: dims
Date: Sun Feb 25 11:56:59 2007
New Revision: 511585
URL: http://svn.apache.org/viewvc?view=rev&rev=511585
Log:
** NO CODE CHANGES **
- Replace tabs with spaces
- set eol-style native on all the files
- cleanup imports
- run IDEA code formatting
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/RelatesTo.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11DefaultActionPatternHelper.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/OMBuilder.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/AbstractContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ContextFactory.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/SelfManagedDataManager.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/SessionContext.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/AxisDataLocator.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/AxisDataLocatorImpl.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/BaseAxisDataLocator.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DRConstants.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/Data.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DataLocatorFactory.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DataRetrievalException.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DataRetrievalRequest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/DataRetrievalUtil.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/LocatorType.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/OutputForm.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/PolicyDataLocator.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/SchemaDataLocator.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/ServiceData.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/WSDLDataLocator.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dataretrieval/client/MexClient.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ClusterBuilder.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentException.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleDeployer.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceDeployer.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/URLBasedAxisConfigurator.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/resolver/WarBasedWSDLLocator.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/resolver/WarFileBasedURIResolver.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBinding.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/ParameterIncludeImpl.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/PolicyInclude.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/TwoChannelAxisOperation.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractOperationDispatcher.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractServiceDispatcher.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedOperationDispatcher.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcher.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcher.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcher.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisConfiguration.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisError.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/HTTPLocationBasedDispatcher.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIOperationDispatcher.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/Messages.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/ProjectResourceBundle.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/modules/PolicyExtension.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/phaseresolver/PhaseException.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutAsyncMessageReceiver.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/MessageFormatter.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/RequestResponseTransport.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/SimpleAxis2Server.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractAgent.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsTransportHeaders.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity2.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/XFormURLEncodedFormatter.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/DefaultConnectionListener.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/DefaultHttpConnectionFactory.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/DefaultHttpConnectionManager.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/DefaultThreadFactory.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/LoggingProcessorDecorator.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/ComplexPart.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/SOAPUtil.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSConnectionFactory.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalResponder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportSender.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailClient.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailToInfo.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MimeBase64BodyPart.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/MailAddress.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/MailServer.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Worker.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPServer.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPWorker.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Builder.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/JavaUtils.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Loader.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MetaDataEntry.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MultipleEntryHashMap.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/ObjectStateUtils.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/OptionsParser.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/PolicyUtil.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/PrettyPrinter.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/SelfManagedDataHolder.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/threadpool/ThreadPool.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/wsdl/HTTPHeaderMessage.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/wsdl/SOAPModuleMessage.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/wsdl/SoapAddress.java (props changed)
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/wsdl/util/WSDL4JImportedWSDLHelper.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test-resources/PingService.wsdl (props changed)
webservices/axis2/trunk/java/modules/kernel/test-resources/wsdl/actionTests.wsdl (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test-resources/wsdl/test1.wsdl (props changed)
webservices/axis2/trunk/java/modules/kernel/test-resources/wsdl/test2.wsdl (props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/EndpointReferenceHelperTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuilderSelectorDeploymentTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/MessageFormatterDeploymentTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/OperationExcludeTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/SystemPhasesremovedTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/RegistryTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/description/SpeakingProvider.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/ActionBasedOperationDispatchTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RelatesToBasedOperationDispatcherTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcherTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcherTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcherTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcherTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcherTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java (props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveATest.java (props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveBTest.java (props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveCTest.java (props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java (props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleConfigTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ObjectSaveTest.java (props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/OperationContextSaveTest.java (props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/OptionsSaveTest.java (props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/SOAPActionBasedDispatcherTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/action/Action.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/driver/Java2SecTest.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/interf/Actor.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/less/LessPermission.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/less/LessPermissionAccessControlContext.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/less/LessPermissionPrivilegedExceptionAction.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/more/MorePermission.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/more/MorePermissionAccessControlContext.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/more/MorePermissionPrivilegedExceptionAction.java (contents, props changed)
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/BeforeTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleHandlers.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/sample/echo/EchoImpl.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/sample/handlers/LoggingHandler.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/util/SchemaUtilTest.java (props changed)
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java Sun Feb 25 11:56:59 2007
@@ -1,353 +1,353 @@
-/*
-* Copyright 2006 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.apache.axis2.addressing;
-
-import java.util.ArrayList;
-import java.util.IdentityHashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.io.ByteArrayInputStream;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import org.apache.axiom.om.OMAttribute;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.OMNode;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.util.AttributeHelper;
-import org.apache.axiom.om.util.ElementHelper;
-import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axis2.AxisFault;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * The methods in this class are used to process {@link EndpointReference} objects
- * according to the rules of the 2005/08 (Final) and 2004/08 (submission) WS-Addressing
- * specifications.
- *
- */
-public class EndpointReferenceHelper {
-
- private static final Log log = LogFactory.getLog(EndpointReferenceHelper.class);
-
- private final static Map finalQNames = new IdentityHashMap();
- private final static Map submissionQNames = new IdentityHashMap();
-
- /**
- * Populates an endpoint reference based on the <code>OMElement</code> and
- * WS-Addressing namespace that is passed in. If the string passed in is not
- * recognized as a valid WS-Addressing namespace then this method behaves as
- * if http://www.w3.org/2005/08/addressing has been passed in.
- *
- * @param epr an endpoint reference instance to hold the info.
- * @param eprOMElement an element of endpoint reference type
- * @param addressingNamespace the namespace of the WS-Addressing spec to comply with.
- * @throws AxisFault if unable to locate an address element
- * @see #fromOM(OMElement)
- */
- public static void fromOM(EndpointReference epr, OMElement eprOMElement, String addressingNamespace) throws AxisFault {
- boolean isFinalAddressingNamespace = false;
- Map map = null;
-
- //First pass, identify the addressing namespace.
- if (AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNamespace)) {
- OMElement address = eprOMElement.getFirstChildWithName((QName) submissionQNames.get(AddressingConstants.EPR_ADDRESS));
-
- if (address != null) {
- map = submissionQNames;
- isFinalAddressingNamespace = false;
-
- if (log.isDebugEnabled()){
- log.debug("fromOM: Found address element for namespace, " + AddressingConstants.Submission.WSA_NAMESPACE);
- }
- }
- else {
- throw new AxisFault("Unable to locate an address element for the endpoint reference type.");
- }
- }
- else {
- OMElement address = eprOMElement.getFirstChildWithName((QName) finalQNames.get(AddressingConstants.EPR_ADDRESS));
-
- if (address != null) {
- map = finalQNames;
- isFinalAddressingNamespace = true;
-
- if (log.isDebugEnabled()){
- log.debug("fromOM: Found address element for namespace, " + AddressingConstants.Final.WSA_NAMESPACE);
- }
- }
- else {
- throw new AxisFault("Unable to locate an address element for the endpoint reference type.");
- }
- }
-
- //Second pass, identify the properties.
- fromOM(epr, eprOMElement, map, isFinalAddressingNamespace);
- }
-
- /**
- * Populates an endpoint reference based on the <code>String</code> that is
- * passed in. If the http://schemas.xmlsoap.org/ws/2004/08/addressing namespace
- * is in effect then any reference properties will be saved as reference parameters.
- * Regardless of the addressing namespace in effect, any elements present in the
- * <code>String</code> that are not recognised are saved as extensibility elements.
- *
- * @param eprString string from the element of endpoint reference type
- * @throws AxisFault if unable to locate an address element
- */
- public static EndpointReference fromOM(String eprString) throws AxisFault {
- try {
- return fromOM(new StAXOMBuilder(new ByteArrayInputStream(eprString.getBytes())).getDocumentElement());
- } catch (XMLStreamException e) {
- throw new AxisFault(e);
- }
- }
- /**
- * Populates an endpoint reference based on the <code>OMElement</code> that is
- * passed in. If the http://schemas.xmlsoap.org/ws/2004/08/addressing namespace
- * is in effect then any reference properties will be saved as reference parameters.
- * Regardless of the addressing namespace in effect, any elements present in the
- * <code>OMElement</code> that are not recognised are saved as extensibility elements.
- *
- * @param eprOMElement an element of endpoint reference type
- * @throws AxisFault if unable to locate an address element
- */
- public static EndpointReference fromOM(OMElement eprOMElement) throws AxisFault {
- EndpointReference epr = new EndpointReference("");
- boolean isFinalAddressingNamespace = false;
- Map map = null;
-
- //First pass, identify the addressing namespace.
- OMElement address = eprOMElement.getFirstChildWithName((QName) finalQNames.get(AddressingConstants.EPR_ADDRESS));
-
- if (address != null) {
- map = finalQNames;
- isFinalAddressingNamespace = true;
-
- if (log.isDebugEnabled()){
- log.debug("fromOM: Found address element for namespace, " + AddressingConstants.Final.WSA_NAMESPACE);
- }
- }
- else {
- address = eprOMElement.getFirstChildWithName((QName) submissionQNames.get(AddressingConstants.EPR_ADDRESS));
-
- if (address != null) {
- map = submissionQNames;
- isFinalAddressingNamespace = false;
-
- if (log.isDebugEnabled()){
- log.debug("fromOM: Found address element for namespace, " + AddressingConstants.Submission.WSA_NAMESPACE);
- }
- }
- else {
- throw new AxisFault("Unable to locate an address element for the endpoint reference type.");
- }
- }
-
- //Second pass, identify the properties.
- fromOM(epr, eprOMElement, map, isFinalAddressingNamespace);
-
- return epr;
- }
-
- /**
- * Creates an <code>OMElement</code> based on the properties of the endpoint
- * reference. The output may differ based on the addressing namespace that is
- * in effect when this method is called. If the http://www.w3.org/2005/08/addressing
- * namespace is in effect, and a metadata property has been defined for the
- * endpoint reference, then there will be a metadata element to contain the
- * property in the output. If the http://schemas.xmlsoap.org/ws/2004/08/addressing
- * namespace is in effect, however, then no metadata element will be included
- * in the output, even if a metadata property element has been defined.
- *
- * @param factory
- * @param epr
- * @param qname
- * @param addressingNamespace
- * @return
- * @throws AxisFault
- */
- public static OMElement toOM(OMFactory factory, EndpointReference epr, QName qname, String addressingNamespace) throws AxisFault {
- OMElement eprElement = null;
-
- if (log.isDebugEnabled()) {
- log.debug("toOM: Factory, " + factory);
- log.debug("toOM: Endpoint reference, " + epr);
- log.debug("toOM: Element qname, " + qname);
- log.debug("toOM: Addressing namespace, " + addressingNamespace);
- }
-
- if (addressingNamespace == null) {
- throw new AxisFault("Addressing namespace cannot be null.");
- }
-
- if (qname.getPrefix() != null) {
- OMNamespace wrapNs = factory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
- if (factory instanceof SOAPFactory){
- eprElement = ((SOAPFactory) factory).createSOAPHeaderBlock(qname.getLocalPart(), wrapNs);
- }else{
- eprElement = factory.createOMElement(qname.getLocalPart(), wrapNs);
- }
-
- OMNamespace wsaNS = factory.createOMNamespace(addressingNamespace, AddressingConstants.WSA_DEFAULT_PREFIX);
- OMElement addressE = factory.createOMElement(AddressingConstants.EPR_ADDRESS, wsaNS, eprElement);
- String address = epr.getAddress();
- addressE.setText(address);
-
- ArrayList addressAttributes = epr.getAddressAttributes();
- if (addressAttributes != null) {
- Iterator attrIter = addressAttributes.iterator();
- while (attrIter.hasNext()) {
- OMAttribute omAttributes = (OMAttribute) attrIter.next();
- addressE.addAttribute(omAttributes);
- }
- }
-
- List metaData = epr.getMetaData();
- if (metaData != null && AddressingConstants.Final.WSA_NAMESPACE.equals(addressingNamespace)) {
- OMElement metadataE = factory.createOMElement(AddressingConstants.Final.WSA_METADATA, wsaNS, eprElement);
- for (int i = 0, size = metaData.size(); i < size; i++) {
- OMElement omElement = (OMElement) metaData.get(i);
- metadataE.addChild(ElementHelper.importOMElement(omElement, factory));
- }
-
- ArrayList metadataAttributes = epr.getMetadataAttributes();
- if (metadataAttributes != null) {
- Iterator attrIter = metadataAttributes.iterator();
- while (attrIter.hasNext()) {
- OMAttribute omAttributes = (OMAttribute) attrIter.next();
- metadataE.addAttribute(omAttributes);
- }
- }
- }
-
-
-
- Map referenceParameters = epr.getAllReferenceParameters();
- if (referenceParameters != null) {
- OMElement refParameterElement = factory.createOMElement(AddressingConstants.EPR_REFERENCE_PARAMETERS, wsaNS, eprElement);
- Iterator iterator = referenceParameters.values().iterator();
- while (iterator.hasNext()) {
- OMElement omElement = (OMElement) iterator.next();
- refParameterElement.addChild(ElementHelper.importOMElement(omElement, factory));
- }
- }
-
- List attributes = epr.getAttributes();
- if (attributes != null) {
- for (int i = 0, size = attributes.size(); i < size; i++) {
- OMAttribute omAttribute = (OMAttribute) attributes.get(i);
- AttributeHelper.importOMAttribute(omAttribute, eprElement);
- }
- }
-
- // add xs:any
- List extensibleElements = epr.getExtensibleElements();
- if (extensibleElements != null) {
- for (int i = 0, size = extensibleElements.size(); i < size; i++) {
- OMElement omElement = (OMElement) extensibleElements.get(i);
- eprElement.addChild(ElementHelper.importOMElement(omElement, factory));
- }
- }
- } else {
- throw new AxisFault("prefix must be specified");
- }
-
- return eprElement;
- }
-
- private static void fromOM(EndpointReference epr, OMElement eprOMElement, Map map, boolean isFinalAddressingNamespace) {
- Iterator childElements = eprOMElement.getChildElements();
-
- while (childElements.hasNext()) {
- OMElement eprChildElement = (OMElement) childElements.next();
- QName qname = eprChildElement.getQName();
-
- if (map.get(AddressingConstants.EPR_ADDRESS).equals(qname)) {
- //We need to identify the address element again in order to ensure
- //that it is not included with the extensibility elements.
- epr.setAddress(eprChildElement.getText());
- Iterator allAddrAttributes = eprChildElement.getAllAttributes();
- ArrayList addressAttributes = new ArrayList();
- while (allAddrAttributes.hasNext()) {
- OMAttribute attribute = (OMAttribute) allAddrAttributes.next();
- addressAttributes.add(attribute);
- }
- epr.setAddressAttributes(addressAttributes);
- }
- else if (map.get(AddressingConstants.EPR_REFERENCE_PARAMETERS).equals(qname)) {
- Iterator iterator = eprChildElement.getChildElements();
- while (iterator.hasNext()) {
- OMElement element = (OMElement) iterator.next();
- epr.addReferenceParameter(element);
- }
- }
- else if (isFinalAddressingNamespace &&
- map.get(AddressingConstants.Final.WSA_METADATA).equals(qname)) {
- Iterator iterator = eprChildElement.getChildElements();
- while (iterator.hasNext()) {
- OMNode node = (OMNode) iterator.next();
- epr.addMetaData(node);
- }
- Iterator allMDAttributes = eprChildElement.getAllAttributes();
- ArrayList metadataAttributes = new ArrayList();
- while (allMDAttributes.hasNext()) {
- OMAttribute attribute = (OMAttribute) allMDAttributes.next();
- metadataAttributes.add(attribute);
- }
- epr.setMetadataAttributes(metadataAttributes);
- }
- else if (!isFinalAddressingNamespace &&
- map.get(AddressingConstants.Submission.EPR_REFERENCE_PROPERTIES).equals(qname)) {
- // since we have the model for WS-Final, we don't have a place to keep this reference properties.
- // The only compatible place is reference properties
- Iterator iterator = eprChildElement.getChildElements();
- while (iterator.hasNext()) {
- OMElement element = (OMElement) iterator.next();
- epr.addReferenceParameter(element);
- }
- }
- else {
- epr.addExtensibleElement(eprChildElement);
- }
- }
-
- Iterator attributes = eprOMElement.getAllAttributes();
- while (attributes.hasNext()) {
- OMAttribute attribute = (OMAttribute) attributes.next();
- epr.addAttribute(attribute);
- }
-
- if (log.isDebugEnabled()) {
- log.debug("fromOM: Endpoint reference, " + epr);
- }
- }
-
- static {
- finalQNames.put(AddressingConstants.EPR_ADDRESS, new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.EPR_ADDRESS));
- finalQNames.put(AddressingConstants.EPR_REFERENCE_PARAMETERS, new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.EPR_REFERENCE_PARAMETERS));
- finalQNames.put(AddressingConstants.Final.WSA_METADATA, new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.Final.WSA_METADATA));
-
- submissionQNames.put(AddressingConstants.EPR_ADDRESS, new QName(AddressingConstants.Submission.WSA_NAMESPACE, AddressingConstants.EPR_ADDRESS));
- submissionQNames.put(AddressingConstants.EPR_REFERENCE_PARAMETERS, new QName(AddressingConstants.Submission.WSA_NAMESPACE, AddressingConstants.EPR_REFERENCE_PARAMETERS));
- submissionQNames.put(AddressingConstants.Submission.EPR_REFERENCE_PROPERTIES, new QName(AddressingConstants.Submission.WSA_NAMESPACE, AddressingConstants.Submission.EPR_REFERENCE_PROPERTIES));
- }
-}
+/*
+* Copyright 2006 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.axis2.addressing;
+
+import java.util.ArrayList;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.io.ByteArrayInputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.util.AttributeHelper;
+import org.apache.axiom.om.util.ElementHelper;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.AxisFault;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * The methods in this class are used to process {@link EndpointReference} objects
+ * according to the rules of the 2005/08 (Final) and 2004/08 (submission) WS-Addressing
+ * specifications.
+ *
+ */
+public class EndpointReferenceHelper {
+
+ private static final Log log = LogFactory.getLog(EndpointReferenceHelper.class);
+
+ private final static Map finalQNames = new IdentityHashMap();
+ private final static Map submissionQNames = new IdentityHashMap();
+
+ /**
+ * Populates an endpoint reference based on the <code>OMElement</code> and
+ * WS-Addressing namespace that is passed in. If the string passed in is not
+ * recognized as a valid WS-Addressing namespace then this method behaves as
+ * if http://www.w3.org/2005/08/addressing has been passed in.
+ *
+ * @param epr an endpoint reference instance to hold the info.
+ * @param eprOMElement an element of endpoint reference type
+ * @param addressingNamespace the namespace of the WS-Addressing spec to comply with.
+ * @throws AxisFault if unable to locate an address element
+ * @see #fromOM(OMElement)
+ */
+ public static void fromOM(EndpointReference epr, OMElement eprOMElement, String addressingNamespace) throws AxisFault {
+ boolean isFinalAddressingNamespace = false;
+ Map map = null;
+
+ //First pass, identify the addressing namespace.
+ if (AddressingConstants.Submission.WSA_NAMESPACE.equals(addressingNamespace)) {
+ OMElement address = eprOMElement.getFirstChildWithName((QName) submissionQNames.get(AddressingConstants.EPR_ADDRESS));
+
+ if (address != null) {
+ map = submissionQNames;
+ isFinalAddressingNamespace = false;
+
+ if (log.isDebugEnabled()){
+ log.debug("fromOM: Found address element for namespace, " + AddressingConstants.Submission.WSA_NAMESPACE);
+ }
+ }
+ else {
+ throw new AxisFault("Unable to locate an address element for the endpoint reference type.");
+ }
+ }
+ else {
+ OMElement address = eprOMElement.getFirstChildWithName((QName) finalQNames.get(AddressingConstants.EPR_ADDRESS));
+
+ if (address != null) {
+ map = finalQNames;
+ isFinalAddressingNamespace = true;
+
+ if (log.isDebugEnabled()){
+ log.debug("fromOM: Found address element for namespace, " + AddressingConstants.Final.WSA_NAMESPACE);
+ }
+ }
+ else {
+ throw new AxisFault("Unable to locate an address element for the endpoint reference type.");
+ }
+ }
+
+ //Second pass, identify the properties.
+ fromOM(epr, eprOMElement, map, isFinalAddressingNamespace);
+ }
+
+ /**
+ * Populates an endpoint reference based on the <code>String</code> that is
+ * passed in. If the http://schemas.xmlsoap.org/ws/2004/08/addressing namespace
+ * is in effect then any reference properties will be saved as reference parameters.
+ * Regardless of the addressing namespace in effect, any elements present in the
+ * <code>String</code> that are not recognised are saved as extensibility elements.
+ *
+ * @param eprString string from the element of endpoint reference type
+ * @throws AxisFault if unable to locate an address element
+ */
+ public static EndpointReference fromOM(String eprString) throws AxisFault {
+ try {
+ return fromOM(new StAXOMBuilder(new ByteArrayInputStream(eprString.getBytes())).getDocumentElement());
+ } catch (XMLStreamException e) {
+ throw new AxisFault(e);
+ }
+ }
+ /**
+ * Populates an endpoint reference based on the <code>OMElement</code> that is
+ * passed in. If the http://schemas.xmlsoap.org/ws/2004/08/addressing namespace
+ * is in effect then any reference properties will be saved as reference parameters.
+ * Regardless of the addressing namespace in effect, any elements present in the
+ * <code>OMElement</code> that are not recognised are saved as extensibility elements.
+ *
+ * @param eprOMElement an element of endpoint reference type
+ * @throws AxisFault if unable to locate an address element
+ */
+ public static EndpointReference fromOM(OMElement eprOMElement) throws AxisFault {
+ EndpointReference epr = new EndpointReference("");
+ boolean isFinalAddressingNamespace = false;
+ Map map = null;
+
+ //First pass, identify the addressing namespace.
+ OMElement address = eprOMElement.getFirstChildWithName((QName) finalQNames.get(AddressingConstants.EPR_ADDRESS));
+
+ if (address != null) {
+ map = finalQNames;
+ isFinalAddressingNamespace = true;
+
+ if (log.isDebugEnabled()){
+ log.debug("fromOM: Found address element for namespace, " + AddressingConstants.Final.WSA_NAMESPACE);
+ }
+ }
+ else {
+ address = eprOMElement.getFirstChildWithName((QName) submissionQNames.get(AddressingConstants.EPR_ADDRESS));
+
+ if (address != null) {
+ map = submissionQNames;
+ isFinalAddressingNamespace = false;
+
+ if (log.isDebugEnabled()){
+ log.debug("fromOM: Found address element for namespace, " + AddressingConstants.Submission.WSA_NAMESPACE);
+ }
+ }
+ else {
+ throw new AxisFault("Unable to locate an address element for the endpoint reference type.");
+ }
+ }
+
+ //Second pass, identify the properties.
+ fromOM(epr, eprOMElement, map, isFinalAddressingNamespace);
+
+ return epr;
+ }
+
+ /**
+ * Creates an <code>OMElement</code> based on the properties of the endpoint
+ * reference. The output may differ based on the addressing namespace that is
+ * in effect when this method is called. If the http://www.w3.org/2005/08/addressing
+ * namespace is in effect, and a metadata property has been defined for the
+ * endpoint reference, then there will be a metadata element to contain the
+ * property in the output. If the http://schemas.xmlsoap.org/ws/2004/08/addressing
+ * namespace is in effect, however, then no metadata element will be included
+ * in the output, even if a metadata property element has been defined.
+ *
+ * @param factory
+ * @param epr
+ * @param qname
+ * @param addressingNamespace
+ * @return
+ * @throws AxisFault
+ */
+ public static OMElement toOM(OMFactory factory, EndpointReference epr, QName qname, String addressingNamespace) throws AxisFault {
+ OMElement eprElement = null;
+
+ if (log.isDebugEnabled()) {
+ log.debug("toOM: Factory, " + factory);
+ log.debug("toOM: Endpoint reference, " + epr);
+ log.debug("toOM: Element qname, " + qname);
+ log.debug("toOM: Addressing namespace, " + addressingNamespace);
+ }
+
+ if (addressingNamespace == null) {
+ throw new AxisFault("Addressing namespace cannot be null.");
+ }
+
+ if (qname.getPrefix() != null) {
+ OMNamespace wrapNs = factory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
+ if (factory instanceof SOAPFactory){
+ eprElement = ((SOAPFactory) factory).createSOAPHeaderBlock(qname.getLocalPart(), wrapNs);
+ }else{
+ eprElement = factory.createOMElement(qname.getLocalPart(), wrapNs);
+ }
+
+ OMNamespace wsaNS = factory.createOMNamespace(addressingNamespace, AddressingConstants.WSA_DEFAULT_PREFIX);
+ OMElement addressE = factory.createOMElement(AddressingConstants.EPR_ADDRESS, wsaNS, eprElement);
+ String address = epr.getAddress();
+ addressE.setText(address);
+
+ ArrayList addressAttributes = epr.getAddressAttributes();
+ if (addressAttributes != null) {
+ Iterator attrIter = addressAttributes.iterator();
+ while (attrIter.hasNext()) {
+ OMAttribute omAttributes = (OMAttribute) attrIter.next();
+ addressE.addAttribute(omAttributes);
+ }
+ }
+
+ List metaData = epr.getMetaData();
+ if (metaData != null && AddressingConstants.Final.WSA_NAMESPACE.equals(addressingNamespace)) {
+ OMElement metadataE = factory.createOMElement(AddressingConstants.Final.WSA_METADATA, wsaNS, eprElement);
+ for (int i = 0, size = metaData.size(); i < size; i++) {
+ OMElement omElement = (OMElement) metaData.get(i);
+ metadataE.addChild(ElementHelper.importOMElement(omElement, factory));
+ }
+
+ ArrayList metadataAttributes = epr.getMetadataAttributes();
+ if (metadataAttributes != null) {
+ Iterator attrIter = metadataAttributes.iterator();
+ while (attrIter.hasNext()) {
+ OMAttribute omAttributes = (OMAttribute) attrIter.next();
+ metadataE.addAttribute(omAttributes);
+ }
+ }
+ }
+
+
+
+ Map referenceParameters = epr.getAllReferenceParameters();
+ if (referenceParameters != null) {
+ OMElement refParameterElement = factory.createOMElement(AddressingConstants.EPR_REFERENCE_PARAMETERS, wsaNS, eprElement);
+ Iterator iterator = referenceParameters.values().iterator();
+ while (iterator.hasNext()) {
+ OMElement omElement = (OMElement) iterator.next();
+ refParameterElement.addChild(ElementHelper.importOMElement(omElement, factory));
+ }
+ }
+
+ List attributes = epr.getAttributes();
+ if (attributes != null) {
+ for (int i = 0, size = attributes.size(); i < size; i++) {
+ OMAttribute omAttribute = (OMAttribute) attributes.get(i);
+ AttributeHelper.importOMAttribute(omAttribute, eprElement);
+ }
+ }
+
+ // add xs:any
+ List extensibleElements = epr.getExtensibleElements();
+ if (extensibleElements != null) {
+ for (int i = 0, size = extensibleElements.size(); i < size; i++) {
+ OMElement omElement = (OMElement) extensibleElements.get(i);
+ eprElement.addChild(ElementHelper.importOMElement(omElement, factory));
+ }
+ }
+ } else {
+ throw new AxisFault("prefix must be specified");
+ }
+
+ return eprElement;
+ }
+
+ private static void fromOM(EndpointReference epr, OMElement eprOMElement, Map map, boolean isFinalAddressingNamespace) {
+ Iterator childElements = eprOMElement.getChildElements();
+
+ while (childElements.hasNext()) {
+ OMElement eprChildElement = (OMElement) childElements.next();
+ QName qname = eprChildElement.getQName();
+
+ if (map.get(AddressingConstants.EPR_ADDRESS).equals(qname)) {
+ //We need to identify the address element again in order to ensure
+ //that it is not included with the extensibility elements.
+ epr.setAddress(eprChildElement.getText());
+ Iterator allAddrAttributes = eprChildElement.getAllAttributes();
+ ArrayList addressAttributes = new ArrayList();
+ while (allAddrAttributes.hasNext()) {
+ OMAttribute attribute = (OMAttribute) allAddrAttributes.next();
+ addressAttributes.add(attribute);
+ }
+ epr.setAddressAttributes(addressAttributes);
+ }
+ else if (map.get(AddressingConstants.EPR_REFERENCE_PARAMETERS).equals(qname)) {
+ Iterator iterator = eprChildElement.getChildElements();
+ while (iterator.hasNext()) {
+ OMElement element = (OMElement) iterator.next();
+ epr.addReferenceParameter(element);
+ }
+ }
+ else if (isFinalAddressingNamespace &&
+ map.get(AddressingConstants.Final.WSA_METADATA).equals(qname)) {
+ Iterator iterator = eprChildElement.getChildElements();
+ while (iterator.hasNext()) {
+ OMNode node = (OMNode) iterator.next();
+ epr.addMetaData(node);
+ }
+ Iterator allMDAttributes = eprChildElement.getAllAttributes();
+ ArrayList metadataAttributes = new ArrayList();
+ while (allMDAttributes.hasNext()) {
+ OMAttribute attribute = (OMAttribute) allMDAttributes.next();
+ metadataAttributes.add(attribute);
+ }
+ epr.setMetadataAttributes(metadataAttributes);
+ }
+ else if (!isFinalAddressingNamespace &&
+ map.get(AddressingConstants.Submission.EPR_REFERENCE_PROPERTIES).equals(qname)) {
+ // since we have the model for WS-Final, we don't have a place to keep this reference properties.
+ // The only compatible place is reference properties
+ Iterator iterator = eprChildElement.getChildElements();
+ while (iterator.hasNext()) {
+ OMElement element = (OMElement) iterator.next();
+ epr.addReferenceParameter(element);
+ }
+ }
+ else {
+ epr.addExtensibleElement(eprChildElement);
+ }
+ }
+
+ Iterator attributes = eprOMElement.getAllAttributes();
+ while (attributes.hasNext()) {
+ OMAttribute attribute = (OMAttribute) attributes.next();
+ epr.addAttribute(attribute);
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("fromOM: Endpoint reference, " + epr);
+ }
+ }
+
+ static {
+ finalQNames.put(AddressingConstants.EPR_ADDRESS, new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.EPR_ADDRESS));
+ finalQNames.put(AddressingConstants.EPR_REFERENCE_PARAMETERS, new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.EPR_REFERENCE_PARAMETERS));
+ finalQNames.put(AddressingConstants.Final.WSA_METADATA, new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.Final.WSA_METADATA));
+
+ submissionQNames.put(AddressingConstants.EPR_ADDRESS, new QName(AddressingConstants.Submission.WSA_NAMESPACE, AddressingConstants.EPR_ADDRESS));
+ submissionQNames.put(AddressingConstants.EPR_REFERENCE_PARAMETERS, new QName(AddressingConstants.Submission.WSA_NAMESPACE, AddressingConstants.EPR_REFERENCE_PARAMETERS));
+ submissionQNames.put(AddressingConstants.Submission.EPR_REFERENCE_PROPERTIES, new QName(AddressingConstants.Submission.WSA_NAMESPACE, AddressingConstants.Submission.EPR_REFERENCE_PROPERTIES));
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/RelatesTo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/RelatesTo.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/RelatesTo.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/RelatesTo.java Sun Feb 25 11:56:59 2007
@@ -48,7 +48,7 @@
* Refer to the "serialVer" utility to compute a serialization
* version ID.
*/
- private static final long serialVersionUID = -1120384315333414960L;
+ private static final long serialVersionUID = -1120384315333414960L;
/**
* @serial Tracks the revision level of a class to identify changes to the
@@ -64,7 +64,7 @@
- /**
+ /**
* Field relationshipType
*/
private String relationshipType;
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java Sun Feb 25 11:56:59 2007
@@ -37,104 +37,104 @@
* Default Action Pattern for WSDL1.1 at http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#defactionwsdl11
*/
public class WSDL11ActionHelper {
-
- private static final Log log = LogFactory.getLog(WSDL11ActionHelper.class);
- private static final QName submissionWSAWNS = new QName(AddressingConstants.Submission.WSA_NAMESPACE, AddressingConstants.WSA_ACTION);
+
+ private static final Log log = LogFactory.getLog(WSDL11ActionHelper.class);
+ private static final QName submissionWSAWNS = new QName(AddressingConstants.Submission.WSA_NAMESPACE, AddressingConstants.WSA_ACTION);
private static final QName finalWSANS = new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.WSA_ACTION);
private static final QName finalWSAWNS = new QName(AddressingConstants.Final.WSAW_NAMESPACE, AddressingConstants.WSA_ACTION);
- /**
- * getActionFromInputElement
- * @param def the wsdl:definitions which contains the wsdl:portType
- * @param wsdl4jPortType the wsdl:portType which contains the wsdl:operation
- * @param op the wsdl:operation which contains the input element
- * @param input the input element to be examined to generate the wsa:Action
- * @return either the wsaw:Action from the input element or an action generated using the DefaultActionPattern
- */
+ /**
+ * getActionFromInputElement
+ * @param def the wsdl:definitions which contains the wsdl:portType
+ * @param wsdl4jPortType the wsdl:portType which contains the wsdl:operation
+ * @param op the wsdl:operation which contains the input element
+ * @param input the input element to be examined to generate the wsa:Action
+ * @return either the wsaw:Action from the input element or an action generated using the DefaultActionPattern
+ */
public static String getActionFromInputElement(Definition def, PortType wsdl4jPortType, Operation op, Input input){
String result = getWSAWActionExtensionAttribute(input);
if(result == null){
result = WSDL11DefaultActionPatternHelper.generateActionFromInputElement(def, wsdl4jPortType, op, input);
}
log.trace(result);
- return result;
+ return result;
}
/**
- * getActionFromOutputElement
- * @param def the wsdl:definitions which contains the wsdl:portType
- * @param wsdl4jPortType the wsdl:portType which contains the wsdl:operation
- * @param op the wsdl:operation which contains the output element
- * @param output the input element to be examined to generate the wsa:Action
- * @return either the wsaw:Action from the output element or an action generated using the DefaultActionPattern
- */
+ * getActionFromOutputElement
+ * @param def the wsdl:definitions which contains the wsdl:portType
+ * @param wsdl4jPortType the wsdl:portType which contains the wsdl:operation
+ * @param op the wsdl:operation which contains the output element
+ * @param output the input element to be examined to generate the wsa:Action
+ * @return either the wsaw:Action from the output element or an action generated using the DefaultActionPattern
+ */
public static String getActionFromOutputElement(Definition def, PortType wsdl4jPortType, Operation op, Output output){
- String result = getWSAWActionExtensionAttribute(output);
- if(result == null){
- result = WSDL11DefaultActionPatternHelper.generateActionFromOutputElement(def, wsdl4jPortType, op, output);
+ String result = getWSAWActionExtensionAttribute(output);
+ if(result == null){
+ result = WSDL11DefaultActionPatternHelper.generateActionFromOutputElement(def, wsdl4jPortType, op, output);
}
- log.trace(result);
- return result;
+ log.trace(result);
+ return result;
}
/**
- * getActionFromFaultElement
- * @param def the wsdl:definitions which contains the wsdl:portType
- * @param wsdl4jPortType the wsdl:portType which contains the wsdl:operation
- * @param op the wsdl:operation which contains the fault element
- * @param fault the fault element to be examined to generate the wsa:Action
- * @return either the wsaw:Action from the fault element or an action generated using the DefaultActionPattern
- */
+ * getActionFromFaultElement
+ * @param def the wsdl:definitions which contains the wsdl:portType
+ * @param wsdl4jPortType the wsdl:portType which contains the wsdl:operation
+ * @param op the wsdl:operation which contains the fault element
+ * @param fault the fault element to be examined to generate the wsa:Action
+ * @return either the wsaw:Action from the fault element or an action generated using the DefaultActionPattern
+ */
public static String getActionFromFaultElement(Definition def, PortType wsdl4jPortType, Operation op, Fault fault){
- String result = getWSAWActionExtensionAttribute(fault);
- if(result == null){
- result = WSDL11DefaultActionPatternHelper.generateActionFromFaultElement(def, wsdl4jPortType, op, fault);
+ String result = getWSAWActionExtensionAttribute(fault);
+ if(result == null){
+ result = WSDL11DefaultActionPatternHelper.generateActionFromFaultElement(def, wsdl4jPortType, op, fault);
}
- log.trace(result);
- return result;
+ log.trace(result);
+ return result;
}
private static String getWSAWActionExtensionAttribute(AttributeExtensible ae){
- // Search first for a wsaw:Action using the submission namespace
- Object attribute = ae.getExtensionAttribute(submissionWSAWNS);
- // Then if that did not exist one using the w3c namespace
- if(attribute == null){
- attribute = ae.getExtensionAttribute(finalWSAWNS);
+ // Search first for a wsaw:Action using the submission namespace
+ Object attribute = ae.getExtensionAttribute(submissionWSAWNS);
+ // Then if that did not exist one using the w3c namespace
+ if(attribute == null){
+ attribute = ae.getExtensionAttribute(finalWSAWNS);
}
// Then finally if that did not exist, try the 2005/08 NS
// (Included here because it's needed for Apache Muse)
if(attribute == null){
attribute = ae.getExtensionAttribute(finalWSANS);
}
-
- // wsdl4j may return a String, QName or a List of either
- // If it is a list, extract the first element
- if(attribute instanceof List){
- List l = (List)attribute;
- if(l.size()>0){
- attribute = l.get(0);
- }else{
- attribute = null;
- }
- }
-
- // attribute must now be a QName or String or null
- // If it is a QName, take the LocalPart as a String
- if(attribute instanceof QName){
- QName qn = (QName)attribute;
- attribute = qn.getLocalPart();
- }
-
- if((attribute instanceof String)) {
- String result = (String)attribute;
- log.trace(result);
- return result;
- } else {
- if(log.isTraceEnabled()){
- log.trace("No wsaw:Action attribute found");
- }
- return null;
- }
+
+ // wsdl4j may return a String, QName or a List of either
+ // If it is a list, extract the first element
+ if(attribute instanceof List){
+ List l = (List)attribute;
+ if(l.size()>0){
+ attribute = l.get(0);
+ }else{
+ attribute = null;
+ }
+ }
+
+ // attribute must now be a QName or String or null
+ // If it is a QName, take the LocalPart as a String
+ if(attribute instanceof QName){
+ QName qn = (QName)attribute;
+ attribute = qn.getLocalPart();
+ }
+
+ if((attribute instanceof String)) {
+ String result = (String)attribute;
+ log.trace(result);
+ return result;
+ } else {
+ if(log.isTraceEnabled()){
+ log.trace("No wsaw:Action attribute found");
+ }
+ return null;
+ }
}
public static String getInputActionFromStringInformation(String messageExchangePattern, String targetNamespace, String portTypeName, String operationName, String inputName){
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11DefaultActionPatternHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11DefaultActionPatternHelper.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11DefaultActionPatternHelper.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11DefaultActionPatternHelper.java Sun Feb 25 11:56:59 2007
@@ -31,95 +31,95 @@
* http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#defactionwsdl11
*/
public class WSDL11DefaultActionPatternHelper {
-
- private static final Log log = LogFactory.getLog(WSDL11DefaultActionPatternHelper.class);
-
- // String constants used extensively in this class
- private static final String URN = "urn";
- private static final String SLASH = "/";
- private static final String COLON = ":";
- private static final String REQUEST = "Request";
- private static final String RESPONSE = "Response";
- private static final String SOLICIT = "Solicit";
- private static final String FAULT = "Fault";
-
- /**
- * Generate the Action for an Input using the Default Action Pattern
- *
- * Pattern is defined as [target namespace][delimiter][port type name][delimiter][input name]
- *
- * @param def is required to obtain the targetNamespace
- * @param wsdl4jPortType is required to obtain the portType name
- * @param op is required to generate the input name if not explicitly specified
- * @param input is required for its name if specified
- * @return a wsa:Action value based on the Default Action Pattern and the provided objects
- */
- public static String generateActionFromInputElement(Definition def, PortType wsdl4jPortType, Operation op, Input input){
- // Get the targetNamespace of the wsdl:definitions
- String targetNamespace = def.getTargetNamespace();
-
- // Determine the delimiter. Per the spec: 'is ":" when the [target namespace] is a URN, otherwise "/".
- // Note that for IRI schemes other than URNs which aren't path-based (i.e. those that outlaw the "/"
- // character), the default action value may not conform to the rules of the IRI scheme. Authors
- // are advised to specify explicit values in the WSDL in this case.'
- String delimiter = SLASH;
- if(targetNamespace.toLowerCase().startsWith(URN)){
- delimiter = COLON;
- }
-
- // Get the portType name (as a string to be included in the action)
- String portTypeName = wsdl4jPortType.getQName().getLocalPart();
- // Get the name of the input element (and generate one if none explicitly specified)
- String inputName = getNameFromInputElement(op, input);
-
- // Append the bits together
- StringBuffer sb = new StringBuffer();
- sb.append(targetNamespace);
- // Deal with the problem that the targetNamespace may or may not have a trailing delimiter
- if(!targetNamespace.endsWith(delimiter)){
- sb.append(delimiter);
- }
- sb.append(portTypeName);
- sb.append(delimiter);
- sb.append(inputName);
-
- // Resolve the action from the StringBuffer
- String result = sb.toString();
-
- if(log.isTraceEnabled()){
- log.trace("generateActionFromInputElement result: "+result);
- }
-
- return result;
+
+ private static final Log log = LogFactory.getLog(WSDL11DefaultActionPatternHelper.class);
+
+ // String constants used extensively in this class
+ private static final String URN = "urn";
+ private static final String SLASH = "/";
+ private static final String COLON = ":";
+ private static final String REQUEST = "Request";
+ private static final String RESPONSE = "Response";
+ private static final String SOLICIT = "Solicit";
+ private static final String FAULT = "Fault";
+
+ /**
+ * Generate the Action for an Input using the Default Action Pattern
+ *
+ * Pattern is defined as [target namespace][delimiter][port type name][delimiter][input name]
+ *
+ * @param def is required to obtain the targetNamespace
+ * @param wsdl4jPortType is required to obtain the portType name
+ * @param op is required to generate the input name if not explicitly specified
+ * @param input is required for its name if specified
+ * @return a wsa:Action value based on the Default Action Pattern and the provided objects
+ */
+ public static String generateActionFromInputElement(Definition def, PortType wsdl4jPortType, Operation op, Input input){
+ // Get the targetNamespace of the wsdl:definitions
+ String targetNamespace = def.getTargetNamespace();
+
+ // Determine the delimiter. Per the spec: 'is ":" when the [target namespace] is a URN, otherwise "/".
+ // Note that for IRI schemes other than URNs which aren't path-based (i.e. those that outlaw the "/"
+ // character), the default action value may not conform to the rules of the IRI scheme. Authors
+ // are advised to specify explicit values in the WSDL in this case.'
+ String delimiter = SLASH;
+ if(targetNamespace.toLowerCase().startsWith(URN)){
+ delimiter = COLON;
+ }
+
+ // Get the portType name (as a string to be included in the action)
+ String portTypeName = wsdl4jPortType.getQName().getLocalPart();
+ // Get the name of the input element (and generate one if none explicitly specified)
+ String inputName = getNameFromInputElement(op, input);
+
+ // Append the bits together
+ StringBuffer sb = new StringBuffer();
+ sb.append(targetNamespace);
+ // Deal with the problem that the targetNamespace may or may not have a trailing delimiter
+ if(!targetNamespace.endsWith(delimiter)){
+ sb.append(delimiter);
+ }
+ sb.append(portTypeName);
+ sb.append(delimiter);
+ sb.append(inputName);
+
+ // Resolve the action from the StringBuffer
+ String result = sb.toString();
+
+ if(log.isTraceEnabled()){
+ log.trace("generateActionFromInputElement result: "+result);
+ }
+
+ return result;
}
- /**
- * Get the name of the specified Input element using the rules defined in WSDL 1.1
- * Section 2.4.5 http://www.w3.org/TR/wsdl#_names
- */
+ /**
+ * Get the name of the specified Input element using the rules defined in WSDL 1.1
+ * Section 2.4.5 http://www.w3.org/TR/wsdl#_names
+ */
private static String getNameFromInputElement(Operation op, Input input) {
- // Get the name from the input element if specified.
- String result = input.getName();
-
- // If not we'll have to generate it.
- if (result == null) {
- // If Request-Response or Solicit-Response do something special per
- // WSDL 1.1 Section 2.4.5
- OperationType operationType = op.getStyle();
- if (null != operationType) {
- if (operationType.equals(OperationType.REQUEST_RESPONSE)){
- result = op.getName() + REQUEST;
- }else if (operationType.equals(OperationType.SOLICIT_RESPONSE)){
- result = op.getName() + RESPONSE;
- }
- }
- // If the OperationType was not available for some reason, assume on-way or notification
- if(result == null){
- result = op.getName();
- }
- }
- return result;
- }
+ // Get the name from the input element if specified.
+ String result = input.getName();
+
+ // If not we'll have to generate it.
+ if (result == null) {
+ // If Request-Response or Solicit-Response do something special per
+ // WSDL 1.1 Section 2.4.5
+ OperationType operationType = op.getStyle();
+ if (null != operationType) {
+ if (operationType.equals(OperationType.REQUEST_RESPONSE)){
+ result = op.getName() + REQUEST;
+ }else if (operationType.equals(OperationType.SOLICIT_RESPONSE)){
+ result = op.getName() + RESPONSE;
+ }
+ }
+ // If the OperationType was not available for some reason, assume on-way or notification
+ if(result == null){
+ result = op.getName();
+ }
+ }
+ return result;
+ }
protected static String getInputActionFromStringInformation(String messageExchangePattern, String targetNamespace, String portTypeName, String operationName, String inputName){
if(messageExchangePattern == null && inputName == null){
@@ -163,83 +163,83 @@
return result;
}
- /**
- * Generate the Action for an Output using the Default Action Pattern
- *
- * Pattern is defined as [target namespace][delimiter][port type name][delimiter][output name]
- *
- * @param def is required to obtain the targetNamespace
- * @param wsdl4jPortType is required to obtain the portType name
- * @param op is required to generate the output name if not explicitly specified
- * @param output is required for its name if specified
- * @return a wsa:Action value based on the Default Action Pattern and the provided objects
- */
+ /**
+ * Generate the Action for an Output using the Default Action Pattern
+ *
+ * Pattern is defined as [target namespace][delimiter][port type name][delimiter][output name]
+ *
+ * @param def is required to obtain the targetNamespace
+ * @param wsdl4jPortType is required to obtain the portType name
+ * @param op is required to generate the output name if not explicitly specified
+ * @param output is required for its name if specified
+ * @return a wsa:Action value based on the Default Action Pattern and the provided objects
+ */
public static String generateActionFromOutputElement(Definition def, PortType wsdl4jPortType, Operation op, Output output){
- // Get the targetNamespace of the wsdl:definition
- String targetNamespace = def.getTargetNamespace();
-
- // Determine the delimiter. Per the spec: 'is ":" when the [target namespace] is a URN, otherwise "/".
- // Note that for IRI schemes other than URNs which aren't path-based (i.e. those that outlaw the "/"
- // character), the default action value may not conform to the rules of the IRI scheme. Authors
- // are advised to specify explicit values in the WSDL in this case.'
- String delimiter = SLASH;
- if(targetNamespace.toLowerCase().startsWith(URN)){
- delimiter = COLON;
- }
-
- // Get the portType name (as a string to be included in the action)
- String portTypeName = wsdl4jPortType.getQName().getLocalPart();
- // Get the name of the output element (and generate one if none explicitly specified)
- String outputName = getNameFromOutputElement(op, output);
-
- // Append the bits together
- StringBuffer sb = new StringBuffer();
- sb.append(targetNamespace);
- // Deal with the problem that the targetNamespace may or may not have a trailing delimiter
- if(!targetNamespace.endsWith(delimiter)){
- sb.append(delimiter);
- }
- sb.append(portTypeName);
- sb.append(delimiter);
- sb.append(outputName);
-
- // Resolve the action from the StringBuffer
- String result = sb.toString();
-
- if(log.isTraceEnabled()){
- log.trace("generateActionFromOutputElement result: "+result);
- }
-
- return result;
+ // Get the targetNamespace of the wsdl:definition
+ String targetNamespace = def.getTargetNamespace();
+
+ // Determine the delimiter. Per the spec: 'is ":" when the [target namespace] is a URN, otherwise "/".
+ // Note that for IRI schemes other than URNs which aren't path-based (i.e. those that outlaw the "/"
+ // character), the default action value may not conform to the rules of the IRI scheme. Authors
+ // are advised to specify explicit values in the WSDL in this case.'
+ String delimiter = SLASH;
+ if(targetNamespace.toLowerCase().startsWith(URN)){
+ delimiter = COLON;
+ }
+
+ // Get the portType name (as a string to be included in the action)
+ String portTypeName = wsdl4jPortType.getQName().getLocalPart();
+ // Get the name of the output element (and generate one if none explicitly specified)
+ String outputName = getNameFromOutputElement(op, output);
+
+ // Append the bits together
+ StringBuffer sb = new StringBuffer();
+ sb.append(targetNamespace);
+ // Deal with the problem that the targetNamespace may or may not have a trailing delimiter
+ if(!targetNamespace.endsWith(delimiter)){
+ sb.append(delimiter);
+ }
+ sb.append(portTypeName);
+ sb.append(delimiter);
+ sb.append(outputName);
+
+ // Resolve the action from the StringBuffer
+ String result = sb.toString();
+
+ if(log.isTraceEnabled()){
+ log.trace("generateActionFromOutputElement result: "+result);
+ }
+
+ return result;
}
- /**
- * Get the name of the specified Output element using the rules defined in WSDL 1.1
- * Section 2.4.5 http://www.w3.org/TR/wsdl#_names
- */
+ /**
+ * Get the name of the specified Output element using the rules defined in WSDL 1.1
+ * Section 2.4.5 http://www.w3.org/TR/wsdl#_names
+ */
private static String getNameFromOutputElement(Operation op, Output output) {
- // Get the name from the output element if specified.
- String result = output.getName();
-
- // If not we'll have to generate it.
- if (result == null) {
- // If Request-Response or Solicit-Response do something special per
- // WSDL 1.1 Section 2.4.5
- OperationType operationType = op.getStyle();
- if (null != operationType) {
- if (operationType.equals(OperationType.REQUEST_RESPONSE)){
- return op.getName() + RESPONSE;
- }else if (operationType.equals(OperationType.SOLICIT_RESPONSE)){
- return op.getName() + SOLICIT;
- }
- }
- // If the OperationType was not available for some reason, assume on-way or notification
- if(result == null){
- result = op.getName();
- }
- }
- return result;
- }
+ // Get the name from the output element if specified.
+ String result = output.getName();
+
+ // If not we'll have to generate it.
+ if (result == null) {
+ // If Request-Response or Solicit-Response do something special per
+ // WSDL 1.1 Section 2.4.5
+ OperationType operationType = op.getStyle();
+ if (null != operationType) {
+ if (operationType.equals(OperationType.REQUEST_RESPONSE)){
+ return op.getName() + RESPONSE;
+ }else if (operationType.equals(OperationType.SOLICIT_RESPONSE)){
+ return op.getName() + SOLICIT;
+ }
+ }
+ // If the OperationType was not available for some reason, assume on-way or notification
+ if(result == null){
+ result = op.getName();
+ }
+ }
+ return result;
+ }
protected static String getOutputActionFromStringInformation(String messageExchangePattern, String targetNamespace, String portTypeName, String operationName, String outputName){
if(messageExchangePattern == null && outputName == null){
@@ -284,16 +284,16 @@
}
/**
- * Generate the Action for a Fault using the Default Action Pattern
- *
- * Pattern is defined as [target namespace][delimiter][port type name][delimiter][operation name][delimiter]Fault[delimiter][fault name]
- *
- * @param def is required to obtain the targetNamespace
- * @param wsdl4jPortType is required to obtain the portType name
- * @param op is required to obtain the operation name
- * @param fault is required to obtain the fault name
- * @return a wsa:Action value based on the Default Action Pattern and the provided objects
- */
+ * Generate the Action for a Fault using the Default Action Pattern
+ *
+ * Pattern is defined as [target namespace][delimiter][port type name][delimiter][operation name][delimiter]Fault[delimiter][fault name]
+ *
+ * @param def is required to obtain the targetNamespace
+ * @param wsdl4jPortType is required to obtain the portType name
+ * @param op is required to obtain the operation name
+ * @param fault is required to obtain the fault name
+ * @return a wsa:Action value based on the Default Action Pattern and the provided objects
+ */
public static String generateActionFromFaultElement(Definition def, PortType wsdl4jPortType, Operation op, Fault fault){
// Get the targetNamespace of the wsdl:definition
String targetNamespace = def.getTargetNamespace();
@@ -306,7 +306,7 @@
if(targetNamespace.toLowerCase().startsWith(URN)){
delimiter = COLON;
}
-
+
// Get the portType name (as a string to be included in the action)
String portTypeName = wsdl4jPortType.getQName().getLocalPart();
// Get the operation name (as a string to be included in the action)
@@ -314,7 +314,7 @@
// Get the name of the fault element (name is mandatory on fault elements)
String faultName = fault.getName();
-
+
// Append the bits together
StringBuffer sb = new StringBuffer();
sb.append(targetNamespace);
@@ -329,14 +329,14 @@
sb.append(FAULT);
sb.append(delimiter);
sb.append(faultName);
-
+
// Resolve the action from the StringBuffer
String result = sb.toString();
-
+
if(log.isTraceEnabled()){
log.trace("generateActionFromFaultElement result: "+result);
}
-
+
return result;
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/OMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/OMBuilder.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/OMBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/OMBuilder.java Sun Feb 25 11:56:59 2007
@@ -7,9 +7,9 @@
import org.apache.axis2.context.MessageContext;
public interface OMBuilder {
-
+
/**
* @return Returns the document element.
*/
- public OMElement processDocument(InputStream inputStream, MessageContext messageContext) throws AxisFault;
+ public OMElement processDocument(InputStream inputStream, MessageContext messageContext) throws AxisFault;
}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/OMBuilder.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java?view=diff&rev=511585&r1=511584&r2=511585
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java Sun Feb 25 11:56:59 2007
@@ -21,20 +21,20 @@
public interface ClusterManager {
- public void init(ConfigurationContext context);
+ public void init(ConfigurationContext context);
- public void addContext(AbstractContext context);
-
- public void removeContext(AbstractContext context);
-
- public void updateState(AbstractContext context);
-
- /**
- * This can be used to limit the contexts that get replicated through the 'flush' method.
- *
- * @param context
- * @return
- */
- public boolean isContextClusterable (AbstractContext context);
-
+ public void addContext(AbstractContext context);
+
+ public void removeContext(AbstractContext context);
+
+ public void updateState(AbstractContext context);
+
+ /**
+ * This can be used to limit the contexts that get replicated through the 'flush' method.
+ *
+ * @param context
+ * @return
+ */
+ public boolean isContextClusterable (AbstractContext context);
+
}
Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusterManager.java
------------------------------------------------------------------------------
svn:eol-style = native
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org