[ 
https://issues.apache.org/jira/browse/AXIS2-1864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844003#action_12844003
 ] 

Gayatri Srinivasan commented on AXIS2-1864:
-------------------------------------------

Reproduction Scenario
a. I have a aar file called CSTService.aar
b. I have a service.xml defined like this 
<serviceGroup>
<service name="CSTService" scope="application" targetNamespace=".....">
    <description>
  /service>
<service name="DSTService" scope="application" targetNamespace="....">
    <description>
  
    </description>
  
</service>
</serviceGroup>

c. I have two wsdl file CSTService.wsdl and DSTService.wsdl placed in META-INF 
folder of my aar file.
d. Axis should pick up these custom wsdl file when I query for the wsdl
e. However it errors out at loading time with this 
 Two services cannot have same name.  A service with the CSTService name 
already exists in the system.
org.apache.axis2.AxisFault: Two services cannot have same name.  A service with 
the CSTService name already exists in the system.
        at 
org.apache.axis2.engine.AxisConfiguration.addToAllServicesMap(AxisConfiguration.java:409)
        at 
org.apache.axis2.description.AxisServiceGroup.addService(AxisServiceGroup.java:110)
        at 
org.apache.axis2.deployment.DeploymentEngine.fillServiceGroup(DeploymentEngine.java:604)
        at 
org.apache.axis2.deployment.DeploymentEngine.addServiceGroup(DeploymentEngine.java:567)
        at 
org.apache.axis2.deployment.DeploymentEngine.loadServicesFromUrl(DeploymentEngine.java:266)
        at 
org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:291)
        at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
        at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:525)
        at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:443)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:997)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:840)

f. This occurs because in deploymentEngine.java calls this method from 
loadServicesFromUrl
populateService(serviceGroup,
                                            servicesURL,
                                            fileUrl.substring(0, 
fileUrl.indexOf(".aar")));
calls populate service with service name as .aar

and in populateServiceGroup  while iterating through servicegroup's services it 
first reads CSTService.wsdl and reads its content succesfully

Next time when it iterates it tries reading and again it tried to read 
CSTService.wsdl and gives the above error. It checks for <service 
name="DSTService"> instead it checks
the CSTService.aar CSTService aar file.


g. I provided wsdl.list file also which loads both the services in the map . 
The wsdl service name are provided correctly





 



> Axis 2 expects single custom WSDL for all services in serviceGroup
> ------------------------------------------------------------------
>
>                 Key: AXIS2-1864
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1864
>             Project: Axis2
>          Issue Type: Improvement
>          Components: deployment
>    Affects Versions: 1.1
>         Environment: WLS 9.2, J2SE 1.5.0.04, Axis 2 1.1 (release)
>            Reporter: James Shiell
>            Assignee: Deepal Jayasinghe
>
> When multiple services are specified in a serviceGroup in the services.xml of 
> a single service archive the DeploymentEngine (~line 277) will only looks for 
> either service.wsdl or (archive-name).wsdl. This means that all services must 
> have their WSDL in a single file if custom WSDLs are required.
> My suggestion is that Axis should instead look in <service/@name>.wsdl, 
> allowing a single WSDL per service instance within the group.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to