1 / 8

mule java xml

mule java xml

Yamini1
Download Presentation

mule java xml

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mule ESB: Data Weave XML – Java Conversion

  2. XML – Java Conversion in Dataweave Mule Pre-requisites: • Anypoint Studio • Mule ESB Runtime 3.7 • xml input file. Input XML File

  3. Mule Flow

  4. Config.xml

  5. In the transform code I created the Object type in the header “ %type user = :object { class: "testweave.User"} ” And the payload of the transform is converted to User Object using the transform logic as below. { firstName: payload.user.name, lastName: payload.user.lastName } as :user

  6. DataWeave

  7. package testweave; publicclass User { private String firstName; private String lastName; public String getFirstName() { returnfirstName; } publicvoidsetFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { returnlastName; } publicvoidsetLastName(String lastName) { this.lastName = lastName; } @Override public String toString() { // TODO Auto-generated method stub returnthis.firstName+" "+this.lastName; } } User.java

  8. Thank Q

More Related