Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

add XML attribute

user1254328Sep 25 2017 — edited Sep 25 2017

Hello,

we want to be able to add a type attribute as follows.

<soapenv:Envelope  xmlns:soapenv=    ...........................

  <soapenv:Header/>

<soapenv:Body>

   ................

.............

          <planNumberId  type="TIN">34343434</planNumberId>

.........

.........

</soapenv:Body>

</soapenv:Envelope>

we already have class that is good as follows ( ONLY how we make new addition type="TIN"  ?? . Easier way not to have additional class......). remember type is optional.

public class MyRecord {

     @XmlElement(required= true)

      private Integer  planNumberId;

     public void PlanNumberId(Integer  planNumberId) {

  this. planNumberId = planNumberId;

}

public Integer get PlanNumberId()   {

return  planNumberId;

}

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2017
Added on Sep 25 2017
1 comment
370 views