From thorntonjeremy@example.com Tue Apr 01 00:29:52 2008 Return-Path: <thorntonjeremy@example.com> Delivered-To: thorntonjeremy@example.com Received: (qmail 28220 invoked from network); 1 Apr 2008 00:29:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Apr 2008 00:29:51 -0000 Received: (qmail 70689 invoked by uid 500); 1 Apr 2008 00:29:51 -0000 Delivered-To: thorntonjeremy@example.com Received: (qmail 70552 invoked by uid 500); 1 Apr 2008 00:29:50 -0000 Mailing-List: contact thorntonjeremy@example.com; run by ezmlm Precedence: bulk list-help: <mailto:thorntonjeremy@example.com> list-unsubscribe: <mailto:thorntonjeremy@example.com> List-Post: <mailto:thorntonjeremy@example.com> List-Id: <axis-cvs.ws.apache.org> Delivered-To: mailing list thorntonjeremy@example.com Received: (qmail 70541 invoked by uid 500); 1 Apr 2008 00:29:50 -0000 Delivered-To: thorntonjeremy@example.com Received: (qmail 70538 invoked by uid 99); 1 Apr 2008 00:29:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 17:29:50 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 00:29:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AF68A1A9832; Mon, 31 Mar 2008 17:29:29 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r643229 - in /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws: framework/JAXWSDeployer.java message/databinding/JAXBUtils.java server/JAXWSMessageReceiver.java Date: Tue, 01 Apr 2008 00:29:28 -0000 To: thorntonjeremy@example.com From: thorntonjeremy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <thorntonjeremy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: dims Date: Mon Mar 31 17:29:26 2008 New Revision: 643229 URL: http://svn.apache.org/viewvc?rev=643229&view=rev Log: Problem #1: SERVICE_TCCL is very expensive Problem #2: When the jaxws-calculator sample throws the business exception TCCL is not picked up, so we get JAXBException saying AddressingException class not found in context Problem #3: We keep creating JAXBContexts / key to innerMap is wrong HACK - If we don't find the classes in the specified TCCL class loader then we look into the cached class loader set in the deployer. Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java?rev=643229&r1=643228&r2=643229&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java (original) +++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/framework/JAXWSDeployer.java Mon Mar 31 17:29:26 2008 @@ -291,7 +291,7 @@ axisService.setElementFormDefault(false); axisService.setFileName(serviceLocation); axisService.setClassLoader(classLoader); - axisService.addParameter(new Parameter(Constants.SERVICE_TCCL, Constants.TCCL_COMPOSITE)); + axisService.addParameter(new Parameter(org.apache.axis2.jaxws.spi.Constants.CACHE_CLASSLOADER, classLoader)); } return axisService; } Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java?rev=643229&r1=643228&r2=643229&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java (original) +++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java Mon Mar 31 17:29:26 2008 @@ -162,8 +162,10 @@ if(innerMap==null) { adjustPoolSize(jaxbMap); innerMap = new ConcurrentHashMap<String, JAXBContextValue>(); - jaxbMap.put(cl, innerMap); - } + if(cacheKey != null) { + jaxbMap.put(cacheKey, innerMap); + } + } } } @@ -185,8 +187,14 @@ TreeSet<String> validContextPackages = new TreeSet<String>(contextPackages); contextValue = createJAXBContextValue(validContextPackages, cl); - - // Put the new context in the map keyed by both the original and valid list of packages + + // If we don't get all the classes, try the cached classloader + if (cacheKey != null && validContextPackages.size() != contextPackages.size()) { + validContextPackages = new TreeSet<String>(contextPackages); + contextValue = createJAXBContextValue(validContextPackages, cacheKey); + } + + // Put the new context in the map keyed by both the original and valid list of packages String validPackagesKey = validContextPackages.toString(); innerMap.put(key, contextValue); innerMap.put(validPackagesKey, contextValue); Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java?rev=643229&r1=643228&r2=643229&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java (original) +++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java Mon Mar 31 17:29:26 2008 @@ -20,7 +20,6 @@ package org.apache.axis2.jaxws.server; import org.apache.axis2.AxisFault; -import org.apache.axis2.receivers.AbstractMessageReceiver; import org.apache.axis2.addressing.AddressingConstants; import org.apache.axis2.context.OperationContext; import org.apache.axis2.description.AxisOperation; @@ -56,34 +55,20 @@ * The JAXWSMessageReceiver is the entry point, from the server's perspective, to the JAX-WS code. * This will be called by the Axis Engine and is the end of the chain from an Axis2 perspective. */ -public class JAXWSMessageReceiver extends AbstractMessageReceiver implements MessageReceiver { +public class JAXWSMessageReceiver implements MessageReceiver { private static final Log log = LogFactory.getLog(JAXWSMessageReceiver.class); private static String PARAM_SERVICE_CLASS = "ServiceClass"; public static String PARAM_BINDING = "Binding"; - protected void invokeBusinessLogic(org.apache.axis2.context.MessageContext messageCtx) throws AxisFault { - // DUMMY. - } - - public void receive(org.apache.axis2.context.MessageContext messageCtx) - throws AxisFault { - ThreadContextDescriptor tc = setThreadContext(messageCtx); - try { - receiveInternal(messageCtx); - } finally { - restoreThreadContext(tc); - } - } - /** * We should have already determined which AxisService we're targetting at this point. So now, * just get the service implementation and invoke the appropriate method. * @param axisRequestMsgCtx * @throws org.apache.axis2.AxisFault */ - public void receiveInternal(org.apache.axis2.context.MessageContext axisRequestMsgCtx) + public void receive(org.apache.axis2.context.MessageContext axisRequestMsgCtx) throws AxisFault { AxisFault faultToReturn = null; @@ -113,9 +98,8 @@ ServiceDescription serviceDesc = DescriptionFactory.createServiceDescriptionFromServiceImpl( clazz, service); - if (service.getParameter(org.apache.axis2.Constants.SERVICE_TCCL) != null) { - service.addParameter(new Parameter(org.apache.axis2.Constants.SERVICE_TCCL, org.apache.axis2.Constants.TCCL_COMPOSITE)); - } + service.addParameter(new Parameter(org.apache.axis2.jaxws.spi.Constants.CACHE_CLASSLOADER, + service.getClassLoader())); } catch (ClassNotFoundException e) { throw new RuntimeException( Messages.getMessage("JAXWSMessageReceiverNoServiceClass")); @@ -141,7 +125,11 @@ MessageContext requestMsgCtx = new MessageContext(axisRequestMsgCtx); requestMsgCtx.setServer(true); requestMsgCtx.setMEPContext(new MEPContext(requestMsgCtx)); - + ClassLoader loader = getCachedClassLoader(axisRequestMsgCtx); + if (loader != null) { + requestMsgCtx.setProperty(org.apache.axis2.jaxws.spi.Constants.CACHE_CLASSLOADER, + loader); + } // The adapters need to be installed on the new request Message Context AttachmentsAdapter.install(requestMsgCtx); TransportHeadersAdapter.install(requestMsgCtx); @@ -187,7 +175,10 @@ MessageContext responseMsgCtx = eic.getResponseMessageContext(); org.apache.axis2.context.MessageContext axisResponseMsgCtx = responseMsgCtx.getAxisMessageContext(); - + if (loader != null) { + responseMsgCtx.setProperty(org.apache.axis2.jaxws.spi.Constants.CACHE_CLASSLOADER, + loader); + } MessageUtils.putMessageOnMessageContext(responseMsgCtx.getMessage(), axisResponseMsgCtx); @@ -269,4 +260,7 @@ eic.setInvocationListenerFactories(InvocationListenerRegistry.getFactories()); } + public ClassLoader getCachedClassLoader(org.apache.axis2.context.MessageContext msgContext) { + return (ClassLoader) msgContext.getAxisService().getParameterValue(org.apache.axis2.jaxws.spi.Constants.CACHE_CLASSLOADER); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: thorntonjeremy@example.com For additional commands, e-mail: thorntonjeremy@example.com From thorntonjeremy@example.com Tue Apr 01 00:37:23 2008 Return-Path: <thorntonjeremy@example.com> Delivered-To: thorntonjeremy@example.com Received: (qmail 33719 invoked from network); 1 Apr 2008 00:37:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Apr 2008 00:37:23 -0000 Received: (qmail 80752 invoked by uid 500); 1 Apr 2008 00:37:22 -0000 Delivered-To: thorntonjeremy@example.com Received: (qmail 80624 invoked by uid 500); 1 Apr 2008 00:37:22 -0000 Mailing-List: contact thorntonjeremy@example.com; run by ezmlm Precedence: bulk list-help: <mailto:thorntonjeremy@example.com> list-unsubscribe: <mailto:thorntonjeremy@example.com> List-Post: <mailto:thorntonjeremy@example.com> List-Id: <axis-cvs.ws.apache.org> Delivered-To: mailing list thorntonjeremy@example.com Received: (qmail 80613 invoked by uid 500); 1 Apr 2008 00:37:22 -0000 Delivered-To: thorntonjeremy@example.com Received: (qmail 80610 invoked by uid 99); 1 Apr 2008 00:37:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 17:37:21 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 00:36:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B85ED1A9832; Mon, 31 Mar 2008 17:36:59 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r643230 - in /webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws: ./ soap/ spi/ wsaddressing/ Date: Tue, 01 Apr 2008 00:36:49 -0000 To: thorntonjeremy@example.com From: thorntonjeremy@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <thorntonjeremy@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: gawor Date: Mon Mar 31 17:36:44 2008 New Revision: 643230 URL: http://svn.apache.org/viewvc?rev=643230&view=rev Log: dos->unix (no other changes) Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/Action.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/FaultAction.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/package-info.java Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/Action.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/Action.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/Action.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/Action.java Mon Mar 31 17:36:44 2008 @@ -1,40 +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; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Documented -@Retention(value=RetentionPolicy.RUNTIME) -@Target(value=ElementType.METHOD) - -public @interface Action { - - public FaultAction[] fault() default {}; - - public String input() default ""; - - public String output() default ""; - -} +/* + * 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.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@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/trunk/java/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/EndpointReference.java Mon Mar 31 17:36:44 2008 @@ -1,49 +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; - -import javax.xml.transform.Result; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamResult; -import javax.xml.ws.spi.Provider; -import java.io.ByteArrayOutputStream; - -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); - } - - @Override - public String toString() { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - writeTo(new StreamResult(baos)); - - return baos.toString(); - } -} +/* + * 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.transform.stream.StreamResult; +import javax.xml.ws.spi.Provider; +import java.io.ByteArrayOutputStream; + +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); + } + + @Override + public String toString() { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + writeTo(new StreamResult(baos)); + + return baos.toString(); + } +} Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/FaultAction.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/FaultAction.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/FaultAction.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/FaultAction.java Mon Mar 31 17:36:44 2008 @@ -1,38 +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.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Documented -@Retention(value=RetentionPolicy.RUNTIME) -@Target(value=ElementType.METHOD) - -public @interface FaultAction { - - public Class className(); - - public String value() default ""; - -} +/* + * 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.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Documented +@Retention(value=RetentionPolicy.RUNTIME) +@Target(value=ElementType.METHOD) + +public @interface FaultAction { + + public Class className(); + + public String value() default ""; + +} Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBinding.java Mon Mar 31 17:36:44 2008 @@ -1,38 +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.ws.spi.WebServiceFeatureAnnotation; -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Documented -@Retention(value=RetentionPolicy.RUNTIME) -@Target(value=ElementType.TYPE) -@WebServiceFeatureAnnotation(id=RespectBindingFeature.ID, bean=RespectBindingFeature.class) - -public @interface RespectBinding { - - public boolean enabled() default true; - -} +/* + * 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.spi.WebServiceFeatureAnnotation; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Documented +@Retention(value=RetentionPolicy.RUNTIME) +@Target(value=ElementType.TYPE) +@WebServiceFeatureAnnotation(id=RespectBindingFeature.ID, bean=RespectBindingFeature.class) + +public @interface RespectBinding { + + public boolean enabled() default true; + +} Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/RespectBindingFeature.java Mon Mar 31 17:36:44 2008 @@ -1,38 +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; - -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; - } -} +/* + * 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/trunk/java/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/WebServiceFeature.java Mon Mar 31 17:36:44 2008 @@ -1,33 +1,33 @@ -/* - * 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; - } -} +/* + * 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/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/Addressing.java Mon Mar 31 17:36:44 2008 @@ -1,40 +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 javax.xml.ws.spi.WebServiceFeatureAnnotation; -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@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; - -} +/* + * 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.spi.WebServiceFeatureAnnotation; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@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; + +} Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/AddressingFeature.java Mon Mar 31 17:36:44 2008 @@ -1,50 +1,50 @@ -/* - * 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; - } -} +/* + * 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; + } +} Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOM.java Mon Mar 31 17:36:44 2008 @@ -1,40 +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 javax.xml.ws.spi.WebServiceFeatureAnnotation; -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@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; - -} +/* + * 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.spi.WebServiceFeatureAnnotation; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@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; + +} Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/soap/MTOMFeature.java Mon Mar 31 17:36:44 2008 @@ -1,61 +1,61 @@ -/* - * 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; - } -} +/* + * 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/trunk/java/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/spi/WebServiceFeatureAnnotation.java Mon Mar 31 17:36:44 2008 @@ -1,39 +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 javax.xml.ws.WebServiceFeature; -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Documented -@Retention(value=RetentionPolicy.RUNTIME) -@Target(value=ElementType.ANNOTATION_TYPE) - -public @interface WebServiceFeatureAnnotation { - - public String id(); - - public Class<? extends WebServiceFeature> bean(); - -} +/* + * 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.ws.WebServiceFeature; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Documented +@Retention(value=RetentionPolicy.RUNTIME) +@Target(value=ElementType.ANNOTATION_TYPE) + +public @interface WebServiceFeatureAnnotation { + + public String id(); + + public Class<? extends WebServiceFeature> bean(); + +} Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReference.java Mon Mar 31 17:36:44 2008 @@ -1,237 +1,237 @@ -/* - * 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 javax.xml.bind.JAXBContext; -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.XmlRootElement; -import javax.xml.bind.annotation.XmlSchemaType; -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; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * <p>Java class for EndpointReferenceType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * &lt;complexType name="EndpointReferenceType"> - * &lt;complexContent> - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * &lt;sequence> - * &lt;element name="Address" type="{http://www.w3.org/2005/08/addressing}AttributedURIType"/> - * &lt;element ref="{http://www.w3.org/2005/08/addressing}ReferenceParameters" minOccurs="0"/> - * &lt;element ref="{http://www.w3.org/2005/08/addressing}Metadata" minOccurs="0"/> - * &lt;any/> - * &lt;/sequence> - * &lt;/restriction> - * &lt;/complexContent> - * &lt;/complexType> - * </pre> - * - * - */ -@XmlRootElement(name = "EndpointReference", namespace = W3CEndpointReference.NS) -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "EndpointReferenceType", namespace = W3CEndpointReference.NS, propOrder = { - "address", - "referenceParameters", - "metadata", - "any" -}) -public final class W3CEndpointReference extends EndpointReference { - protected static final String NS = "http://www.w3.org/2005/08/addressing"; - protected static JAXBContext jaxbContext; - - @XmlElement(name = "Address", namespace = NS, required = true) - protected AttributedURIType address; - @XmlElement(name = "ReferenceParameters", namespace = NS) - protected ReferenceParametersType referenceParameters; - @XmlElement(name = "Metadata", namespace = NS) - protected MetadataType metadata; - @XmlAnyElement(lax = true) - protected List<Object> any; - @XmlAnyAttribute - private Map<QName, String> otherAttributes = new HashMap<QName, String>(); - - static { - try { - jaxbContext = JAXBContext.newInstance(W3CEndpointReference.class); - } - catch (Exception e) { - //TODO NLS enable - throw new WebServiceException("JAXBContext creation failed.", e); - } - } - - protected W3CEndpointReference() { - } - - public W3CEndpointReference(Source eprInfoset) { - super(); - - try { - 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) { - //TODO NLS enable. - 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 { - Marshaller m = jaxbContext.createMarshaller(); - m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); - m.marshal(this, result); - } - catch (Exception e) { - //TODO NLS enable - throw new WebServiceException("writeTo failure.", e); - } - } - - /** - * <p>Java class for AttributedURIType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * &lt;complexType name="AttributedURIType"> - * &lt;simpleContent> - * &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>anyURI"> - * &lt;/extension> - * &lt;/simpleContent> - * &lt;/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>(); - - public AttributedURIType() { - } - } - - /** - * <p>Java class for ReferenceParametersType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * &lt;complexType name="ReferenceParametersType"> - * &lt;complexContent> - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * &lt;sequence> - * &lt;any/> - * &lt;/sequence> - * &lt;/restriction> - * &lt;/complexContent> - * &lt;/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>(); - - public ReferenceParametersType() { - } - } - - /** - * <p>Java class for MetadataType complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * &lt;complexType name="MetadataType"> - * &lt;complexContent> - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * &lt;sequence> - * &lt;any/> - * &lt;/sequence> - * &lt;/restriction> - * &lt;/complexContent> - * &lt;/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>(); - - public MetadataType() { - } - } -} +/* + * 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 javax.xml.bind.JAXBContext; +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.XmlRootElement; +import javax.xml.bind.annotation.XmlSchemaType; +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; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * <p>Java class for EndpointReferenceType complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * &lt;complexType name="EndpointReferenceType"> + * &lt;complexContent> + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * &lt;sequence> + * &lt;element name="Address" type="{http://www.w3.org/2005/08/addressing}AttributedURIType"/> + * &lt;element ref="{http://www.w3.org/2005/08/addressing}ReferenceParameters" minOccurs="0"/> + * &lt;element ref="{http://www.w3.org/2005/08/addressing}Metadata" minOccurs="0"/> + * &lt;any/> + * &lt;/sequence> + * &lt;/restriction> + * &lt;/complexContent> + * &lt;/complexType> + * </pre> + * + * + */ +@XmlRootElement(name = "EndpointReference", namespace = W3CEndpointReference.NS) +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EndpointReferenceType", namespace = W3CEndpointReference.NS, propOrder = { + "address", + "referenceParameters", + "metadata", + "any" +}) +public final class W3CEndpointReference extends EndpointReference { + protected static final String NS = "http://www.w3.org/2005/08/addressing"; + protected static JAXBContext jaxbContext; + + @XmlElement(name = "Address", namespace = NS, required = true) + protected AttributedURIType address; + @XmlElement(name = "ReferenceParameters", namespace = NS) + protected ReferenceParametersType referenceParameters; + @XmlElement(name = "Metadata", namespace = NS) + protected MetadataType metadata; + @XmlAnyElement(lax = true) + protected List<Object> any; + @XmlAnyAttribute + private Map<QName, String> otherAttributes = new HashMap<QName, String>(); + + static { + try { + jaxbContext = JAXBContext.newInstance(W3CEndpointReference.class); + } + catch (Exception e) { + //TODO NLS enable + throw new WebServiceException("JAXBContext creation failed.", e); + } + } + + protected W3CEndpointReference() { + } + + public W3CEndpointReference(Source eprInfoset) { + super(); + + try { + 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) { + //TODO NLS enable. + 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 { + Marshaller m = jaxbContext.createMarshaller(); + m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); + m.marshal(this, result); + } + catch (Exception e) { + //TODO NLS enable + throw new WebServiceException("writeTo failure.", e); + } + } + + /** + * <p>Java class for AttributedURIType complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * &lt;complexType name="AttributedURIType"> + * &lt;simpleContent> + * &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>anyURI"> + * &lt;/extension> + * &lt;/simpleContent> + * &lt;/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>(); + + public AttributedURIType() { + } + } + + /** + * <p>Java class for ReferenceParametersType complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * &lt;complexType name="ReferenceParametersType"> + * &lt;complexContent> + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * &lt;sequence> + * &lt;any/> + * &lt;/sequence> + * &lt;/restriction> + * &lt;/complexContent> + * &lt;/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>(); + + public ReferenceParametersType() { + } + } + + /** + * <p>Java class for MetadataType complex type. + * + * <p>The following schema fragment specifies the expected content contained within this class. + * + * <pre> + * &lt;complexType name="MetadataType"> + * &lt;complexContent> + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> + * &lt;sequence> + * &lt;any/> + * &lt;/sequence> + * &lt;/restriction> + * &lt;/complexContent> + * &lt;/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>(); + + public MetadataType() { + } + } +} Modified: webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java?rev=643230&r1=643229&r2=643230&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java (original) +++ webservices/axis2/trunk/java/modules/jaxws-api/src/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java Mon Mar 31 17:36:44 2008 @@ -1,107 +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 org.w3c.dom.Element; - -import javax.xml.namespace.QName; -import javax.xml.ws.spi.Provider; -import java.util.ArrayList; -import java.util.List; - -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(); - } -} +/* + * 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;
{'source': 'Apache Software Foundation Public Mail Archives'}