// import文宣言
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
import javax.xml.namespace.QName;
import javax.xml.rpc.encoding.TypeMappingRegistry;
import javax.xml.rpc.encoding.TypeMapping;
:
Service service = null;
try {
service = ServiceFactory.newInstance().createService(new QName("",""));
} catch( javax.xml.rpc.ServiceException e ){
:
}
TypeMappingRegistry tmr = service.getTypeMappingRegistry();
TypeMapping tm = tmr.createTypeMapping();
// 構造体 resultのマッピング登録
QName _qname = new QName( "urn:Fujitsu-Soap-Service-Data", "ODdemo-calculator-result " );
tm.register( ODdemo.calculatorPackage.resultSOAPGWType.class, _qname,
new com.fujitsu.interstage.soapx.encoding.ser.BeanSerializerFactory(
ODdemo.calculatorPackage.resultSOAPGWType.class, _qname),
new com.fujitsu.interstage.soapx.encoding.ser.BeanDeserializerFactory(
ODdemo.calculatorPackage.resultSOAPGWType.class, _qname ) );
// 例外 ZEROPARAMのマッピング登録
_qname = new QName( "urn:Fujitsu-Soap-Service-Data", "ODdemo-calculator-ZEROPARAM" );
tm.register(ODdemo.calculatorPackage.ZEROPARAMSOAPGWType.class, _qname,
new com.fujitsu.interstage.soapx.encoding.ser.BeanSerializerFactory(
ODdemo.calculatorPackage.ZEROPARAMSOAPGWType.class, _qname),
new com.fujitsu.interstage.soapx.encoding.ser.BeanDeserializerFactory(
ODdemo.calculatorPackage.ZEROPARAMSOAPGWType.class, _qname ) );
// 列挙 CALCKINDのマッピング登録
_qname = new QName( "urn:Fujitsu-Soap-Service-Data", "ODdemo-calculator-CALCKIND" );
tm.register(ODdemo.calculatorPackage.CALCKINDSOAPEnumImpl.class, _qname,
new com.fujitsu.interstage.soapx.encoding.ser.EnumSerializerFactory(
ODdemo.calculatorPackage.CALCKINDSOAPEnumImpl.class, _qname),
new com.fujitsu.interstage.soapx.encoding.ser.EnumDeserializerFactory(
ODdemo.calculatorPackage.CALCKINDSOAPEnumImpl.class, _qname ) );
// マッピング情報をマッピングレジストリへ登録
tmr.register( "http://schemas.xmlsoap.org/soap/encoding/", tm );
: |