Я использую Apache Axis 1.3 для создания веб-службы Soap.Я генерирую Java-классы из моего XSD с использованием JAX-B в Eclipse.
В моем XSD у меня есть complexType, содержащий атрибуты:
<xs:complexType name="IdentificationType">
<xs:annotation>
<xs:documentation>Basic bloc for Indentification of object without version (Customer, Third party, operation)</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="IdentifierType">
<xs:attribute name="Issuer" type="IssuerCodeSLN" use="required">
<xs:annotation>
<xs:documentation>Provider or manager of the identifier</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Scheme" type="SchemeCodeSLN" use="required">
<xs:annotation>
<xs:documentation>Identifier type code</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Java-объект, соответствующий этому типу, содержит(@XmlAttribute) аннотации.Я использовал TypeMapping для объявления этого типа в wsdd:
*****<typeMapping xmlns:ns="http://ea.assurance.bnpparibas.com/internal/schema/mco/common/v1"
qname="ns:IdentificationType"
type="java:ws.cls.POJO.xsd.ArchiveDocumentMessages.IdentificationType"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>*****
Но в WSDL атрибуты отображаются в виде последовательности элементов:
*<complexType name="IdentificationType">
<sequence>
<element name="issuer" nillable="true" type="xsd:string" />
<element name="scheme" nillable="true" type="xsd:string" />
<element name="value" nillable="true" type="xsd:string" />
</sequence>
</complexType>*
Можете ли вы помочь мне решить эту проблемупожалуйста ?Заранее спасибо,