Web service Mandatory field in Optional object.

2
Hi there, We have a third party web service that we imported into our Mendix application. The Input parameters of this web service consists of multiple complex types. The problem that I have is, when a complex type is optional, but a field in this type is mandatory, it is set as mandatory in MENDIX. Have a look at this example : <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <schema xmlns="http://www.w3.org/2001/XMLSchema" > <complexType name="AccountApplication"> <sequence> <element name="applicationId" type="int" nillable="false"/> <element name="applicationDate" type="date" nillable="false"/> <element name="insurance" type="tns:InsuranceDetail" nillable="true" minOccurs="0"/> </sequence> </complexType> <complexType name="InsuranceDetail"> <sequence> <element name="type" type="tns:InsuranceType" nillable="false"/> <element name="partnerName" type="string" nillable="true" minOccurs="0"/> <element name="partnerId" type="tns:CustomerId" nillable="true" minOccurs="0"/> </sequence> </complexType> </schema> </types> </definitions> Each account application's insurance object can be null, but in Mendix, you would have to set the insurance object's type field. Is there a way that I can call this web service without having to enter insurance details? Please shout if anything is unclear or if you need more info. Kind Regards Frikkie Chalmers
asked
2 answers
0

OK, so now I've gone and changed the Web service call to have a Custom Request Body, I've even hard coded the XML into the Body, so I know exactly what I am passing through and what I am supposed to recieve.

But instead, I am getting the following error :


com.mendix.modules.webservices.WebserviceException: Internal server error at jB.a(SourceFile:292) at jB.b(SourceFile:129) at jB.a(SourceFile:88) at com.mendix.modules.webservices.WebserviceModule.handleWebserviceCall(SourceFile:380) at dI.processRequest(SourceFile:27) at fF.a(SourceFile:71) at com.mendix.core.MxRuntime.processRequest(SourceFile:938) at com.mendix.m2ee.server.handler.RuntimeHandler.handle(RuntimeHandler.java:42) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:992) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:550) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:662) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreException: Exception occurred in action 'Microflow [PointOfSale.PreAgreementSigned]', all database changes executed by this action were rolled back at com.mendix.core.Core.execute(SourceFile:281) Caused by: com.mendix.core.CoreException: Exception occurred in action 'Microflow [PointOfSale.PreAgreementSigned]', 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 'PointOfSale.PreAgreementSigned' for activity 'Call 'CreateVisionAccount'', all database changes executed by this microflow were rolled back at kM.b(SourceFile:252) Caused by: com.mendix.core.CoreException: Exception occurred in microflow 'TrafficCop.CreateVisionAccount' for activity 'Call web service 'createCustomerAccount'', all database changes executed by this microflow were rolled back at kM.b(SourceFile:252) Caused by: org.apache.axiom.om.OMException: localname can not be null or empty at org.apache.axiom.om.impl.llom.OMElementImpl.<init>(OMElementImpl.java:122) at org.apache.axiom.om.impl.llom.OMElementImpl.<init>(OMElementImpl.java:138) at org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory.createOMElement(OMLinkedListImplFactory.java:95) at hv.a(SourceFile:64) at kh.a(SourceFile:32) at lI.a(SourceFile:215) at lI.a(SourceFile:75) at com.mendix.modules.webservices.WebserviceModule.callWebservice(SourceFile:114) at bM.a(SourceFile:93) at kM.a(SourceFile:67) at eR.executeAction(SourceFile:96) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:49) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:473) at it.b(SourceFile:155) at com.mendix.core.Core.executeSync(SourceFile:167) at is.a(SourceFile:71) at kM.a(SourceFile:67) at eR.executeAction(SourceFile:96) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:49) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:473) at it.b(SourceFile:155) at com.mendix.core.Core.execute(SourceFile:277) at com.mendix.core.Core.execute(SourceFile:252) at jB.a(SourceFile:277) at jB.b(SourceFile:129) at jB.a(SourceFile:88) at com.mendix.modules.webservices.WebserviceModule.handleWebserviceCall(SourceFile:380) at dI.processRequest(SourceFile:27) at fF.a(SourceFile:71) at com.mendix.core.MxRuntime.processRequest(SourceFile:938) at com.mendix.m2ee.server.handler.RuntimeHandler.handle(RuntimeHandler.java:42) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:992) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:550) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:662)

answered
-1

How can I invoke this Web service from a Java Action?

answered