Project: mule
Issue MULE-7326: Can't use WebService consumer with operation without parameters
Consider the documentation attached: The endpoint localhost:8081/ consumes a web services that takes a ZIP as an input parameter. That operation works perfectly. However, in localhost:8081/test I'm trying to consume an operation which doesn't take any parameters. There's no way to make this work because: 1) WS consumer is expecting me to generate the soap envelope using datamapper, however, I don't have a payload to transform so I'm forced to create a dummy map 2) Because the operation is expecting no parameters, the XML that DataMapper generates looks like this: 3) The above results in WS consumer returning this error, basically because there's no envelope to consume: org.mule.api.transport.DispatchException: COULD_NOT_READ_XML_STREAM. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PostMethod Error put aside, it doesn't make sense to me that: * It seems like the only easy way to generate the SOAP envelopes is through DataMapper, which is not a CE feature like WS Consumer is * How do I create a valid envelope when the operation takes no parameters? * Because envelope generation depends on datamapper, I have to drop the WS Consumer box in the canvas before the DataMapper one. It's not natural for the developer to think the flow from right to left. * Shouldn't WS consumer be capable of auto generating the envelope, at least when it requires no parameters?
Story points: 5