0 Replies Latest reply on May 30, 2012 7:06 AM by l.courtin

    JBoss 7.1.1 wsdl difference with JBoss 6.1 : missing name attribute on some xs:element

    l.courtin

      Hello,

       

      I am testing JBoss 7.1.1 with a Web Service.

      I was previously on JBoss 6.1.0.

      I have seen that there is some difference on the generated wsdl file between version 7.1.1 and version 6.1.0.

       

      Here is an extract of the generated wsdl file by JBoss 6.1.0:

      <xs:complexType name="lastSolePtCoord">
      <xs:sequence>
      <xs:element minOccurs="0" name="dmReferenceSize" type="tns:dmReferenceSize" />
      <xs:element minOccurs="0" name="lastSolePt" type="tns:lastSolePt" />
      <xs:element minOccurs="0" name="lastSolePtCoordPK" type="tns:lastSolePtCoordPK" />
      <xs:element minOccurs="0" name="reference" type="tns:reference" />
      <xs:element name="x" type="xs:double" />
      <xs:element name="y" type="xs:double" />
      <xs:element name="z" type="xs:double" />
      </xs:sequence>
      </xs:complexType>
      

       

      Here is an extract of the generated wsdl file by JBoss 7.1.1:

      <xs:complexType name="lastSolePtCoord">
          <xs:sequence>
            <xs:element minOccurs="0" ref="tns:dmReferenceSize"/>
            <xs:element minOccurs="0" ref="tns:lastSolePt"/>
            <xs:element minOccurs="0" name="lastSolePtCoordPK" type="tns:lastSolePtCoordPK"/>
            <xs:element minOccurs="0" ref="tns:reference"/>
            <xs:element name="x" type="xs:double"/>
            <xs:element name="y" type="xs:double"/>
            <xs:element name="z" type="xs:double"/>
          </xs:sequence>
        </xs:complexType>
      

       

      You can see that some name attributes are missing the 7.1.1 version.

       

      This prevent the client of the Web Service to retrieve the value of the specified field: ie. the reference field is null with the 7.1.1 version while the reference field is filled with the 6.1.0 version.

       

      There is also a funny thing : when I run the client generated with a wsdl of JBoss 6.1.0 on a JBoss 7.1.1, it works perfectly (i.e. the reference  field is filled).

       

      Here the source of the LastSolePtCoord entity:

      package com.cadwin.rcsdmwebservices.jpa;
      
      import java.io.Serializable;
      import java.math.BigInteger;
      import javax.persistence.Basic;
      import javax.persistence.Column;
      import javax.persistence.EmbeddedId;
      import javax.persistence.Entity;
      import javax.persistence.JoinColumn;
      import javax.persistence.JoinColumns;
      import javax.persistence.ManyToOne;
      import javax.persistence.NamedQueries;
      import javax.persistence.NamedQuery;
      import javax.persistence.Table;
      import javax.xml.bind.annotation.XmlRootElement;
      
      /**
       *
       * @author laurent
       */
      @Entity
      @Table(name = "LAST_SOLE_PT_COORD")
      @XmlRootElement
      @NamedQueries({
          @NamedQuery(name = "LastSolePtCoord.findAll", query = "SELECT l FROM LastSolePtCoord l"),
          @NamedQuery(name = "LastSolePtCoord.findByReferenceCode", query = "SELECT l FROM LastSolePtCoord l WHERE l.lastSolePtCoordPK.referenceCode = :referenceCode"),
          @NamedQuery(name = "LastSolePtCoord.findByReferenceRev", query = "SELECT l FROM LastSolePtCoord l WHERE l.lastSolePtCoordPK.referenceRev = :referenceRev"),
          @NamedQuery(name = "LastSolePtCoord.findByReferenceCodeRev", query = "SELECT l FROM LastSolePtCoord l WHERE l.lastSolePtCoordPK.referenceCode = :referenceCode AND l.lastSolePtCoordPK.referenceRev = :referenceRev"),
          @NamedQuery(name = "LastSolePtCoord.findByReferenceCodeRevSizeId", query = "SELECT l FROM LastSolePtCoord l WHERE l.lastSolePtCoordPK.referenceCode = :referenceCode AND l.lastSolePtCoordPK.referenceRev = :referenceRev AND l.lastSolePtCoordPK.sizeId = :sizeId"),
          @NamedQuery(name = "LastSolePtCoord.findBySizeId", query = "SELECT l FROM LastSolePtCoord l WHERE l.lastSolePtCoordPK.sizeId = :sizeId"),
          @NamedQuery(name = "LastSolePtCoord.findByPointId", query = "SELECT l FROM LastSolePtCoord l WHERE l.lastSolePtCoordPK.pointId = :pointId"),
          @NamedQuery(name = "LastSolePtCoord.findByX", query = "SELECT l FROM LastSolePtCoord l WHERE l.x = :x"),
          @NamedQuery(name = "LastSolePtCoord.findByY", query = "SELECT l FROM LastSolePtCoord l WHERE l.y = :y"),
          @NamedQuery(name = "LastSolePtCoord.findByZ", query = "SELECT l FROM LastSolePtCoord l WHERE l.z = :z")})
      public class LastSolePtCoord implements Serializable {
          private static final long serialVersionUID = 1L;
          @EmbeddedId
          protected LastSolePtCoordPK lastSolePtCoordPK;
          @Basic(optional = false)
          @Column(name = "X")
          private double x;
          @Basic(optional = false)
          @Column(name = "Y")
          private double y;
          @Basic(optional = false)
          @Column(name = "Z")
          private double z;
          @JoinColumns({
              @JoinColumn(name = "PRODUCT_CODE", referencedColumnName = "PRODUCT_CODE", insertable = false, updatable = false),
              @JoinColumn(name = "PRODUCT_REV", referencedColumnName = "PRODUCT_REV", insertable = false, updatable = false)})
          @ManyToOne(optional = false)
          private Reference reference;
          @JoinColumn(name = "POINT_ID", referencedColumnName = "ID", insertable = false, updatable = false)
          @ManyToOne(optional = false)
          private LastSolePt lastSolePt;
          @JoinColumn(name = "SIZE_ID", referencedColumnName = "ID", insertable = false, updatable = false)
          @ManyToOne(optional = false)
          private DmReferenceSize dmReferenceSize;
      
          public LastSolePtCoord() {
          }
      
          public LastSolePtCoord(LastSolePtCoordPK lastSolePtCoordPK) {
              this.lastSolePtCoordPK = lastSolePtCoordPK;
          }
      
          public LastSolePtCoord(LastSolePtCoordPK lastSolePtCoordPK, double x, double y, double z) {
              this.lastSolePtCoordPK = lastSolePtCoordPK;
              this.x = x;
              this.y = y;
              this.z = z;
          }
      
          public LastSolePtCoord(String referenceCode, String referenceRev, BigInteger sizeId, BigInteger pointId) {
              this.lastSolePtCoordPK = new LastSolePtCoordPK(referenceCode, referenceRev, sizeId, pointId);
          }
      
          public LastSolePtCoordPK getLastSolePtCoordPK() {
              return lastSolePtCoordPK;
          }
      
          public void setLastSolePtCoordPK(LastSolePtCoordPK lastSolePtCoordPK) {
              this.lastSolePtCoordPK = lastSolePtCoordPK;
          }
      
          public double getX() {
              return x;
          }
      
          public void setX(double x) {
              this.x = x;
          }
      
          public double getY() {
              return y;
          }
      
          public void setY(double y) {
              this.y = y;
          }
      
          public double getZ() {
              return z;
          }
      
          public void setZ(double z) {
              this.z = z;
          }
      
          public Reference getReference() {
              return reference;
          }
      
          public void setReference(Reference reference) {
              this.reference = reference;
          }
      
          public LastSolePt getLastSolePt() {
              return lastSolePt;
          }
      
          public void setLastSolePt(LastSolePt lastSolePt) {
              this.lastSolePt = lastSolePt;
          }
      
          public DmReferenceSize getDmReferenceSize() {
              return dmReferenceSize;
          }
      
          public void setDmReferenceSize(DmReferenceSize dmReferenceSize) {
              this.dmReferenceSize = dmReferenceSize;
          }
      
          @Override
          public int hashCode() {
              int hash = 0;
              hash += (lastSolePtCoordPK != null ? lastSolePtCoordPK.hashCode() : 0);
              return hash;
          }
      
          @Override
          public boolean equals(Object object) {
              // TODO: Warning - this method won't work in the case the id fields are not set
              if (!(object instanceof LastSolePtCoord)) {
                  return false;
              }
              LastSolePtCoord other = (LastSolePtCoord) object;
              if ((this.lastSolePtCoordPK == null && other.lastSolePtCoordPK != null) || (this.lastSolePtCoordPK != null && !this.lastSolePtCoordPK.equals(other.lastSolePtCoordPK))) {
                  return false;
              }
              return true;
          }
      
          @Override
          public String toString() {
              return "LastSolePtCoord[ lastSolePtCoordPK=" + lastSolePtCoordPK + " ]";
          }
          
      }
      

       

      Is there something I have missed ?

      Is this a problem with JBoss 7.1.1 ?

       

      Best regards,

      Laurent