You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2007/03/29 01:37:29 UTC

svn commit: r523508 - in /incubator/servicemix/trunk: ./ core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/ deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/ samples/wsdl-first/wsdl-first-htt...

Author: gnodet
Date: Wed Mar 28 16:37:28 2007
New Revision: 523508

URL: http://svn.apache.org/viewvc?view=rev&rev=523508
Log:
SM-901: Upgrade to xfire 1.2.5

Modified:
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/ServiceFactoryHelper.java
    incubator/servicemix/trunk/pom.xml
    incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-http-su/src/main/resources/xbean.xml
    incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
    incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml
    incubator/servicemix/trunk/tooling/xfire-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/xfire/WsdlgenMojo.java

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java?view=diff&rev=523508&r1=523507&r2=523508
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/DOMStreamReader.java Wed Mar 28 16:37:28 2007
@@ -45,7 +45,7 @@
 
     private ElementFrame frame;
 
-    private int currentEvent = XMLStreamConstants.START_DOCUMENT;
+    protected int currentEvent = XMLStreamConstants.START_DOCUMENT;
 
     /**
      *     

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java?view=diff&rev=523508&r1=523507&r2=523508
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/W3CDOMStreamReader.java Wed Mar 28 16:37:28 2007
@@ -145,7 +145,12 @@
     }
 
     public String getElementText() throws XMLStreamException {
-        return getText();
+        getCurrentFrame().ended = true;
+        currentEvent = END_ELEMENT;
+        endElement();
+        String result = getContent(getCurrentElement());
+        // we should not return null according to the StAx API javadoc
+        return result != null ? result : "";
     }
 
     public String getNamespaceURI(String prefix) {
@@ -164,10 +169,14 @@
     }
 
     public String getAttributeValue(String ns, String local) {
+        Attr attr;
         if (ns == null || ns.equals(""))
-            return getCurrentElement().getAttribute(local);
+            attr = getCurrentElement().getAttributeNode(local);
         else
-            return getCurrentElement().getAttributeNS(ns, local);
+            attr = getCurrentElement().getAttributeNodeNS(ns, local);
+        if (attr != null)
+            return attr.getValue();
+        return null;
     }
 
     public int getAttributeCount() {
@@ -306,4 +315,31 @@
     public String getPIData() {
         throw new UnsupportedOperationException();
     }
+
+    /**
+     * Get the trimed text content of a node or null if there is no text
+     */
+    public static String getContent(Node n) {
+        if (n == null)
+            return null;
+        Node n1 = getChild(n, Node.TEXT_NODE);
+        if (n1 == null)
+            return null;
+        String s1 = n1.getNodeValue();
+        return s1.trim();
+    }
+
+    /**
+     * Get the first direct child with a given type
+     */
+    public static Node getChild(Node parent, int type) {
+        Node n = parent.getFirstChild();
+        while (n != null && type != n.getNodeType()) {
+            n = n.getNextSibling();
+        }
+        if (n == null)
+            return null;
+        return n;
+    }
+
 }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java?view=diff&rev=523508&r1=523507&r2=523508
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java Wed Mar 28 16:37:28 2007
@@ -40,12 +40,12 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.servicemix.jsr181.xfire.ServiceFactoryHelper.FixedJAXWSServiceFactory;
 import org.codehaus.xfire.XFire;
 import org.codehaus.xfire.annotations.AnnotationServiceFactory;
 import org.codehaus.xfire.client.Client;
 import org.codehaus.xfire.client.XFireProxyFactory;
 import org.codehaus.xfire.fault.XFireFault;
+import org.codehaus.xfire.jaxws.JAXWSServiceFactory;
 import org.codehaus.xfire.service.OperationInfo;
 import org.codehaus.xfire.service.Service;
 import org.codehaus.xfire.service.ServiceFactory;
@@ -138,7 +138,7 @@
             ServiceFactory factory = ServiceFactoryHelper.findServiceFactory(xfire, serviceClass, null, null);
             Service service = factory.create(serviceClass, props);
             JBIClient client;
-            if (factory instanceof FixedJAXWSServiceFactory) {
+            if (factory instanceof JAXWSServiceFactory) {
                 client = new JAXWSJBIClient(xfire, service);
             } else {
                 client = new JBIClient(xfire, service);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/ServiceFactoryHelper.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/ServiceFactoryHelper.java?view=diff&rev=523508&r1=523507&r2=523508
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/ServiceFactoryHelper.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/ServiceFactoryHelper.java Wed Mar 28 16:37:28 2007
@@ -16,61 +16,19 @@
  */
 package org.apache.servicemix.jsr181.xfire;
 
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 
-import javax.jws.WebMethod;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-import javax.xml.ws.WebFault;
-
-import org.codehaus.xfire.MessageContext;
 import org.codehaus.xfire.XFire;
-import org.codehaus.xfire.XFireRuntimeException;
 import org.codehaus.xfire.aegis.AegisBindingProvider;
-import org.codehaus.xfire.aegis.stax.ElementReader;
-import org.codehaus.xfire.aegis.stax.ElementWriter;
 import org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry;
-import org.codehaus.xfire.aegis.type.Type;
 import org.codehaus.xfire.aegis.type.TypeMappingRegistry;
 import org.codehaus.xfire.annotations.AnnotationServiceFactory;
 import org.codehaus.xfire.annotations.WebAnnotations;
 import org.codehaus.xfire.annotations.commons.CommonsWebAttributes;
-import org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations;
-import org.codehaus.xfire.exchange.InMessage;
-import org.codehaus.xfire.exchange.MessageSerializer;
-import org.codehaus.xfire.exchange.OutMessage;
-import org.codehaus.xfire.fault.FaultSender;
-import org.codehaus.xfire.fault.XFireFault;
-import org.codehaus.xfire.handler.OutMessageSender;
-import org.codehaus.xfire.jaxb2.JaxbType;
-import org.codehaus.xfire.jaxws.handler.WebFaultHandler;
-import org.codehaus.xfire.jaxws.type.JAXWSTypeRegistry;
-import org.codehaus.xfire.service.FaultInfo;
-import org.codehaus.xfire.service.OperationInfo;
-import org.codehaus.xfire.service.Service;
-import org.codehaus.xfire.service.ServiceInfo;
-import org.codehaus.xfire.service.binding.AbstractBinding;
+import org.codehaus.xfire.jaxws.JAXWSServiceFactory;
 import org.codehaus.xfire.service.binding.ObjectServiceFactory;
-import org.codehaus.xfire.service.binding.PostInvocationHandler;
-import org.codehaus.xfire.service.binding.ServiceInvocationHandler;
-import org.codehaus.xfire.soap.AbstractSoapBinding;
-import org.codehaus.xfire.transport.TransportManager;
-import org.codehaus.xfire.util.ClassLoaderUtils;
-import org.codehaus.xfire.util.STAXUtils;
-import org.codehaus.xfire.util.stax.DepthXMLStreamReader;
 import org.codehaus.xfire.xmlbeans.XmlBeansTypeRegistry;
 
 public class ServiceFactoryHelper {
@@ -161,7 +119,7 @@
         } else if (selectedAnnotations.equals(AN_JAVA5) && 
                    selectedTypeMapping.equals(TM_JAXB2)) {
             try {
-                factory = new FixedJAXWSServiceFactory(xfire.getTransportManager());
+                factory = new JAXWSServiceFactory(xfire.getTransportManager());
             } catch (Exception e) {
                 factory = new AnnotationServiceFactory(wa, 
                         xfire.getTransportManager(), 
@@ -178,386 +136,5 @@
         factory.getSoap11Transports().add(JbiTransport.JBI_BINDING);
         return factory;
     }
-    
-    public static class FixedJAXWSServiceFactory extends AnnotationServiceFactory {
-        public FixedJAXWSServiceFactory(TransportManager transportManager) {
-            super(new Jsr181WebAnnotations(), 
-                  transportManager, 
-                  new AegisBindingProvider(new JAXWSTypeRegistry()));
-        }
-        protected void registerHandlers(Service service)
-        {
-            service.addInHandler(new ServiceInvocationHandler());
-            service.addInHandler(new PostInvocationHandler());
-            service.addOutHandler(new OutMessageSender());
-            service.addFaultHandler(new FaultSender());
-            service.addFaultHandler(new WebFaultHandler());
-        }
-        public String getOperationName(ServiceInfo service, Method method) {
-            Annotation[] annotations = method.getAnnotations();
-            for (int i = 0; i < annotations.length; i++) {
-                if (annotations[i] instanceof WebMethod) {
-                    if (((WebMethod) annotations[i]).operationName() != null &&
-                        ((WebMethod) annotations[i]).operationName().length() > 0) {
-                        return ((WebMethod) annotations[i]).operationName();
-                    }
-                }
-            }
-            return super.getOperationName(service, method);
-        }        
-        @Override
-        protected OperationInfo addOperation(Service endpoint, Method method, String style)
-        {
-            OperationInfo op = super.addOperation(endpoint, method, style);
-            
-            return op;
-        }
-
-        @Override
-        protected FaultInfo addFault(Service service, OperationInfo op, Class exClazz)
-        {
-            FaultInfo info = super.addFault(service, op, exClazz);
-            
-            return info;
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        protected boolean isFaultInfoClass(Class exClass) 
-        {
-            return exClass.isAnnotationPresent(WebFault.class);
-        }
-
-        @SuppressWarnings("unchecked")
-        @Override
-        protected QName getFaultName(Service service, OperationInfo o, Class exClass, Class beanClass)
-        {
-            WebFault webFault = (WebFault) exClass.getAnnotation(WebFault.class);
-            
-            if (webFault == null || webFault.name().equals(""))
-                return super.getFaultName(service, o, exClass, beanClass);
-
-            String ns = webFault.targetNamespace();
-            if (ns == null) ns = service.getTargetNamespace();
-            
-            return new QName(ns, webFault.name());
-        }
-
-        protected MessageSerializer getSerializer(AbstractSoapBinding binding)
-        {
-           return new FixedJAXWSBinding(super.getSerializer(binding));
-        }
-
-        public void createBindingOperation(Service service, AbstractSoapBinding binding, OperationInfo op)
-        {
-            super.createBindingOperation(service, binding, op);
-            binding.setSerializer(op, new FixedJAXWSOperationBinding(op, super.getSerializer(binding)));
-        }
-        @Override
-        protected QName createInputMessageName(OperationInfo op)
-        {
-            if (op.getMethod().isAnnotationPresent(RequestWrapper.class))
-            {
-                RequestWrapper wrapper = op.getMethod().getAnnotation(RequestWrapper.class);
-                
-                String ns = wrapper.targetNamespace();
-                if (ns.length() == 0) ns = op.getService().getPortType().getNamespaceURI();
-
-                String name = wrapper.localName();
-                if (name.length() == 0) name = op.getName();
-                
-                return new QName(ns, name);
-            }
-            
-            return super.createInputMessageName(op);
-        }
-
-        @Override
-        protected QName createOutputMessageName(OperationInfo op)
-        {
-            if (op.getMethod().isAnnotationPresent(ResponseWrapper.class))
-            {
-                ResponseWrapper wrapper = op.getMethod().getAnnotation(ResponseWrapper.class);
-                
-                String ns = wrapper.targetNamespace();
-                if (ns.length() == 0) ns = op.getService().getPortType().getNamespaceURI();
-
-                String name = wrapper.localName();
-                if (name.length() == 0) name = op.getName();
-                
-                return new QName(ns, name);
-            }
-            
-            return super.createOutputMessageName(op);
-        }
-    }
-    
-    public static class FixedJAXWSOperationBinding implements MessageSerializer {
-        private MessageSerializer delegate;
-
-        private boolean processInput = false;
-        private List inputPDs = new ArrayList();
-        private Class inputClass;
-        
-        private boolean processOutput = false;
-        private List outputPDs = new ArrayList();
-        private Class outputClass;
-        
-        public FixedJAXWSOperationBinding(OperationInfo op, MessageSerializer delegate) {
-            this.delegate = delegate;
-            
-            Method declared = op.getMethod();
-            if (declared.isAnnotationPresent(RequestWrapper.class))
-            {
-                this.processInput = true;
-                RequestWrapper wrapper = op.getMethod().getAnnotation(RequestWrapper.class);
-                
-                try
-                {
-                    inputClass = ClassLoaderUtils.loadClass(wrapper.className(), getClass());
-                    String[] inputOrder = ((XmlType) inputClass.getAnnotation(XmlType.class)).propOrder();
-                    BeanInfo inputBeanInfo = Introspector.getBeanInfo(inputClass);
-                    
-                    PropertyDescriptor[] pds = inputBeanInfo.getPropertyDescriptors();
-                    for (int i = 0; i < inputOrder.length; i++)
-                    {
-                        inputPDs.add(getPropertyDescriptor(pds, inputOrder[i]));
-                    }
-                }
-                catch (ClassNotFoundException e)
-                {
-                    throw new XFireRuntimeException("Could not load request class for operation " + op.getName(), e);
-                }
-                catch (IntrospectionException e)
-                {
-                    throw new XFireRuntimeException("Could introspect request class for operation " + op.getName(), e);
-                }
-            }
-            
-            if (declared.isAnnotationPresent(ResponseWrapper.class))
-            {
-                this.processOutput = true;
-                ResponseWrapper wrapper = op.getMethod().getAnnotation(ResponseWrapper.class);
-
-                try
-                {
-                    outputClass = ClassLoaderUtils.loadClass(wrapper.className(), getClass());
-                    String[] outputOrder = ((XmlType) outputClass.getAnnotation(XmlType.class)).propOrder();
-                    BeanInfo outputBeanInfo = Introspector.getBeanInfo(outputClass);
-                    
-                    PropertyDescriptor[] pds = outputBeanInfo.getPropertyDescriptors();
-                    for (int i = 0; i < outputOrder.length; i++)
-                    {
-                        outputPDs.add(getPropertyDescriptor(pds, outputOrder[i]));
-                    }
-                }
-                catch (ClassNotFoundException e)
-                {
-                    throw new XFireRuntimeException("Could not load response class for operation " + op.getName(), e);
-                }
-                catch (IntrospectionException e)
-                {
-                    throw new XFireRuntimeException("Could introspect response class for operation " + op.getName(), e);
-                }
-            }
-        }
-
-        protected PropertyDescriptor getPropertyDescriptor(PropertyDescriptor[] descriptors, String name)
-        {
-            for (int i = 0; i < descriptors.length; i++)
-            {
-                if (descriptors[i].getName().equals(name))
-                    return descriptors[i];
-            }
-            
-            return null;
-        }
-        
-        public void readMessage(InMessage message, MessageContext context)
-            throws XFireFault
-        {
-            if (AbstractBinding.isClientModeOn(context)) {
-                if (processOutput) {
-                    Service service = context.getService();
-                    AegisBindingProvider provider = (AegisBindingProvider) service.getBindingProvider();
-                    Type type = provider.getType(service, outputClass);
-                    Object in = type.readObject(new ElementReader(message.getXMLStreamReader()), context);
-                    List<Object> parameters = new ArrayList<Object>();
-                    for (Iterator itr = outputPDs.iterator(); itr.hasNext();) {
-                        PropertyDescriptor pd = (PropertyDescriptor) itr.next();
-                        try {
-                            Object val = getReadMethod(outputClass, pd).invoke(in, new Object[] {});
-                            parameters.add(val);
-                        } catch (Exception e) {
-                            throw new XFireRuntimeException("Couldn't read property " + pd.getName(), e);
-                        }
-                    }
-                    message.setBody(parameters);
-                } else {
-                    delegate.readMessage(message, context);
-                }
-            } else {
-                if (processInput) {
-                    Service service = context.getService();
-                    AegisBindingProvider provider = (AegisBindingProvider) service.getBindingProvider();
-                    Type type = provider.getType(service, inputClass);
-                    Object in = type.readObject(new ElementReader(message.getXMLStreamReader()), context);
-                    List<Object> parameters = new ArrayList<Object>();
-                    for (Iterator itr = inputPDs.iterator(); itr.hasNext();) {
-                        PropertyDescriptor pd = (PropertyDescriptor) itr.next();
-                        try {
-                            Object val = getReadMethod(inputClass, pd).invoke(in, new Object[] {});
-                            parameters.add(val);
-                        } catch (Exception e) {
-                            throw new XFireRuntimeException("Couldn't read property " + pd.getName(), e);
-                        }
-                    }
-                    message.setBody(parameters);
-                } else {
-                    delegate.readMessage(message, context);
-                }
-            }
-        }
-
-        public void writeMessage(OutMessage message, XMLStreamWriter writer, MessageContext context)
-            throws XFireFault
-        {
-            if (processOutput)
-            {
-                Object[] params = (Object[]) message.getBody();
-                
-                Service service = context.getService();
-                AegisBindingProvider provider = (AegisBindingProvider) service.getBindingProvider();
-                
-                Type type = provider.getType(service, outputClass);
-
-                Object out;
-                try
-                {
-                    out = outputClass.newInstance();
-                }
-                catch (Exception e)
-                {
-                    throw new XFireRuntimeException("Could not instantiate resposne class " + outputClass.getName(), e);
-                }
-                
-                for (int i = 0; i < outputPDs.size(); i++)
-                {
-                    PropertyDescriptor pd = (PropertyDescriptor) outputPDs.get(i);
-                    Object val = params[i];
-                    
-                    if (val == null) continue;
-                    
-                    try
-                    {
-                        getWriteMethod(pd).invoke(out, new Object[] {val});
-                    }
-                    catch (Exception e)
-                    {
-                        throw new XFireRuntimeException("Couldn't read property " + pd.getName(), e);
-                    }
-                }
-                ((JaxbType) type).writeObject(out, new ElementWriter(writer), context);
-            }
-            else
-            {
-                delegate.writeMessage(message, writer, context);
-            }
-        }
-        
-        protected Method getReadMethod(Class clazz, PropertyDescriptor pd) 
-        {
-            Method mth = pd.getReadMethod();
-            if (mth == null && pd.getPropertyType() == Boolean.class) {
-                String name = pd.getName();
-                name = name.substring(0, 1).toUpperCase() + name.substring(1);
-                name = "is" + name;
-                try 
-                {
-                    mth = clazz.getMethod(name, new Class[0]);
-                    if (mth != null) {
-                        pd.setReadMethod(mth);
-                    }
-                } 
-                catch (IntrospectionException e) 
-                {
-                    // do nothing
-                }
-                catch (NoSuchMethodException e) 
-                {
-                    // do nothing
-                }
-            }
-            return mth;
-        }
-        
-        protected Method getWriteMethod(PropertyDescriptor pd) 
-        {
-            return pd.getWriteMethod();
-        }
-    }
-    
-    public static class FixedJAXWSBinding 
-    extends AbstractBinding
-    implements MessageSerializer
-{
-    private MessageSerializer delegate;
-    private Map<OperationInfo, FixedJAXWSOperationBinding> op2Binding = 
-        new HashMap<OperationInfo, FixedJAXWSOperationBinding>();
-    
-    public FixedJAXWSBinding(MessageSerializer delegate)
-    {
-        super();
-
-        this.delegate = delegate;
-    }
-
-    public void readMessage(InMessage message, MessageContext context)
-        throws XFireFault
-    {
-        Service endpoint = context.getService();
-        
-        DepthXMLStreamReader dr = new DepthXMLStreamReader(context.getInMessage().getXMLStreamReader());
-
-        if ( !STAXUtils.toNextElement(dr) )
-            throw new XFireFault("There must be a method name element.", XFireFault.SENDER);
-        
-        OperationInfo op = context.getExchange().getOperation();
-
-        if (!isClientModeOn(context) && op == null)
-        {
-            op = endpoint.getServiceInfo().getOperation( dr.getLocalName() );
-
-            if (op != null)
-            {
-                setOperation(op, context);
-    
-                FixedJAXWSOperationBinding opBinding = getOperationBinding(op);
-                opBinding.readMessage(message, context);
-                return;
-            }
-        }
-
-        delegate.readMessage(message, context);
-    }
-
-    private FixedJAXWSOperationBinding getOperationBinding(OperationInfo op)
-    {
-        FixedJAXWSOperationBinding opBinding = (FixedJAXWSOperationBinding) op2Binding.get(op);
-        if (opBinding == null)
-        {
-            opBinding = new FixedJAXWSOperationBinding(op, delegate);
-            op2Binding.put(op, opBinding);
-        }
-        return opBinding;
-    }
-
-    public void writeMessage(OutMessage message, XMLStreamWriter writer, MessageContext context)
-        throws XFireFault
-    {
-        OperationInfo op = context.getExchange().getOperation();
-        
-    }
-}
 
 }

Modified: incubator/servicemix/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/pom.xml?view=diff&rev=523508&r1=523507&r2=523508
==============================================================================
--- incubator/servicemix/trunk/pom.xml (original)
+++ incubator/servicemix/trunk/pom.xml Wed Mar 28 16:37:28 2007
@@ -194,7 +194,7 @@
 
     <properties>
         <xfire-jsr181-api-version>1.0-M1</xfire-jsr181-api-version>
-        <xfire-version>1.2.2</xfire-version>
+        <xfire-version>1.2.5</xfire-version>
         <mavenAssemblyPluginVersion>2.1</mavenAssemblyPluginVersion>
         <xbean-version>3.0-SNAPSHOT</xbean-version>
         <spring-version>2.0.1</spring-version>

Modified: incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-http-su/src/main/resources/xbean.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-http-su/src/main/resources/xbean.xml?view=diff&rev=523508&r1=523507&r2=523508
==============================================================================
--- incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-http-su/src/main/resources/xbean.xml (original)
+++ incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-http-su/src/main/resources/xbean.xml Wed Mar 28 16:37:28 2007
@@ -22,10 +22,9 @@
 
   <http:endpoint service="person:PersonService"
                  endpoint="soap"
+                 targetService="person:PersonService"
                  role="consumer" 
                  locationURI="http://0.0.0.0:8192/PersonService/"
-                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
-                 soap="true" 
-                 soapAction="getPerson"/>             
+                 soap="true" />
 
 </beans>

Modified: incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java?view=diff&rev=523508&r1=523507&r2=523508
==============================================================================
--- incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java (original)
+++ incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java Wed Mar 28 16:37:28 2007
@@ -17,25 +17,25 @@
 package org.apache.servicemix.samples.wsdl_first;
 
 import javax.jws.WebService;
+import javax.xml.ws.Holder;
 
 import org.apache.servicemix.samples.wsdl_first.types.GetPerson;
 import org.apache.servicemix.samples.wsdl_first.types.GetPersonResponse;
 
-@WebService
+@WebService(serviceName = "PersonService", targetNamespace = "http://servicemix.apache.org/samples/wsdl-first", endpointInterface = "org.apache.servicemix.samples.wsdl_first.Person")
 public class PersonImpl implements Person {
 
-    public GetPersonResponse getPerson(GetPerson payload) throws UnknownPersonFault {
-        String personId = payload.getPersonId();
+    public String getPerson(String personId, Holder<String> ssn, Holder<String> name)
+        throws UnknownPersonFault
+    {
         if (personId == null || personId.length() == 0) {
             org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault fault = new org.apache.servicemix.samples.wsdl_first.types.UnknownPersonFault();
             fault.setPersonId(personId);
             throw new UnknownPersonFault(null, fault);
         }
-        GetPersonResponse response = new GetPersonResponse();
-        response.setPersonId(payload.getPersonId());
-        response.setName("Guillaume");
-        response.setSsn("000-000-0000");
-        return response;
+        name.value = "Guillaume";
+        ssn.value = "000-000-0000";
+        return personId;
     }
 
 }

Modified: incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml?view=diff&rev=523508&r1=523507&r2=523508
==============================================================================
--- incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml (original)
+++ incubator/servicemix/trunk/samples/wsdl-first/wsdl-first-jsr181-su/src/main/resources/xbean.xml Wed Mar 28 16:37:28 2007
@@ -19,8 +19,6 @@
 -->
 <beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0">
 
-    <jsr181:endpoint pojoClass="org.apache.servicemix.samples.wsdl_first.PersonImpl"
-                     wsdlResource="classpath:person.wsdl"
-                     style="document" />
+    <jsr181:endpoint pojoClass="org.apache.servicemix.samples.wsdl_first.PersonImpl" />
 
 </beans>

Modified: incubator/servicemix/trunk/tooling/xfire-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/xfire/WsdlgenMojo.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/xfire-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/xfire/WsdlgenMojo.java?view=diff&rev=523508&r1=523507&r2=523508
==============================================================================
--- incubator/servicemix/trunk/tooling/xfire-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/xfire/WsdlgenMojo.java (original)
+++ incubator/servicemix/trunk/tooling/xfire-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/xfire/WsdlgenMojo.java Wed Mar 28 16:37:28 2007
@@ -180,6 +180,8 @@
         }
 
         URLClassLoader cl = new URLClassLoader(urls, parent);
+        ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
+        Thread.currentThread().setContextClassLoader(cl);
 
         // displayClasspath(cl, "using classpath");
         // load("javax.servlet.ServletException", cl);
@@ -187,8 +189,6 @@
 
         final WsdlGenTask task = new WsdlGenTask();
 
-        task.setOverridingContextClassLoader(cl);
-
         task.setProject( antProject );
 
         task.setOutputDirectory( outputDirectory.getAbsolutePath() );
@@ -216,6 +216,7 @@
 
             getLog().debug( "generated " + task.getGeneratedFile());
         }
+        Thread.currentThread().setContextClassLoader(oldCl);
 
         getLog().debug( "Adding outputDirectory as Project's resource.");
         Resource resource = new Resource();