[ 
https://issues.apache.org/jira/browse/AXIS2-3408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Davy Toch updated AXIS2-3408:
-----------------------------

    Component/s: kernel

> EAR packaging of Axis2 war causes XSD included in .aar not to be found by 
> WSDLLocator.
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3408
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3408
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: - WinXP
> - WebLogic 8.1.5 (JDK 1.4.2)
>            Reporter: Davy Toch
>            Priority: Minor
>
> Hi,
> We have created an Axis2 webservice (.aar) which is included in the standard 
> Axis2 war structure. This war is included in an EAR because we also have 
> EJB's that need to be deployed.
> So our EAR file is (only showing Axis2 related entries + EJB jar):
>   MyApp.ear/                        (zip)
>     MyEjb.jar                       (file zipentry)
>     MyAxis2.war/                    (file zipentry) 
>       WEB-INF/                      (directory zipentry)
>         services/                   (directory zipentry) 
>           MyService.aar/            (file zipentry)
>             META-INF/               (directory zipentry)
>               MyService.wsdl        (file zipentry)
>               MyXSD.xsd             (file zipentry)
>   The above EAR is one zipfile with everything in it, so unexpanded.
>   The WSDL packaged inside the .aar has a reference to the XSD using 
> xs:include:
>   
>     <definitions ...>
>       <types>
>         <xs:schema targetNamespace="http://www.minfin.fgov.be/calculipp";>
>           <xs:include schemaLocation="./MyXSD.xsd"/>.
>         </xs:schema>
>       </types>
>       ...
>     </definitions>
>   Now if we deploy the EAR to our J2EE container (WebLogic 8.1.5), then the 
> EAR
>   gets expanded automatically, but not the WAR included in it, so we get:
>   MyApp/                            (directory)
>     MyEjb.jar                       (zip)
>     MyAxis2.war/                    (zip)
>      WEB-INF/                       (directory zipentry)
>        services/                    (directory zipentry)
>          MyService.aar/             (file zipentry)
>            META-INF/                (directory zipentry)
>              MyService.wsdl         (file zipentry)
>              MyXSD.xsd              (file zipentry)
>   This poses a problem in org.apache.axis2.deployment.DeploymentEngine on 
> line 390:
>   390  File file = Utils.toFile(servicesURL);
>   391  if(file != null && file.exists()){
>   392      wsdl2AxisServiceBuilder.setCustomWSLD4JResolver(
>   393                  new AARBasedWSDLLocator(wsdlLocation, file, 
> wsdlStream));
>   394      ...
>   395      ...
>   396  }
>   because servicesURL will e.g. be :
>     
> D:\bea815\mydomain\myserver\.wlnotdelete\MyApp\MyAxis2.war!\WEB-INF\services\MyService.aar
> As a consequence file.exists() will be false since MyService.aar is a 
> zipentry inside the file MyAxis2.war. So an AARBasedWSDLLocator instance 
> won't be passed and therefore the XSD referenced by the WSDL won't be 
> searched inside the .aar. So in this case we're obliged to put the XSD's in 
> the directory where the JVM was started as well :-(.
> The solution we currently use to avoid this problem is to have the following 
> EAR as starting point:
>   MyApp.ear/                        (zip)
>     MyEjb.jar                       (file zipentry)
>     MyAxis2.war/                    (**directory** zipentry)  !!!
>       WEB-INF/                      (directory zipentry)
>         services/                   (directory zipentry) 
>           MyService.aar/            (file zipentry)
>             META-INF/               (directory zipentry)
>               MyService.wsdl        (file zipentry)
>               MyXSD.xsd             (file zipentry)
>   so deployment will expand it to:
>   MyApp/                            (directory)
>     MyEjb.jar                       (zip)
>     MyAxis2.war/                    (**directory**)
>      WEB-INF/                       (**directory**)
>        services/                    (**directory**)
>          MyService.aar/             (file)
>            META-INF/                (directory zipentry)
>              MyService.wsdl         (file zipentry)
>              MyXSD.xsd              (file zipentry)
> It took me a while to figure out this problem, so even if it can't be fixed 
> in Axis2, it would be useful to indicate it somewhere in the Axis2 
> documentation.

-- 
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