Hi, When calling a webservice in our application we are getting a java.lang.IllegalStateException error. The included message is Current state not START_ELEMENT or END_ELEMENT. We have multiple webservices running successfully, the main difference being that this particular service requires a base64Binary element which is converted to a binary attribute in the Modeler after importing the wsdl. By using the Export with Mapping MF action I can generate the XML for the call without encountering any errors and the resulting XML looks OK. Can anyone help us with this error? The stacktrace is included below. Kind regards, Koen Brouwers Stacktrace: Current state not START_ELEMENT or END_ELEMENT at com.ctc.wstx.sr.BasicStreamReader.getName(BasicStreamReader.java:721) at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.getName(XMLStreamReaderFilter.java:228) at com.sun.xml.ws.wsdl.parser.FoolProofParserExtension.post(FoolProofParserExtension.java:75) at com.sun.xml.ws.wsdl.parser.FoolProofParserExtension.bindingElements(FoolProofParserExtension.java:104) at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.bindingElements(WSDLParserExtensionFacade.java:150) at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseBinding(RuntimeWSDLParser.java:481) at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:357) at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:172) at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:135) at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:275) at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:238) at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:186) at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:111) at javax.xml.ws.Service.<init>(Service.java:77) at javax.xml.ws.Service.create(Service.java:707) at com.mendix.integration.webservices.call.ImportedService.service$lzycompute(ImportedService.scala:35) at com.mendix.integration.webservices.call.ImportedService.service(ImportedService.scala:28) at com.mendix.integration.webservices.call.MetroDispatcher.createDispatcher(MetroDispatcher.scala:126) at com.mendix.integration.webservices.call.MetroDispatcher.com$mendix$integration$webservices$call$MetroDispatcher$$dispatchAsPayload(MetroDispatcher.scala:88) at com.mendix.integration.webservices.call.MetroDispatcher$$anonfun$3.apply(MetroDispatcher.scala:38) at com.mendix.integration.webservices.call.MetroDispatcher$$anonfun$3.apply(MetroDispatcher.scala:33) at com.mendix.integration.util.AutoCloseableUtil$.using(AutoCloseableUtil.scala:8) at com.mendix.integration.webservices.call.MetroDispatcher.dispatch(MetroDispatcher.scala:33) at com.mendix.integration.webservices.call.WebserviceCaller.com$mendix$integration$webservices$call$WebserviceCaller$$call(WebserviceCaller.scala:137) at com.mendix.integration.webservices.call.WebserviceCaller$$anonf$$$$e959ef1748ff875c9cd682a9c757afa$$$$callWithRequestStream$5.apply(WebserviceCaller.scala:89) at com.mendix.integration.webservices.call.WebserviceCaller$$anonf$$$$e959ef1748ff875c9cd682a9c757afa$$$$callWithRequestStream$5.apply(WebserviceCaller.scala:88) at com.mendix.integration.util.AutoCloseableUtil$.using(AutoCloseableUtil.scala:8) at com.mendix.integration.webservices.call.WebserviceCaller.com$mendix$integration$webservices$call$WebserviceCaller$$callWithRequestStream(WebserviceCaller.scala:88) at com.mendix.integration.webservices.call.WebserviceCaller$$anonfun$call$2.apply(WebserviceCaller.scala:35) at com.mendix.integration.webservices.call.WebserviceCaller$$anonfun$call$2.apply(WebserviceCaller.scala:35) at scala.Option.fold(Option.scala:158) at com.mendix.integration.webservices.call.WebserviceCaller.call(WebserviceCaller.scala:35) at com.mendix.integration.webservices.WebserviceModuleImpl.callWebservice(WebserviceModuleImpl.scala:47) at com.mendix.integration.actions.microflow.WebServiceCallAction.execute(WebServiceCallAction.scala:95) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51) at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191) at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:651) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:43) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51) at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191) at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:651) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:43) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51) at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191) at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:651) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:43) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51) at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191) at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:651) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:43) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51) at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191) at com.mendix.basis.component.InternalCore.execute(InternalCore.java:573) at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:328) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:313) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:313) at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.IMonitoredAction$class.monitor(IMonitoredAction.scala:49) at com.mendix.webui.requesthandling.ClientRequestHandler$ClientMonitoredAction.monitor(ClientRequestHandler.scala:431) at com.mendix.webui.requesthandling.ClientRequestHandler.handleRequest(ClientRequestHandler.scala:313) at com.mendix.webui.requesthandling.ClientRequestHandler.handleActionWithSessionRequired(ClientRequestHandler.scala:251) at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:218) at com.mendix.webui.requesthandling.ClientRequestHandler.liftedTree1$1(ClientRequestHandler.scala:104) at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:96) at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:70) at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:67) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:73) at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:858) at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.handle(RuntimeHandler.java:41) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:748)
asked
Koen Brouwers
1 answers
2
This issue has now been resolved.
The WSDL we imported did not have any whitespaces between the elements which somehow caused this error. By importing a new WSDL which did have the whitespaces the call to the webservice works as expected