WS-call between Mendix projects

I published a webservice (from self-created Microflow) in project A. I retrieved the required URL through http://localhost:8081/ws-doc/PWS1?wsdl for call from project B. I created a webservice call & XML-to-domain mappings in project B. Deployed project A (HTTP-port 8081, Server Admin-port 8090) reimported WS into B and deployed project B (HTTP-port 8080, SA-port 8091) but unable to call the WS from microflow in project B: "An error has occurred while handling the request. [User 'Anonymous_2cb38e1a-93ef-483d-8850-e0509684d396' with roles 'Administrator']", even though the 'Request Header' in the WS operation of the calling Microflow (project B) normally contains a webuser-name & password. No matter if project-security is set on/off. In other words, how to deal with localhosts, passwords & webusers for correct communication? NEW Stack-trace: com.mendix.core.CoreException: Exception occurred in action 'Microflow [Wielrennen.IVK2]', all database changes executed by this action were rolled back at com.mendix.core.actionmanagement.CoreAction.d(SourceFile:553) Caused by: com.mendix.core.CoreException: Exception occurred in microflow 'Wielrennen.IVK2' for activity 'Call web service 'Operation'', all database changes executed by this microflow were rolled back at kM.b(SourceFile:252) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId. at fl.a(SourceFile:164) Caused by: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId. at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at fl.a(SourceFile:62) at com.mendix.core.Core.importXmlStream(SourceFile:1802) at com.mendix.core.Core.importXmlStream(SourceFile:1787) at bM.a(SourceFile:215) at bM.a(SourceFile:104) at kM.a(SourceFile:67) at eR.executeAction(SourceFile:96) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:49) at at it.b(SourceFile:155) at com.mendix.core.Core.execute(SourceFile:191) at dA.execute(SourceFile:183) at ju.a(SourceFile:299) at ju.a(SourceFile:230) at ju.processRequest(SourceFile:174) at fF.a(SourceFile:71) at com.mendix.core.MxRuntime.processRequest(SourceFile:924) at com.mendix.m2ee.server.handler.RuntimeHandler.handle( at org.eclipse.jetty.server.handler.HandlerWrapper.handle( at org.eclipse.jetty.server.Server.handle( at org.eclipse.jetty.server.HttpConnection.handleRequest( at org.eclipse.jetty.server.HttpConnection$RequestHandler.content( at org.eclipse.jetty.http.HttpParser.parseNext( at org.eclipse.jetty.http.HttpParser.parseAvailable( at org.eclipse.jetty.server.HttpConnection.handle( at at org.eclipse.jetty.util.thread.QueuedThreadPool$ at
3 answers

You can change your localhost setting in your project settings, the mendix runtime will use this value to generate the wsdl (note that you will have to reimport the wsdl). Alternatively, you have the option of using a custom URL in the call webservice microflow activity on the client side.

As far as authentication is concerned, published webservices in mendix require a "web service user" to be present. You can add these by logging in as administrator and clicking the "new webservice user" button in the User menu.


You probably used an constant or specific url in your activity. When you get this exception the message will show the actual url it tries to access. In your case this means that you're receiving the exception: ' no protocol: 2'
This means that the framework tries to access url: '2'

Take a look at your activity and the imported wsdl, maybe you've accidentally checked the box to use a specific url or constant (or selected the wrong one)


Thanks Achiel, seem to be almost there: deployed proj.A (HTTP-port 8081, Server Admin-port 8090) reimported WS and deployed proj.B (HTTP-port 8080, SA-port 8091). Upon running WS-call: “An error has occurred while handling the request. [User 'Anonymous_... with roles 'Administrator']”. In MF properties-allowed roles(proj.A): ‘webgebruiker’ (=module role) coupled to ‘user’ in project security user roles. In proj.B project-security level is turned-off. Why this message?