TestGlobalTypeMappingspublic class TestGlobalTypeMappings extends test.GenericLocalTest Confirm that global type mappings work in both RPC and Document
contexts. |
Fields Summary |
---|
private QName | TYPE_QNAME |
Constructors Summary |
---|
public TestGlobalTypeMappings()
super("service");
| public TestGlobalTypeMappings(String s)
super(s);
|
Methods Summary |
---|
public Data | echoData(Data data)Our service method. We'll deploy this several ways.
return data;
| protected void | setUp()
super.setUp(false); // don't deploy here
TypeMapping tm = (TypeMapping)config.getTypeMappingRegistry().
getDefaultTypeMapping();
tm.register(Data.class, TYPE_QNAME,
new BeanSerializerFactory(Data.class, TYPE_QNAME),
new BeanDeserializerFactory(Data.class, TYPE_QNAME));
| public void | testDocLit()
deploy("service", this.getClass(), Style.WRAPPED);
Call call = getCall();
call.setOperationStyle("wrapped");
call.setOperationUse("literal");
call.setEncodingStyle("");
call.registerTypeMapping(Data.class, TYPE_QNAME,
new BeanSerializerFactory(Data.class, TYPE_QNAME),
new BeanDeserializerFactory(Data.class, TYPE_QNAME));
call.setReturnClass(Data.class);
call.addParameter("arg0", TYPE_QNAME, ParameterMode.IN);
Data data = new Data();
data.stringMember = "doc lit test";
data.floatMember = new Float(451.0F);
call.invoke("echoData", new Object [] { data });
|
|