Search code examples
javaweb-serviceswsdljax-wsmtom

Does WSDL need any changes when applying MTOM to a web service?


So, let's assume I have a simple web service in which I am not using attachments. And then I would like to start sending attachements via MTOM. Do I need to change anything in a WSDL file? As far as I know I don't have to make changes there, but I would like to make sure.


Solution

  • Now I have found this instruction and there is a paragraph 1a) Modifying your schema for MTOM and it seems that there is only one optional change. It is to add xmime:expectedContentTypes parameter to field which data is to be sent as an attachment. It is optional and it tells JAXB which type of data is expected in this attachment and JAX-WS web service receives this attachment in corresponding Java type.