How to circumvent extraneous assocation tags in published webservice

4
When publishing a webservice Mendix generates unwanted extra tags for associations between entities. Consider the following example. Suppose you two entities in your domain model, Employee and Employer with an N:1 association Employee_Employer, and would would like to accept the following XML <employee> <full_name>Tim Cook</full_name> <employer> <company_name>Apple</company_name> </employer> </employee> Mendix however generates an extraneous association tag in the WSDL: <employee> <full_name>Tim Cook</full_name> <employee_employer> <employer> <company_name>Apple</company_name> </employer> </employee_employer> </employee> Because we have to publish our webservices according to certain predefined XML standards we need a solution to circumvent the Mendix behaviour. Does anybody know how we can acheive this?
asked
2 answers
0

With the Mendix webservice engine you can only expose WSDL's with the association tag in it. The Mendix XML mapper, however, can import XML that doesn't have association tags in it. You need to build your custom Webservice handler in java to expose WSDL's you like and than you can import and export the XML with the Mendix XML mapper.

The java should register a request handler in Mendix, like the deeplink module: /link/. Execute the authorization for the credentials and execute a microflow that will return the webservice response.

answered
0

I did as Joël described, registering my own requesthandler (/soap/) and in a subsequent microflow an XMLimport and it is working.

I still think this should be something available in the standard SOAP publishing WS of Mendix, so I filed a feature request for this and it has been accepted.

answered