[jboss-jira] [JBoss JIRA] Updated: (JBAS-4915) service-ref merge looses data

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Mon Oct 29 07:36:01 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBAS-4915?page=all ]

Thomas Diesler updated JBAS-4915:
---------------------------------

    Fix Version/s:  JBossAS-5.0.0.Beta3
      Description: 
In the following scenario only jboss-client.xml contains <service-ref> elements

<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
  
  <display-name>TestEndpointService</display-name>
  
</application-client>

<jboss-client>
  <jndi-name>jbossws-client</jndi-name>
  
  <!-- 
  @WebServiceRef(name = "Service1")
  -->
  <service-ref>
    <service-ref-name>Service1</service-ref-name>
    <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
    <service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
  </service-ref>
  
  <!-- 
  @WebServiceRef(name = "Service2")
  -->
  <service-ref>
    <service-ref-name>Service2</service-ref-name>
    <config-name>Custom Client</config-name>
    <config-file>META-INF/jbossws-client-config.xml</config-file>
    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
  </service-ref>
  
  <!-- 
  @WebServiceRef(name = "Service3")
  -->
  <service-ref>
    <service-ref-name>Service3</service-ref-name>
    <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
    <service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
  </service-ref>
  
  <!-- 
  @WebServiceRef(name = "Service4")
  -->
  <service-ref>
    <service-ref-name>Service4</service-ref-name>
    <port-component-ref>
      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
      <config-name>Custom Client</config-name>
      <config-file>META-INF/jbossws-client-config.xml</config-file>
    </port-component-ref>
    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
  </service-ref>
  
  <!-- 
  @WebServiceRef(name = "Port1", type = TestEndpoint.class)
  -->
  <service-ref>
    <service-ref-name>Port1</service-ref-name>
    <port-component-ref>
      <port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
      <config-name>Custom Client</config-name>
      <config-file>META-INF/jbossws-client-config.xml</config-file>
    </port-component-ref>
    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
  </service-ref>
  
  <!-- 
  @WebServiceRef(name = "Port2")
  -->
  <service-ref>
    <service-ref-name>Port2</service-ref-name>
    <port-component-ref>
      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
      <config-name>Custom Client</config-name>
      <config-file>META-INF/jbossws-client-config.xml</config-file>
    </port-component-ref>
    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
  </service-ref>
  
  <!-- 
  @WebServiceRef(name = "Port3")
  -->
  <service-ref>
    <service-ref-name>Port3</service-ref-name>
    <port-component-ref>
      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
      <port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
      <stub-property>
        <prop-name>javax.xml.ws.security.auth.username</prop-name>
        <prop-value>kermit</prop-value>
      </stub-property>
      <stub-property>
        <prop-name>javax.xml.ws.security.auth.password</prop-name>
        <prop-value>thefrog</prop-value>
      </stub-property>
    </port-component-ref>
    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
  </service-ref>
  
</jboss-client>

These are lost by

   public static JBossServiceReferencesMetaData merge(ServiceReferencesMetaData override,
         ServiceReferencesMetaData overriden,
         String overridenFile, String overrideFile)
   {
      if (override == null && overriden == null)
         return null;

      JBossServiceReferencesMetaData merged = new JBossServiceReferencesMetaData();
      JavaEEMetaDataUtil.merge(merged, overriden, override, "service-ref", overridenFile, overrideFile, false);
      return merged;
   }

because JavaEEMetaDataUtil.merge does nothing with merged if overridden is empty

> service-ref merge looses data
> -----------------------------
>
>                 Key: JBAS-4915
>                 URL: http://jira.jboss.com/jira/browse/JBAS-4915
>             Project: JBoss Application Server
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>            Reporter: Thomas Diesler
>             Fix For:  JBossAS-5.0.0.Beta3
>
>
> In the following scenario only jboss-client.xml contains <service-ref> elements
> <application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee" 
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
>   
>   <display-name>TestEndpointService</display-name>
>   
> </application-client>
> <jboss-client>
>   <jndi-name>jbossws-client</jndi-name>
>   
>   <!-- 
>   @WebServiceRef(name = "Service1")
>   -->
>   <service-ref>
>     <service-ref-name>Service1</service-ref-name>
>     <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
>     <service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
>     <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
>   </service-ref>
>   
>   <!-- 
>   @WebServiceRef(name = "Service2")
>   -->
>   <service-ref>
>     <service-ref-name>Service2</service-ref-name>
>     <config-name>Custom Client</config-name>
>     <config-file>META-INF/jbossws-client-config.xml</config-file>
>     <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
>   </service-ref>
>   
>   <!-- 
>   @WebServiceRef(name = "Service3")
>   -->
>   <service-ref>
>     <service-ref-name>Service3</service-ref-name>
>     <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
>     <service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
>     <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
>   </service-ref>
>   
>   <!-- 
>   @WebServiceRef(name = "Service4")
>   -->
>   <service-ref>
>     <service-ref-name>Service4</service-ref-name>
>     <port-component-ref>
>       <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
>       <config-name>Custom Client</config-name>
>       <config-file>META-INF/jbossws-client-config.xml</config-file>
>     </port-component-ref>
>     <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
>   </service-ref>
>   
>   <!-- 
>   @WebServiceRef(name = "Port1", type = TestEndpoint.class)
>   -->
>   <service-ref>
>     <service-ref-name>Port1</service-ref-name>
>     <port-component-ref>
>       <port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
>       <config-name>Custom Client</config-name>
>       <config-file>META-INF/jbossws-client-config.xml</config-file>
>     </port-component-ref>
>     <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
>   </service-ref>
>   
>   <!-- 
>   @WebServiceRef(name = "Port2")
>   -->
>   <service-ref>
>     <service-ref-name>Port2</service-ref-name>
>     <port-component-ref>
>       <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
>       <config-name>Custom Client</config-name>
>       <config-file>META-INF/jbossws-client-config.xml</config-file>
>     </port-component-ref>
>     <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
>   </service-ref>
>   
>   <!-- 
>   @WebServiceRef(name = "Port3")
>   -->
>   <service-ref>
>     <service-ref-name>Port3</service-ref-name>
>     <port-component-ref>
>       <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
>       <port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
>       <stub-property>
>         <prop-name>javax.xml.ws.security.auth.username</prop-name>
>         <prop-value>kermit</prop-value>
>       </stub-property>
>       <stub-property>
>         <prop-name>javax.xml.ws.security.auth.password</prop-name>
>         <prop-value>thefrog</prop-value>
>       </stub-property>
>     </port-component-ref>
>     <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
>   </service-ref>
>   
> </jboss-client>
> These are lost by
>    public static JBossServiceReferencesMetaData merge(ServiceReferencesMetaData override,
>          ServiceReferencesMetaData overriden,
>          String overridenFile, String overrideFile)
>    {
>       if (override == null && overriden == null)
>          return null;
>       JBossServiceReferencesMetaData merged = new JBossServiceReferencesMetaData();
>       JavaEEMetaDataUtil.merge(merged, overriden, override, "service-ref", overridenFile, overrideFile, false);
>       return merged;
>    }
> because JavaEEMetaDataUtil.merge does nothing with merged if overridden is empty

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list