Author: ropalka
Date: 2012-04-03 04:54:31 -0400 (Tue, 03 Apr 2012)
New Revision: 16081
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPProtocolConnection.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/DetailImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
Log:
[JBWS-3474] removing jaxws native packages
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -24,18 +24,13 @@
import java.util.Observable;
import javax.xml.ws.EndpointReference;
-import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.soap.SOAPBinding;
import org.jboss.logging.Logger;
import org.jboss.ws.core.jaxrpc.SOAP11BindingJAXRPC;
import org.jboss.ws.core.jaxrpc.SOAP12BindingJAXRPC;
-import org.jboss.ws.core.jaxws.binding.HTTPBindingJAXWS;
-import org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS;
-import org.jboss.ws.core.jaxws.binding.SOAP12BindingJAXWS;
import org.jboss.ws.metadata.config.Configurable;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
/**
* Provides access to the protocol binding.
@@ -54,15 +49,15 @@
public CommonBindingProvider(EndpointMetaData epMetaData)
{
this.epMetaData = epMetaData;
- initBinding(epMetaData.getBindingId(), epMetaData.getType());
+ initBinding(epMetaData.getBindingId());
this.epMetaData.registerConfigObserver(this);
configure();
}
- public CommonBindingProvider(String bindingId, Type type)
+ public CommonBindingProvider(String bindingId)
{
- initBinding(bindingId, type);
+ initBinding(bindingId);
configure();
}
@@ -74,20 +69,16 @@
}
}
- protected void initBinding(String bindingId, Type type)
+ protected void initBinding(String bindingId)
{
if (SOAPBinding.SOAP11HTTP_BINDING.equals(bindingId))
{
- binding = (type == Type.JAXWS ? new SOAP11BindingJAXWS() : new
SOAP11BindingJAXRPC());
+ binding = new SOAP11BindingJAXRPC();
}
else if (SOAPBinding.SOAP12HTTP_BINDING.equals(bindingId))
{
- binding = (type == Type.JAXWS ? new SOAP12BindingJAXWS() : new
SOAP12BindingJAXRPC());
+ binding = new SOAP12BindingJAXRPC();
}
- else if (HTTPBinding.HTTP_BINDING.equals(bindingId))
- {
- binding = new HTTPBindingJAXWS();
- }
}
public CommonBinding getCommonBinding()
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -36,7 +36,6 @@
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPException;
import javax.xml.ws.ProtocolException;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
@@ -56,7 +55,6 @@
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
@@ -211,7 +209,7 @@
QName anonQName = new QName(Constants.NS_JBOSSWS_URI, "Anonymous");
QName anonPort = new QName(Constants.NS_JBOSSWS_URI,
"AnonymousPort");
- epMetaData = new ClientEndpointMetaData(serviceMetaData, anonPort, anonQName,
Type.JAXRPC);
+ epMetaData = new ClientEndpointMetaData(serviceMetaData, anonPort, anonQName);
epMetaData.setStyle(Style.RPC);
serviceMetaData.addEndpoint(epMetaData);
@@ -282,20 +280,6 @@
// Create the invocation and sync the input parameters
EndpointInvocation epInv = createEndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
-
- if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC &&
opMetaData.isRPCLiteral()
- && epInv.getRequestParamNames() != null)
- {
- for (QName qname : epInv.getRequestParamNames())
- {
- ParameterMetaData paramMetaData = opMetaData.getParameter(qname);
- if ((paramMetaData.getMode().equals(ParameterMode.IN) ||
paramMetaData.getMode().equals(ParameterMode.INOUT))
- && epInv.getRequestParamValue(qname) == null)
- {
- throw new WebServiceException(BundleUtils.getMessage(bundle,
"RPC_LITERAL_OPERATION_PARAMS_IS_NULL"));
- }
- }
- }
// Set the required outbound properties
setOutboundContextProperties();
@@ -549,8 +533,6 @@
retValue = epInv.getReturnValue();
if (opMetaData.isDocumentWrapped() && retMetaData.isMessageType() ==
false)
retValue = ParameterWrapping.unwrapResponseParameters(retMetaData, retValue,
inParams);
- if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC &&
opMetaData.isRPCLiteral() && retValue == null)
- throw new WebServiceException(BundleUtils.getMessage(bundle,
"RPC_LITERAL_OPERATION_RETURN_IS_NULL", opMetaData.getQName()));
}
// Set the holder values for INOUT parameters
@@ -563,15 +545,6 @@
{
QName xmlName = paramMetaData.getXmlName();
Object value = epInv.getResponseParamValue(xmlName);
- //JBWS-2969:Check if reponse parameter or return value is null
- if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC &&
opMetaData.isRPCLiteral())
- {
- if (value == null)
- {
- throw new WebServiceException(BundleUtils.getMessage(bundle,
"RPC_LITERAL_OPERATION_RETURN_IS_NULL",
- opMetaData.getQName()));
- }
- }
// document/literal wrapped return value header
if (index == -1)
{
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -43,7 +43,6 @@
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPHeaderElement;
import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.handler.MessageContext;
import org.apache.xerces.xs.XSElementDeclaration;
import org.apache.xerces.xs.XSTypeDefinition;
@@ -55,7 +54,6 @@
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.NameImpl;
@@ -176,14 +174,6 @@
CIDGenerator cidGenerator = reqMessage.getCidGenerator();
AttachmentPart part = createAttachmentPart(paramMetaData, value,
cidGenerator);
reqMessage.addAttachmentPart(part);
-
- // Add the attachment to the standard property
- if (value instanceof DataHandler && msgContext instanceof
MessageContextJAXWS)
- {
- DataHandler dataHandler = (DataHandler)value;
- Map<String, DataHandler> attachments = (Map<String,
DataHandler>)msgContext.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- attachments.put(dataHandler.getContentType(), dataHandler);
- }
}
else
{
@@ -339,9 +329,6 @@
}
}
- // Add all attachments to the standard property
- this.propagateAttachmentsToJAXWSMessageContext(reqMessage, msgContext);
-
return epInv;
}
catch (Exception e)
@@ -401,8 +388,6 @@
}
}
- this.propagateAttachmentsFromJAXWSMessageContext(resMessage, msgContext);
-
// Add the return to the message
ParameterMetaData retMetaData = opMetaData.getReturnParameter();
if (retMetaData != null)
@@ -419,14 +404,6 @@
AttachmentPart part = createAttachmentPart(retMetaData, value,
cidGenerator);
resMessage.addAttachmentPart(part);
epInv.setReturnValue(part);
-
- // Add the attachment to the standard property
- if (part.getDataHandler() != null && msgContext instanceof
MessageContextJAXWS)
- {
- DataHandler dataHandler = part.getDataHandler();
- Map<String, DataHandler> attachments = (Map<String,
DataHandler>)msgContext.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- attachments.put(part.getContentId(), dataHandler);
- }
}
else
{
@@ -446,14 +423,6 @@
CIDGenerator cidGenerator = resMessage.getCidGenerator();
AttachmentPart part = createAttachmentPart(paramMetaData, value,
cidGenerator);
resMessage.addAttachmentPart(part);
-
- // Add the attachment to the standard property
- if (value instanceof DataHandler && msgContext instanceof
MessageContextJAXWS)
- {
- DataHandler dataHandler = (DataHandler)value;
- Map<String, DataHandler> attachments = (Map<String,
DataHandler>)msgContext.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- attachments.put(dataHandler.getContentType(), dataHandler);
- }
}
else
{
@@ -477,31 +446,6 @@
}
}
- /**
- * Propagates attachments from JAXWS message context to soap message.
- *
- * @param message soap message to bind attachments to
- * @param msgContext message context to read attachments from
- */
- private void propagateAttachmentsFromJAXWSMessageContext(final SOAPMessage message,
final CommonMessageContext msgContext)
- {
- if (msgContext instanceof MessageContextJAXWS)
- {
- @SuppressWarnings("unchecked")
- final Map<String, DataHandler> attachments = (Map<String,
DataHandler>)msgContext.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- final Iterator<?> attachmentsIterator = attachments.keySet().iterator();
-
- AttachmentPart part = null;
- while (attachmentsIterator.hasNext())
- {
- final String contentId = (String)attachmentsIterator.next();
- final DataHandler handler = attachments.get(contentId);
- part = this.createAttachmentPart(contentId, handler);
- ((SOAPMessageImpl)message).addAttachmentPart(part);
- }
- }
- }
-
/** On the client side, extract the OUT parameters from the payload and return them to
the client. */
public void unbindResponseMessage(OperationMetaData opMetaData, MessageAbstraction
payload, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
@@ -607,9 +551,6 @@
epInv.setResponseParamValue(xmlName, value);
}
}
-
- // Add all attachments to the standard property
- this.propagateAttachmentsToJAXWSMessageContext(resMessage, msgContext);
}
catch (Exception e)
{
@@ -617,30 +558,6 @@
}
}
- /**
- * Propagates all the attachments from SOAPMessage to JAXWS Message context standard
property.
- *
- * @param message soap message to read attachments from
- * @param msgContext to propagate attachments to
- * @throws SOAPException if something went wrong
- */
- private void propagateAttachmentsToJAXWSMessageContext(final SOAPMessage message,
final CommonMessageContext msgContext) throws SOAPException
- {
- if (msgContext instanceof MessageContextJAXWS)
- {
- final SOAPMessageImpl implMessage = (SOAPMessageImpl)message;
- final Iterator<?> attachmentsIterator = implMessage.getAttachments();
- final Map<String, DataHandler> attachments = (Map<String,
DataHandler>)msgContext.get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS);
-
- AttachmentPart part = null;
- while (attachmentsIterator.hasNext())
- {
- part = (AttachmentPart)attachmentsIterator.next();
- attachments.put(part.getContentId(), part.getDataHandler()); // TODO: test on
getDataHandler() == null?
- }
- }
- }
-
public MessageAbstraction bindFaultMessage(Exception ex)
{
SOAPMessageImpl faultMessage =
(SOAPMessageImpl)createFaultMessageFromException(ex);
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -31,8 +31,8 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.Normalizer;
import org.jboss.ws.core.soap.SOAPContentElement;
-import org.jboss.ws.common.Normalizer;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,8 +21,6 @@
*/
package org.jboss.ws.core.client;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
Deleted:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPProtocolConnection.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPProtocolConnection.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPProtocolConnection.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.client;
-
-import org.jboss.ws.core.jaxws.binding.HTTPMessageMarshaller;
-import org.jboss.ws.core.jaxws.binding.HTTPMessageUnMarshaller;
-
-/**
- * @since 02-Apr-2007
- */
-public class HTTPProtocolConnection extends HTTPRemotingConnection
-{
- public UnMarshaller getUnmarshaller()
- {
- return new HTTPMessageUnMarshaller();
- }
-
- public Marshaller getMarshaller()
- {
- return new HTTPMessageMarshaller();
- }
-}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,25 +22,23 @@
package org.jboss.ws.core.client;
import org.jboss.ws.core.jaxrpc.client.serviceref.NativeServiceRefBinderJAXRPC;
-import org.jboss.ws.core.jaxws.client.serviceref.NativeServiceRefBinderJAXWS;
import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
/**
- * Binds a JAXWS Service object in the client's ENC
- *
- * @author Thomas.Diesler(a)jboss.org
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public final class NativeServiceRefBinderFactoryImpl implements ServiceRefBinderFactory
{
private static final ServiceRefBinder JAXRPC_BINDER = new
NativeServiceRefBinderJAXRPC();
- private static final ServiceRefBinder JAXWS_BINDER = new
NativeServiceRefBinderJAXWS();
-
public ServiceRefBinder newServiceRefBinder(final Type type)
{
- return type == Type.JAXRPC ? JAXRPC_BINDER : JAXWS_BINDER;
+ if (type == Type.JAXRPC)
+ {
+ return JAXRPC_BINDER;
+ }
+ throw new UnsupportedOperationException();
}
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -26,7 +26,6 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.umdm.OperationMetaData;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,15 +22,15 @@
package org.jboss.ws.core.jaxrpc;
import java.util.HashMap;
+import java.util.Map;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.util.Map;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.encoding.TypeMapping;
import javax.xml.rpc.encoding.TypeMappingRegistry;
import org.jboss.util.NotImplementedException;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.binding.TypeMappingImpl;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -25,11 +25,11 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.common.JavaUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -23,12 +23,12 @@
import java.util.Calendar;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerSupport;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -23,12 +23,12 @@
import java.util.Calendar;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,17 +21,18 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import java.util.ResourceBundle;
+
import javax.xml.namespace.QName;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.common.DOMWriter;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -25,11 +25,11 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.common.JavaUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.AbstractDeserializerFactory;
import org.jboss.ws.core.binding.DeserializerSupport;
/**
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.AbstractSerializerFactory;
import org.jboss.ws.core.binding.SerializerSupport;
/**
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.AbstractDeserializerFactory;
import org.jboss.ws.core.binding.DeserializerSupport;
/**
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.AbstractSerializerFactory;
import org.jboss.ws.core.binding.SerializerSupport;
/**
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,18 +21,19 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import java.util.ResourceBundle;
+
import javax.xml.namespace.QName;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.soap.SOAPElement;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.common.DOMWriter;
import org.w3c.dom.NamedNodeMap;
/**
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,8 +22,6 @@
package org.jboss.ws.core.jaxrpc.client;
import java.rmi.RemoteException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -33,6 +31,7 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -46,7 +45,9 @@
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
@@ -69,7 +70,6 @@
import org.jboss.ws.metadata.umdm.TypesMetaData;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-import org.jboss.ws.common.JavaUtils;
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call
instances.
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,15 +21,15 @@
*/
package org.jboss.ws.core.server;
+import java.util.Iterator;
+import java.util.ResourceBundle;
+
import org.jboss.logging.Logger;
-import java.util.ResourceBundle;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointResolver;
-import java.util.Iterator;
-
/**
* @author Heiko.Braun(a)jboss.com
* Created: Jul 23, 2007
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,27 +21,18 @@
*/
package org.jboss.ws.core.server;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsEndpoint;
-
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.UndeclaredThrowableException;
-import java.util.HashMap;
-import java.util.Map;
import java.util.ResourceBundle;
-import javax.activation.DataHandler;
import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.rpc.server.ServletEndpointContext;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.http.HTTPBinding;
import org.jboss.logging.Logger;
@@ -61,16 +52,11 @@
import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
-import org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -113,16 +99,8 @@
if (sepMetaData == null)
throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_ENDPOINT_META_DATA"));
- if (sepMetaData.getType() == EndpointMetaData.Type.JAXRPC)
- {
- bindingProvider = new CommonBindingProvider(sepMetaData);
- delegate = new HandlerDelegateJAXRPC(sepMetaData);
- }
- else
- {
- bindingProvider = new BindingProviderImpl(sepMetaData);
- delegate = new HandlerDelegateJAXWS(sepMetaData);
- }
+ bindingProvider = new CommonBindingProvider(sepMetaData);
+ delegate = new HandlerDelegateJAXRPC(sepMetaData);
}
public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType
type)
@@ -159,9 +137,6 @@
HandlerType[] handlerType = delegate.getHandlerTypeOrder();
HandlerType[] faultType = delegate.getHandlerTypeOrder();
- // Set the required inbound context properties
- setInboundContextProperties();
-
try
{
boolean oneway = false;
@@ -211,21 +186,7 @@
reqMessage = msgContext.getMessageAbstraction();
sepInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
- //JBWS-2969:check if the RPC/Lit input paramter is null
- if (opMetaData.getEndpointMetaData().getType() !=
EndpointMetaData.Type.JAXRPC
- && opMetaData.isRPCLiteral() &&
sepInv.getRequestParamNames() != null)
- {
- for (QName qname : sepInv.getRequestParamNames())
- {
- ParameterMetaData paramMetaData = opMetaData.getParameter(qname);
- if ((paramMetaData.getMode().equals(ParameterMode.IN) ||
paramMetaData.getMode().equals(ParameterMode.INOUT)) &&
sepInv.getRequestParamValue(qname) == null)
- {
- throw new WebServiceException(BundleUtils.getMessage(bundle,
"RPC/LITERAL_PAPAMETERS_IS_NULL", opMetaData.getQName()));
- }
- }
- }
-
// Invoke an instance of the SEI implementation bean
Invocation inv = setupInvocation(endpoint, sepInv, invContext);
InvocationHandler invHandler = endpoint.getInvocationHandler();
@@ -247,9 +208,6 @@
// Reverse the message direction
msgContext = processPivotInternal(msgContext, direction);
- // Set the required outbound context properties
- setOutboundContextProperties();
-
// Bind the response message
MessageAbstraction resMessage = binding.bindResponseMessage(opMetaData,
sepInv);
msgContext.setMessageAbstraction(resMessage);
@@ -311,22 +269,6 @@
protected Invocation setupInvocation(Endpoint ep, EndpointInvocation epInv,
InvocationContext invContext) throws Exception
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext instanceof SOAPMessageContextJAXWS)
- {
- if (isJaxwsEndpoint(ep))
- {
- if (msgContext.get(MessageContext.SERVLET_REQUEST) != null)
- {
- WebServiceContext wsContext =
contextFactory.newWebServiceContext((SOAPMessageContextJAXWS)msgContext);
- invContext.addAttachment(WebServiceContext.class, wsContext);
- }
- else
- {
- log.warn(BundleUtils.getMessage(bundle,
"CANNOT_PROVIDE_WEBSERVICECONTEXT"));
- }
- }
- invContext.addAttachment(javax.xml.ws.handler.MessageContext.class,
msgContext);
- }
if (msgContext instanceof SOAPMessageContextJAXRPC)
{
invContext.addAttachment(javax.xml.rpc.handler.MessageContext.class,
msgContext);
@@ -378,7 +320,7 @@
Method seiMethod = sepInv.getJavaMethod();
Method implMethod = null;
- if (seiMethod != null) // RM hack
+ if (seiMethod != null)
{
String methodName = seiMethod.getName();
Class[] paramTypes = seiMethod.getParameterTypes();
@@ -412,50 +354,11 @@
return implMethod;
}
- protected void setInboundContextProperties()
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext instanceof MessageContextJAXWS)
- {
- // Map of attachments to a message for the outbound message, key is the MIME
Content-ID, value is a DataHandler
- msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new
HashMap<String, DataHandler>());
- }
- }
-
- protected void setOutboundContextProperties()
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext instanceof MessageContextJAXWS)
- {
- Map<String, DataHandler> outboundAttachments = (Map<String,
DataHandler>)msgContext.get(MessageContextJAXWS.OUTBOUND_MESSAGE_ATTACHMENTS);
- Map<String, DataHandler> newAttachments = new HashMap<String,
DataHandler>(); // to protect against attacks from endpoint
-
- // Map of attachments to a message for the outbound message, key is the MIME
Content-ID, value is a DataHandler
- msgContext.put(MessageContextJAXWS.OUTBOUND_MESSAGE_ATTACHMENTS,
newAttachments);
-
- if (outboundAttachments != null)
- {
- for (final String key : outboundAttachments.keySet())
- {
- newAttachments.put(key, outboundAttachments.get(key));
- }
- }
- }
- }
-
private CommonMessageContext processPivotInternal(CommonMessageContext msgContext,
DirectionHolder direction)
{
if (direction.getDirection() == Direction.InBound)
{
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- if (epMetaData.getType() == EndpointMetaData.Type.JAXRPC)
- {
- msgContext = MessageContextJAXRPC.processPivot(msgContext);
- }
- else
- {
- msgContext = MessageContextJAXWS.processPivot(msgContext);
- }
+ msgContext = MessageContextJAXRPC.processPivot(msgContext);
direction.setDirection(Direction.OutBound);
}
return msgContext;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServletRequestContext.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,13 +21,13 @@
*/
package org.jboss.ws.core.server;
-import org.jboss.wsf.spi.invocation.InvocationContext;
-
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+
/**
* Implementation of ServletEndpointContext
*
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/DetailImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/DetailImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/DetailImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,10 +22,9 @@
package org.jboss.ws.core.soap;
import java.util.ArrayList;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.util.Iterator;
import java.util.List;
+import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.soap.Detail;
@@ -36,6 +35,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.DOMUtils;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,7 +22,6 @@
package org.jboss.ws.core.soap;
import java.lang.reflect.Method;
-import java.util.List;
import java.util.ResourceBundle;
import javax.xml.namespace.QName;
@@ -40,7 +39,6 @@
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.binding.NullValueSerializer;
-import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
@@ -150,8 +148,6 @@
serContext.setJavaType(javaType);
ParameterMetaData pmd = container.getParamMetaData();
OperationMetaData opMetaData = pmd.getOperationMetaData();
- List<Class> registeredTypes =
opMetaData.getEndpointMetaData().getRegisteredTypes();
- serContext.setProperty(SerializationContextJAXWS.JAXB_CONTEXT_TYPES,
registeredTypes.toArray(new Class[0]));
TypeMappingImpl typeMapping = serContext.getTypeMapping();
XMLFragment xmlFragment = null;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,13 +22,12 @@
package org.jboss.ws.core.soap;
import java.io.IOException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.io.InputStream;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.ResourceBundle;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPElement;
@@ -41,6 +40,7 @@
import javax.xml.transform.stream.StreamSource;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.api.util.ServiceLoader;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -23,7 +23,6 @@
import java.lang.reflect.Array;
import java.lang.reflect.Method;
-import java.util.List;
import java.util.ResourceBundle;
import javax.xml.namespace.QName;
@@ -42,7 +41,6 @@
import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.TypeMappingImpl;
-import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.w3c.dom.Comment;
@@ -162,8 +160,6 @@
OperationMetaData opMetaData = pmd.getOperationMetaData();
serContext.setProperty(ParameterMetaData.class.getName(), pmd);
serContext.setJavaType(javaType);
- List<Class> registeredTypes =
opMetaData.getEndpointMetaData().getRegisteredTypes();
- serContext.setProperty(SerializationContextJAXWS.JAXB_CONTEXT_TYPES,
registeredTypes.toArray(new Class[0]));
try
{
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,11 +21,14 @@
*/
package org.jboss.ws.core.soap.attachment;
-import org.jboss.util.Base64;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Iterator;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.IOUtils;
-import org.jboss.ws.WSException;
import javax.activation.DataHandler;
import javax.activation.DataSource;
@@ -33,9 +36,12 @@
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPException;
-import java.io.*;
-import java.util.Iterator;
+import org.jboss.util.Base64;
+import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.IOUtils;
+
/**
* Implementation of the <code>AttachmentPart</code> interface.
* @see javax.xml.soap.AttachmentPart
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -38,7 +38,6 @@
import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -171,7 +170,7 @@
{
QName portName = wsdlEndpoint.getName();
QName interfaceQName = wsdlEndpoint.getInterface().getName();
- ClientEndpointMetaData epMetaData = new
ClientEndpointMetaData(serviceMetaData, portName, interfaceQName, Type.JAXRPC);
+ ClientEndpointMetaData epMetaData = new
ClientEndpointMetaData(serviceMetaData, portName, interfaceQName);
epMetaData.setEndpointAddress(wsdlEndpoint.getAddress());
serviceMetaData.addEndpoint(epMetaData);
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -32,7 +32,6 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
@@ -132,7 +131,7 @@
QName interfaceQName = wsdlEndpoint.getInterface().getName();
Endpoint ep = dep.getService().getEndpointByName(linkName);
- ServerEndpointMetaData sepMetaData = new
ServerEndpointMetaData(serviceMetaData, ep, portName, interfaceQName, Type.JAXRPC);
+ ServerEndpointMetaData sepMetaData = new
ServerEndpointMetaData(serviceMetaData, ep, portName, interfaceQName);
sepMetaData.setPortComponentName(pcMetaData.getPortComponentName());
sepMetaData.setLinkName(linkName);
serviceMetaData.addEndpoint(sepMetaData);
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,13 +21,11 @@
*/
package org.jboss.ws.metadata.umdm;
-import org.jboss.ws.core.jaxws.handler.PortInfoImpl;
+import javax.xml.namespace.QName;
+
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-import javax.xml.namespace.QName;
-import javax.xml.ws.handler.PortInfo;
-
/**
* Client side endpoint meta data.
*
@@ -43,17 +41,12 @@
{
}
- public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName
portTypeName, Type type)
+ public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName
portTypeName)
{
- super(service, qname, portTypeName, type);
+ super(service, qname, portTypeName);
String configName = ConfigurationProvider.DEFAULT_CLIENT_CONFIG_NAME;
+ String configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
- String configFile;
- if (type == Type.JAXRPC)
- configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
- else
- configFile = ConfigurationProvider.DEFAULT_JAXWS_CLIENT_CONFIG_FILE;
-
EndpointConfigMetaData ecmd = getEndpointConfigMetaData();
ecmd.setConfigName(configName);
ecmd.setConfigFile(configFile);
@@ -69,15 +62,6 @@
this.endpointAddress = endpointAddress;
}
- public PortInfo getPortInfo()
- {
- QName serviceName = getServiceMetaData().getServiceName();
- QName portName = getPortName();
- String bindingID = getBindingId();
- PortInfo portInfo = new PortInfoImpl(serviceName, portName, bindingID);
- return portInfo;
- }
-
public EndpointConfigMetaData createEndpointConfigMetaData(String configName, String
configFile)
{
return super.createEndpointConfigMetaData(configName, configFile);
@@ -86,7 +70,6 @@
public String toString()
{
StringBuilder buffer = new StringBuilder("\nClientEndpointMetaData:");
- buffer.append("\n type=").append(getType());
buffer.append("\n qname=").append(getPortName());
buffer.append("\n address=").append(getEndpointAddress());
buffer.append("\n binding=").append(getBindingId());
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -39,7 +39,6 @@
import java.util.Set;
import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.bind.JAXBContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.ws.Service.Mode;
@@ -55,11 +54,6 @@
import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SOAPArrayDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SOAPArraySerializerFactory;
-import org.jboss.ws.core.jaxws.JAXBContextCache;
-import org.jboss.ws.core.jaxws.JAXBContextFactory;
-import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
-import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
-import org.jboss.ws.core.jaxws.client.DispatchBinding;
import org.jboss.ws.core.soap.Style;
import org.jboss.ws.core.soap.Use;
import org.jboss.ws.metadata.accessor.AccessorFactory;
@@ -67,15 +61,12 @@
import org.jboss.ws.metadata.accessor.JAXBAccessorFactoryCreator;
import org.jboss.ws.metadata.config.Configurable;
import org.jboss.ws.metadata.config.ConfigurationProvider;
-import org.jboss.ws.metadata.config.EndpointFeature;
import org.jboss.ws.metadata.config.JBossWSConfigFactory;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.config.CommonConfig;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import com.sun.xml.bind.api.JAXBRIContext;
-
/**
* A Service component describes a set of endpoints.
*
@@ -88,11 +79,6 @@
// provide logging
private static Logger log = Logger.getLogger(EndpointMetaData.class);
- public enum Type
- {
- JAXRPC, JAXWS
- }
-
public static final Set<String> SUPPORTED_BINDINGS = new
HashSet<String>();
static
{
@@ -128,8 +114,6 @@
private ParameterStyle parameterStyle;
// The JAXWS ServiceMode
private Mode serviceMode;
- // Whether the endpoint was deployed from annotations
- private Type type;
// The list of service meta data
private List<OperationMetaData> operations = new
ArrayList<OperationMetaData>();
// Maps the java method to the operation meta data
@@ -143,20 +127,15 @@
private List<UnifiedPortComponentRefMetaData> serviceRefContrib = new
ArrayList<UnifiedPortComponentRefMetaData>();
- private JAXBContextCache jaxbCache = new JAXBContextCache();
-
EndpointMetaData()
{
}
- public EndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName,
Type type)
+ public EndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName)
{
this.serviceMetaData = service;
this.portName = portName;
this.portTypeName = portTypeName;
- this.type = type;
-
- // The default binding
this.bindingId = Constants.SOAP11HTTP_BINDING;
}
@@ -323,11 +302,6 @@
this.serviceMode = serviceMode;
}
- public Type getType()
- {
- return type;
- }
-
public String getAuthMethod()
{
return authMethod;
@@ -526,7 +500,6 @@
eagerInitializeOperations();
eagerInitializeTypes();
eagerInitializeAccessors();
- eagerInitializeJAXBContextCache();
}
private void eagerInitializeOperations()
@@ -594,14 +567,7 @@
}
else
{
- if (getType() == Type.JAXWS)
- {
- typeMapping.register(javaType, xmlType, new
JAXBSerializerFactory(), new JAXBDeserializerFactory());
- }
- else
- {
- typeMapping.register(javaType, xmlType, new
JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
- }
+ typeMapping.register(javaType, xmlType, new
JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
}
}
catch (ClassNotFoundException e)
@@ -640,54 +606,24 @@
}
}
- // Create a JAXBContext for those types
- JAXBRIContext jaxbCtx = null;
- if (useJAXBAccessorFactory)
- {
- Class[] typeArr = new Class[types.size()];
- jaxbCtx =
(JAXBRIContext)JAXBContextFactory.newInstance().createContext(types.toArray(typeArr));
- }
-
// Create the accessors using a shared JAXBContext
for (OperationMetaData opMetaData : operations)
{
for (ParameterMetaData paramMetaData : opMetaData.getParameters())
{
- createAccessor(paramMetaData, jaxbCtx);
+ createAccessor(paramMetaData);
}
ParameterMetaData retParam = opMetaData.getReturnParameter();
if (retParam != null)
- createAccessor(retParam, jaxbCtx);
+ createAccessor(retParam);
}
}
- private void eagerInitializeJAXBContextCache()
+ private void createAccessor(ParameterMetaData paramMetaData)
{
- //initialize jaxb context cache
- if
("true".equalsIgnoreCase(System.getProperty(Constants.EAGER_INITIALIZE_JAXB_CONTEXT_CACHE)))
- {
- log.debug("Initializing JAXBContext cache...");
- try
- {
- Class[] classes = getRegisteredTypes().toArray(new Class[0]);
- JAXBContext context =
JAXBContextFactory.newInstance().createContext(classes);
- jaxbCache.add(classes, context);
- }
- catch (Exception e)
- {
- //ignore
- }
- }
- }
-
- private void createAccessor(ParameterMetaData paramMetaData, JAXBRIContext jaxbCtx)
- {
AccessorFactoryCreator factoryCreator = paramMetaData.getAccessorFactoryCreator();
- if (factoryCreator instanceof JAXBAccessorFactoryCreator)
- ((JAXBAccessorFactoryCreator)factoryCreator).setJAXBContext(jaxbCtx);
-
if (paramMetaData.getWrappedParameters() != null)
{
AccessorFactory factory = factoryCreator.create(paramMetaData);
@@ -705,12 +641,7 @@
public void configure(Configurable configurable)
{
CommonConfig config = getConfig();
-
- if (configurable instanceof DispatchBinding)
- {
- DispatchBinding dpb = (DispatchBinding)configurable;
- dpb.setValidateDispatch(config.hasFeature(EndpointFeature.VALIDATE_DISPATCH));
- }
+ // TODO: remove this method
}
public UnifiedVirtualFile getRootFile()
@@ -723,11 +654,6 @@
configObservable.addObserver(observer);
}
- public JAXBContextCache getJaxbCache()
- {
- return jaxbCache;
- }
-
public String getConfigFile()
{
return getEndpointConfigMetaData().getConfigFile();
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,8 +21,6 @@
*/
package org.jboss.ws.metadata.umdm;
-import java.beans.IntrospectionException;
-import java.beans.PropertyDescriptor;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -31,7 +29,6 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceException;
@@ -39,11 +36,9 @@
import org.jboss.ws.WSException;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.JavaUtils;
-import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.metadata.accessor.AccessorFactory;
import org.jboss.ws.metadata.accessor.ReflectiveFieldAccessorFactoryCreator;
import org.jboss.ws.metadata.accessor.ReflectiveMethodAccessorFactoryCreator;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
/**
* A Fault component describes a fault that a given operation supports.
@@ -208,16 +203,6 @@
public void eagerInitialize()
{
- Type epType = getOperationMetaData().getEndpointMetaData().getType();
- if (epType == EndpointMetaData.Type.JAXWS && faultBeanName != null)
- {
- if (loadFaultBean() == null)
- {
- ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
- new DynamicWrapperGenerator(loader).generate(this);
- }
- }
-
// Initialize the cache
javaType = getJavaType();
if (javaType == null)
@@ -225,99 +210,7 @@
if (JavaUtils.isAssignableFrom(Exception.class, javaType) == false)
throw new WSException(BundleUtils.getMessage(bundle,
"FAULT_JAVA_TYPE_NOT_EXCEPTION", javaTypeName));
-
- if (epType == EndpointMetaData.Type.JAXWS)
- {
- faultBean = getFaultBean();
- if (faultBean != null)
- initializeFaultBean();
- }
}
-
- private void initializeFaultBean()
- {
- /* JAX-WS 3.7: For exceptions that match the pattern described in section
- * 2.5 (i.e. exceptions that have a getFaultInfo method), the FaultBean
- * is used as input to JAXB */
- try
- {
- /* JAX-WS 2.5: A wsdl:fault element refers to a wsdl:message that contains
- * a single part. The global element declaration referred to by that part
- * is mapped to a Java bean. A wrapper exception class contains the
- * following methods:
- * . WrapperException(String message, FaultBean faultInfo)
- * . WrapperException(String message, FaultBean faultInfo, Throwable cause)
- * . FaultBean getFaultInfo() */
- serviceExceptionConstructor = javaType.getConstructor(String.class, faultBean);
- faultInfoMethod = javaType.getMethod("getFaultInfo");
- }
- /* JAX-WS 3.7: For exceptions that do not match the pattern described in
- * section 2.5, JAX-WS maps those exceptions to Java beans and then uses
- * those Java beans as input to the JAXB mapping. */
- catch (NoSuchMethodException nsme)
- {
- /* For each getter in the exception and its superclasses, a property of
- * the same type and name is added to the bean. */
- XmlType xmlType = (XmlType)faultBean.getAnnotation(XmlType.class);
- if (xmlType == null)
- throw new WebServiceException(BundleUtils.getMessage(bundle,
"XMLTYPE_MISSING", faultBeanName));
-
- AccessorFactory accessorFactory = getAccessorFactory(faultBean);
-
- String[] propertyNames = xmlType.propOrder();
- int propertyCount = propertyNames.length;
- propertyTypes = new Class[propertyCount];
- faultBeanProperties = new WrappedParameter[propertyCount];
- serviceExceptionGetters = new Method[propertyCount];
-
- for (int i = 0; i < propertyCount; i++)
- {
- String propertyName = propertyNames[i];
- // extract property metadata from the fault bean
- try
- {
- PropertyDescriptor propertyDescriptor = new
PropertyDescriptor(propertyName, faultBean);
- Class propertyType = propertyDescriptor.getPropertyType();
-
- WrappedParameter faultBeanProperty = new WrappedParameter(null,
propertyType.getName(), propertyName, i);
- faultBeanProperty.setAccessor(accessorFactory.create(faultBeanProperty));
- faultBeanProperties[i] = faultBeanProperty;
-
- propertyTypes[i] = propertyType;
- }
- catch (IntrospectionException ie)
- {
- throw new WSException(BundleUtils.getMessage(bundle,
"PROPERTY_NOT_FOUND_IN_BEAN", new Object[]{ propertyName, faultBeanName }),
ie);
- }
-
- // extract property metadata from the service exception
- try
- {
- /* use PropertyDescriptor(String, Class, String, String) instead
- * of PropertyDescriptor(String, Class) because the latter requires
- * the setter method to be present */
- PropertyDescriptor propertyDescriptor = new
PropertyDescriptor(propertyName, javaType, "is" +
JavaUtils.capitalize(propertyName), null);
- serviceExceptionGetters[i] = propertyDescriptor.getReadMethod();
- }
- catch (IntrospectionException ie)
- {
- throw new WSException(BundleUtils.getMessage(bundle,
"PROPERTY_NOT_FOUND_IN_EXCEPTION", new Object[]{ propertyName , javaTypeName}),
ie);
- }
- }
-
- try
- {
- // Attempt to locate a usable constructor
- serviceExceptionConstructor =
javaType.asSubclass(Exception.class).getConstructor(propertyTypes);
- }
- catch (NoSuchMethodException e)
- {
- // Only needed for client side. The spec does not clarify this, and the TCK
makes use of non matching constructors,
- // so we allow them for server side usage and only fail when used by the
client.
- }
- }
- }
-
private AccessorFactory getAccessorFactory(Class faultBean)
{
// This should catch all cases due to the constraints that JAX-WS puts on the fault
bean
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -38,12 +38,10 @@
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.metadata.accessor.AccessorFactoryCreator;
import org.jboss.ws.metadata.accessor.ReflectiveMethodAccessorFactoryCreator;
import org.jboss.ws.metadata.config.EndpointFeature;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
/**
* A request/response parameter that a given operation supports.
@@ -441,15 +439,11 @@
javaType = null;
// TODO - Remove messageType hack
- Type epType = getOperationMetaData().getEndpointMetaData().getType();
if (getOperationMetaData().isDocumentWrapped() && !isInHeader() &&
!isSwA() && !isMessageType())
{
if (loadWrapperBean() == null)
{
- if (epType == EndpointMetaData.Type.JAXRPC)
- throw new WSException(BundleUtils.getMessage(bundle,
"WRAPPER_BEANS_AUTOGEN_NOT_SUPPORTED"));
-
- new DynamicWrapperGenerator(getClassLoader()).generate(this);
+ throw new WSException(BundleUtils.getMessage(bundle,
"WRAPPER_BEANS_AUTOGEN_NOT_SUPPORTED"));
}
}
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -68,17 +68,13 @@
// The optional secure wsdl access
private boolean secureWSDLAccess;
- public ServerEndpointMetaData(ServiceMetaData service, Endpoint endpoint, QName
portName, QName portTypeName, Type type)
+ public ServerEndpointMetaData(ServiceMetaData service, Endpoint endpoint, QName
portName, QName portTypeName)
{
- super(service, portName, portTypeName, type);
+ super(service, portName, portTypeName);
this.endpoint = endpoint;
String configName = ConfigurationProvider.DEFAULT_ENDPOINT_CONFIG_NAME;
- String configFile;
- if (type == Type.JAXRPC)
- configFile = ConfigurationProvider.DEFAULT_JAXRPC_ENDPOINT_CONFIG_FILE;
- else
- configFile = ConfigurationProvider.DEFAULT_JAXWS_ENDPOINT_CONFIG_FILE;
+ String configFile = ConfigurationProvider.DEFAULT_JAXRPC_ENDPOINT_CONFIG_FILE;
EndpointConfigMetaData ecmd = getEndpointConfigMetaData();
ecmd.setConfigName(configName);
@@ -199,7 +195,6 @@
public String toString()
{
StringBuilder buffer = new StringBuilder("\nServerEndpointMetaData:");
- buffer.append("\n type=").append(getType());
buffer.append("\n qname=").append(getPortName());
buffer.append("\n
id=").append(getServiceEndpointID().getCanonicalName());
buffer.append("\n address=").append(getEndpointAddress());
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/WrappedParameter.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -23,8 +23,8 @@
import javax.xml.namespace.QName;
+import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.metadata.accessor.Accessor;
-import org.jboss.ws.common.JavaUtils;
/**
* WrappedParameter represents a document/literal wrapped parameter.
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,15 +22,15 @@
package org.jboss.ws.metadata.wsdl;
import java.util.Collection;
+import java.util.LinkedHashMap;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.util.LinkedHashMap;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.WSException;
/**
* A Message Reference component associates a defined type with a message
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,17 +22,17 @@
package org.jboss.ws.metadata.wsdl.xsd;
import java.io.File;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URL;
+import java.util.ResourceBundle;
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.metadata.wsdl.xmlschema.WSSchemaUtils;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -23,11 +23,11 @@
import java.util.Map;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import javax.xml.namespace.QName;
import org.apache.xerces.xs.XSModel;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLFactoryImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLFactoryImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLFactoryImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,16 +21,16 @@
*/
package org.jboss.ws.tools.wsdl;
-import com.ibm.wsdl.DefinitionImpl;
-import com.ibm.wsdl.extensions.PopulatedExtensionRegistry;
-import com.ibm.wsdl.xml.WSDLWriterImpl;
-
import javax.wsdl.Definition;
import javax.wsdl.extensions.ExtensionRegistry;
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLReader;
import javax.wsdl.xml.WSDLWriter;
+import com.ibm.wsdl.DefinitionImpl;
+import com.ibm.wsdl.extensions.PopulatedExtensionRegistry;
+import com.ibm.wsdl.xml.WSDLWriterImpl;
+
/**
* A fork of the original wsdl4j 1.6.2 package
* that delegates to the {@link JBossWSDLReaderImpl}.
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JBossWSDLReaderImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,22 +21,38 @@
*/
package org.jboss.ws.tools.wsdl;
-import com.ibm.wsdl.Constants;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import com.ibm.wsdl.extensions.schema.SchemaConstants;
-import com.ibm.wsdl.util.StringUtils;
-import com.ibm.wsdl.util.xml.DOMUtils;
-import com.ibm.wsdl.util.xml.QNameUtils;
-import com.ibm.wsdl.util.xml.XPathUtils;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.xml.sax.InputSource;
+import java.util.Vector;
-import javax.wsdl.*;
+import javax.wsdl.Binding;
+import javax.wsdl.BindingFault;
+import javax.wsdl.BindingInput;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.BindingOutput;
+import javax.wsdl.Definition;
+import javax.wsdl.Fault;
+import javax.wsdl.Import;
+import javax.wsdl.Input;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.OperationType;
+import javax.wsdl.Output;
+import javax.wsdl.Part;
+import javax.wsdl.Port;
+import javax.wsdl.PortType;
+import javax.wsdl.Service;
+import javax.wsdl.Types;
+import javax.wsdl.WSDLException;
import javax.wsdl.extensions.AttributeExtensible;
import javax.wsdl.extensions.ExtensibilityElement;
import javax.wsdl.extensions.ExtensionDeserializer;
@@ -50,10 +66,22 @@
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.*;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.xml.sax.InputSource;
+
+import com.ibm.wsdl.Constants;
+import com.ibm.wsdl.extensions.schema.SchemaConstants;
+import com.ibm.wsdl.util.StringUtils;
+import com.ibm.wsdl.util.xml.DOMUtils;
+import com.ibm.wsdl.util.xml.QNameUtils;
+import com.ibm.wsdl.util.xml.XPathUtils;
+
/**
* A WSDLReader fork of the original wsdl4j 1.6.2 package
* that delegates to the JBossWSEntityResolver in
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,16 +22,18 @@
package org.jboss.ws.tools.wsdl;
import java.io.IOException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.io.Writer;
import java.util.Iterator;
+import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.WSException;
+import org.jboss.ws.common.DOMUtils;
+import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.metadata.wsdl.DOMTypes;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLService;
@@ -39,8 +41,6 @@
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.XSModelTypes;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.DOMUtils;
-import org.jboss.ws.common.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,11 +21,12 @@
*/
package org.jboss.wsf.stack.jbws;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import java.util.ResourceBundle;
+
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.common.utils.DelegateClassLoader;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
/**
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -25,20 +25,20 @@
import java.util.LinkedList;
import java.util.List;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.ServletDelegate;
-import org.jboss.wsf.spi.management.EndpointResolver;
-import org.jboss.ws.common.injection.InjectionHelper;
-import org.jboss.ws.common.injection.PreDestroyHolder;
-import org.jboss.ws.common.servlet.AbstractEndpointServlet;
-
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.injection.InjectionHelper;
+import org.jboss.ws.common.injection.PreDestroyHolder;
+import org.jboss.ws.common.servlet.AbstractEndpointServlet;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.ServletDelegate;
+import org.jboss.wsf.spi.management.EndpointResolver;
+
/**
* A Native endpoint servlet that is installed for every web service endpoint
* @author thomas.diesler(a)jboss.com
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerFactoryImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,8 +21,8 @@
*/
package org.jboss.wsf.stack.jbws;
+import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
-import org.jboss.wsf.spi.invocation.RequestHandler;
/**
* @author Heiko.Braun(a)jboss.com
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -22,19 +22,14 @@
package org.jboss.wsf.stack.jbws;
import java.io.IOException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.ResourceBundle;
-import javax.activation.DataHandler;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
@@ -51,8 +46,11 @@
import javax.xml.ws.http.HTTPBinding;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.DOMWriter;
+import org.jboss.ws.common.IOUtils;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
@@ -63,8 +61,6 @@
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.server.MimeHeaderSource;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.server.ServletHeaderSource;
@@ -74,11 +70,7 @@
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.utils.ThreadLocalAssociation;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.DOMWriter;
-import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -246,23 +238,9 @@
if (sepMetaData == null)
throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_ENDPOINTMD"));
- Type type = sepMetaData.getType();
-
// Build the message context
- CommonMessageContext msgContext;
- if (type == EndpointMetaData.Type.JAXRPC)
- {
- msgContext = new SOAPMessageContextJAXRPC();
- invContext.addAttachment(javax.xml.rpc.handler.MessageContext.class,
msgContext);
- }
- else
- {
- msgContext = new SOAPMessageContextJAXWS();
- msgContext.put(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY,
Boolean.valueOf(false));
- msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new
HashMap<String, DataHandler>());
- msgContext.put(MessageContextJAXWS.OUTBOUND_MESSAGE_ATTACHMENTS, new
HashMap<String, DataHandler>());
- invContext.addAttachment(javax.xml.ws.handler.MessageContext.class,
msgContext);
- }
+ CommonMessageContext msgContext = new SOAPMessageContextJAXRPC();
+ invContext.addAttachment(javax.xml.rpc.handler.MessageContext.class, msgContext);
// Set servlet specific properties
HttpServletResponse httpResponse = null;
@@ -275,23 +253,9 @@
HttpServletRequest httpRequest = reqContext.getHttpServletRequest();
httpResponse = reqContext.getHttpServletResponse();
headerSource = new ServletHeaderSource(httpRequest, httpResponse);
-
- if (type == EndpointMetaData.Type.JAXRPC)
- {
- msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
- msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
- msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
- }
- else
- {
- msgContext.put(MessageContextJAXWS.HTTP_REQUEST_HEADERS,
headerSource.getHeaderMap());
- msgContext.put(MessageContextJAXWS.HTTP_REQUEST_METHOD,
httpRequest.getMethod());
- msgContext.put(MessageContextJAXWS.QUERY_STRING,
httpRequest.getQueryString());
- msgContext.put(MessageContextJAXWS.PATH_INFO, httpRequest.getPathInfo());
- msgContext.put(MessageContextJAXWS.SERVLET_CONTEXT, servletContext);
- msgContext.put(MessageContextJAXWS.SERVLET_REQUEST, httpRequest);
- msgContext.put(MessageContextJAXWS.SERVLET_RESPONSE, httpResponse);
- }
+ msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
+ msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
+ msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
}
// Associate a message context with the current thread
@@ -302,27 +266,7 @@
msgContext.setEndpointMetaData(sepMetaData);
MessageAbstraction resMessage = processRequest(endpoint, headerSource,
invContext, inStream);
CommonMessageContext reqMsgContext = msgContext;
- // Replace the message context with the response context
- msgContext = MessageContextAssociation.peekMessageContext();
- Map<String, List<String>> headers = (Map<String,
List<String>>)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_HEADERS);
- if (headers != null)
- {
- if (headerSource != null)
- {
- headerSource.setHeaderMap(headers);
- }
- }
-
- Integer code = (Integer)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_CODE);
- if (code != null)
- {
- if (httpResponse != null)
- {
- httpResponse.setStatus(code.intValue());
- }
- }
-
boolean isFault = false;
if (resMessage instanceof SOAPMessage)
{
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -23,9 +23,9 @@
import static org.jboss.ws.common.integration.WSHelper.isJaxrpcEjbEndpoint;
+import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInvokerEJB21;
-import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -23,17 +23,13 @@
import static org.jboss.ws.common.integration.WSHelper.isJaxrpcEjbDeployment;
import static org.jboss.ws.common.integration.WSHelper.isJaxrpcJseDeployment;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsEjbDeployment;
import static org.jboss.ws.common.integration.WSHelper.isJaxwsDeployment;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseDeployment;
import java.util.ResourceBundle;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
@@ -57,17 +53,6 @@
UnifiedMetaData umd = dep.getAttachment(UnifiedMetaData.class);
if (umd == null)
{
- if (isJaxwsJseDeployment(dep))
- {
- JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
- umd = builder.buildMetaData((ArchiveDeployment)dep);
- dep.addAttachment(UnifiedMetaData.class, umd);
- }
- if (isJaxwsEjbDeployment(dep))
- {
- JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
- umd = builder.buildMetaData((ArchiveDeployment)dep);
- }
if (isJaxrpcJseDeployment(dep) && !isJaxwsDeployment(dep))
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -21,12 +21,13 @@
*/
package org.jboss.wsf.stack.jbws;
-import org.jboss.wsf.spi.management.EndpointResolver;
-import org.jboss.wsf.spi.deployment.Endpoint;
+import java.util.Iterator;
import javax.management.ObjectName;
-import java.util.Iterator;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.EndpointResolver;
+
/**
* Resolves Endpoints by Servlet name and web context path.
*
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -48,7 +48,6 @@
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.common.DOMUtils;
import org.jboss.wsf.test.JBossWSTest;
@@ -180,7 +179,7 @@
*/
public void testBindRequestMessage() throws Exception
{
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = new EndpointInvocation(opMetaData);
@@ -199,7 +198,7 @@
*/
public void testBindRequestMessageWithBoundHeader() throws Exception
{
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
// Add bound header
@@ -225,7 +224,7 @@
*/
public void testBindRequestMessageWithUnboundHeader() throws Exception
{
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
// Add unbound header
@@ -252,7 +251,7 @@
*/
public void testUnbindRequestMessage() throws Exception
{
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new
ByteArrayInputStream(reqEnvelope.getBytes());
@@ -290,7 +289,7 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setSOAPMessage(reqMessage);
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
assertNotNull(epInv);
@@ -313,7 +312,7 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
msgContext.setSOAPMessage(reqMessage);
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
assertNotNull(epInv);
@@ -327,7 +326,7 @@
*/
public void testBindResponseMessage() throws Exception
{
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = new EndpointInvocation(opMetaData);
@@ -346,7 +345,7 @@
*/
public void testUnbindResponseMessage() throws Exception
{
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new
ByteArrayInputStream(resEnvelope.getBytes());
@@ -366,7 +365,7 @@
*/
public void testUnbindResponseMessageWithBoundHeader() throws Exception
{
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new
ByteArrayInputStream(resEnvelopeWithBoundHeader.getBytes());
@@ -397,7 +396,7 @@
*/
public void testUnbindResponseMessageWithUnboundHeader() throws Exception
{
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new
ByteArrayInputStream(resEnvelopeWithUnboundHeader.getBytes());
@@ -425,7 +424,7 @@
*/
public void testUnbindFaultResponse() throws Exception
{
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP12HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
ByteArrayInputStream inputStream = new
ByteArrayInputStream(resEnvelopeWithFault.getBytes());
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2012-04-03
03:41:59 UTC (rev 16080)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2012-04-03
08:54:31 UTC (rev 16081)
@@ -51,12 +51,9 @@
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.soap.attachment.MimeConstants;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.jboss.wsf.test.JBossWSTest;
/**
- * TODO
- *
* @author <a href="mailto:jason@stacksmash.com">Jason T.
Greene</a>
*/
public class GenericAttachmentTestCase extends JBossWSTest
@@ -149,7 +146,7 @@
MessageContextAssociation.pushMessageContext(messageContext);
messageContext.setOperationMetaData(opMetaData);
- CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP11HTTP_BINDING, Type.JAXRPC);
+ CommonBindingProvider bindingProvider = new
CommonBindingProvider(CommonSOAPBinding.SOAP11HTTP_BINDING);
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
EndpointInvocation epInv = new EndpointInvocation(opMetaData);