cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r529262 - in /incubator/cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/core/src/main/java/org/apache/cxf/wsdl11/ rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ tools/common/src/main/java/org/apache/cxf/...
Date Mon, 16 Apr 2007 14:24:32 GMT
Author: mmao
Date: Mon Apr 16 07:24:30 2007
New Revision: 529262

URL: http://svn.apache.org/viewvc?view=rev&rev=529262
Log:
CXF-529
 * JaxwsServiceFactoryBean support soap12

Added:
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_rpc.wsdl
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_wrapped.wsdl

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
Mon Apr 16 07:24:30 2007
@@ -23,16 +23,14 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
-
 import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
+import javax.wsdl.BindingInput;
+import javax.wsdl.BindingOutput;
 import javax.wsdl.Port;
-import javax.wsdl.extensions.soap.SOAPAddress;
-
-import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
-import com.ibm.wsdl.extensions.soap.SOAPBindingImpl;
-import com.ibm.wsdl.extensions.soap.SOAPBodyImpl;
-import com.ibm.wsdl.extensions.soap.SOAPOperationImpl;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensionRegistry;
+import javax.wsdl.factory.WSDLFactory;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
@@ -44,6 +42,9 @@
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.extensions.soap.SoapAddress;
+import org.apache.cxf.tools.common.extensions.soap.SoapBinding;
+import org.apache.cxf.tools.common.extensions.soap.SoapBody;
+import org.apache.cxf.tools.common.extensions.soap.SoapOperation;
 import org.apache.cxf.tools.util.SOAPBindingUtil;
 import org.apache.cxf.transport.AbstractTransportFactory;
 import org.apache.cxf.transport.Conduit;
@@ -70,7 +71,6 @@
         try {
             destinationFactory = bus.getExtension(DestinationFactoryManager.class)
                 .getDestinationFactory(binding.getTransportURI());
-
             return destinationFactory.getDestination(ei);
         } catch (BusException e) {
             throw new RuntimeException("Could not find destination factory for transport
"
@@ -80,45 +80,64 @@
 
     public void createPortExtensors(EndpointInfo ei, Service service) {
         SoapBindingInfo bi = (SoapBindingInfo)ei.getBinding();
-        if (bi.getSoapVersion() instanceof Soap11) {
-            createSoap11Extensors(ei, bi);
+        boolean isSoap12 = false;
+        if (bi.getSoapVersion() instanceof Soap12) {
+            isSoap12 = true;
         }
+        createSoapExtensors(ei, bi, isSoap12);
     }
 
-    private void createSoap11Extensors(EndpointInfo ei, SoapBindingInfo bi) {
-        SOAPAddress address = new SOAPAddressImpl();
-        address.setLocationURI(ei.getAddress());
-
-        ei.addExtensor(address);
-
-        SOAPBindingImpl sbind = new SOAPBindingImpl();
-        sbind.setStyle(bi.getStyle());
-        sbind.setTransportURI(bi.getTransportURI());
-        bi.addExtensor(sbind);
-
-        for (BindingOperationInfo b : bi.getOperations()) {
-            SoapOperationInfo soi = b.getExtensor(SoapOperationInfo.class);
-
-            SOAPOperationImpl op = new SOAPOperationImpl();
-            op.setSoapActionURI(soi.getAction());
-            op.setStyle(soi.getStyle());
-
-            b.addExtensor(op);
-
-            if (b.getInput() != null) {
-                SOAPBodyImpl body = new SOAPBodyImpl();
-                body.setUse("literal");
-                b.getInput().addExtensor(body);
+    private void createSoapExtensors(EndpointInfo ei, SoapBindingInfo bi, boolean isSoap12)
{
+        try {
+            // We need to populate the soap extensibilityelement proxy for soap11 and soap12
+            ExtensionRegistry extensionRegistry = WSDLFactory.newInstance().newPopulatedExtensionRegistry();
+            
+            SoapAddress soapAddress = SOAPBindingUtil.createSoapAddress(extensionRegistry,
isSoap12);
+            String address = ei.getAddress();
+            if (address == null) {
+                address = "http://localhost:9090";
             }
 
-            if (b.getOutput() != null) {
-                SOAPBodyImpl body = new SOAPBodyImpl();
-                body.setUse("literal");
-                b.getOutput().addExtensor(body);
+            soapAddress.setLocationURI(address);
+            ei.addExtensor(soapAddress);
+            
+            SoapBinding soapBinding = SOAPBindingUtil.createSoapBinding(extensionRegistry,
isSoap12);
+            soapBinding.setStyle(bi.getStyle());
+            soapBinding.setTransportURI(bi.getTransportURI());
+            bi.addExtensor(soapBinding);
+
+            for (BindingOperationInfo b : bi.getOperations()) {
+                SoapOperationInfo soi = b.getExtensor(SoapOperationInfo.class);
+                
+                SoapOperation soapOperation = SOAPBindingUtil.createSoapOperation(extensionRegistry,
+                                                                                  isSoap12);
+                soapOperation.setSoapActionURI(soi.getAction());
+                soapOperation.setStyle(soi.getStyle());
+
+                b.addExtensor(soapOperation);
+
+                if (b.getInput() != null) {
+                    SoapBody body = SOAPBindingUtil.createSoapBody(extensionRegistry,
+                                                                   BindingInput.class,
+                                                                   isSoap12);
+                    body.setUse("literal");
+                    b.getInput().addExtensor(body);
+                }
+
+                if (b.getOutput() != null) {
+                    SoapBody body = SOAPBindingUtil.createSoapBody(extensionRegistry,
+                                                                   BindingOutput.class,
+                                                                   isSoap12);
+                    body.setUse("literal");
+                    b.getOutput().addExtensor(body);
+                }
             }
+            
+        } catch (WSDLException e) {
+            e.printStackTrace();
         }
     }
-
+    
     public EndpointInfo createEndpointInfo(ServiceInfo serviceInfo, BindingInfo b, Port port)
{
         List ees = port.getExtensibilityElements();
         for (Iterator itr = ees.iterator(); itr.hasNext();) {

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/ServiceWSDLBuilder.java
Mon Apr 16 07:24:30 2007
@@ -98,6 +98,7 @@
                                                                  new SchemaSerializer());
                     
             addNamespace("wsdlsoap", "http://schemas.xmlsoap.org/wsdl/soap/");
+            addNamespace("wsdlsoap12", "http://schemas.xmlsoap.org/wsdl/soap12/");
             addNamespace("soap", "http://schemas.xmlsoap.org/soap/");
             addNamespace("xsd", "http://www.w3.org/2001/XMLSchema");
             

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
Mon Apr 16 07:24:30 2007
@@ -44,6 +44,7 @@
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.transport.DestinationFactoryManager;
+import org.apache.cxf.transport.local.LocalTransportFactory;
 import org.apache.cxf.ws.AbstractWSFeature;
 import org.apache.cxf.wsdl11.WSDLEndpointFactory;
 
@@ -163,14 +164,16 @@
         // Get the Service from the ServiceFactory if specified
         Service service = serviceFactory.getService();
 
-
         // SOAP nonsense
         BindingInfo bindingInfo = createBindingInfo();
         if (bindingInfo instanceof SoapBindingInfo) {
-            ((SoapBindingInfo) bindingInfo).setTransportURI(transportId);
+            if (((SoapBindingInfo) bindingInfo).getTransportURI() == null
+                || LocalTransportFactory.TRANSPORT_ID.equals(transportId)) {
+                ((SoapBindingInfo) bindingInfo).setTransportURI(transportId);
+            }
             transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
         }
-        
+
         service.getServiceInfos().get(0).addBinding(bindingInfo);
 
         setTransportId(transportId);

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
Mon Apr 16 07:24:30 2007
@@ -77,7 +77,11 @@
         return getClass().getResource(wsdlFile).toString();
     }
 
-    protected void assertFileEquals(String location1, String location2) {
+    protected void assertFileEquals(String f1, String f2) {
+        assertFileEquals(new File(f1), new File(f2));
+    }
+    
+    protected void assertFileEquals(File location1, File location2) {
         String str1 = getStringFromFile(location1);
         String str2 = getStringFromFile(location2);
 
@@ -94,12 +98,12 @@
         assertTrue(!st1.hasMoreTokens());
     }
 
-    private String getStringFromFile(String location) {
+    private String getStringFromFile(File location) {
         InputStream is = null;
         String result = null;
 
         try {
-            is = new FileInputStream(new File(location));
+            is = new FileInputStream(location);
             result = normalizeCRLF(is);
         } catch (Exception e) {
             e.printStackTrace();

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessor.java
Mon Apr 16 07:24:30 2007
@@ -19,11 +19,17 @@
 
 package org.apache.cxf.tools.java2wsdl.processor;
 
-import java.io.*;
+import java.io.File;
 import java.util.logging.Logger;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
+import org.apache.cxf.binding.BindingConfiguration;
+import org.apache.cxf.binding.soap.Soap11;
+import org.apache.cxf.binding.soap.Soap12;
+import org.apache.cxf.binding.soap.SoapBindingConfiguration;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.service.model.ServiceInfo;
@@ -40,7 +46,7 @@
 
 public class JavaToProcessor implements Processor {
     private static final Logger LOG = LogUtils.getL7dLogger(JavaToProcessor.class);
-    private static final String DEFAULT_BINDING_ID = "http://schemas.xmlsoap.org/soap/http";
+    //private static final String DEFAULT_TRANSPORT_ID = WSDLConstants.SOAP11_NAMESPACE;
     private static final String DEFAULT_ADDRESS = "http://localhost:9090/hello";
     private ToolContext context;
 
@@ -52,8 +58,9 @@
         //      builderFactory.setStyle(style/from/command/line);
         ServiceBuilder builder = builderFactory.newBuilder();
         builder.setAddress(DEFAULT_ADDRESS);
-        builder.setTransportId(DEFAULT_BINDING_ID);
+        builder.setTransportId(getTransportId());
         builder.setBus(getBus());
+        builder.setBindingConfig(getBindingConfig());
 
         ServiceInfo service = builder.build();
 
@@ -68,6 +75,35 @@
         generator.generate(output);
     }
 
+    protected String getTransportId() {
+        if (isSOAP12()) {
+            return WSDLConstants.SOAP12_NAMESPACE;
+        }
+        return WSDLConstants.SOAP11_NAMESPACE;
+    }
+    
+    protected BindingConfiguration getBindingConfig() {
+        SoapBindingConfiguration bindingConfig = new SoapBindingConfiguration();
+        if (isSOAP12()) {
+            bindingConfig.setVersion(Soap12.getInstance());
+            bindingConfig.setTransportURI(WSDLConstants.SOAP12_HTTP_TRANSPORT);
+        } else {
+            bindingConfig.setVersion(Soap11.getInstance());
+        }
+        return bindingConfig;
+    }
+
+    protected boolean isSOAP12() {
+        if (!this.context.optionSet(ToolConstants.CFG_SOAP12)) {
+            BindingType bType = getServiceClass().getAnnotation(BindingType.class);
+            if (bType != null) {
+                return SOAPBinding.SOAP12HTTP_BINDING.equals(bType.value());
+            }
+            return false;
+        }
+        return true;
+    }
+
     protected File getOutputFile(File nameFromClz, File defaultOutputFile) {
         File result = defaultOutputFile;
         String output = (String) context.get(ToolConstants.CFG_OUTPUTFILE);
@@ -86,7 +122,7 @@
         return result;
     }
 
-    public Class getServiceClass() {
+    public Class<?> getServiceClass() {
         return AnnotationUtil.loadClass((String)context.get(ToolConstants.CFG_CLASSNAME),
                                         getClass().getClassLoader());
     }

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
Mon Apr 16 07:24:30 2007
@@ -19,12 +19,15 @@
 
 package org.apache.cxf.tools.java2wsdl.processor;
 
-import java.io.*;
-
+import java.io.File;
 import javax.wsdl.Definition;
 import javax.wsdl.Service;
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.binding.BindingConfiguration;
+import org.apache.cxf.binding.soap.Soap11;
+import org.apache.cxf.binding.soap.Soap12;
+import org.apache.cxf.binding.soap.SoapBindingConfiguration;
 import org.apache.cxf.helpers.WSDLHelper;
 import org.apache.cxf.tools.common.ProcessorTestBase;
 import org.apache.cxf.tools.common.ToolConstants;
@@ -35,6 +38,10 @@
 public class JavaToProcessorTest extends ProcessorTestBase {
     JavaToProcessor processor = new JavaToProcessor();
     private WSDLHelper wsdlHelper = new WSDLHelper();
+
+    //     @org.junit.After
+    //     public void tearDown() {
+    //     }
         
     @Test
     public void testGetWSDLVersion() {
@@ -60,7 +67,6 @@
         assertNotNull("Generate WSDL Service Error", wsdlService);
     }
 
-
     @Test
     public void testCalculator() throws Exception {
         ToolContext context = new ToolContext();
@@ -72,5 +78,55 @@
 
         // Test for CXF-337
         // FIXME - check for existence and correctness of faults
+    }
+
+    @Test
+    public void testIsSOAP12() throws Exception {
+        ToolContext context = new ToolContext();
+        context.put(ToolConstants.CFG_CLASSNAME,
+                    "org.apache.cxf.tools.fortest.withannotation.doc.Stock12Impl");
+        processor.setEnvironment(context);
+        assertTrue(processor.isSOAP12());
+
+        context.put(ToolConstants.CFG_CLASSNAME, "org.apache.hello_world_soap12_http.Greeter");
+        assertFalse(processor.isSOAP12());
+
+        context.put(ToolConstants.CFG_SOAP12, "soap12");
+        assertTrue(processor.isSOAP12());
+    }
+
+    @Test
+    public void testGetBindingConfig() throws Exception {
+        ToolContext context = new ToolContext();
+        context.put(ToolConstants.CFG_CLASSNAME,
+                    "org.apache.cxf.tools.fortest.withannotation.doc.Stock12Impl");
+        processor.setEnvironment(context);
+        BindingConfiguration config = processor.getBindingConfig();
+        assertTrue(config instanceof SoapBindingConfiguration);
+        
+        assertTrue(((SoapBindingConfiguration)config).getVersion() instanceof Soap12);
+
+        context.put(ToolConstants.CFG_CLASSNAME, "org.apache.hello_world_soap12_http.Greeter");
+        config = processor.getBindingConfig();
+        assertTrue(((SoapBindingConfiguration)config).getVersion() instanceof Soap11);
+
+        context.put(ToolConstants.CFG_SOAP12, "soap12");
+        config = processor.getBindingConfig();
+        assertTrue(((SoapBindingConfiguration)config).getVersion() instanceof Soap12);
+    }
+
+    // FIXME CXF-534
+    @Test
+    public void testSOAP12() throws Exception {
+        ToolContext context = new ToolContext();
+        context.put(ToolConstants.CFG_CLASSNAME, "org.apache.hello_world_soap12_http.Greeter");
+        context.put(ToolConstants.CFG_SOAP12, "soap12");
+        context.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/hello_soap12.wsdl");
+        
+        processor.setEnvironment(context);
+        processor.process();
+
+        String expectedFile = getClass().getResource("expected/hello_soap12.wsdl").getFile();
+        assertFileEquals(new File(expectedFile), new File(output, "hello_soap12.wsdl"));
     }
 }

Added: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl?view=auto&rev=529262
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
(added)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/expected/hello_soap12.wsdl
Mon Apr 16 07:24:30 2007
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="GreeterService" targetNamespace="http://apache.org/hello_world_soap12_http"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://apache.org/hello_world_soap12_http"
xmlns:wsdlsoap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="http://apache.org/hello_world_soap12_http/types" xmlns:soap="http://schemas.xmlsoap.org/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://apache.org/hello_world_soap12_http/types"
version="1.0">
+<xs:element name="faultDetail">
+<xs:complexType>
+<xs:sequence>
+<xs:element form="qualified" name="minor" type="xs:short"/>
+<xs:element form="qualified" name="major" type="xs:short"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="pingMe">
+<xs:complexType/>
+</xs:element>
+<xs:element name="pingMeResponse">
+<xs:complexType/>
+</xs:element>
+<xs:element name="sayHi">
+<xs:complexType/>
+</xs:element>
+<xs:element name="sayHiResponse">
+<xs:complexType>
+<xs:sequence>
+<xs:element form="qualified" name="responseType" type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+</xs:schema>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://apache.org/hello_world_soap12_http"
attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://apache.org/hello_world_soap12_http">
+<xsd:element name="sayHi">
+<xsd:complexType>
+<xsd:sequence/>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="sayHiResponse">
+<xsd:complexType>
+<xsd:sequence>
+<xsd:element name="responseType" nillable="true" type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="pingMe">
+<xsd:complexType>
+<xsd:sequence/>
+</xsd:complexType>
+</xsd:element>
+<xsd:element name="pingMeResponse">
+<xsd:complexType>
+<xsd:sequence/>
+</xsd:complexType>
+</xsd:element>
+</xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="sayHi">
+    <wsdl:part name="sayHi" element="ns2:sayHi">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="sayHiResponse">
+    <wsdl:part name="sayHiResponse" element="ns2:sayHiResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="pingMeResponse">
+    <wsdl:part name="pingMeResponse" element="ns2:pingMeResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="pingMe">
+    <wsdl:part name="pingMe" element="ns2:pingMe">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="Greeter">
+    <wsdl:operation name="sayHi">
+      <wsdl:input name="sayHi" message="ns1:sayHi">
+    </wsdl:input>
+      <wsdl:output name="sayHiResponse" message="ns1:sayHiResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="pingMe">
+      <wsdl:input name="pingMe" message="ns1:pingMe">
+    </wsdl:input>
+      <wsdl:output name="pingMeResponse" message="ns1:pingMeResponse">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="GreeterServiceSoapBinding" type="ns1:Greeter">
+    <wsdlsoap12:binding style="document" transport="http://www.w3.org/2003/05/soap/bindings/HTTP/"/>
+    <wsdl:operation name="sayHi">
+      <wsdlsoap12:operation soapAction="" style="document"/>
+      <wsdl:input name="sayHi">
+        <wsdlsoap12:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="sayHiResponse">
+        <wsdlsoap12:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="pingMe">
+      <wsdlsoap12:operation soapAction="" style="document"/>
+      <wsdl:input name="pingMe">
+        <wsdlsoap12:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output name="pingMeResponse">
+        <wsdlsoap12:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="GreeterService">
+    <wsdl:port name="GreeterPort" binding="ns1:GreeterServiceSoapBinding">
+      <wsdlsoap12:address location="http://localhost:9090/hello"/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderNoAnnoTest.java
Mon Apr 16 07:24:30 2007
@@ -53,6 +53,7 @@
     @Test
     public void testGeneratedWithElementryClass() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.classnoanno.docbare.Stock.class);
+        builder.setAddress("http://localhost");
         ServiceInfo service =  builder.build();
         generator.setServiceModel(service);
         File output = getOutputFile("stock_noanno_bare.wsdl");
@@ -65,6 +66,7 @@
     @Test
     public void testGeneratedWithDocWrappedClass() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.classnoanno.docwrapped.Stock.class);
+        builder.setAddress("http://localhost");
         ServiceInfo service =  builder.build();
         generator.setServiceModel(service);
         File output = getOutputFile("stock_noanno_wrapped.wsdl");
@@ -84,6 +86,7 @@
     @Test
     public void testGeneratedWithRPCClass() throws Exception {
         builder.setServiceClass(org.apache.cxf.tools.fortest.classnoanno.rpc.Stock.class);
+        builder.setAddress("http://localhost");
         ServiceInfo service =  builder.build();
         generator.setServiceModel(service);
         File output = getOutputFile("stock_noanno_rpc.wsdl");

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JaxwsServiceBuilderTest.java
Mon Apr 16 07:24:30 2007
@@ -86,6 +86,7 @@
     @Test
     public void testRPCLit() throws Exception {
         builder.setServiceClass(GreeterRPCLit.class);
+        builder.setAddress("http://localhost");
         ServiceInfo service = builder.build();
 
         generator.setServiceModel(service);
@@ -104,6 +105,7 @@
     public void testDocWrapparBare() throws Exception {
 
         builder.setServiceClass(org.apache.hello_world_doc_wrapped_bare.Greeter.class);
+        builder.setAddress("http://localhost");
         ServiceInfo service = builder.build();
 
         generator.setServiceModel(service);

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_rpc.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_rpc.wsdl?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_rpc.wsdl
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_rpc.wsdl
Mon Apr 16 07:24:30 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions name="StockService" targetNamespace="http://rpc.classnoanno.fortest.tools.cxf.apache.org/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://rpc.classnoanno.fortest.tools.cxf.apache.org/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="StockService" targetNamespace="http://rpc.classnoanno.fortest.tools.cxf.apache.org/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://rpc.classnoanno.fortest.tools.cxf.apache.org/"
xmlns:wsdlsoap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:message name="getPrice">
     <wsdl:part name="arg0" type="xsd:string">
     </wsdl:part>
@@ -30,7 +30,7 @@
   </wsdl:binding>
   <wsdl:service name="StockService">
     <wsdl:port name="StockPort" binding="ns1:StockServiceSoapBinding">
-      <wsdlsoap:address/>
+      <wsdlsoap:address location="http://localhost"/>
     </wsdl:port>
   </wsdl:service>
-</wsdl:definitions>
+</wsdl:definitions>
\ No newline at end of file

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_wrapped.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_wrapped.wsdl?view=diff&rev=529262&r1=529261&r2=529262
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_wrapped.wsdl
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/stock_noanno_wrapped.wsdl
Mon Apr 16 07:24:30 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions name="StockService" targetNamespace="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions name="StockService" targetNamespace="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/"
xmlns:wsdlsoap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/"
attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://docwrapped.classnoanno.fortest.tools.cxf.apache.org/">
 <xsd:element name="getPrice">
@@ -48,7 +48,7 @@
   </wsdl:binding>
   <wsdl:service name="StockService">
     <wsdl:port name="StockPort" binding="ns1:StockServiceSoapBinding">
-      <wsdlsoap:address/>
+      <wsdlsoap:address location="http://localhost"/>
     </wsdl:port>
   </wsdl:service>
-</wsdl:definitions>
+</wsdl:definitions>
\ No newline at end of file



Mime
View raw message