Added explanation how to add MTOM to Java classes after automatic code generation
This commit is contained in:
@@ -5,3 +5,21 @@ Mit Maven Goal "clean deploy" wird der Release in das Kap Dion OMDS Repository g
|
|||||||
|
|
||||||
Codegenerierung
|
Codegenerierung
|
||||||
Mit Maven Goal "clean package" und Profil "genJavaFromWsdl" wird der zugehörige Java-Code generiert.
|
Mit Maven Goal "clean package" und Profil "genJavaFromWsdl" wird der zugehörige Java-Code generiert.
|
||||||
|
|
||||||
|
|
||||||
|
ODMS MTOM in Java classes after code generation
|
||||||
|
|
||||||
|
Server (Class: OmdsServicePortImpl)
|
||||||
|
Add import:
|
||||||
|
import javax.xml.ws.soap.MTOM;
|
||||||
|
Add a class annotation (above the class name):
|
||||||
|
@MTOM(enabled = true, threshold = 1024)
|
||||||
|
|
||||||
|
Client (Class: OmdsServicePortType_OmdsServicePort_Client)
|
||||||
|
Add import:
|
||||||
|
import javax.xml.ws.soap.MTOMFeature;
|
||||||
|
Rewrite the OMDSService creation like following:
|
||||||
|
OmdsService ss = new OmdsService(wsdlURL, SERVICE_NAME);
|
||||||
|
OmdsServicePortType port = ss.getOmdsServicePort(new MTOMFeature(1024));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user