Java2WSDLコマンドでJavaクラスからWSDLを生成した場合の,WSDL定義のデータ型と名前空間のURL,およびソースコードのデータ型の関係を示します。
表11-3 JavaクラスからWSDLを生成した場合のデータ型の対応
Javaでのデータ型 | WSDLでのデータ型 | |
---|---|---|
データ型 | 名前空間のURL | |
boolean | boolean | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.BooleanHolder | ||
byte | byte | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.ByteHolder | ||
byte[] | base64※3 | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.ByteArrayHolder | ||
double | double | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.DoubleHolder | ||
float | float | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.FloatHolder | ||
int | int | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.IntHolder | ||
long | long | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.LongHolder | ||
short | short | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.ShortHolder | ||
java.lang.Byte | byte | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.ByteWrapperHolder | ||
java.lang.Byte[] | SequenceOf_soapenc_byte※3 | definitions要素のtargetNamespace※1 |
javax.xml.rpc.holders.ByteWrapperArrayHolder | ||
java.lang.Double | double | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.DoubleWrapperHolder | ||
java.lang.Float | float | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.FloatWrapperHolder | ||
java.lang.Integer | int | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.IntegerWrapperHolder | ||
java.lang.Long | long | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.LongWrapperHolder | ||
java.lang.Object | anyType | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.ObjectHolder | ||
java.lang.Object[] | SequenceOf_xsd_anyType | definitions要素のtargetNamespace※2 |
java.lang.Short | short | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.ShortWrapperHolder | ||
java.lang.String | string | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.StringHolder | ||
java.math.BigDecimal | decimal | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.BigDecimalHolder | ||
java.math.BigInteger | integer | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.BigIntegerHolder | ||
java.util.Date | date | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.DateHolder | ||
javax.xml.namespace.QName | QName | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.QNameHolder | ||
java.lang.Boolean | boolean | http://schemas.xmlsoap.org/soap/encoding/※3 |
javax.xml.rpc.holders.BooleanWrapperHolder | ||
java.util.Calendar | dateTime | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.CalendarHolder | ||
org.apache.axis.types.Duration | duration | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.DurationHolder | ||
org.apache.axis.types.Time | time | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.TimeHolder | ||
org.apache.axis.types.YearMonth | gYearMonth | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.YearMonthHolder | ||
org.apache.axis.types.Year | gYear | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.YearHolder | ||
org.apache.axis.types.MonthDay | gMonthDay | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.MonthDayHolder | ||
org.apache.axis.types.Day | gDay | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.DayHolder | ||
org.apache.axis.types.Month | gMonth | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.MonthHolder | ||
org.apache.axis.types.URI | anyURI | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.URIHolder | ||
org.apache.axis.types.NormalizedString | normalizedString | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.NormalizedStringHolder | ||
org.apache.axis.types.Token | token | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.TokenHolder | ||
org.apache.axis.types.Name | Name | http://www.w3.org/2001/XMLSchema |
org.apache.axis.types.NCName | NCName | http://www.w3.org/2001/XMLSchema |
org.apache.axis.types.NMToken | NMTOKEN | http://www.w3.org/2001/XMLSchema |
org.apache.axis.types.NonPositiveInteger | nonPositiveInteger | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.NonPositiveIntegerHolder | ||
org.apache.axis.types.NegativeInteger | negativeInteger | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.NegativeIntegerHolder | ||
org.apache.axis.types.NonNegativeInteger | nonNegativeInteger | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.NonNegativeIntegerHolder | ||
org.apache.axis.types.UnsignedInt | unsignedInt | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.UnsignedIntHolder | ||
org.apache.axis.types.UnsignedLong | unsignedLong | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.UnsignedLongHolder | ||
org.apache.axis.types.UnsignedShort | unsignedShort | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.UnsignedShortHolder | ||
org.apache.axis.types.UnsignedByte | unsignedByte | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.UnsignedByteHolder | ||
org.apache.axis.types.PositiveInteger | positiveInteger | http://www.w3.org/2001/XMLSchema |
org.apache.axis.holders.PositiveIntegerHolder | ||
org.apache.axis.types.Language | language | http://www.w3.org/2001/XMLSchema |
org.apache.axis.types.Id | ID | http://www.w3.org/2001/XMLSchema |
org.apache.axis.types.IDRef | IDREF | http://www.w3.org/2001/XMLSchema |
org.apache.axis.types.Entity | ENTITY | http://www.w3.org/2001/XMLSchema |
org.apache.axis.types.IDRefs | IDREFS | http://www.w3.org/2001/XMLSchema |
org.apache.axis.types.Entities | ENTITIES | http://www.w3.org/2001/XMLSchema |
org.apache.axis.types.NMTokens | NMTOKENS | http://www.w3.org/2001/XMLSchema |
javax.activation.DataHandler | wsi:swaRef | http://ws-i.org/profiles/basic/1.1/xsd |
org.apache.axis.holders.DataHandlerHolder |
<schema targetNamespace="http://localhost" (definitions要素のtargetNamespace)
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="SequenceOf_xsd_byte">
<sequence>
<element name="item" minOccurs="0" maxOccurs="unbounded" type="xsd:byte" />
</sequence>
</complexType>
</schema>
<schema targetNamespace="http://localhost" (definitions要素のtargetNamespace)
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="SequenceOf_soapenc_byte">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:byte[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
<schema targetNamespace="http://localhost" (definitions要素のtargetNamespace)
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="SequenceOf_xsd_anyType">
<sequence>
<element name="item" minOccurs="0" maxOccurs="unbounded" type="xsd:anyType" />
</sequence>
</complexType>
</schema>
<schema targetNamespace="http://localhost" (definitions要素のtargetNamespace)
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="SequenceOf_xsd_anyType">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
表11-4 JavaクラスからWSDLを生成した場合のデータ型の対応
Javaでのデータ型 | WSDLでのデータ型 | |
---|---|---|
データ型 | 名前空間のURL | |
byte[] | base64Binary | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.ByteArrayHolder | ||
java.lang.Byte | byte | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.ByteWrapperHolder | ||
java.lang.Byte[] | SequenceOf_xsd_byte | definitions要素のtargetNamespace |
javax.xml.rpc.holders.ByteWrapperArrayHolder | ||
java.lang.Double | double | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.DoubleWrapperHolder | ||
java.lang.Float | float | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.FloatWrapperHolder | ||
java.lang.Integer | int | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.IntegerWrapperHolder | ||
java.lang.Long | long | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.LongWrapperHolder | ||
java.lang.Short | short | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.ShortWrapperHolder | ||
java.lang.String | string | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.StringHolder | ||
java.math.BigDecimal | decimal | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.BigDecimalHolder | ||
java.math.BigInteger | integer | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.BigIntegerHolder | ||
java.lang.Boolean | boolean | http://www.w3.org/2001/XMLSchema |
javax.xml.rpc.holders.BooleanWrapperHolder |
Java2WSDLコマンドの引数については「9.1 Java2WSDLコマンド(WSDLの生成)」を参照してください。