Author: thomas.diesler(a)jboss.com
Date: 2007-04-14 05:26:57 -0400 (Sat, 14 Apr 2007)
New Revision: 2840
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
trunk/jbossws-tests/src/resources/jaxrpc/wsse/username/META-INF/jboss-client.xml
Log:
Support deprecated use of <call-properties> on JAXRPC stub
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-04-14
08:58:02 UTC (rev 2839)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-04-14
09:26:57 UTC (rev 2840)
@@ -407,6 +407,10 @@
CallImpl call = new CallImpl(this, epMetaData);
initStubProperties(call, seiClass.getName());
+ // JBoss-4.0.x does not support <stub-properties>
+ if (initCallProperties(call, seiClass.getName()) > 0)
+ log.info("Deprecated use of <call-properties> on JAXRPC Stub. Use
<stub-properties>");
+
PortProxy handler = new PortProxy(call);
ClassLoader cl = epMetaData.getClassLoader();
Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass,
Stub.class, StubExt.class }, handler);
@@ -414,31 +418,41 @@
return proxy;
}
- private void initStubProperties(CallImpl call, String seiName)
+ private int initStubProperties(CallImpl call, String seiName)
{
// nothing to do
if (usrMetaData == null)
- return;
+ return 0;
+ int propCount = 0;
for (UnifiedPortComponentRefMetaData upcRef : usrMetaData.getPortComponentRefs())
{
if (seiName.equals(upcRef.getServiceEndpointInterface()))
{
for (UnifiedStubPropertyMetaData prop : upcRef.getStubProperties())
+ {
call.setProperty(prop.getPropName(), prop.getPropValue());
+ propCount++;
+ }
}
}
+ return propCount;
}
- private void initCallProperties(CallImpl call, String seiName)
+ private int initCallProperties(CallImpl call, String seiName)
{
// nothing to do
if (usrMetaData == null)
- return;
+ return 0;
+
+ int propCount = 0;
// General properties
for (UnifiedCallPropertyMetaData prop : usrMetaData.getCallProperties())
+ {
call.setProperty(prop.getPropName(), prop.getPropValue());
+ propCount++;
+ }
if (seiName != null)
{
@@ -447,10 +461,15 @@
if (seiName.equals(upcRef.getServiceEndpointInterface()))
{
for (UnifiedCallPropertyMetaData prop : upcRef.getCallProperties())
+ {
call.setProperty(prop.getPropName(), prop.getPropValue());
+ propCount++;
+ }
}
}
}
+
+ return propCount;
}
/**
Modified:
trunk/jbossws-tests/src/resources/jaxrpc/wsse/username/META-INF/jboss-client.xml
===================================================================
---
trunk/jbossws-tests/src/resources/jaxrpc/wsse/username/META-INF/jboss-client.xml 2007-04-14
08:58:02 UTC (rev 2839)
+++
trunk/jbossws-tests/src/resources/jaxrpc/wsse/username/META-INF/jboss-client.xml 2007-04-14
09:26:57 UTC (rev 2840)
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_4_2.dtd">
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
<jboss-client>
<jndi-name>jbossws-client</jndi-name>
@@ -10,14 +10,14 @@
<config-name>Standard WSSecurity Client</config-name>
<port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxrpc.wsse.JaxRpcTestService</service-endpoint-interface>
- <stub-property>
+ <call-property>
<prop-name>javax.xml.rpc.security.auth.username</prop-name>
<prop-value>kermit</prop-value>
- </stub-property>
- <stub-property>
+ </call-property>
+ <call-property>
<prop-name>javax.xml.rpc.security.auth.password</prop-name>
<prop-value>thefrog</prop-value>
- </stub-property>
+ </call-property>
</port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-wsse-username?wsdl</wsdl-override>
</service-ref>
Show replies by date