You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ng...@apache.org on 2007/03/27 02:54:33 UTC
svn commit: r522689 - in
/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws:
client/async/ client/dispatch/ client/proxy/ context/utils/ core/ server/
server/dispatcher/ server/endpoint/lifecycle/impl/ spi/migrator/
Author: ngallardo
Date: Mon Mar 26 17:54:30 2007
New Revision: 522689
URL: http://svn.apache.org/viewvc?view=rev&rev=522689
Log:
AXIS2-2396
Changed the JAX-WS MessageContext to hold an EndpointDescription rather than a ServiceDescription.
Modified:
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncResponse.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatch.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatchAsyncListener.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatch.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatchAsyncListener.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/ProxyAsyncListener.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/lifecycle/impl/EndpointLifecycleManagerImpl.java
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/migrator/ApplicationContextMigratorUtil.java
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncResponse.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncResponse.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncResponse.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncResponse.java Mon Mar 26 17:54:30 2007
@@ -30,7 +30,7 @@
import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.core.MessageContext;
-import org.apache.axis2.jaxws.description.ServiceDescription;
+import org.apache.axis2.jaxws.description.EndpointDescription;
import org.apache.axis2.jaxws.spi.Constants;
import org.apache.axis2.jaxws.spi.migrator.ApplicationContextMigratorUtil;
import org.apache.commons.logging.Log;
@@ -54,15 +54,15 @@
private MessageContext faultMessageContext;
private MessageContext response;
- private ServiceDescription serviceDescription;
+ private EndpointDescription endpointDescription;
private Map<String, Object> responseContext;
private CountDownLatch latch;
private boolean cacheValid = false;
private Object cachedObject = null;
- protected AsyncResponse(ServiceDescription sd) {
- serviceDescription = sd;
+ protected AsyncResponse(EndpointDescription ed) {
+ endpointDescription = ed;
latch = new CountDownLatch(1);
}
@@ -73,7 +73,7 @@
fault = flt;
faultMessageContext = faultCtx;
- faultMessageContext.setServiceDescription(serviceDescription);
+ faultMessageContext.setEndpointDescription(endpointDescription);
// Probably a good idea to invalidate the cache
cacheValid = false;
@@ -98,7 +98,7 @@
}
response = mc;
- response.setServiceDescription(serviceDescription);
+ response.setEndpointDescription(endpointDescription);
latch.countDown();
if (log.isDebugEnabled()) {
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java Mon Mar 26 17:54:30 2007
@@ -26,8 +26,8 @@
import javax.xml.ws.Binding;
import javax.xml.ws.ProtocolException;
import javax.xml.ws.Response;
-import javax.xml.ws.Service.Mode;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.Service.Mode;
import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.soap.SOAPBinding;
@@ -43,7 +43,6 @@
import org.apache.axis2.jaxws.description.EndpointDescription;
import org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils;
import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.XMLFault;
import org.apache.axis2.jaxws.spi.Constants;
import org.apache.axis2.jaxws.spi.ServiceDelegate;
import org.apache.axis2.jaxws.spi.migrator.ApplicationContextMigratorUtil;
@@ -106,7 +105,7 @@
// Create the MessageContext to hold the actual request message and its
// associated properties
MessageContext requestMsgCtx = new MessageContext();
- requestMsgCtx.setServiceDescription(getEndpointDescription().getServiceDescription());
+ requestMsgCtx.setEndpointDescription(getEndpointDescription());
invocationContext.setRequestMessageContext(requestMsgCtx);
Message requestMsg = null;
@@ -130,7 +129,7 @@
ic.invoke(invocationContext);
MessageContext responseMsgCtx = invocationContext.getResponseMessageContext();
- responseMsgCtx.setServiceDescription(requestMsgCtx.getServiceDescription());
+ responseMsgCtx.setEndpointDescription(requestMsgCtx.getEndpointDescription());
// Migrate the properties from the response MessageContext back
// to the client response context bag.
@@ -180,7 +179,7 @@
// Create the MessageContext to hold the actual request message and its
// associated properties
MessageContext requestMsgCtx = new MessageContext();
- requestMsgCtx.setServiceDescription(getEndpointDescription().getServiceDescription());
+ requestMsgCtx.setEndpointDescription(getEndpointDescription());
invocationContext.setRequestMessageContext(requestMsgCtx);
Message requestMsg = null;
@@ -237,7 +236,7 @@
// Create the MessageContext to hold the actual request message and its
// associated properties
MessageContext requestMsgCtx = new MessageContext();
- requestMsgCtx.setServiceDescription(getEndpointDescription().getServiceDescription());
+ requestMsgCtx.setEndpointDescription(getEndpointDescription());
invocationContext.setRequestMessageContext(requestMsgCtx);
Message requestMsg = null;
@@ -305,7 +304,7 @@
// Create the MessageContext to hold the actual request message and its
// associated properties
MessageContext requestMsgCtx = new MessageContext();
- requestMsgCtx.setServiceDescription(getEndpointDescription().getServiceDescription());
+ requestMsgCtx.setEndpointDescription(getEndpointDescription());
invocationContext.setRequestMessageContext(requestMsgCtx);
Message requestMsg = null;
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatch.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatch.java Mon Mar 26 17:54:30 2007
@@ -1,18 +1,20 @@
/*
- * Copyright 2006 The Apache Software Foundation.
- * Copyright 2006 International Business Machines Corp.
- *
- * 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.
*/
package org.apache.axis2.jaxws.client.dispatch;
@@ -23,7 +25,6 @@
import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.client.async.AsyncResponse;
import org.apache.axis2.jaxws.description.EndpointDescription;
-import org.apache.axis2.jaxws.description.ServiceDescription;
import org.apache.axis2.jaxws.message.Block;
import org.apache.axis2.jaxws.message.Message;
import org.apache.axis2.jaxws.message.Protocol;
@@ -54,8 +55,7 @@
}
public AsyncResponse createAsyncResponseListener() {
- ServiceDescription sd = getEndpointDescription().getServiceDescription();
- JAXBDispatchAsyncListener listener = new JAXBDispatchAsyncListener(sd);
+ JAXBDispatchAsyncListener listener = new JAXBDispatchAsyncListener(getEndpointDescription());
listener.setJAXBContext(jaxbContext);
listener.setMode(mode);
return listener;
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatchAsyncListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatchAsyncListener.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatchAsyncListener.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/JAXBDispatchAsyncListener.java Mon Mar 26 17:54:30 2007
@@ -1,33 +1,29 @@
/*
- * Copyright 2006 The Apache Software Foundation.
- * Copyright 2006 International Business Machines Corp.
- *
- * 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.
*/
package org.apache.axis2.jaxws.client.dispatch;
import javax.xml.bind.JAXBContext;
import javax.xml.ws.Service.Mode;
-import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.client.async.AsyncResponse;
import org.apache.axis2.jaxws.core.MessageContext;
-import org.apache.axis2.jaxws.description.ServiceDescription;
-import org.apache.axis2.jaxws.message.Block;
-import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.databinding.JAXBBlockContext;
-import org.apache.axis2.jaxws.message.factory.JAXBBlockFactory;
-import org.apache.axis2.jaxws.registry.FactoryRegistry;
+import org.apache.axis2.jaxws.description.EndpointDescription;
/**
* The JAXBDispatchAsyncListener is an extension of the
@@ -39,8 +35,8 @@
private Mode mode;
private JAXBContext jaxbContext;
- public JAXBDispatchAsyncListener(ServiceDescription sd) {
- super(sd);
+ public JAXBDispatchAsyncListener(EndpointDescription ed) {
+ super(ed);
}
public void setMode(Mode m) {
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatch.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatch.java Mon Mar 26 17:54:30 2007
@@ -1,18 +1,20 @@
/*
- * Copyright 2006 The Apache Software Foundation.
- * Copyright 2006 International Business Machines Corp.
- *
- * 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.
*/
package org.apache.axis2.jaxws.client.dispatch;
@@ -26,7 +28,6 @@
import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.client.async.AsyncResponse;
import org.apache.axis2.jaxws.description.EndpointDescription;
-import org.apache.axis2.jaxws.description.ServiceDescription;
import org.apache.axis2.jaxws.message.Block;
import org.apache.axis2.jaxws.message.Message;
import org.apache.axis2.jaxws.message.Protocol;
@@ -62,8 +63,7 @@
log.debug("Creating new AsyncListener for XMLDispatch");
}
- ServiceDescription sd = getEndpointDescription().getServiceDescription();
- XMLDispatchAsyncListener al = new XMLDispatchAsyncListener(sd);
+ XMLDispatchAsyncListener al = new XMLDispatchAsyncListener(getEndpointDescription());
al.setMode(mode);
al.setType(type);
al.setBlockFactoryType(blockFactoryType);
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatchAsyncListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatchAsyncListener.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatchAsyncListener.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/XMLDispatchAsyncListener.java Mon Mar 26 17:54:30 2007
@@ -1,20 +1,28 @@
+/*
+ * 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 org.apache.axis2.jaxws.client.dispatch;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.Service.Mode;
-import org.apache.axiom.om.OMElement;
import org.apache.axis2.jaxws.client.async.AsyncResponse;
import org.apache.axis2.jaxws.core.MessageContext;
-import org.apache.axis2.jaxws.description.ServiceDescription;
-import org.apache.axis2.jaxws.message.Block;
-import org.apache.axis2.jaxws.message.Message;
-import org.apache.axis2.jaxws.message.factory.BlockFactory;
-import org.apache.axis2.jaxws.message.factory.SOAPEnvelopeBlockFactory;
-import org.apache.axis2.jaxws.message.factory.XMLStringBlockFactory;
-import org.apache.axis2.jaxws.registry.FactoryRegistry;
+import org.apache.axis2.jaxws.description.EndpointDescription;
/**
* The XMLDispatchAsyncListener is an extension of the
@@ -27,8 +35,8 @@
private Class type;
private Class blockFactoryType;
- public XMLDispatchAsyncListener(ServiceDescription sd) {
- super(sd);
+ public XMLDispatchAsyncListener(EndpointDescription ed) {
+ super(ed);
}
public void setMode(Mode m) {
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/ProxyAsyncListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/ProxyAsyncListener.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/ProxyAsyncListener.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/ProxyAsyncListener.java Mon Mar 26 17:54:30 2007
@@ -1,18 +1,20 @@
/*
- * Copyright 2006 The Apache Software Foundation.
- * Copyright 2006 International Business Machines Corp.
- *
- * 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.
*/
package org.apache.axis2.jaxws.client.proxy;
@@ -20,8 +22,6 @@
import org.apache.axis2.jaxws.client.async.AsyncResponse;
import org.apache.axis2.jaxws.core.MessageContext;
import org.apache.axis2.jaxws.description.OperationDescription;
-import org.apache.axis2.jaxws.description.ServiceDescription;
-
/**
* ProxyAsyncListener will be used to create response object when client does
@@ -31,39 +31,39 @@
*/
public class ProxyAsyncListener extends AsyncResponse {
- JAXWSProxyHandler handler = null;
- Object[] inputArgs = null;
+ JAXWSProxyHandler handler = null;
+ Object[] inputArgs = null;
OperationDescription operationDesc = null;
- public ProxyAsyncListener(OperationDescription opDesc) {
- super(opDesc.getEndpointInterfaceDescription().getEndpointDescription().getServiceDescription());
- operationDesc = opDesc;
- }
+ public ProxyAsyncListener(OperationDescription od) {
+ super(od.getEndpointInterfaceDescription().getEndpointDescription());
+ operationDesc = od;
+ }
- public JAXWSProxyHandler getHandler() {
- return handler;
- }
-
- public void setHandler(JAXWSProxyHandler handler) {
- this.handler = handler;
- }
+ public JAXWSProxyHandler getHandler() {
+ return handler;
+ }
+
+ public void setHandler(JAXWSProxyHandler handler) {
+ this.handler = handler;
+ }
- public void setInputArgs(Object[] inputArgs){
- this.inputArgs = inputArgs;
- }
+ public void setInputArgs(Object[] inputArgs){
+ this.inputArgs = inputArgs;
+ }
@Override
- public Object getResponseValueObject(MessageContext mc) {
- try{
- //Delegate the request to create respose to proxyHandler
+ public Object getResponseValueObject(MessageContext mc) {
+ try {
+ //Delegate the request to create respose to proxyHandler
//since it has all the logic written to create response for Sync
//and oneWay.
- return handler.createResponse(null,inputArgs, mc, operationDesc);
- }
- catch (Throwable e) {
- throw ExceptionFactory.makeWebServiceException(e);
- }
- }
+ return handler.createResponse(null,inputArgs, mc, operationDesc);
+ }
+ catch (Throwable e) {
+ throw ExceptionFactory.makeWebServiceException(e);
+ }
+ }
@Override
public Throwable getFaultResponse(MessageContext mc) {
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java Mon Mar 26 17:54:30 2007
@@ -21,23 +21,19 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
-import java.util.Enumeration;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.wsdl.PortType;
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext.Scope;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.core.MessageContext;
import org.apache.axis2.jaxws.description.EndpointDescription;
import org.apache.axis2.jaxws.description.EndpointInterfaceDescription;
-import org.apache.axis2.jaxws.description.EndpointInterfaceDescriptionWSDL;
import org.apache.axis2.jaxws.description.OperationDescription;
import org.apache.axis2.jaxws.description.ServiceDescription;
import org.apache.axis2.jaxws.description.ServiceDescriptionWSDL;
@@ -55,7 +51,7 @@
* @param soapMessageContext
* @param jaxwsMessageContext
*/
- public static void addProperties(SOAPMessageContext soapMessageContext, MessageContext jaxwsMessageContext){
+ public static void addProperties(SOAPMessageContext soapMessageContext, MessageContext jaxwsMessageContext){
org.apache.axis2.context.MessageContext axisMsgContext = jaxwsMessageContext.getAxisMessageContext();
// Copy Axis2 MessageContext options. It's possible that some set of Axis2 handlers
@@ -65,9 +61,9 @@
soapMessageContext.putAll(props);
// Set the WSDL properties
- ServiceDescription sd = jaxwsMessageContext.getServiceDescription();
- URL wsdlLocation = ((ServiceDescriptionWSDL) sd).getWSDLLocation();
- if (wsdlLocation != null && !"".equals(wsdlLocation)){
+ ServiceDescription sd = jaxwsMessageContext.getEndpointDescription().getServiceDescription();
+ URL wsdlLocation = ((ServiceDescriptionWSDL) sd).getWSDLLocation();
+ if (wsdlLocation != null && !"".equals(wsdlLocation)){
URI wsdlLocationURI = null;
try {
wsdlLocationURI = wsdlLocation.toURI();
@@ -76,44 +72,44 @@
// TODO: NLS/RAS
log.warn("Unable to convert WSDL location URL to URI. URL: " + wsdlLocation.toString() + "; Service: " + sd.getServiceQName() , ex);
}
- soapMessageContext.put(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, wsdlLocationURI);
- soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, Scope.APPLICATION);
+ soapMessageContext.put(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, wsdlLocationURI);
+ soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, Scope.APPLICATION);
}
- if(sd!=null){
- soapMessageContext.put(javax.xml.ws.handler.MessageContext.WSDL_SERVICE, sd.getServiceQName());
- soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.WSDL_SERVICE,Scope.APPLICATION );
- if(log.isDebugEnabled()){
- log.debug("WSDL_SERVICE :"+sd.getServiceQName());
- }
- }
+ if (sd!=null) {
+ soapMessageContext.put(javax.xml.ws.handler.MessageContext.WSDL_SERVICE, sd.getServiceQName());
+ soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.WSDL_SERVICE,Scope.APPLICATION );
+ if(log.isDebugEnabled()) {
+ log.debug("WSDL_SERVICE :"+sd.getServiceQName());
+ }
+ }
- // If we are running within a servlet container, then JAX-WS requires that the
+ // If we are running within a servlet container, then JAX-WS requires that the
// servlet related properties be set on the MessageContext
- soapMessageContext.put(javax.xml.ws.handler.MessageContext.SERVLET_CONTEXT, axisMsgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT));
- soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.SERVLET_CONTEXT, Scope.APPLICATION);
- if(log.isDebugEnabled()){
- if(axisMsgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT) != null){
- log.debug("Servlet Context Set");
- }
- else{
- log.debug("Servlet Context not found");
- }
- }
+ soapMessageContext.put(javax.xml.ws.handler.MessageContext.SERVLET_CONTEXT, axisMsgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT));
+ soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.SERVLET_CONTEXT, Scope.APPLICATION);
+ if(log.isDebugEnabled()){
+ if(axisMsgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT) != null){
+ log.debug("Servlet Context Set");
+ }
+ else{
+ log.debug("Servlet Context not found");
+ }
+ }
- HttpServletRequest req = (HttpServletRequest)axisMsgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
- if(req == null){
- if(log.isDebugEnabled()){
- log.debug("HTTPServletRequest not found");
- }
- }
- if(req != null){
- soapMessageContext.put(javax.xml.ws.handler.MessageContext.SERVLET_REQUEST, req);
- soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.SERVLET_REQUEST, Scope.APPLICATION);
- if(log.isDebugEnabled()){
- log.debug("SERVLET_REQUEST Set");
- }
+ HttpServletRequest req = (HttpServletRequest)axisMsgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
+ if(req == null){
+ if(log.isDebugEnabled()){
+ log.debug("HTTPServletRequest not found");
+ }
+ }
+ if(req != null){
+ soapMessageContext.put(javax.xml.ws.handler.MessageContext.SERVLET_REQUEST, req);
+ soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.SERVLET_REQUEST, Scope.APPLICATION);
+ if(log.isDebugEnabled()){
+ log.debug("SERVLET_REQUEST Set");
+ }
String pathInfo = req.getPathInfo();
soapMessageContext.put(javax.xml.ws.handler.MessageContext.PATH_INFO, pathInfo);
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/MessageContext.java Mon Mar 26 17:54:30 2007
@@ -1,18 +1,20 @@
/*
- * Copyright 2006 The Apache Software Foundation.
- * Copyright 2006 International Business Machines Corp.
- *
- * 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.
*/
package org.apache.axis2.jaxws.core;
@@ -25,8 +27,8 @@
import javax.xml.ws.Service.Mode;
import org.apache.axis2.description.AxisService;
+import org.apache.axis2.jaxws.description.EndpointDescription;
import org.apache.axis2.jaxws.description.OperationDescription;
-import org.apache.axis2.jaxws.description.ServiceDescription;
import org.apache.axis2.jaxws.message.Message;
import org.apache.axis2.jaxws.message.util.MessageUtils;
@@ -47,7 +49,7 @@
private InvocationContext invocationCtx;
private org.apache.axis2.context.MessageContext axisMsgCtx;
private Map<String, Object> properties;
- private ServiceDescription serviceDesc;
+ private EndpointDescription endpointDesc;
private OperationDescription operationDesc;
private QName operationName; //FIXME: This should become the OperationDescription
private Message message;
@@ -86,12 +88,12 @@
return properties;
}
- public ServiceDescription getServiceDescription() {
- return serviceDesc;
+ public EndpointDescription getEndpointDescription() {
+ return endpointDesc;
}
- public void setServiceDescription(ServiceDescription sd) {
- serviceDesc = sd;
+ public void setEndpointDescription(EndpointDescription ed) {
+ endpointDesc = ed;
}
public OperationDescription getOperationDescription() {
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java Mon Mar 26 17:54:30 2007
@@ -1,44 +1,38 @@
/*
- * Copyright 2004,2005 The Apache Software Foundation.
- * Copyright 2006 International Business Machines Corp.
- *
- * 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.
*/
package org.apache.axis2.jaxws.server;
+import java.io.StringReader;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.http.HTTPBinding;
-import java.io.StringReader;
-import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-
-import org.apache.axiom.om.impl.builder.StAXBuilder;
import org.apache.axiom.om.util.StAXUtils;
-import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
-import org.apache.axis2.context.ServiceContext;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.java.security.AccessController;
import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.binding.SOAPBinding;
-import org.apache.axis2.jaxws.context.factory.MessageContextFactory;
-import org.apache.axis2.jaxws.context.utils.ContextUtils;
import org.apache.axis2.jaxws.core.InvocationContext;
import org.apache.axis2.jaxws.core.MessageContext;
import org.apache.axis2.jaxws.core.util.MessageContextUtils;
@@ -47,7 +41,6 @@
import org.apache.axis2.jaxws.description.ServiceDescription;
import org.apache.axis2.jaxws.handler.HandlerChainProcessor;
import org.apache.axis2.jaxws.handler.HandlerInvokerUtils;
-import org.apache.axis2.jaxws.handler.SoapMessageContext;
import org.apache.axis2.jaxws.i18n.Messages;
import org.apache.axis2.jaxws.message.Message;
import org.apache.axis2.jaxws.message.Protocol;
@@ -101,10 +94,10 @@
Class implClass = loadServiceImplClass(implClassName,
requestMsgCtx.getClassLoader());
- ServiceDescription serviceDesc = getServiceDescription(requestMsgCtx, implClass);
- requestMsgCtx.setServiceDescription(serviceDesc);
+ EndpointDescription endpointDesc = getEndpointDescription(requestMsgCtx, implClass);
+ requestMsgCtx.setEndpointDescription(endpointDesc);
- if (!bindingTypesMatch(requestMsgCtx, serviceDesc)) {
+ if (!bindingTypesMatch(requestMsgCtx, endpointDesc.getServiceDescription())) {
Protocol protocol = requestMsgCtx.getMessage().getProtocol();
// only if protocol is soap12 and MISmatches the endpoint do we halt processing
if (protocol.equals(Protocol.soap12)) {
@@ -145,7 +138,10 @@
// Invoke inbound application handlers. It's safe to use the first object on the iterator because there is
// always exactly one EndpointDescription on a server invoke
- boolean success = HandlerInvokerUtils.invokeInboundHandlers(requestMsgCtx, serviceDesc.getEndpointDescriptions_AsCollection().iterator().next(), HandlerChainProcessor.MEP.REQUEST, isOneWay(requestMsgCtx.getAxisMessageContext()));
+ boolean success = HandlerInvokerUtils.invokeInboundHandlers(requestMsgCtx,
+ requestMsgCtx.getEndpointDescription(),
+ HandlerChainProcessor.MEP.REQUEST,
+ isOneWay(requestMsgCtx.getAxisMessageContext()));
if (success) {
@@ -160,7 +156,9 @@
// Invoke outbound application handlers. It's safe to use the first object on the iterator because there is
// always exactly one EndpointDescription on a server invoke
- HandlerInvokerUtils.invokeOutboundHandlers(responseMsgContext, serviceDesc.getEndpointDescriptions_AsCollection().iterator().next(), HandlerChainProcessor.MEP.RESPONSE, false);
+ HandlerInvokerUtils.invokeOutboundHandlers(responseMsgContext,
+ requestMsgCtx.getEndpointDescription(),
+ HandlerChainProcessor.MEP.RESPONSE, false);
} else { // the inbound handler chain must have had a problem, and we've reversed directions
responseMsgContext = MessageContextUtils.createResponseMessageContext(requestMsgCtx);
// since we've reversed directions, the message has "become a response message" (section 9.3.2.1, footnote superscript 2)
@@ -256,7 +254,7 @@
* Gets the ServiceDescription associated with the request that is currently
* being processed.
*/
- private ServiceDescription getServiceDescription(MessageContext mc, Class implClass) {
+ private EndpointDescription getEndpointDescription(MessageContext mc, Class implClass) {
AxisService axisSvc = mc.getAxisMessageContext().getAxisService();
//Check to see if we've already created a ServiceDescription for this
@@ -265,13 +263,13 @@
if (axisSvc.getParameter(EndpointDescription.AXIS_SERVICE_PARAMETER) != null) {
Parameter param = axisSvc.getParameter(EndpointDescription.AXIS_SERVICE_PARAMETER);
- ServiceDescription sd = ((EndpointDescription) param.getValue()).getServiceDescription();
- return sd;
+ EndpointDescription ed = (EndpointDescription) param.getValue();
+ return ed;
}
else {
ServiceDescription sd = DescriptionFactory.createServiceDescriptionFromServiceImpl(implClass, axisSvc);
- //createServiceDescriptionFromServiceImpl(implClass, axisSvc);
- return sd;
+ EndpointDescription ed = sd.getEndpointDescriptions_AsCollection().iterator().next();
+ return ed;
}
}
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java Mon Mar 26 17:54:30 2007
@@ -1,24 +1,25 @@
/*
- * Copyright 2006 The Apache Software Foundation.
- * Copyright 2006 International Business Machines Corp.
- *
- * 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.
*/
package org.apache.axis2.jaxws.server.dispatcher;
import java.lang.reflect.Method;
-import javax.xml.namespace.QName;
import javax.xml.ws.soap.SOAPBinding;
import org.apache.axis2.jaxws.ExceptionFactory;
@@ -28,7 +29,6 @@
import org.apache.axis2.jaxws.description.EndpointDescription;
import org.apache.axis2.jaxws.description.EndpointInterfaceDescription;
import org.apache.axis2.jaxws.description.OperationDescription;
-import org.apache.axis2.jaxws.description.ServiceDescription;
import org.apache.axis2.jaxws.i18n.Messages;
import org.apache.axis2.jaxws.marshaller.MethodMarshaller;
import org.apache.axis2.jaxws.marshaller.factory.MethodMarshallerFactory;
@@ -148,7 +148,7 @@
private void initialize(MessageContext mc){
mc.setOperationName(mc.getAxisMessageContext().getAxisOperation().getName());
- endpointDesc = getEndpointDescription(mc);
+ endpointDesc = mc.getEndpointDescription();
mc.setOperationDescription(getOperationDescription(mc));
//methodMarshaller = null;
}
@@ -161,9 +161,7 @@
* to Endpoint-based implementation (i.e. not to Proxy-based ones)s
*/
private OperationDescription getOperationDescription(MessageContext mc) {
- ServiceDescription sd = mc.getServiceDescription();
- EndpointDescription[] eds = sd.getEndpointDescriptions();
- EndpointDescription ed = eds[0];
+ EndpointDescription ed = mc.getEndpointDescription();
EndpointInterfaceDescription eid = ed.getEndpointInterfaceDescription();
OperationDescription[] ops = eid.getDispatchableOperation(mc.getOperationName());
@@ -187,6 +185,7 @@
return op;
}
+ /*
private ServiceDescription getServiceDescription(MessageContext mc){
return mc.getServiceDescription();
}
@@ -197,7 +196,7 @@
EndpointDescription ed = eds[0];
return ed;
}
-
+ */
private MethodMarshaller getMethodMarshaller(Protocol protocol, OperationDescription operationDesc){
javax.jws.soap.SOAPBinding.Style styleOnSEI = endpointDesc.getEndpointInterfaceDescription().getSoapBindingStyle();
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java Mon Mar 26 17:54:30 2007
@@ -1,20 +1,21 @@
/*
- * Copyright 2006 The Apache Software Foundation.
- * Copyright 2006 International Business Machines Corp.
- *
- * 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.
*/
-
package org.apache.axis2.jaxws.server.dispatcher;
import java.lang.reflect.ParameterizedType;
@@ -23,15 +24,12 @@
import javax.activation.DataSource;
import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
import javax.xml.soap.SOAPMessage;
import javax.xml.transform.Source;
import javax.xml.ws.Provider;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;
-import org.apache.axiom.om.OMElement;
-import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.core.MessageContext;
import org.apache.axis2.jaxws.core.util.MessageContextUtils;
@@ -42,9 +40,7 @@
import org.apache.axis2.jaxws.message.Message;
import org.apache.axis2.jaxws.message.Protocol;
import org.apache.axis2.jaxws.message.XMLFault;
-import org.apache.axis2.jaxws.message.databinding.JAXBBlockContext;
import org.apache.axis2.jaxws.message.factory.BlockFactory;
-import org.apache.axis2.jaxws.message.factory.JAXBBlockFactory;
import org.apache.axis2.jaxws.message.factory.MessageFactory;
import org.apache.axis2.jaxws.message.factory.SOAPEnvelopeBlockFactory;
import org.apache.axis2.jaxws.message.factory.SourceBlockFactory;
@@ -52,8 +48,6 @@
import org.apache.axis2.jaxws.registry.FactoryRegistry;
import org.apache.axis2.jaxws.server.EndpointController;
import org.apache.axis2.jaxws.utility.ClassUtils;
-import org.apache.axis2.wsdl.WSDLConstants.WSDL20_2004_Constants;
-import org.apache.axis2.wsdl.WSDLConstants.WSDL20_2006Constants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -75,21 +69,21 @@
private static Log log = LogFactory.getLog(ProviderDispatcher.class);
private BlockFactory blockFactory = null;
- private Class providerType = null;
+ private Class providerType = null;
private Provider providerInstance = null;
private Service.Mode providerServiceMode = null;
private Message message = null;
private Protocol messageProtocol;
- /**
- * Constructor
- * @param _class
- * @param serviceInstance
- */
- public ProviderDispatcher(Class _class, Object serviceInstance) {
- super(_class, serviceInstance);
- }
+ /**
+ * Constructor
+ * @param _class
+ * @param serviceInstance
+ */
+ public ProviderDispatcher(Class _class, Object serviceInstance) {
+ super(_class, serviceInstance);
+ }
/* (non-Javadoc)
* @see org.apache.axis2.jaxws.server.EndpointDispatcher#execute()
@@ -106,7 +100,7 @@
providerType = getProviderType();
// REVIEW: This assumes there is only one endpoint description on the service. Is that always the case?
- EndpointDescription endpointDesc = mc.getServiceDescription().getEndpointDescriptions()[0];
+ EndpointDescription endpointDesc = mc.getEndpointDescription();
// Now that we know what kind of Provider we have, we can create the
// right type of Block for the request parameter data
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/lifecycle/impl/EndpointLifecycleManagerImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/lifecycle/impl/EndpointLifecycleManagerImpl.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/lifecycle/impl/EndpointLifecycleManagerImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/lifecycle/impl/EndpointLifecycleManagerImpl.java Mon Mar 26 17:54:30 2007
@@ -72,7 +72,7 @@
// Get the ServiceDescription and injectionDesc which contain
// cached information
- ServiceDescription serviceDesc = mc.getServiceDescription();
+ ServiceDescription serviceDesc = mc.getEndpointDescription().getServiceDescription();
ResourceInjectionServiceRuntimeDescription injectionDesc = null;
if (serviceDesc != null) {
injectionDesc =
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/migrator/ApplicationContextMigratorUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/migrator/ApplicationContextMigratorUtil.java?view=diff&rev=522689&r1=522688&r2=522689
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/migrator/ApplicationContextMigratorUtil.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/migrator/ApplicationContextMigratorUtil.java Mon Mar 26 17:54:30 2007
@@ -72,7 +72,7 @@
throw ExceptionFactory.makeWebServiceException("Null MessageContext");
}
- ServiceDescription sd = messageContext.getServiceDescription();
+ ServiceDescription sd = messageContext.getEndpointDescription().getServiceDescription();
if (sd != null) {
ConfigurationContext configCtx = sd.getAxisConfigContext();
List<ApplicationContextMigrator> migratorList = (List<ApplicationContextMigrator>) configCtx.getProperty(contextMigratorListID);
@@ -103,7 +103,7 @@
throw ExceptionFactory.makeWebServiceException("Null MessageContext");
}
- ServiceDescription sd = messageContext.getServiceDescription();
+ ServiceDescription sd = messageContext.getEndpointDescription().getServiceDescription();
if (sd != null) {
ConfigurationContext configCtx = sd.getAxisConfigContext();
List<ApplicationContextMigrator> migratorList = (List<ApplicationContextMigrator>) configCtx.getProperty(contextMigratorListID);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org