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

Inconsistent behavior in Axis2 service deployment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1
    • 1.1
    • deployment
    • None
    • Win XP, JDK 1.4

    Description

      Axis2 refers a service by its name when the service is defined within a service group. However it uses the archive name, when the service is described in the service xml without specifying a serviceGroup.

      Steps to reproduce:
      ====================
      1. Deploy the attached 'sample-mtom' service archive. (sample-mtom.aar)
      2. Look at its services.xml

      <serviceGroup>
      <service name="MTOMSample">
      <messageReceivers>
      <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="sample.mtom.service.MTOMSampleMessageReceiverInOut"/>
      </messageReceivers>
      <parameter locked="false" name="ServiceClass">sample.mtom.service.MTOMSampleSkeleton</parameter>
      <operation name="attachment" mep="http://www.w3.org/2004/08/wsdl/in-out">
      <actionMapping>attachment</actionMapping>
      <outputActionMapping>//schemas.xmlsoap.org/wsdl/MTOMServicePortType/AttachmentResponse</outputActionMapping>
      </operation>
      </service>
      </serviceGroup>

      3. Service can be seen in the admin console as 'MTOMSample' (This is the name of service inside the service group)

      4. Deploy the attached 'sample-swa' service archive. (sample-swa.aar)
      5. Look at the services.xml
      ie:-
      <service name="SWASampleService">
      <description>
      This is a sample Web Service for illustrating Attachments API of Axis2
      </description>
      <parameter name="ServiceClass" locked="false">sample.soapwithattachments.service.AttachmentService</parameter>
      <operation name="uploadFile">
      <actionMapping>urn:uploadFile</actionMapping>
      <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
      </operation>
      </service>
      6. In this case, service is displayed in the admin console as 'sample-swa' (This is the name of archive)

      Following solutions can be suggested to overcome this issue.

      1. All the services should be defined using <serviceGroup>, even if the services.xml contains only one service.
      Then the service can be displayed in the admin console by the specified service name in services.xml.
      OR
      2. Throw a deployment error if service name and archive names are different in a single service archive.

      Attachments

        1. sample-mtom.aar
          27 kB
          Charitha Kankanambe
        2. sample-swa.aar
          2 kB
          Charitha Kankanambe

        Activity

          People

            rajith Rajith Muditha Attapattu
            charitha Charitha Kankanambe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: