[prev in list] [next in list] [prev in thread] [next in thread]
List: axis-cvs
Subject: svn commit: r542643 [1/3] - in
From: pradine () apache ! org
Date: 2007-05-29 20:23:49
Message-ID: 20070529202352.648021A981D () eris ! apache ! org
[Download RAW message or body]
Author: pradine
Date: Tue May 29 13:23:45 2007
New Revision: 542643
URL: http://svn.apache.org/viewvc?view=rev&rev=542643
Log:
First attempts.
Added:
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Action.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/FaultAction.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/package-info.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/addressing/
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/addressing/SubmissionAddressing.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/addressing/SubmissionAddressingFeature.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/addressing/SubmissionEndpointReference.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/addressing/package-info.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceBuilder.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceConverter.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/feature/
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/feature/WebServiceFeatureValidator.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/feature/config/
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/feature/config/MTOMConfigurator.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/feature/config/RespectBindingConfigurator.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/feature/config/W3CAndSubmissionAddressingConfigurator.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/feature/util/
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/feature/util/WebServiceFeatureConfigUtil.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/feature/util/WebServiceFeatureConfigurator.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/metadata/
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/metadata/InterfaceName.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/metadata/ServiceName.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/metadata/WSDLLocation.java
Removed:
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/ServiceName.java
Modified:
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/project.xml
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Binding.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/BindingProvider.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Endpoint.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Service.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/WebServiceContext.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/handler/MessageContext.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/Provider.java
webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/ServiceDelegate.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/binding/BindingImpl.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatch.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatch.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/context/WebServiceContextImpl.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/EndpointImpl.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/BindingProvider.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/Constants.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java
webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/AddressingConstants.java
webservices/axis2/branches/java/jaxws21/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java
webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/DescriptionFactory.java
webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/builder/WebServiceContextAnnot.java
webservices/axis2/branches/java/jaxws21/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/project.xml?view=diff&rev=542643&r1=542642&r2=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/project.xml (original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/project.xml Tue May 29 \
13:23:45 2007 @@ -1,19 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
- * Copyright 2001-2004 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
- *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ * 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.
*/
-->
<project>
@@ -95,6 +98,14 @@
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxbapi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ <version>${stax.api.version}</version>
+ <properties>
+ <module>true</module>
+ </properties>
</dependency>
</dependencies>
</project>
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Action.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Action.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Action.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Action.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws; \
+ \
+import java.lang.annotation.RetentionPolicy; \
+import java.lang.annotation.ElementType; \
+import java.lang.annotation.Retention; \
+import java.lang.annotation.Target; \
+import java.lang.annotation.Documented; \
+ \
+@Documented \
+@Retention(value=RetentionPolicy.RUNTIME) \
+@Target(value=ElementType.METHOD) \
+ \
+public @interface Action { \
+ \
+ public FaultAction[] fault() default {};
+
+ public String input() default "";
+
+ public String output() default "";
+ \
+}
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Binding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Binding.java?view=diff&rev=542643&r1=542642&r2=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Binding.java \
(original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Binding.java \
Tue May 29 13:23:45 2007 @@ -1,18 +1,21 @@
/*
-* Copyright 2004,2005 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.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws;
import javax.xml.ws.handler.Handler;
@@ -20,6 +23,9 @@
public interface Binding {
+ //TODO
+ public abstract String getBindingID();
+
public abstract List<Handler> getHandlerChain();
public abstract void setHandlerChain(List<Handler> list);
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/BindingProvider.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxw \
s-api/src/javax/xml/ws/BindingProvider.java?view=diff&rev=542643&r1=542642&r2=542643 \
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/BindingProvider.java \
(original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/BindingProvider.java \
Tue May 29 13:23:45 2007 @@ -1,23 +1,31 @@
/*
-* Copyright 2004,2005 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.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws;
import java.util.Map;
public interface BindingProvider {
+ //TODO
+ public abstract EndpointReference getEndpointReference();
+
+ //TODO
+ public abstract <T extends EndpointReference> T getEndpointReference(Class<T> \
clazz);
public abstract Map<java.lang.String, java.lang.Object> \
getRequestContext();
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Endpoint.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Endpoint.java?view=diff&rev=542643&r1=542642&r2=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Endpoint.java \
(original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Endpoint.java \
Tue May 29 13:23:45 2007 @@ -64,6 +64,12 @@
public abstract void setProperties(Map<java.lang.String, java.lang.Object> map);
+ //TODO
+ public abstract EndpointReference getEndpointReference(org.w3c.dom.Element... \
referenceParameters); +
+ //TODO
+ public abstract <T extends EndpointReference> T getEndpointReference(Class<T> \
clazz, org.w3c.dom.Element... referenceParameters); +
public static final String WSDL_SERVICE = "javax.xml.ws.wsdl.service";
public static final String WSDL_PORT = "javax.xml.ws.wsdl.port";
}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws;
+
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.ws.spi.Provider;
+
+public abstract class EndpointReference {
+ protected EndpointReference() {
+ }
+
+ public static EndpointReference readFrom(Source eprInfoset) {
+ return Provider.provider().readEndpointReference(eprInfoset);
+ }
+
+ public abstract void writeTo(Result result);
+
+ public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... \
features) { + return Provider.provider().getPort(this, \
serviceEndpointInterface, features); + }
+}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/FaultAction.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/FaultAction.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/FaultAction.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/FaultAction.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws; \
+ \
+import java.lang.annotation.RetentionPolicy; \
+import java.lang.annotation.ElementType; \
+import java.lang.annotation.Retention; \
+import java.lang.annotation.Target; \
+import java.lang.annotation.Documented; \
+ \
+@Documented \
+@Retention(value=RetentionPolicy.RUNTIME) \
+@Target(value=ElementType.METHOD) \
+ \
+public @interface FaultAction { \
+
+ public Class className();
+
+ public String value() default "";
+ \
+}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws; \
+ \
+import java.lang.annotation.RetentionPolicy; \
+import java.lang.annotation.ElementType; \
+import java.lang.annotation.Retention; \
+import java.lang.annotation.Target; \
+import java.lang.annotation.Documented; \
+
+import javax.xml.ws.spi.WebServiceFeatureAnnotation;
+ \
+@Documented \
+@Retention(value=RetentionPolicy.RUNTIME) \
+@Target(value=ElementType.TYPE) \
+@WebServiceFeatureAnnotation(id=RespectBindingFeature.ID, \
bean=RespectBindingFeature.class) \
+
+public @interface RespectBinding { \
+ \
+ public boolean enabled() default true;
+ \
+}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws;
+
+public final class RespectBindingFeature extends WebServiceFeature {
+ public static final String ID = "javax.xml.ws.RespectBindingFeature";
+
+ public RespectBindingFeature() {
+ this(true);
+ }
+
+ public RespectBindingFeature(boolean enabled) {
+ super();
+ this.enabled = enabled;
+ }
+
+ @Override
+ public String getID() {
+ return ID;
+ }
+}
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Service.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Service.java?view=diff&rev=542643&r1=542642&r2=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Service.java \
(original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/Service.java \
Tue May 29 13:23:45 2007 @@ -1,18 +1,21 @@
/*
-* Copyright 2004,2005 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.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws;
import javax.xml.bind.JAXBContext;
@@ -20,7 +23,6 @@
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.spi.Provider;
import javax.xml.ws.spi.ServiceDelegate;
-import java.net.URI;
import java.net.URL;
import java.util.Iterator;
import java.util.concurrent.Executor;
@@ -41,6 +43,21 @@
return (T) _delegate.getPort(serviceEndpointInterface);
}
+ //TODO
+ public <T> T getPort(QName portName, Class<T> serviceEndpointInterface, \
WebServiceFeature... features) { + return (T) _delegate.getPort(portName, \
serviceEndpointInterface, features); + }
+
+ //TODO
+ public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... \
features) { + return (T) _delegate.getPort(serviceEndpointInterface, \
features); + }
+
+ //TODO
+ public <T> T getPort(EndpointReference endpointReference, Class<T> \
serviceEndpointInterface, WebServiceFeature... features) { + return (T) \
_delegate.getPort(endpointReference, serviceEndpointInterface, features); + }
+
public void addPort(QName portName, String bindingId, String endpointAddress) {
_delegate.addPort(portName, bindingId, endpointAddress);
}
@@ -49,15 +66,35 @@
return _delegate.createDispatch(portName, type, mode);
}
- public Dispatch<java.lang.Object> createDispatch(QName portName, JAXBContext \
context, Mode mode) { + public Dispatch<Object> createDispatch(QName portName, \
JAXBContext context, Mode mode) { return _delegate.createDispatch(portName, context, \
mode); }
+ //TODO
+ public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, \
Service.Mode mode, WebServiceFeature... features) { + return \
_delegate.createDispatch(portName, type, mode, features); + }
+
+ //TODO
+ public <T> Dispatch<T> createDispatch(EndpointReference endpointReference, \
Class<T> type, Service.Mode mode, WebServiceFeature... features) { + return \
_delegate.createDispatch(endpointReference, type, mode, features); + }
+
+ //TODO
+ public Dispatch<Object> createDispatch(QName portName, JAXBContext context, \
Service.Mode mode, WebServiceFeature... features) { + return \
_delegate.createDispatch(portName, context, mode, features); + }
+
+ //TODO
+ public Dispatch<Object> createDispatch(EndpointReference endpointReference, \
JAXBContext context, Service.Mode mode, WebServiceFeature... features) { + \
return _delegate.createDispatch(endpointReference, context, mode, features); + }
+
public QName getServiceName() {
return _delegate.getServiceName();
}
- public Iterator<javax.xml.namespace.QName> getPorts() {
+ public Iterator<QName> getPorts() {
return _delegate.getPorts();
}
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/WebServiceContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxw \
s-api/src/javax/xml/ws/WebServiceContext.java?view=diff&rev=542643&r1=542642&r2=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/WebServiceContext.java \
(original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/WebServiceContext.java \
Tue May 29 13:23:45 2007 @@ -1,24 +1,33 @@
/*
-* Copyright 2004,2005 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.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws;
import javax.xml.ws.handler.MessageContext;
import java.security.Principal;
public interface WebServiceContext {
+
+ //TODO
+ public abstract EndpointReference getEndpointReference(org.w3c.dom.Element... \
referenceParameters); +
+ //TODO
+ public abstract <T extends EndpointReference> T getEndpointReference(Class<T> \
clazz, org.w3c.dom.Element... referenceParameters);
public abstract MessageContext getMessageContext();
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws;
+
+public abstract class WebServiceFeature {
+ protected boolean enabled;
+
+ protected WebServiceFeature() {
+ }
+
+ public abstract String getID();
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+}
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/handler/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxw \
s-api/src/javax/xml/ws/handler/MessageContext.java?view=diff&rev=542643&r1=542642&r2=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/handler/MessageContext.java \
(original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/handler/MessageContext.java \
Tue May 29 13:23:45 2007 @@ -1,18 +1,21 @@
/*
-* Copyright 2004,2005 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.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.handler;
import java.util.Map;
@@ -35,6 +38,7 @@
public static final String WSDL_INTERFACE = "javax.xml.ws.wsdl.interface";
public static final String WSDL_OPERATION = "javax.xml.ws.wsdl.operation";
public static final String HTTP_RESPONSE_CODE = \
"javax.xml.ws.http.response.code"; + public static final String \
REFERENCE_PARAMETERS = "javax.xml.ws.reference.parameters";
public static final String HTTP_REQUEST_HEADERS = \
"javax.xml.ws.http.request.headers";
public static final String HTTP_RESPONSE_HEADERS = \
"javax.xml.ws.http.response.headers";
public static final String HTTP_REQUEST_METHOD = \
"javax.xml.ws.http.request.method";
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.soap; \
+ \
+import java.lang.annotation.RetentionPolicy; \
+import java.lang.annotation.ElementType; \
+import java.lang.annotation.Retention; \
+import java.lang.annotation.Target; \
+import java.lang.annotation.Documented;
+
+import javax.xml.ws.spi.WebServiceFeatureAnnotation;
+ \
+@Documented \
+@Retention(value=RetentionPolicy.RUNTIME) \
+@Target(value=ElementType.TYPE) \
+@WebServiceFeatureAnnotation(id=AddressingFeature.ID, bean=AddressingFeature.class)
+ \
+public @interface Addressing { \
+ \
+ public boolean enabled() default true;
+
+ public boolean required() default false;
+ \
+}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.soap;
+
+import javax.xml.ws.WebServiceFeature;
+
+public final class AddressingFeature extends WebServiceFeature {
+ public static final String ID = "http://www.w3.org/2005/08/addressing/module";
+
+ protected boolean required;
+
+ public AddressingFeature() {
+ this(true, false);
+ }
+
+ public AddressingFeature(boolean enabled) {
+ this(enabled, false);
+ }
+
+ public AddressingFeature(boolean enabled, boolean required) {
+ this.enabled = enabled;
+ this.required = required;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ @Override
+ public String getID() {
+ return ID;
+ }
+}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.soap; \
+ \
+import java.lang.annotation.RetentionPolicy; \
+import java.lang.annotation.ElementType; \
+import java.lang.annotation.Retention; \
+import java.lang.annotation.Target; \
+import java.lang.annotation.Documented; \
+
+import javax.xml.ws.spi.WebServiceFeatureAnnotation;
+ \
+@Documented \
+@Retention(value=RetentionPolicy.RUNTIME) \
+@Target(value=ElementType.TYPE) \
+@WebServiceFeatureAnnotation(id=MTOMFeature.ID, bean=MTOMFeature.class)
+ \
+public @interface MTOM { \
+ \
+ public boolean enabled() default true;
+
+ public int threshold() default 0;
+ \
+}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.soap;
+
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+public final class MTOMFeature extends WebServiceFeature {
+ public static final String ID = \
"http://www.w3.org/2004/08/soap/features/http-optimization"; +
+ protected int threshold;
+
+ public MTOMFeature() {
+ this(true, 0);
+ }
+
+ public MTOMFeature(boolean enabled) {
+ this(enabled, 0);
+ }
+
+ public MTOMFeature(int threshold) {
+ this(true, threshold);
+ }
+
+ public MTOMFeature(boolean enabled, int threshold) {
+ super();
+
+ //TODO NLS enable
+ if (threshold < 0)
+ throw new WebServiceException("MTOM threshold size cannot be less than \
zero. It was " + threshold); +
+ this.enabled = enabled;
+ this.threshold = threshold;
+ }
+
+ public int getThreshold() {
+ return threshold;
+ }
+
+ @Override
+ public String getID() {
+ return ID;
+ }
+}
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/Provider.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxw \
s-api/src/javax/xml/ws/spi/Provider.java?view=diff&rev=542643&r1=542642&r2=542643 \
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/Provider.java \
(original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/Provider.java \
Tue May 29 13:23:45 2007 @@ -1,24 +1,34 @@
/*
-* Copyright 2004,2005 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.
-*/
-
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.spi;
import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
import javax.xml.ws.Endpoint;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+import org.w3c.dom.Element;
+
import java.net.URL;
+import java.util.List;
public abstract class Provider {
@@ -26,7 +36,7 @@
}
public static Provider provider() {
- return (Provider) FactoryFinder.find("javax.xml.ws.spi.Provider", \
DEFAULT_JAXWSPROVIDER); + return (Provider) \
FactoryFinder.find(JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER); }
public abstract ServiceDelegate createServiceDelegate(URL url, QName qname, \
Class class1); @@ -35,6 +45,20 @@
public abstract Endpoint createAndPublishEndpoint(String s, Object obj);
+ //TODO
+ public abstract EndpointReference readEndpointReference(Source eprInfoset);
+
+ //TODO
+ public abstract <T> T getPort(EndpointReference endpointReference, Class<T> \
serviceEndpointInterface, WebServiceFeature... features); +
+ //TODO
+ public abstract W3CEndpointReference createW3CEndpointReference(String address,
+ QName serviceName,
+ QName portName,
+ List<Element> metadata,
+ String wsdlDocumentLocation,
+ List<Element> referenceParameters);
+
public static final String JAXWSPROVIDER_PROPERTY = "javax.xml.ws.spi.Provider";
private static final String DEFAULT_JAXWSPROVIDER = \
"org.apache.axis2.jaxws.spi.Provider"; }
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/ServiceDelegate.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxw \
s-api/src/javax/xml/ws/spi/ServiceDelegate.java?view=diff&rev=542643&r1=542642&r2=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/ServiceDelegate.java \
(original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/ServiceDelegate.java \
Tue May 29 13:23:45 2007 @@ -1,23 +1,29 @@
/*
-* Copyright 2004,2005 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.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.spi;
import javax.xml.bind.JAXBContext;
import javax.xml.namespace.QName;
import javax.xml.ws.Dispatch;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.handler.HandlerResolver;
import java.net.URI;
import java.net.URL;
@@ -33,15 +39,36 @@
public abstract <T> T getPort(Class<T> class1);
+ //TODO
+ public abstract <T> T getPort(QName portName, Class<T> serviceEndpointInterface, \
WebServiceFeature... features); +
+ //TODO
+ public abstract <T> T getPort(EndpointReference endpointReference, Class<T> \
serviceEndpointInterface, WebServiceFeature... features); +
+ //TODO
+ public abstract <T> T getPort(Class<T> serviceEndpointInterface, \
WebServiceFeature... features); +
public abstract void addPort(QName qname, String bindingId, String s);
- public abstract <T>Dispatch<T> createDispatch(QName qname, Class<T> class1, \
javax.xml.ws.Service.Mode mode); + public abstract <T>Dispatch<T> \
createDispatch(QName qname, Class<T> class1, Service.Mode mode);
- public abstract Dispatch<java.lang.Object> createDispatch(QName qname, \
JAXBContext jaxbcontext, javax.xml.ws.Service.Mode mode); + public abstract \
Dispatch<Object> createDispatch(QName qname, JAXBContext jaxbcontext, \
javax.xml.ws.Service.Mode mode);
+ //TODO
+ public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type, \
Service.Mode mode, WebServiceFeature... features); +
+ //TODO
+ public abstract <T> Dispatch<T> createDispatch(EndpointReference \
endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features); \
+ + //TODO
+ public abstract Dispatch<Object> createDispatch(QName portName, JAXBContext \
context, Service.Mode mode, WebServiceFeature... features); +
+ //TODO
+ public abstract Dispatch<Object> createDispatch(EndpointReference \
endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... \
features); +
public abstract QName getServiceName();
- public abstract Iterator<javax.xml.namespace.QName> getPorts();
+ public abstract Iterator<QName> getPorts();
public abstract URL getWSDLDocumentLocation();
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.spi; \
+ \
+import java.lang.annotation.RetentionPolicy; \
+import java.lang.annotation.ElementType; \
+import java.lang.annotation.Retention; \
+import java.lang.annotation.Target; \
+import java.lang.annotation.Documented; \
+
+import javax.xml.ws.WebServiceFeature;
+ \
+@Documented \
+@Retention(value=RetentionPolicy.RUNTIME) \
+@Target(value=ElementType.ANNOTATION_TYPE) \
+ \
+public @interface WebServiceFeatureAnnotation { \
+ \
+ public String id();
+
+ public Class<? extends WebServiceFeature> bean();
+ \
+}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxw \
s-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java?view=auto&rev=542643 \
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.wsaddressing;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceException;
+
+/**
+ * <p>Java class for EndpointReferenceType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within \
this class. + *
+ * <pre>
+ * <complexType name="EndpointReferenceType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Address" \
type="{http://www.w3.org/2005/08/addressing}AttributedURIType"/> + * \
<element ref="{http://www.w3.org/2005/08/addressing}ReferenceParameters" \
minOccurs="0"/> + * <element \
ref="{http://www.w3.org/2005/08/addressing}Metadata" minOccurs="0"/> + * \
<any/> + * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "EndpointReferenceType", propOrder = {
+ "address",
+ "referenceParameters",
+ "metadata",
+ "any"
+})
+public final class W3CEndpointReference extends EndpointReference {
+ @XmlTransient
+ private static volatile JAXBContext jaxbContext;
+ @XmlTransient
+ protected static final String NS = "http://www.w3.org/2005/08/addressing";
+
+ @XmlElement(name = "Address", required = true)
+ protected AttributedURIType address;
+ @XmlElement(name = "ReferenceParameters")
+ protected ReferenceParametersType referenceParameters;
+ @XmlElement(name = "Metadata")
+ protected MetadataType metadata;
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ protected W3CEndpointReference() {
+ }
+
+ public W3CEndpointReference(Source eprInfoset) {
+ super();
+
+ try {
+ JAXBContext jaxbContext = getJAXBContext();
+ Unmarshaller um = jaxbContext.createUnmarshaller();
+ W3CEndpointReference w3cEPR =
+ (W3CEndpointReference) um.unmarshal(eprInfoset);
+
+ address = w3cEPR.address;
+ referenceParameters = w3cEPR.referenceParameters;
+ metadata = w3cEPR.metadata;
+ any = w3cEPR.any;
+ otherAttributes.putAll(w3cEPR.otherAttributes);
+ }
+ catch (Exception e) {
+ throw new WebServiceException("Unable to create W3C endpoint \
reference.", e); + }
+ }
+
+ @Override
+ public void writeTo(Result result) {
+ if (result == null) {
+ //TODO NLS enable
+ throw new IllegalArgumentException("Null is not allowed.");
+ }
+
+ try {
+ JAXBContext jaxbContext = getJAXBContext();
+ Marshaller m = jaxbContext.createMarshaller();
+ m.marshal(this, result);
+ }
+ catch (Exception e) {
+ //TODO NLS enable
+ throw new WebServiceException("writeTo failure.", e);
+ }
+ }
+
+ private JAXBContext getJAXBContext() throws JAXBException {
+ //This is an implementation of double-checked locking.
+ //It works because jaxbContext is volatile.
+ if (jaxbContext == null) {
+ synchronized (W3CEndpointReference.class) {
+ if (jaxbContext == null)
+ jaxbContext = \
JAXBContext.newInstance(W3CEndpointReference.class); + }
+ }
+
+ return jaxbContext;
+ }
+
+ /**
+ * <p>Java class for AttributedURIType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained \
within this class. + *
+ * <pre>
+ * <complexType name="AttributedURIType">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
+ * </extension>
+ * </simpleContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "AttributedURIType", propOrder = {
+ "value"
+ })
+ private static class AttributedURIType {
+
+ @XmlValue
+ @XmlSchemaType(name = "anyURI")
+ protected String value;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ }
+
+ /**
+ * <p>Java class for ReferenceParametersType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained \
within this class. + *
+ * <pre>
+ * <complexType name="ReferenceParametersType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "ReferenceParametersType", propOrder = {
+ "any"
+ })
+ private static class ReferenceParametersType {
+
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ }
+
+ /**
+ * <p>Java class for MetadataType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained \
within this class. + *
+ * <pre>
+ * <complexType name="MetadataType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "MetadataType", propOrder = {
+ "any"
+ })
+ private static class MetadataType {
+
+ @XmlAnyElement(lax = true)
+ protected List<Object> any;
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ }
+}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxw \
s-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 javax.xml.ws.wsaddressing;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.spi.Provider;
+
+import org.w3c.dom.Element;
+
+public final class W3CEndpointReferenceBuilder {
+ private String address;
+ private QName serviceName;
+ private QName endpointName;
+ private String wsdlDocumentLocation;
+ private List<Element> referenceParameters;
+ private List<Element> metadataElements;
+
+ public W3CEndpointReferenceBuilder() {
+ }
+
+ public W3CEndpointReferenceBuilder address(String address) {
+ this.address = address;
+ return this;
+ }
+
+ public W3CEndpointReferenceBuilder serviceName(QName serviceName) {
+ this.serviceName = serviceName;
+ return this;
+ }
+
+ public W3CEndpointReferenceBuilder endpointName(QName endpointName) {
+ //TODO NLS enable
+ if (this.serviceName == null) {
+ throw new IllegalStateException("The endpoint qname cannot be set before \
the service qname."); + }
+
+ this.endpointName = endpointName;
+ return this;
+ }
+
+ public W3CEndpointReferenceBuilder wsdlDocumentLocation(String \
wsdlDocumentLocation) { + this.wsdlDocumentLocation = wsdlDocumentLocation;
+ return this;
+ }
+
+ public W3CEndpointReferenceBuilder referenceParameter(Element \
referenceParameter) { + //TODO NLS enable
+ if (referenceParameter == null) {
+ throw new IllegalArgumentException("A reference parameter cannot be \
null."); + }
+
+ if (this.referenceParameters == null) {
+ this.referenceParameters = new ArrayList<Element>();
+ }
+
+ this.referenceParameters.add(referenceParameter);
+ return this;
+ }
+
+ public W3CEndpointReferenceBuilder metadata(Element metadataElement) {
+ //TODO NLS enable
+ if (metadataElement == null) {
+ throw new IllegalArgumentException("A metadata element cannot be \
null."); + }
+
+ if (this.metadataElements == null) {
+ this.metadataElements = new ArrayList<Element>();
+ }
+
+ this.metadataElements.add(metadataElement);
+ return this;
+ }
+
+ public W3CEndpointReference build() {
+ return Provider.provider().createW3CEndpointReference(address,
+ serviceName,
+ endpointName,
+ metadataElements,
+ wsdlDocumentLocation,
+ referenceParameters);
+ }
+
+ @Override
+ public String toString() {
+ // TODO Auto-generated method stub
+ return super.toString();
+ }
+}
Added: webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/package-info.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/package-info.java?view=auto&rev=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/package-info.java \
(added)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws-api/src/javax/xml/ws/wsaddressing/package-info.java \
Tue May 29 13:23:45 2007 @@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+@javax.xml.bind.annotation.XmlSchema(namespace = \
"http://www.w3.org/2005/08/addressing", elementFormDefault = \
javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package javax.xml.ws.wsaddressing;
Modified: webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/jaxw \
s/src/org/apache/axis2/jaxws/BindingProvider.java?view=diff&rev=542643&r1=542642&r2=542643
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java \
(original)
+++ webservices/axis2/branches/java/jaxws21/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java \
Tue May 29 13:23:45 2007 @@ -18,24 +18,40 @@
*/
package org.apache.axis2.jaxws;
+import org.apache.axis2.addressing.EndpointReferenceHelper;
+import org.apache.axis2.addressing.AddressingConstants.Final;
+import org.apache.axis2.addressing.AddressingConstants.Submission;
+import org.apache.axis2.addressing.metadata.ServiceName;
+import org.apache.axis2.addressing.metadata.WSDLLocation;
+import org.apache.axis2.jaxws.addressing.SubmissionAddressingFeature;
+import org.apache.axis2.jaxws.addressing.SubmissionEndpointReference;
+import org.apache.axis2.jaxws.addressing.util.EndpointReferenceConverter;
+import org.apache.axis2.jaxws.binding.BindingUtils;
import org.apache.axis2.jaxws.binding.SOAPBinding;
import org.apache.axis2.jaxws.client.PropertyValidator;
import org.apache.axis2.jaxws.core.InvocationContext;
import org.apache.axis2.jaxws.core.MessageContext;
import org.apache.axis2.jaxws.description.EndpointDescription;
+import org.apache.axis2.jaxws.description.ServiceDescriptionWSDL;
+import org.apache.axis2.jaxws.feature.WebServiceFeatureValidator;
import org.apache.axis2.jaxws.handler.HandlerResolverImpl;
import org.apache.axis2.jaxws.i18n.Messages;
import org.apache.axis2.jaxws.spi.ServiceDelegate;
import org.apache.axis2.transport.http.HTTPConstants;
+import javax.xml.namespace.QName;
import javax.xml.ws.Binding;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.handler.HandlerResolver;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import java.net.URL;
import java.util.Hashtable;
import java.util.Map;
public class BindingProvider implements org.apache.axis2.jaxws.spi.BindingProvider {
-
protected Map<String, Object> requestContext;
protected Map<String, Object> responseContext;
@@ -43,13 +59,26 @@
protected EndpointDescription endpointDesc;
protected ServiceDelegate serviceDelegate;
+
+ protected WebServiceFeatureValidator validator;
+
+ protected org.apache.axis2.addressing.EndpointReference epr;
+
+ protected String addressingNamespace;
private Binding binding; // force subclasses to use the lazy getter
- public BindingProvider(ServiceDelegate svcDelegate, EndpointDescription epDesc) \
{
- endpointDesc = epDesc;
- serviceDelegate = svcDelegate;
-
+ public BindingProvider(ServiceDelegate svcDelegate,
+ EndpointDescription epDesc,
+ org.apache.axis2.addressing.EndpointReference epr,
+ String addressingNamespace,
+ WebServiceFeature... features) {
+ this.endpointDesc = epDesc;
+ this.serviceDelegate = svcDelegate;
+ this.epr = epr;
+ this.addressingNamespace = addressingNamespace;
+ this.validator = new WebServiceFeatureValidator(false, features);
+
initialize();
}
@@ -59,15 +88,24 @@
private void initialize() {
requestContext = new ValidatingClientContext();
responseContext = new ValidatingClientContext();
-
+
// Setting standard property defaults for the request context
- requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, new \
Boolean(false));
- requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, new \
Boolean(true));
-
+ requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, \
Boolean.FALSE); +
+ WebServiceFeature addressingFeature = validator.get(AddressingFeature.ID);
+ WebServiceFeature submissionAddressingFeature = \
validator.get(SubmissionAddressingFeature.ID); + String bindingID = \
endpointDesc.getClientBindingID(); +
+ if (BindingUtils.isSOAPBinding(bindingID) &&
+ (addressingFeature.isEnabled() || \
submissionAddressingFeature.isEnabled())) + \
requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE); + \
else + requestContext.put(BindingProvider.SOAPACTION_USE_PROPERTY, \
Boolean.FALSE); +
// Set the endpoint address
- String endpointAddress = endpointDesc.getEndpointAddress();
- if (endpointAddress != null) {
- requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, \
endpointAddress); + String endpointAddress = (epr != null ) ? epr.getAddress() \
: endpointDesc.getEndpointAddress(); + if (endpointAddress != null && \
!"".equals(endpointAddress)) { + \
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress); \
}
}
@@ -188,10 +226,88 @@
}
}
+ public EndpointReference getEndpointReference() {
+ return getEndpointReference(W3CEndpointReference.class);
+ }
+
+ public <T extends EndpointReference> T getEndpointReference(Class<T> clazz) {
+ //TODO NLS enable.
+ if (!SubmissionEndpointReference.class.isAssignableFrom(clazz) &&
+ !W3CEndpointReference.class.isAssignableFrom(clazz))
+ throw ExceptionFactory.makeWebServiceException("Unrecognized class type \
" + clazz.getCanonicalName()); +
+ T jaxwsEPR = null;
+ String bindingID = endpointDesc.getClientBindingID();
+ String addressingNamespace =
+ SubmissionEndpointReference.class.isAssignableFrom(clazz) ? \
Submission.WSA_NAMESPACE : Final.WSA_NAMESPACE; +
+ if (BindingUtils.isSOAPBinding(bindingID)) {
+ try {
+ if (epr == null) {
+ String address = endpointDesc.getEndpointAddress();
+ org.apache.axis2.addressing.EndpointReference epr =
+ new org.apache.axis2.addressing.EndpointReference(address);
+ QName service = endpointDesc.getServiceQName();
+ QName port = endpointDesc.getPortQName();
+ URL wsdlURL = ((ServiceDescriptionWSDL) \
endpointDesc.getServiceDescription()).getWSDLLocation(); + \
ServiceName serviceName = new ServiceName(service, port.getLocalPart()); + \
WSDLLocation wsdlLocation = new WSDLLocation(port.getNamespaceURI(), \
wsdlURL.toString()); + \
EndpointReferenceHelper.setServiceNameMetadata(epr, addressingNamespace, \
serviceName); + \
EndpointReferenceHelper.setWSDLLocationMetadata(epr, addressingNamespace, \
wsdlLocation); + this.epr = epr;
+ this.addressingNamespace = addressingNamespace;
+ }
+ else if (!addressingNamespace.equals(this.addressingNamespace)) {
+ String address = this.epr.getAddress();
+ org.apache.axis2.addressing.EndpointReference epr =
+ new org.apache.axis2.addressing.EndpointReference(address);
+ QName service = endpointDesc.getServiceQName();
+ QName port = endpointDesc.getPortQName();
+ URL wsdlURL = ((ServiceDescriptionWSDL) \
endpointDesc.getServiceDescription()).getWSDLLocation(); + \
ServiceName serviceName = new ServiceName(service, port.getLocalPart()); + \
WSDLLocation wsdlLocation = new WSDLLocation(port.getNamespaceURI(), \
wsdlURL.toString()); + \
EndpointReferenceHelper.setServiceNameMetadata(epr, addressingNamespace, \
serviceName); + \
EndpointReferenceHelper.setWSDLLocationMetadata(epr, addressingNamespace, \
wsdlLocation); + \
EndpointReferenceHelper.transferReferenceParameters(this.epr, epr); + \
this.epr = epr; + this.addressingNamespace = addressingNamespace; \
+ }
+
+ jaxwsEPR = EndpointReferenceConverter.convertFromAxis2(epr, clazz);
+ }
+ catch (Exception e) {
+ //TODO NLS enable.
+ throw ExceptionFactory.makeWebServiceException("Error creating \
endpoint reference", e); + }
+ }
+ else {
+ //TODO NLS enable.
+ throw new UnsupportedOperationException("This method is not supported \
with a binding of " + bindingID); + }
+
+ return jaxwsEPR;
+ }
+
+ public String getAddressingNamespace() {
+ return addressingNamespace;
+ }
+
+ public org.apache.axis2.addressing.EndpointReference getAxis2EndpointReference() \
{ + return epr;
+ }
+
+ public WebServiceFeatureValidator getWebServiceFeatureValidator() {
+ return validator;
+ }
+
/*
* An inner class used to validate properties as they are set by the client.
*/
class ValidatingClientContext extends Hashtable<String, Object> {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3485112205801917858L;
@Override
public synchronized Object put(String key, Object value) {
@@ -204,4 +320,6 @@
}
}
}
+
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic