Little more info: I turned on logging, and the map entries are being
sent by the client, just not mapped on the server side. The inbound
message was logged as:
<soap:Envelope>
<soap:Body>
<ns1:integrityAssert>
<ns1:arg0>
<ns1:entry>
<ns1:key>terminalSerialNumber</ns1:key>
<ns1:value>63336559</ns1:value>
</ns1:entry>
<ns1:entry>
<ns1:key>transactionId</ns1:key>
<ns1:value>prTaskLUTCoreSignOn</ns1:value>
</ns1:entry>
<ns1:entry>
<ns1:key>operatorId</ns1:key>
<ns1:value>dennisd</ns1:value>
</ns1:entry>
</ns1:arg0>
</ns1:integrityAssert>
</soap:Body>
</soap:Envelope>
-----Original Message-----
From: Doubleday, Dennis [mailto:[EMAIL PROTECTED]
Sent: Friday, January 11, 2008 12:28 PM
To: [email protected]
Subject: Map parameter is empty in CXF, worked in XFire
I've been struggling with this for the better part of a day now. I have
a service that takes a Map<String, String> as a parameter. It worked
under XFire, but I am trying to port to CXF 2.0.3 now and I can't get
the values in the Map to come across. I pass a Map with three entries
from the client but an empty Map appears on the server side.
Any ideas where I'm going wrong:
Here is the client setup code:
ClientProxyFactoryBean fb = new
ClientProxyFactoryBean();
fb.setServiceClass(IntegrityCheckWebService.class);
fb.setAddress(serviceUri + SERVICE_URL);
fb.setProperties(properties);
// Not sure if this line is needed, but tried it anyway
// Didn't work either way
fb.setDataBinding(new AegisDatabinding());
fb.getServiceFactory().setDataBinding(new
AegisDatabinding());
this.service = (IntegrityCheckWebService) fb.create();
And the call:
Map<String, String> licenseCheckInfo = new
HashMap<String, String>();
licenseCheckInfo.put(IntegrityCheckWebService.TRANSACTION_ID,
rro.getTransactionID());
licenseCheckInfo.put(IntegrityCheckWebService.OPERATOR_ID,
rro.getParameters().get(2));
licenseCheckInfo.put(IntegrityCheckWebService.TERMINAL_SERIAL_NUMBER,
rro.getParameters().get(1));
result = this.service.integrityAssert(licenseCheckInfo);
And the service method interface:
public boolean integrityAssert(Map<String, String>
integrityCheckInfo);
And the Spring config:
<bean id="aegisBean"
class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
<bean id='jaxwsAegisServiceFactory'
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
<property name="dataBinding" ref="aegisBean" />
<property name="serviceConfigurations">
<list>
<bean
class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
<bean
class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration" />
<bean
class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
</list>
</property>
</bean>
<bean id="integrityCheckWebService"
class="IntegrityCheckWebService"/>
<property name="licenseManager" ref="systemLicenseManager"/>
</bean>
<jaxws:endpoint id="IntegrityCheckService"
implementor="#integrityCheckWebService"
address="/IntegrityCheckService">
<jaxws:serviceFactory>
<ref bean='jaxwsAegisServiceFactory' />
</jaxws:serviceFactory>
</jaxws:endpoint>