vendredi 5 mai 2017

Best practice for Java to create new SOAP objects

We are calling external web service APIs. We generated object package by using the wsdl file.

While calling the SOAP API in Java, we always have to instantiate lots of new objects like this way:

A a = new A();
B b = new B();
b.setField1(value1);
b.setFiled2(value2);
a.setB(b);

What is the best practice to deal with such kind of instantiating new objects?

Aucun commentaire:

Enregistrer un commentaire