Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2944

targetNamespace value in @WebResult annotation does not respect the refrence element namespace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.11
    • Tooling
    • None

    Description

      SEI generated with wsdl contains the following schema should contains the namespace value ="hello/name" in @WebResult annotation :

      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="hello/name" xmlns:tns="http://cxf2941.fortest.tools.cxf.apache.org/" elementFormDefault="unqualified" targetNamespace="http://cxf2941.fortest.tools.cxf.apache.org/" version="1.0">
      <xs:import namespace="hello/name"/>
      <xs:element name="helloString" type="tns:helloString"/>
      <xs:element name="helloStringResponse" type="tns:helloStringResponse"/>
      <xs:complexType name="helloString">
      <xs:sequence>
      <xs:element name="arg0" type="xs:int"/>
      </xs:sequence>
      </xs:complexType>
      <xs:complexType name="helloStringResponse">
      <xs:sequence>
      <xs:element minOccurs="0" ref="ns1:name"/>
      </xs:sequence>
      </xs:complexType>
      </xs:schema>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="hello/name" version="1.0">
      <xs:element name="name" type="xs:string"/>
      </xs:schema>

      ------------The actual SEI generated --------------
      public interface WebResultService {

      @WebResult(name = "name", targetNamespace = "hello/name")
      @RequestWrapper(localName = "helloString", targetNamespace = "http://cxf2941.fortest.tools.cxf.apache.org/", className = "org.apache.cxf.tools.fortest.cxf2941.HelloString")
      @WebMethod(action = "urn:HelloString")
      @ResponseWrapper(localName = "helloStringResponse", targetNamespace = "http://cxf2941.fortest.tools.cxf.apache.org/", className = "org.apache.cxf.tools.fortest.cxf2941.HelloStringResponse")
      public java.lang.String helloString(
      @WebParam(name = "arg0", targetNamespace = "")
      int arg0
      );
      }

      Attachments

        Activity

          People

            ema Jim Ma
            ema Jim Ma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: