[
http://jira.jboss.com/jira/browse/JBAS-4915?page=comments#action_12384782 ]
Thomas Diesler commented on JBAS-4915:
--------------------------------------
[tdiesler@tddell jbossws-native-2.0.2]$ ant
-Dtest=org.jboss.test.ws.jaxws.samples.webserviceref.WebServiceRefClientTestCase one-test
one-test:
[junit] Running
org.jboss.test.ws.jaxws.samples.webserviceref.WebServiceRefClientTestCase
[junit] javax.naming.NamingException: Could not dereference object [Root exception is
org.jboss.ws.WSException: Cannot create service]
[junit] at
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1337)
[junit] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:765)
[junit] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
[junit] at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
[junit] at
org.jboss.injection.JndiFieldInjector.lookup(JndiFieldInjector.java:82)
[junit] at
org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:101)
[junit] at
org.jboss.ejb3.client.ClientContainer.<init>(ClientContainer.java:120)
[junit] at org.jboss.ejb3.client.ClientLauncher.launch(ClientLauncher.java:76)
[junit] at org.jboss.ejb3.client.ClientLauncher.launch(ClientLauncher.java:179)
[junit] at
org.jboss.test.ws.jaxws.samples.webserviceref.WebServiceRefClientTestCase.testApplicationClient(WebServiceRefClientTestCase.java:80)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:585)
[junit] at junit.framework.TestCase.runTest(TestCase.java:154)
[junit] at junit.framework.TestCase.runBare(TestCase.java:127)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
[junit] at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.extensions.TestSetup.run(TestSetup.java:23)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
[junit] Caused by: org.jboss.ws.WSException: Cannot create service
[junit] at org.jboss.ws.WSException.rethrow(WSException.java:60)
[junit] at
org.jboss.ws.core.jaxws.client.ServiceObjectFactoryJAXWS.getObjectInstance(ServiceObjectFactoryJAXWS.java:201)
[junit] at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
[junit] at
org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1312)
[junit] at
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1329)
[junit] ... 28 more
[junit] Caused by: java.lang.IllegalArgumentException: Cannot create generic
javax.xml.ws.Service without wsdlLocation:
org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne/port4
[junit] at
org.jboss.ws.core.jaxws.client.ServiceObjectFactoryJAXWS.getObjectInstance(ServiceObjectFactoryJAXWS.java:139)
[junit] ... 31 more
[junit] Tests run: 3, Failures: 0, Errors: 1, Time elapsed: 1,399.484 sec
[junit] Test org.jboss.test.ws.jaxws.samples.webserviceref.WebServiceRefClientTestCase
FAILED
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