You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2008/09/10 12:16:07 UTC

svn commit: r693770 - in /tuscany/branches/sca-java-1.3.2: itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/ itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/im...

Author: slaws
Date: Wed Sep 10 03:16:04 2008
New Revision: 693770

URL: http://svn.apache.org/viewvc?rev=693770&view=rev
Log:
TUSCANY-2398 doc/lit/bare wsdl on service and interface.java on reference

Added:
    tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java   (with props)
    tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java   (with props)
    tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java   (with props)
    tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java   (with props)
    tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl   (with props)
    tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite   (with props)
    tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java   (with props)
Modified:
    tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
    tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java
    tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java
    tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java
    tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java
    tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java

Added: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java?rev=693770&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java (added)
+++ tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java Wed Sep 10 03:16:04 2008
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for AClientService.
+ */
+@Remotable
+public interface AClientService {
+    public String getGreetingsForward(String name);
+}

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java?rev=693770&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java (added)
+++ tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java Wed Sep 10 03:16:04 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import javax.jws.soap.SOAPBinding;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for AService.
+ */
+@Remotable
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface AService {
+    public String getGreetings(String name);
+}

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java?rev=693770&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java (added)
+++ tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java Wed Sep 10 03:16:04 2008
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.AClientService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.AService;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements AService.
+ */
+@Service(AClientService.class)
+public class AClientServiceImpl implements AClientService {
+
+    @Reference
+    protected AService aService;
+    
+    public String getGreetingsForward(String name) {
+        return aService.getGreetings(name);
+    }
+}

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java?rev=693770&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java (added)
+++ tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java Wed Sep 10 03:16:04 2008
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.AService;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements AService.
+ */
+@Service(AService.class)
+public class AServiceImpl implements AService {
+
+    public String getGreetings(String name) {
+        return "Hello " + name;
+    }
+}

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl?rev=693770&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl (added)
+++ tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl Wed Sep 10 03:16:04 2008
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    *
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.
+-->
+<wsdl:definitions targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org"
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+                  xmlns:ns0="http://jaxb.databindings.itest.sca.tuscany.apache.org"
+                  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+                  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+                  xmlns:ns1="http://org.apache.axis2/xsd"
+                  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+                  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org" xmlns:ns="http://jaxb.databindings.itest.sca.tuscany.apache.org">
+            <xs:element name="getGreetings" nillable="true" type="xs:string"/>
+            <xs:element name="getGreetingsResponse" nillable="true" type="xs:string"/>
+    </xs:schema>
+  </wsdl:types>
+
+  <wsdl:message name="getGreetingsRequest">
+    <wsdl:part name="parameters" element="ns0:getGreetings"/>
+  </wsdl:message>
+
+  <wsdl:message name="getGreetingsResponse">
+    <wsdl:part name="parameters" element="ns0:getGreetingsResponse"/>
+  </wsdl:message>
+
+  <wsdl:portType name="AServicePortType">
+    <wsdl:operation name="getGreetings">
+      <wsdl:input message="ns0:getGreetingsRequest" wsaw:Action="urn:getGreetings"/>
+      <wsdl:output message="ns0:getGreetingsResponse" wsaw:Action="urn:getGreetingsResponse"/>
+    </wsdl:operation>
+  </wsdl:portType>
+
+  <wsdl:binding name="AServiceSOAP12Binding" type="ns0:AServicePortType">
+    <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <wsdl:operation name="getGreetings">
+      <soap12:operation soapAction="urn:getGreetings" style="document"/>
+      <wsdl:input>
+        <soap12:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap12:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+
+  <wsdl:binding name="AServicePortTypeBinding" type="ns0:AServicePortType">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <wsdl:operation name="getGreetings">
+      <soap:operation soapAction=""/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+
+  <wsdl:binding name="AServiceHttpBinding" type="ns0:AServicePortType">
+    <http:binding verb="POST"/>
+    <wsdl:operation name="getGreetings">
+      <http:operation location="AService/getGreetings"/>
+      <wsdl:input>
+        <mime:content part="getGreetings" type="text/xml"/>
+      </wsdl:input>
+      <wsdl:output>
+        <mime:content part="getGreetings" type="text/xml"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+
+  <wsdl:binding name="AServiceSOAP11Binding" type="ns0:AServicePortType">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+    <wsdl:operation name="getGreetings">
+      <soap:operation soapAction="urn:getGreetings" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+
+  <wsdl:service name="AServicePortTypeService">
+    <wsdl:port name="AServicePortTypePort" binding="ns0:AServicePortTypeBinding">
+      <soap:address location="http://localhost:8080/AService"/>
+    </wsdl:port>
+  </wsdl:service>
+
+  <wsdl:service name="AService">
+    <wsdl:port name="AServiceHttpport" binding="ns0:AServiceHttpBinding">
+      <http:address location="http://localhost:8080/AService/httpport"/>
+    </wsdl:port>
+    <wsdl:port name="AServiceSOAP12port_http" binding="ns0:AServiceSOAP12Binding">
+      <soap12:address location="http://localhost:8080/AService/soap12port"/>
+    </wsdl:port>
+    <wsdl:port name="AServiceSOAP11port_http" binding="ns0:AServiceSOAP11Binding">
+      <soap:address location="http://localhost:8080/AService/soap11port"/>
+    </wsdl:port>
+    <wsdl:port name="AServiceSOAP12port_http_null" binding="ns0:AServiceSOAP12Binding">
+      <soap12:address location=""/>
+    </wsdl:port>
+    <wsdl:port name="AServiceSOAP12port_http_wsdl" binding="ns0:AServiceSOAP12Binding">
+      <soap12:address location="inWsdl"/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite?rev=693770&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite (added)
+++ tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite Wed Sep 10 03:16:04 2008
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://itest" name="doclitbarewsdltest">
+          
+    <component name="AComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.AServiceImpl"/>
+        <service name="AService">
+            <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org#wsdl.interface(AServicePortType)"/>
+            <binding.ws uri="http://localhost:8085/AService/endpointref"/>
+        </service>
+    </component>
+    <component name="AClientComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.AClientServiceImpl"/>
+        <reference name="aService">
+            <!--interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org#wsdl.interface(AServicePortType)"/-->
+            <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.AService"/>
+            <binding.ws uri="http://localhost:8085/AService/endpointref"/>
+        </reference>
+    </component>
+</composite>

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java?rev=693770&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java (added)
+++ tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java Wed Sep 10 03:16:04 2008
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DocLitBareWsdlTestCase {
+
+    private static SCADomain domain;
+
+    /**
+     * Runs once before running the tests
+     */
+    @BeforeClass
+    public static void setUp() throws Exception {
+        try {
+            domain = SCADomain.newInstance("doclitbarewsdl.composite");
+        } catch (Throwable e) {
+            // @Ignore("TUSCANY-2398")
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * Runs once after running the tests
+     */
+    @AfterClass
+    public static void tearDown() {
+        if (domain != null) {
+            domain.close();
+        }
+    }
+
+    // @Ignore("TUSCANY-2398")
+    @Test
+    public void testDocLitBareWsdl() throws Exception {
+        AClientService client = domain.getService(AClientService.class, "AClientComponent");
+        String name = "Pandu";
+        String resp = client.getGreetingsForward(name);
+        Assert.assertEquals("Hello " + name, resp);
+    }
+}

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3.2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java?rev=693770&r1=693769&r2=693770&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java (original)
+++ tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java Wed Sep 10 03:16:04 2008
@@ -236,6 +236,10 @@
             javax.wsdl.Operation operation = generateOperation(definition, op, helpers, wrappers);
             portType.addOperation(operation);
             String action = ((JavaOperation)op).getAction();
+            if ((action == null || "".equals(action)) && !op.isWrapperStyle() && op.getWrapper() == null) {
+                // Bare style
+                action = "urn:" + op.getName();
+            }
             BindingOperation bindingOp = definitionGenerator.createBindingOperation(definition, operation, action);
             binding.addBindingOperation(bindingOp);
         }
@@ -307,7 +311,25 @@
                 if (entry.getValue().size() == 1 && entry.getValue().get(0).getQName() == null) {
                     // special case for global fault element
                     QName typeName = entry.getValue().get(0).getType().getQName();
-                    wrapper.setAttribute("type", typeName.getLocalPart());
+                    String nsURI = typeName.getNamespaceURI();
+                    if ("".equals(nsURI)) {
+                        wrapper.setAttribute("type", typeName.getLocalPart());
+                        addSchemaImport(schema, "", schemaDoc);
+                    } else if (targetNS.equals(nsURI)) {
+                        wrapper.setAttribute("type", typeName.getLocalPart());
+                    } else if (SCHEMA_NS.equals(nsURI)) {
+                        wrapper.setAttribute("type", "xs:" + typeName.getLocalPart());
+                    } else {
+                        Map<String, String> prefixMap = prefixMaps.get(schema);
+                        String prefix = prefixMap.get(nsURI);
+                        if (prefix == null) {
+                            prefix = "ns" + i++;
+                            prefixMap.put(nsURI, prefix);
+                            schema.setAttributeNS(XMLNS_NS, "xmlns:" + prefix, nsURI);
+                            addSchemaImport(schema, nsURI, schemaDoc);
+                        }
+                        wrapper.setAttribute("type", prefix + ":" + typeName.getLocalPart());
+                    }                    
                 } else {
                     // normal wrapper containing type definition inline
                     Element complexType = schemaDoc.createElementNS(SCHEMA_NS, "xs:complexType");
@@ -496,6 +518,7 @@
         inputMsg.setUndefined(false);
         definition.addMessage(inputMsg);
 
+        List<ElementInfo> elements = null;
         // FIXME: By default, java interface is mapped to doc-lit-wrapper style WSDL
         if (op.getWrapper() != null) {
             // Generate doc-lit-wrapper style
@@ -505,6 +528,11 @@
             int i = 0;
             for (DataType d : op.getInputType().getLogical()) {
                 inputMsg.addPart(generatePart(definition, d, "arg" + i));
+                elements = new ArrayList<ElementInfo>();
+                ElementInfo element = getElementInfo(d.getPhysical(), d, null, helpers);
+                elements.add(element);
+                QName elementName = ((XMLType)d.getLogical()).getElementName();
+                wrappers.put(elementName, elements);
                 i++;
             }
         }
@@ -522,7 +550,15 @@
             if (op.getWrapper() != null) {
                 outputMsg.addPart(generateWrapperPart(definition, op, helpers, wrappers, false));
             } else {
-                outputMsg.addPart(generatePart(definition, op.getOutputType(), "return"));
+                DataType outputType = op.getOutputType();
+                outputMsg.addPart(generatePart(definition, outputType, "return"));
+                if (outputType != null) {
+                    elements = new ArrayList<ElementInfo>();
+                    ElementInfo element = getElementInfo(outputType.getPhysical(), outputType, null, helpers);
+                    elements.add(element);
+                    QName elementName = ((XMLType)outputType.getLogical()).getElementName();
+                    wrappers.put(elementName, elements);
+                }
             }
             output.setMessage(outputMsg);
 
@@ -546,17 +582,16 @@
             }
             fault.setMessage(faultMsg);
             operation.addFault(fault);
-            List<ElementInfo> elements = null;
             if (faultType.getLogical().getPhysical() != faultType.getPhysical()) {
                 // create special wrapper for type indirection to real fault bean
-                elements = new ArrayList<ElementInfo>(1);
                 DataType logical = faultType.getLogical();
+                elements = new ArrayList<ElementInfo>();
                 elements.add(getElementInfo(logical.getPhysical(), logical, null, helpers));
              } else {
                 // convert synthesized fault bean to a wrapper type
-                elements = new ArrayList<ElementInfo>();
                 for (DataType<XMLType> propDT: op.getFaultBeans().get(faultName)) {
                     XMLType logical = propDT.getLogical();
+                    elements = new ArrayList<ElementInfo>();
                     elements.add(getElementInfo(propDT.getPhysical(), propDT, logical.getElementName(), helpers));
                 }
             }

Modified: tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java?rev=693770&r1=693769&r2=693770&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java (original)
+++ tuscany/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLDefinitionGenerator.java Wed Sep 10 03:16:04 2008
@@ -146,7 +146,8 @@
         try {
             for (Iterator oi = portType.getOperations().iterator(); oi.hasNext();) {
                 Operation operation = (Operation)oi.next();
-                BindingOperation bindingOperation = createBindingOperation(definition, operation, "");
+                BindingOperation bindingOperation =
+                    createBindingOperation(definition, operation, "urn:" + operation.getName());
                 binding.addBindingOperation(bindingOperation);
             }
         } catch (WSDLException e) {

Modified: tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java?rev=693770&r1=693769&r2=693770&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java (original)
+++ tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java Wed Sep 10 03:16:04 2008
@@ -133,7 +133,8 @@
         // Check if the source operation is wrapped
         DataType<List<DataType>> sourceType = context.getSourceDataType();
         Operation sourceOp = context.getSourceOperation();
-        boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle();
+        boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null;
+        boolean sourceBare = sourceOp != null && !sourceOp.isWrapperStyle() && sourceOp.getWrapper() == null;
 
         // Find the wrapper handler for source data
         WrapperHandler sourceWrapperHandler = null;
@@ -143,19 +144,20 @@
         // Check if the target operation is wrapped
         DataType<List<DataType>> targetType = context.getTargetDataType();
         Operation targetOp = (Operation)context.getTargetOperation();
-        boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle();
+        boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle() && targetOp.getWrapper() != null;
+        boolean targetBare = targetOp != null && !targetOp.isWrapperStyle() && targetOp.getWrapper() == null;
 
         // Find the wrapper handler for target data
         WrapperHandler targetWrapperHandler = null;
         String targetDataBinding = getDataBinding(targetOp);
         targetWrapperHandler = getWrapperHandler(targetDataBinding, targetWrapped);
 
-        if ((!sourceWrapped) && targetWrapped) {
+        if ((!sourceWrapped && !sourceBare) && targetWrapped) {
             // Unwrapped --> Wrapped
             WrapperInfo wrapper = targetOp.getWrapper();
-            ElementInfo wrapperElement = wrapper.getInputWrapperElement();
+            // ElementInfo wrapperElement = wrapper.getInputWrapperElement();
 
-            Class<?> targetWrapperClass = wrapper != null ? wrapper.getInputWrapperClass() : null;
+            // Class<?> targetWrapperClass = wrapper != null ? wrapper.getInputWrapperClass() : null;
 
             if (source == null) {
                 // Empty child elements
@@ -207,14 +209,14 @@
                                              true);
             return new Object[] {targetWrapper};
 
-        } else if (sourceWrapped && (!targetWrapped)) {
+        } else if (sourceWrapped && (!targetWrapped && !targetBare)) {
             // Wrapped to Unwrapped
             Object sourceWrapper = source[0];
             Object[] target = null;
 
-            List<ElementInfo> childElements = sourceOp.getWrapper().getInputChildElements();
+            // List<ElementInfo> childElements = sourceOp.getWrapper().getInputChildElements();
             if (targetWrapperHandler != null) {
-                ElementInfo wrapperElement = sourceOp.getWrapper().getInputWrapperElement();
+                // ElementInfo wrapperElement = sourceOp.getWrapper().getInputWrapperElement();
                 // FIXME: This is a workaround for the wsdless support as it passes in child elements
                 // under the wrapper that only matches by position
                 if (sourceWrapperHandler.isInstance(sourceWrapper, sourceOp, true)) {

Modified: tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java?rev=693770&r1=693769&r2=693770&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java (original)
+++ tuscany/branches/sca-java-1.3.2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java Wed Sep 10 03:16:04 2008
@@ -154,7 +154,8 @@
         try {
             DataType<DataType> sourceType = context.getSourceDataType();
             Operation sourceOp = context.getSourceOperation();
-            boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle();
+            boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null;
+            boolean sourceBare = sourceOp != null && !sourceOp.isWrapperStyle() && sourceOp.getWrapper() == null;
 
             WrapperHandler sourceWrapperHandler = null;
             String sourceDataBinding = getDataBinding(sourceOp);
@@ -162,12 +163,14 @@
 
             DataType<DataType> targetType = context.getTargetDataType();
             Operation targetOp = (Operation)context.getTargetOperation();
-            boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle();
+            boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle() && targetOp.getWrapper() != null;
+            boolean targetBare = targetOp != null && !targetOp.isWrapperStyle() && targetOp.getWrapper() == null;
+
             WrapperHandler targetWrapperHandler = null;
             String targetDataBinding = getDataBinding(targetOp);
             targetWrapperHandler = getWrapperHandler(targetDataBinding, targetWrapped);
 
-            if ((!sourceWrapped) && targetWrapped) {
+            if ((!sourceWrapped &&!sourceBare) && targetWrapped) {
                 // Unwrapped --> Wrapped
                 WrapperInfo wrapper = targetOp.getWrapper();
                 ElementInfo wrapperElement = wrapper.getOutputWrapperElement();
@@ -211,7 +214,7 @@
                 child = mediator.mediate(response, sourceType.getLogical(), argType, context.getMetadata());
                 targetWrapperHandler.setChildren(targetWrapper, new Object[] {child}, targetOp, false);
                 return targetWrapper;
-            } else if (sourceWrapped && (!targetWrapped)) {
+            } else if (sourceWrapped && (!targetWrapped && !targetBare)) {
                 // Wrapped to Unwrapped
                 Object sourceWrapper = response;
                 List<ElementInfo> childElements = sourceOp.getWrapper().getOutputChildElements();

Modified: tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java?rev=693770&r1=693769&r2=693770&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java (original)
+++ tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java Wed Sep 10 03:16:04 2008
@@ -125,8 +125,11 @@
             boolean bare = false;
             if (methodSOAPBinding != null) {
                 bare = methodSOAPBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE;
-                // For BARE parameter style, the data is in the wrapped format already
-                operation.setWrapperStyle(bare);
+                if(bare) {
+                    // For BARE parameter style, the data won't be unwrapped
+                    // The wrapper should be null
+                    operation.setWrapperStyle(false);
+                }
                 documentStyle = methodSOAPBinding.style() == Style.DOCUMENT;
             }
 

Modified: tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java?rev=693770&r1=693769&r2=693770&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java (original)
+++ tuscany/branches/sca-java-1.3.2/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java Wed Sep 10 03:16:04 2008
@@ -36,7 +36,6 @@
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
 
 import com.example.stock.StockExceptionTest;
-
 /**
  *
  * @version $Rev$ $Date$
@@ -91,7 +90,7 @@
             op = op2;
         }
 
-        assertTrue(op.isWrapperStyle());
+        assertTrue(!op.isWrapperStyle() && op.getWrapper() == null);
 
         if ("M2".equals(op2.getName())) {
             op = op2;