Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-647

"Unbound namespace URI" when generating code for ADB and using chained schema imports

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Axis2 1.0 RC4

    Description

      My scenario is as follows:

      • I defined the datatypes for my sample application in file Restaurant.xsd and namespace R1
      • I defined the messages for communication with the RestaurantService in file RestaurantMessages.xsd and namespace R2
      • RestaurantMessages.xsd imports Restaurant.xsd, since the messages make use of the basic datatypes.
      • My WSDL imports RestaurantMessages.xsd
      • WS-I test tools show that this WSDL complies to BP
      • This scenario worked nicely with Axis 1.3

      I generated service and client code for this WSDL with WSDL2Java and ADB option. When I send a message to the service using the generated proxy, I get an "Unbound namespace URI" error for namespace R1( ! ) on the server side. That is interesting, because the messages that are sent back and forth are all in namespace R2 and my request message does not contain any reference to R1 whatsoever. However, the response message (R2) is supposed to contain types defined in Restaurant.xsd.

      If I move all the datatype definitions from file Restaurant.xsd into RestaurantMessages.xsd and thus from R1 to R2, everything works fine.
      Apparently Axis2 / ADB has issues with chained imports, perhaps only if not all of the imports belong to the same namespace.

      Attachments

        1. RestaurantService.wsdl
          2 kB
          Thilo Frotscher
        2. RestaurantMessages.xsd
          1 kB
          Thilo Frotscher
        3. Restaurant.xsd
          1 kB
          Thilo Frotscher
        4. restaurant-client-src.zip
          9 kB
          Ajith Ranabahu
        5. RestaurantService.aar
          28 kB
          Ajith Ranabahu
        6. restaurant-src.zip
          22 kB
          Ajith Ranabahu

        Activity

          People

            ajith Ajith Ranabahu
            thilo.frotscher@web.de Thilo Frotscher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: