Mobilefirst 7.0 soapadapter fails calling no argument operatio

I created a soapadapter via the wizard using the webservice wsdl file. Most operation run succesfully bu one. This particular operatio returns an array of objects and consume no arguments. The sample procedure parameters is:

{
"recuperaVariabili": {
}
}

Calling the procedure, never invokes onSuccess nor onFailure functions. Looking at MobileFirst server log, I can see the following stacktrace:`

[ERROR ] FWLSE0099E: An error occurred while invoking procedure [project FinancialGuardian]SoapAdapter1/RischiServiceService_recuperaVariabiliFWLSE0100E: parameters: [project FinancialGuardian]
TypeError: Cannot read property "children" from undefined (2015-06-12T15:19:59.479Z/198f6d0c5bd3a9763e35dfa0268338bb84d5cfae/SoapAdapter1-impl.js#1134)
FWLSE0101E: Caused by: [project FinancialGuardian]nullorg.mozilla.javascript.EcmaError: TypeError: Cannot read property "children" from undefined (2015-06-12T15:19:59.479Z/198f6d0c5bd3a9763e35dfa0268338bb84d5cfae/SoapAdapter1-impl.js#1134)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3687)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3665)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3693)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3712)
at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3725)
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1432)
at org.mozilla.javascript.Interpreter.doGetElem(Interpreter.java:2204)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1260)
at script.handleMappings(2015-06-12T15:19:59.479Z/198f6d0c5bd3a9763e35dfa0268338bb84d5cfae/SoapAdapter1-impl.js:1134)
at script.buildBody(2015-06-12T15:19:59.479Z/198f6d0c5bd3a9763e35dfa0268338bb84d5cfae/SoapAdapter1-impl.js:1117)
at script.RischiServiceService_recuperaVariabili(2015-06-12T15:19:59.479Z/198f6d0c5bd3a9763e35dfa0268338bb84d5cfae/SoapAdapter1-impl.js:960)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107)
at com.worklight.integration.js.JavaScriptManager.callFunction(JavaScriptManager.java:267)
at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:241)
at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:211)
at com.worklight.integration.services.impl.AdapterManagerImpl.invokeFunction(AdapterManagerImpl.java:125)
at com.worklight.integration.js.JavaScriptProcedureInvoker.invoke(JavaScriptProcedureInvoker.java:42)
at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:54)
at com.worklight.integration.model.Procedure.invoke(Procedure.java:166)
at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedureInternal(DataAccessServiceImpl.java:676)
at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedure(DataAccessServiceImpl.java:622)
at com.worklight.integration.services.impl.DataAccessServiceImpl.access$100(DataAccessServiceImpl.java:69)
at com.worklight.integration.services.impl.DataAccessServiceImpl$3.execute(DataAccessServiceImpl.java:504)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:501)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedure(DataAccessServiceImpl.java:155)
at com.worklight.gadgets.serving.handler.BackendQueryHandler.getContent(BackendQueryHandler.java:95)
at com.worklight.gadgets.serving.handler.BackendQueryHandler.doPost(BackendQueryHandler.java:56)
at com.worklight.gadgets.serving.GadgetAPIServlet.doGetOrPost(GadgetAPIServlet.java:148)
at com.worklight.gadgets.serving.GadgetAPIServlet.doPost(GadgetAPIServlet.java:108)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1275)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:766)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:472)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:135)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
at com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:215)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:220)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:86)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:975)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1097)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:81)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:912)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:938)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)

What am I missing?

Best How To :

I examined the WSDL that you've provided and for the recuperaVariabili service the input parameter is defined as:

<element name="recuperaVariabili">
<complexType/>
</element>

I believe that the empty complexType is what confuses that adapter generator as it might expect some elements/attributes to be defined for that complex type. I must say that this is a valid declaration in XSD/WSDL so the MF should be able to handle such cases.

I can think of two quick fixes until it will be fixed in MF:

1) Update the adapter's RischiServiceService_recuperaVariabili function so that the mappings variable should be something like this:

Do not try to include namespaces in your XPath query. If all you want is the text of the SomeResult node, then you can use '//SomeResult' as query. For some reason the default xml implementation (msxml) barfs on the default namespace xmlns="http://someurl" on the SomeResponse parentnode. However, using OmniXML as...

I ended up writing my own code for outputting a soap fault. Then I can return whichever HTTP Status Code I want. I'm not sure what $faultname and $headerfault should be used for. Please leave a comment if you've got any idea. function soapFault($faultcode, $faultstring, $faultactor = null, $detail =...

That is indeed one of the parameters that you cannot 'externalize' to worklight.properties in order to read its value from a variable. You can submit a feature request here: http://developer.ibm.com/mobilefirstplatform/help...

Generally it means that the worklight-jee-library.jar shared library referenced in the server.xml (in each MFP runtime application) is not found. Check the path of this library in the server.xml and that the jar file is present in this path.

If you are trying to enrich the data from one source and combine that with information from another source, I think this is a decent solution. I think it is better to have one single point to talk to (your REST service), than to have two in your application and...

Ok so I took the lead from Cyaegha (Thank you) and I generated POJO's using wsdl2java using the answer below. Solution for wsdl2java serialization Using these POJO's which implement Serializable interface now works! Happy times! =)...

When trying to tackle problem like this in Ruby, it's useful to think of it in terms of transformations on your data. The Ruby Enumerable library is full of methods that help you manipulate regular data structures like Array and Hash. A Ruby solution to this problem looks like: def...

The error message says: The request failed with an empty response. As with troubleshooting any PHP script, the very first thing you should do is check your PHP error log. Did you check it? What did it say? Failing that -- post your code. Tough to help you if you...

Solved! After many search and modification I finally solved the problem with a new web.config changing. How I have not client endpoints but server endpoints for all clients that communicates with my WS. I also needed to create a new service (svc and interface files in the same WCF project)...

This is not related to MobileFirst but to the underlying application server that handles the logs creation. AFAIK not WebSphere full profile nor WebSphere Liberty profile provide the ability to separate logs based on their contents. What you could do is create your own tool/script that will go over the...

You are correct that the JEE library is missing. Could it be that you did not declare it in the Ant task? See this user documentation topic: Building applications and adapters > Building an adapter building a Java adapter without libs <path id="my.path"> <pathelement path="/opt/IBM/Worklight/WorklightServer/worklight-jee-library.jar"/> </path> <adapter-builder folder="adapterRootFolder" destinationfolder="destination-folder" classpathref="my.path"/>...

If you check this answer you might find your clue how-to-enable-soap-on-centos You should point to some soap.so library. DLLs are usually on windows. Check your libraries path /usr/local/lib/php/extensions and see if any soap.so library is to be found there...

This turned out to be caused by a class being constantly re-created which is initializing a new Context on each service call. In a nutshell: The Axis2 (temp files) issue does not reproduce on Axis2 1.5.4. Temp fles are generated only on the creation of a new Axis2 Context. Temp...

About the error message: /home/worklight/.worklight/server-configuration-tool/Configuration_MobileFirst_7‌​/MobileFirst_7.xml:71: The element , is missing. A default user cannot be created for this server. This happens if your Liberty is configured for LDAP. In that case, the server configuration tool is not able to add a user (it can add users if Liberty has a...

So after some digging I finally found a suitable answer. XML / SOAP apparently support the ability to indicate that a value can contain special characters. You do this by enclosing the value in a CDATA element. For example, if I had a value for an XML node named Characters...

It is just an expression to add enthusiasm. It isn't to mean that other existing web services architecture aren't build for the web. Since REST is a choice implementation for a lot of lightweight(not much extra xml markup, human readable, no toolkits required to build) requirement, it has gotten...

I've confirmed that this is PHP bug, and was introduced in PHP 5.6.7, in commit fd4641696cc67fedf494717b5e4d452019f04d6f. The workaround is to call openssl_error_string() after openssl_pkcs12_read(). Update A pull request has been submitted to address this issue....

The best approach here is to have a simple wrapper script as mentioned previously. This keeps you safe from updates. Also, be sure to remove the PATH setting in "/etc/profile". Its quite simple... In Bash: #!/bin/bash #-------------------------------------------------------------------- # Simple multi-MFP launcher script # Karl Bishop <kfbisho[email protected]> #-------------------------------------------------------------------- #-- Set specific...

You could do something like this (very rough idea): As part of your authentication flow, if the user has passed the authentication - store in either localStorange or JSONStore a "token" that will basically state that the user has previously logged in. Also save in the server's database using userPrefs...

We don't have "consumers and producers" with Spring version 3.0.2, So we need to add some additional entries in root pom.xml and dispatch-servlet.xml to use @RequestBody annotation. pom.xml <!-- jackson --> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.13</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-asl</artifactId>...

Did you make sure to place a .gitkeep file in the java-adapter-folder\lib folder? The folder by default is empty and GIT does not preserve empty folders, and so when downloading this project from GIT the folder will be missing, but it may be required for the build process. Try adding...

On my server with Windows and PHP 5.4.23 this: if (!empty((array)($occulist))) { gives the following error: Parse error: syntax error, unexpected '(array)' (array) (T_ARRAY_CAST) I fixed it using: if (get_object_vars($occulist)) { I think that is a more elegant alternative to the original......

As far as I understood, WSS4J is not able to create an Enveloped Signature at all! Therefore I moved into another direction. I used Apache Santuario in order to create a Signature for my message. I used the Intercepor mechanism of CXF to create my own interceptor, an abstract class...

I examined the WSDL that you've provided and for the recuperaVariabili service the input parameter is defined as: <element name="recuperaVariabili"> <complexType/> </element> I believe that the empty complexType is what confuses that adapter generator as it might expect some elements/attributes to be defined for that complex type. I must say...

We were using v1.7 of Installation Manager, installed as adminsitrator. We moved up to v1.8.2.1 installed as our user. It now works. Whether that's a version problem or an ownership problem I can't say....

object is a string in this example. You can retrieve the attribute using getattr Objects = ["Contact", "Opportunity"] for object in Objects: # object is a string. print getattr(sf, object).describe() ...

Finally i figured out what was the issue i was creating new cookie container for both the request request.CookieContainer = new CookieContainer(); thus server was unable to authenticate Error was resolved by using this code CookieContainer cookieJar = new CookieContainer(); private void CreateObject() { try { string abc = "";...

The instructions you've followed are incorrect when using MobileFirst Platform. Follow the steps described in this user documentation topic (for Worklight 6.2, but valid for MFPF 6.3 and above as well). Do not export the certificate from a browser because this action adds browser metadata and other artifacts which shouldn't...

previous i was using this address. either php or soapui works. http://localhost/magento/index.php/api/?wsdl now i am using this address in both my soapui and php. both are working now. http://localhost/magento/index.php/api/soap/?wsdl...

You cannot create a SOAP message without SOAP envelope and body as they are required parameters for any message to confirm to SOAP standard. In case of your requirement, you can create a normal XML message with all the tags and attributes necessary. But, you will have to take care...

Actually you can generate class with soap ui. And your program can easily call the service using the class created without construct your own request header and body But you need some library. Example java jdk comes with jax-ws lib tutorial: http://www.soapui.org/soap-and-wsdl/soap-code-generation.html...

If you want to save in a file all request that your Mock service recieve, simply do the follow. In your mock service open the onRequest script tab as in the follow image (this script executes each time that your service receives a request): And add the follow groovy script...

Starting MFPF 7.0 there are two authentication models: Classic: as you know it from pre-7.0 versions OAuth-based If your adapter is developed in the Classic way, it continues to work as before. If you want a procedure to have no security defined for it, not even the default internal one...

Found a guide for this here, which does load tests. For normal functional tests, the official documentation is here. A sample command for functional tests goes like: sh /opt/app/home/SOAP-UI/SoapUI-5.0.0/bin/testrunner.sh -a -s"Test_Suite2" -r -f/opt/app/home/SOAP-UI/test-project/reports/ /opt/app/home/SOAP-UI/test-project/test-soapui-project.xml ...

I think you are confusing how you invoke/test the adapter, with what verb it uses on the back-end system it is calling. You are testing/invoking it using GET, but the adapter is then calling your backend system - http://kenatibm.cloudant.com/backendsystem - using PUT. This is broadly the same explanation as Dave...

No, just generating a PKCS#1 signature is not enough. PKCS#7 specifies the Cryptographic Message Syntax (CMS). This is a container format, not just a signature. You need an implementation of CMS to create such a signature. A well known library that contains an implementation of CMS is Bouncy Castle: Generators/Processors...