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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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
324 views