11.2 WSDLからソースコードを生成する場合のデータ型の関係

WSDL2JavaコマンドでWSDLからソースコードを生成した場合の,WSDL定義のデータ型と名前空間のURL,およびソースコードのデータ型の関係を示します。データ型の対応関係は,次に示す場合によって異なります。

それぞれの場合に分けて,データ型の対応関係を示します。

<この節の構成>
(1) メソッド引数の入出力種別が「IN」,およびメソッド戻り値の場合
(2) メソッド引数の入出力種別が「OUT」および「INOUT」の場合

(1) メソッド引数の入出力種別が「IN」,およびメソッド戻り値の場合

表11-1 WSDLからソースコードを生成した場合のデータ型の対応(入出力種別が「IN」,およびメソッド戻り値の場合)

WSDLでのデータ型Javaでのデータ型
データ型名前空間URL
anyTypehttp://www.w3.org/2001/XMLSchemajava.lang.Object
Arrayhttp://schemas.xmlsoap.org/soap/encoding/java.lang.Object[]
base64http://schemas.xmlsoap.org/soap/encoding/byte[]
base64Binaryhttp://www.w3.org/2001/XMLSchemabyte[]
booleanhttp://www.w3.org/2001/XMLSchemaboolean
http://schemas.xmlsoap.org/soap/encoding/java.lang.Boolean
bytehttp://www.w3.org/2001/XMLSchemabyte
http://schemas.xmlsoap.org/soap/encoding/java.lang.Byte
datehttp://www.w3.org/2001/XMLSchemajava.util.Date
dateTimehttp://www.w3.org/2001/XMLSchemajava.util.Calendar
decimalhttp://www.w3.org/2001/XMLSchemajava.math.BigDecimal
http://schemas.xmlsoap.org/soap/encoding/java.math.BigDecimal
doublehttp://www.w3.org/2001/XMLSchemadouble
http://schemas.xmlsoap.org/soap/encoding/java.lang.Double
floathttp://www.w3.org/2001/XMLSchemafloat
http://schemas.xmlsoap.org/soap/encoding/java.lang.Float
hexBinaryhttp://www.w3.org/2001/XMLSchemabyte[]
inthttp://www.w3.org/2001/XMLSchemaint
http://schemas.xmlsoap.org/soap/encoding/java.lang.Integer
integerhttp://www.w3.org/2001/XMLSchemajava.math.BigInteger
http://schemas.xmlsoap.org/soap/encoding/java.math.BigInteger
longhttp://www.w3.org/2001/XMLSchemalong
http://schemas.xmlsoap.org/soap/encoding/java.lang.Long
QNamehttp://www.w3.org/2001/XMLSchemajavax.xml.namespace.QName
shorthttp://www.w3.org/2001/XMLSchemashort
http://schemas.xmlsoap.org/soap/encoding/java.lang.Short
stringhttp://www.w3.org/2001/XMLSchemajava.lang.String
http://schemas.xmlsoap.org/soap/encoding/java.lang.String
durationhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Duration
timehttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Time
gYearMonthhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.YearMonth
gYearhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Year
gMonthDayhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.MonthDay
gDayhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Day
gMonthhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Month
anyURIhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.URI
normalizedStringhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.NormalizedString
tokenhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Token
Namehttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Name
NCNamehttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.NCName
NMTOKENhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.NMToken
nonPositiveIntegerhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.NonPositiveInteger
negativeIntegerhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.NegativeInteger
nonNegativeIntegerhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.NonNegativeInteger
unsignedInthttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.UnsignedInt
unsignedShorthttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.UnsignedShort
unsignedLonghttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.UnsignedLong
unsignedBytehttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.UnsignedByte
positiveIntegerhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.PositiveInteger
languagehttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Language
IDhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Id
IDREFhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.IDRef
ENTITYhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Entity
IDREFShttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.IDRefs
ENTITIEShttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.Entities
NMTOKENShttp://www.w3.org/2001/XMLSchemaorg.apache.axis.types.NMTokens
wsi:swaRefhttp://ws-i.org/profiles/basic/1.1/xsdjavax.activation.DataHandler
注※
データ型の変数には指定できません。

(2) メソッド引数の入出力種別が「OUT」および「INOUT」の場合

表11-2 WSDLからソースコードを生成した場合のデータ型の対応(入出力種別が「OUT」,および「INOUT」の場合)

WSDLでのデータ型Javaでのデータ型
データ型名前空間URL
anyTypehttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.ObjectHolder
base64http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.ByteArrayHolder
base64Binaryhttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.ByteArrayHolder
booleanhttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.BooleanHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.BooleanWrapperHolder
bytehttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.ByteHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.ByteWrapperHolder
datehttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.DateHolder
dateTimehttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.CalendarHolder
decimalhttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.BigDecimalHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.BigDecimalHolder
doublehttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.DoubleHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.DoubleWrapperHolder
floathttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.FloatHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.FloatWrapperHolder
hexBinaryhttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.ByteArrayHolder
inthttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.IntHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.IntegerWrapperHolder
integerhttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.BigIntegerHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.BigIntegerHolder
longhttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.LongHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.LongWrapperHolder
QNamehttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.QNameHolder
shorthttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.ShortHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.ShortWrapperHolder
stringhttp://www.w3.org/2001/XMLSchemajavax.xml.rpc.holders.StringHolder
http://schemas.xmlsoap.org/soap/encoding/javax.xml.rpc.holders.StringHolder
durationhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.DurationHolder
timehttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.TimeHolder
gYearMonthhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.YearMonthHolder
gYearhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.YearHolder
gMonthDayhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.MonthDayHolder
gDayhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.DayHolder
gMonthhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.MonthHolder
anyURIhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.URIHolder
normalizedStringhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.NormalizedStringHolder
tokenhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.TokenHolder
nonPositiveIntegerhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.NonPositiveIntegerHolder
negativeIntegerhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.NegativeIntegerHolder
nonNegativeIntegerhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.NonNegativeIntegerHolder
unsignedInthttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.UnsignedIntHolder
unsignedShorthttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.UnsignedShortHolder
unsignedLonghttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.UnsignedLongHolder
unsignedBytehttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.UnsignedByteHolder
positiveIntegerhttp://www.w3.org/2001/XMLSchemaorg.apache.axis.holders.PositiveIntegerHolder
wsi:swaRefhttp://ws-i.org/profiles/basic/1.1/xsdorg.apache.axis.holders.DataHandlerHolder
注※
データ型の変数には指定できません。