You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by em...@apache.org on 2007/05/21 07:10:08 UTC

svn commit: r540029 - in /incubator/cxf/trunk: rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/ tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/...

Author: ema
Date: Sun May 20 22:10:07 2007
New Revision: 540029

URL: http://svn.apache.org/viewvc?view=rev&rev=540029
Log:
Fixed issue CXF-554

Modified:
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?view=diff&rev=540029&r1=540028&r2=540029
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java Sun May 20 22:10:07 2007
@@ -57,6 +57,7 @@
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.i18n.UncheckedException;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.DataWriter;
@@ -269,10 +270,11 @@
                 for (DOMResult r : generateJaxbSchemas()) {
                     Document d = (Document)r.getNode();
                     String ns = d.getDocumentElement().getAttribute("targetNamespace");
-                    if (ns == null) {
-                        ns = "";
+                    if (StringUtils.isEmpty(ns)) {
+                        ns = serviceInfo.getInterface().getName().getNamespaceURI();
+                        d.getDocumentElement().setAttribute("targetNamespace", ns);
                     }
-    
+                                       
                     NodeList nodes = d.getDocumentElement().getChildNodes();
                     for (int i = 0; i < nodes.getLength(); i++) {
                         Node n = nodes.item(i);

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java?view=diff&rev=540029&r1=540028&r2=540029
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java (original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPrice.java Sun May 20 22:10:07 2007
@@ -48,8 +48,8 @@
  * 
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {"responseType" }, namespace = "http://cxf.com/")
-@XmlRootElement(name = "getPrice", namespace = "http://cxf.com/")
+@XmlType(name = "", propOrder = {"responseType" })
+@XmlRootElement(name = "getPrice")
 public class GetPrice {
 
     @XmlElement(required = true)

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java?view=diff&rev=540029&r1=540028&r2=540029
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java (original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/jaxws/GetPriceResponse.java Sun May 20 22:10:07 2007
@@ -47,8 +47,8 @@
  * 
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {"responseType" }, namespace = "http://cxf.com/")
-@XmlRootElement(name = "getPriceResponse", namespace = "http://cxf.com/")
+@XmlType(name = "", propOrder = {"responseType" })
+@XmlRootElement(name = "getPriceResponse")
 public class GetPriceResponse {
 
     protected float responseType;

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl?view=diff&rev=540029&r1=540028&r2=540029
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl (original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/expected/expected_doc_lit_wrapped_localName.wsdl Sun May 20 22:10:07 2007
@@ -19,7 +19,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <wsdl:definitions name="StockService" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:ns1="http://doc.withannotation.fortest.tools.cxf.apache.org/" xmlns:xsd="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 xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cxf.com/" version="1.0">
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/" version="1.0">
 <xs:element name="getPrice">
 <xs:complexType>
 <xs:sequence>
@@ -35,20 +35,6 @@
 </xs:complexType>
 </xs:element>
 </xs:schema>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://doc.withannotation.fortest.tools.cxf.apache.org/" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://doc.withannotation.fortest.tools.cxf.apache.org/">
-<xsd:element name="getPrice" type="getPrice"/>
-<xsd:complexType name="getPrice">
-<xsd:sequence>
-<xsd:element minOccurs="0" name="arg0" type="xsd:string"/>
-</xsd:sequence>
-</xsd:complexType>
-<xsd:element name="getPriceResponse" type="getPriceResponse"/>
-<xsd:complexType name="getPriceResponse">
-<xsd:sequence>
-<xsd:element name="return" type="xsd:float"/>
-</xsd:sequence>
-</xsd:complexType>
-</xsd:schema>
   </wsdl:types>
   <wsdl:message name="getPriceResponse">
     <wsdl:part name="parameters" element="ns1:getPriceResponse">