Help needed: published webservices on acceptance / production environment

0
Hi Mendix community, I have several published webservices in my mendix application and consuming these webservice during running it locally was easy and worked just fine. The consuming of these webservices within the localhost domain worked. At first I had the namespaces set to http://localhost:8080/WebserviceName but later on re-named these and I re-imported the wsdl files and did the mapping again. Now i'm trying to move to acceptance and production environments but for some reason I keep getting "Internal server errors" when trying to consume my webservices on the acceptance environment. I enabled the /ws/ and /ws-doc/ url extentions on acceptance server in my admin console. I have the idea that I need to setup different authentication because of the https:// connection on acceptance and production, maybe causing it to require certificates to be set somewhere. But I have no idea where. Since the webservice documentation only has localhost examples I was wondering if someone could help with an addon example/guide to the original documentation of webservices on how to setup a webservice that can be used both locally but also in acceptance and production environments. Thank you very much, Marnix LOG FILES 2014-10-13 11:08:51.350 ERROR - WebServices: Exception occurred while processing webservice request 2014-10-13 11:08:51.350 ERROR - WebServices: com.mendix.integration.WebserviceException: Internal server error at com.mendix.gD.a(SourceFile:120) at com.mendix.gC$a.apply$mcV$sp(SourceFile:19) at com.mendix.gC$a.apply(SourceFile:16) at com.mendix.gC$a.apply(SourceFile:16) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(SourceFile:158) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(SourceFile:36) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(SourceFile:160) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:154) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(SourceFile:147) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Caused by: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: at PersonnelManagement.WSAddAgentsData.nested.20adc488-6859-42b0-ad72-193b3f122be7 [0 of 1] (CreateAndChange : 'Create Account(Name, Active, PersonAccount, UserRoles, Password)') at PersonnelManagement.WS_AddAgentsData (NestedLoopedMicroflow : '') Advanced stacktrace: at com.mendix.core.component.InternalCore.execute(SourceFile:382) Caused by: com.mendix.modules.microflowengine.MicroflowException: at PersonnelManagement.WSAddAgentsData.nested.20adc488-6859-42b0-ad72-193b3f122be7 [0 of 1] (CreateAndChange : 'Create Account(Name, Active, PersonAccount, UserRoles, Password)') at PersonnelManagement.WS_AddAgentsData (NestedLoopedMicroflow : '') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(SourceFile:158) Caused by: java.lang.NullPointerException: null at edu.vt.middleware.password.Password.<init>(Password.java:66) at com.mendix.core.objectmanagement.member.PasswordStrengthVerifier.getVerifiedPasswordResult(SourceFile:107) at com.mendix.core.objectmanagement.member.PasswordStrengthVerifier.verify(SourceFile:58) at com.mendix.core.objectmanagement.member.MendixHashString.setValue(SourceFile:49) at com.mendix.core.objectmanagement.member.MendixHashString.setValue(SourceFile:12) at com.mendix.core.objectmanagement.MendixObjectImpl.setValue(SourceFile:224) at com.mendix.hN$e.a(SourceFile:46) at com.mendix.hN$e.apply(SourceFile:46) at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:778) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:777) at com.mendix.hO.a(SourceFile:46) at com.mendix.hR.a(SourceFile:23) at com.mendix.hR.a(SourceFile:43) at com.mendix.hR.execute(SourceFile:23) at com.mendix.ik.a(SourceFile:47) at com.mendix.ij.a(SourceFile:193) at com.mendix.ij.executeAction(SourceFile:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:199) at com.mendix.core.component.InternalCore.executeSync(SourceFile:235) at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction$b.a(SourceFile:66) at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction$b.apply(SourceFile:56) at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:778) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:777) at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.a(SourceFile:56) at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.execute(SourceFile:37) at com.mendix.ik.a(SourceFile:47) at com.mendix.ij.a(SourceFile:193) at com.mendix.ij.executeAction(SourceFile:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:199) at com.mendix.core.component.InternalCore.execute(SourceFile:378) at com.mendix.gD.a(SourceFile:96) at com.mendix.gC$a.apply$mcV$sp(SourceFile:19) at com.mendix.gC$a.apply(SourceFile:16) at com.mendix.gC$a.apply(SourceFile:16) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(SourceFile:158) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(SourceFile:36) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(SourceFile:160) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:154) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(SourceFile:147) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) 2014-10-13 11:08:51.464 ERROR - Connector: com.mendix.modules.microflowengine.MicroflowException: javax.xml.ws.soap.SOAPFaultException: Internal server error at TestEmployeeService.Ivk_CallEmployeeService (CallWebservice : 'Call web service') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(SourceFile:158) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: javax.xml.ws.soap.SOAPFaultException: Internal server error at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(SourceFile:40) Caused by: javax.xml.ws.soap.SOAPFaultException: Internal server error at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:193) at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:126) at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:199) at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:218) at com.mendix.gj$3.a(SourceFile:386) at com.mendix.gj$3.run(SourceFile:320) at java.security.AccessController.doPrivileged(Native Method) at com.mendix.gj$2.a(SourceFile:305) at com.mendix.gj$2.execute(SourceFile:301) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(SourceFile:36) at com.mendix.util.classloading.Runner$1.run(SourceFile:23) at java.security.AccessController.doPrivileged(Native Method) at com.mendix.util.classloading.Runner.runUsingClassLoaderOf(SourceFile:18) at com.mendix.gj.a(SourceFile:300) at com.mendix.gj.a(SourceFile:144) at com.mendix.ge.a(SourceFile:200) at com.mendix.integration.internal.IntegrationImpl.callWebservice(SourceFile:145) at com.mendix.fW.execute(SourceFile:74) at com.mendix.ik.a(SourceFile:47) at com.mendix.ij.a(SourceFile:193) at com.mendix.ij.executeAction(SourceFile:148) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:199) at com.mendix.core.component.InternalCore.execute(SourceFile:262) at com.mendix.iW.a(SourceFile:135) at com.mendix.pj$g.apply$mcV$sp(SourceFile:294) at com.mendix.pj$g.apply(SourceFile:285) at com.mendix.pj$g.apply(SourceFile:285) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(SourceFile:158) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(SourceFile:36) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(SourceFile:160) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:154) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(SourceFile:147) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
asked
4 answers
1

Problem is fixed,

this nullpointer error existed because of an earlier checkup in my creation microflow that checked whether the account already existed, the newly created user through the webservice was referencing to a property from an empty user object instead of the new user object that i created for this person.

Special thanks to Ronald Catersels, and anyone who helped.

answered
0
  • Does the Internal server error occur on the Mendix side? If so could you inspect the log file for a more detailed error message?

  • Are your Acceptance and Production environments in the Mendix Cloud?

  • Is it a mendix-to-mendix application?

Try SoapUI for calling the WS and inspect the response. Maybe this points you in the right direction in order to solve this problem .

answered
0

Personally I use constants for each web services that I use. This means that in your modeller you can use a constant to define the location of the web service. When running your application in Test / Acceptance / Production, you can override that constant with the correct location.

For example: - Create a constant and select it when you select 'override locatio' to Yes in your microflow where you use the web service. 1) Value of the Constant as specified in modeller: https://www.yourapplication-test.mendixcloud.com/ws/webservice 2) Override the constant in your settings > database > constants into: http://localhost:8080/ws/webservice 3) Via Home.mendix.com, override the constant for acceptance: https://www.yourapplication-accp.mendixcloud.com/ws/webservice 4) via home.mendix.com, override the constant for production: https://www.yourapplication.mendixcloud.com/ws/webservice

answered
0

That's good to hear. It wasn't clear to me in your original story.

Looking at the error, the following part might be the cause:

Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(SourceFile:158) Caused by: java.lang.NullPointerException: null at edu.vt.middleware.password.Password.<init>(Password.java:66) at com.mendix.core.objectmanagement.member.PasswordStrengthVerifier.getVerifiedPasswordResult(SourceFile:107) at com.mendix.core.objectmanagement.member.PasswordStrengthVerifier.verify(SourceFile:58)

Could it be that the password you send via the web service isn't strong enough for the set security for appectance/production? (example: you try to set password to 'abcd' while at least 1 number is mandatory?

answered