MultiRef in SOAP XML Response

Hi all, In implementing a consumed SOAP webservice, I have created XML Import and XML Export mappings based on the provided WSDL. When I call the webservice and set the loglevels for webservices to Trace, I nicely see a response coming back, wth all the returned attributes I need to have and was expecting. Sadly this XML Import mapping does not reflect the attributes that came back in the response. I think it is related to the fact that the XML I see in the tracing of the webservice response, has a multiRef tag. This multiRef tag is not correctly translated to my response entity, even though it came from it's own WSDL. Does anybody have experience with the multiRef response in a standard Mendix SOAP webservice call?
2 answers

Sounds like this should go to a support ticket. You might be able to work around this by accepting the XML response as a string, replacing the multiRef tag, then importing the XML string using an import mapping.


I gave the short term solution a go and parsed the response of a SOAP webservice call via Java to a string variabele, see below.

public static String callWebservice(String location, String username, String password, String soapAction, String bodyString,ILogNode logNode) throws HttpException, IOException {

    // build first part of envelope
    String soapEnv = "<soapenv:Envelope xmlns:xsi=\"\" xmlns:xsd=\"\" xmlns:soapenv=\"\" xmlns:ser=\"\" xmlns:soapenc=\"\"><soapenv:Header/><soapenv:Body>";
    // build last part of envelope
    String soapEnvEnd = "</soapenv:Body></soapenv:Envelope>";

    // add all together
    RequestEntity soapRequest = new StringRequestEntity(soapEnv + bodyString + soapEnvEnd);

    PostMethod post = new PostMethod(location);
    post.setRequestHeader("Host", new URI(location).getHost());
    post.setRequestHeader("SOAPAction", soapAction);


    HttpClient client = new HttpClient();
    int status = client.executeMethod(post);

    return post.getResponseBodyAsString();


After receiving the string response with a regex I searched for the correct value of the tag I was looking for, with this:

String wsResponseString = callWebservice(location,un,pw,soapAction,bodyString,logNode);

String patternString = "<" + lookupTag + " xsi:type=\"xsd:string\">(.+?)</" + lookupTag + ">";

final Pattern pattern = Pattern.compile(patternString);
final Matcher matcher = pattern.matcher(wsResponseString);

// look for the value between the tags

if (!=null){
    String tagValueString =;   
    return tagValueString;
} else {
     return null;