I have a Web Service I setup on the iSeries. It works when using SOAPUI and it works from the Built in test facility in the Native Web server. But when I try to access it form the following PHP program it fails to return any data. I am obviously fairly new to this and I am not sure what I am missing.
<?php
echo 'Start of Soap Request<br />';
$client = new SoapClient("http://iseriesdev.wdm.int:10010/web/services/getItemDesc?wsdl");
print_r($client);
echo '<br />Start of Var_Dump<br />';
var_dump($client);
echo '<br />Result Print<br />';
$result = $client->testws(array("PEITEM" => "1020000000", "PEMSG" =>" "));
print_r($result);
?>
That accesses a web service on my iSeries. I can get the Web Service to work in SOAP UI, but for some reason it does not work when called from this very short program. I seem to be missing something. I have tried to look at the error logs on the iSeries, but all I have been able to find is a Null Pointer Error:
[ERROR] Exception occurred while trying to invoke service method testws
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:256)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:201)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:176)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:163)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937)
at com.ibm.pvc.internal.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:85)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at com.ibm.wsspi.webcontainer.WebContainer.handleRequest(WebContainer.java:95)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:54)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:457)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:360)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:632)
Caused by: java.lang.NullPointerException
at iseries.wsbeans.getitemdesc.GetItemDescServices.testws(GetItemDescServices.java:34)
... 24 more
When installing a web service on the iSeries it automatically generates the WSDL. Here …