I generated the IDL and XMM file for a web service and also started the XML RPC server.
When I tried to test using XML Tester, I got below error.
XML Tester Error: Broker Error 2000 0079: Transport error. Caused by: org.apache.axis2.AxisFault: The input stream for an incoming message is null.
I think XML RPC server is waiting for a response from web service and reporting an error beacuse it did not get any reply back from the web service. However, web service is an asynchronous service with no reply. Further, I verified that web service did receive the request xml payload which I used in my test and completed successfully. but still we got an error in XML tester.
I’m not sure if I’m missing any step to make my call as asynchronous with no reply. I tried to search but could not find where to specify if I’m expecting a reply from web service or not.
Another thing which I noticed that EntireX generated the parameter in IDL file as InOut while I think it should have generated as In. I tried to modifly the property of parameters in XMM file as In but still got same error.
When you use XML RPC server, it means you call an external Web Service (elsewhere outside EntireX domain).
In such case - this is not the use case for XML tester, rather you should use Java Tester under workbench.
On IDL - click Test Software AG IDL, specify Broker and RPC service of XMLRPC Server ( example RPC/XMLSERVER/CALLNAT).
Click PING - to check connectivity to XMLRPC server.
Enter INput parameters, and issue Call; this will cause XMLRPC server to send SOAP to extenal Web Service.
RPC is generally a request/reply protocol. To use asynchronous requests that are not expecting a reply, you have to use the “Reliable RPC” options. The EntireX RPC Server that you are calling must support Reliable RPC.
A key requirement for Reliable RPC is that the IDL must have “IN” elements only. You need to change the “Data-Area” to IN only and regenerate your wrapper.
I tried to test using Java Tester but got the same error message. I was using ADVANCED trace level and was able to see the request payload but not response beacuse web service is asynchronous with no reply and my server is expecting a reply and I think this is the reason I’m getting the error.
I have no experince working with reliable RPC and would appreciate if you can provide any documentation reference or example of reliable RPC.
Not sure, If I need to change some option for my broker / XML RPC server. If yes, what option do I need to specify to make it reliable RPC. IF i need to make changes to my broker, Will it affect my other xml rpc server which are used for synchronous communication.
When you have further questions, please include the complete scenario you are working with. For example, using EntireX Designer 8.2.1, you import a WSDL into the workbench, which generates an IDL and XMM mapping. You have an XML RPC Server running on Windows 7 and deployed your aar files to there using the Designer deployment.
I generated the IDL and XMM files by importing the external web service WSDL file using EntireX Designer 8.2.1.
I’m running XML RPC server on Windows XP.
I tested the XMM file using XML tester by using Reliable RPC option and did not see any error on the designed workbench. However, I could see the error “SendReceive Exception: com.softwareag.wsstack.client.API.WSClientException: org.apache.axis2.AxisFault: The input stream for an incoming message is null.” in the XML RPC server log file exx.sdk.xml.runtime.log.
I also executed a test from Natural and got the Natural error (NAT6977 EntireX RPC error on Server, reason 10010007). I checked the log file and found the same error ((SendReceive Exception: com.softwareag.wsstack.client.API.WSClientException: org.apache.axis2.AxisFault: The input stream for an incoming message is null.) for my test from Natural.
I checked the external web service and found that message was received by external web service and processed the message successfully.
I am jumping into this conversation as I am working on this with Yogesh. He has done a fine job of researching the leads that Doug has provided, and I think we are close to having this work. Yogesh has tried the Reliable RPC approach and has generated RPC Client modules from the workbench. However, we are now getting errors back saying that the XML RPC Server is not a high enough ACI version to support Reliable RPC.
Please advise what we need to do to overcome this problem.
OK I can see how USR2071N is different. What are the requirements of this routine? Are these RACF ids? Natural Security ids? Something new specific to EntireX (and if so, where do I set up these ids?). Guess I am uncertain as to where this is being authenticated to.
And depending on what kind of user ids these are, I could have problems if we want the user’s *USER value populating the USER_ID field since I am not sure how we populate their password. Is password required?
I assume your approach will not work. You cannot have a HTTP server which does not send back a reply.
The HTTP specification clearly states that HTTP is a synchronous request/reply model, see HTTP/1.1: Introduction
A HTTP client has to wait for a HTTP response from a HTTP server, and this what the XML RPC Server does. If no reply is coming back it will wait forever and stop responding to other requests (Brian, does this sound familiar … ?)
It’s a lot to absorb. Looking at the documentation block, it makes reference to a parm called httpConnectionTimeout which isn’t part of the default enitrex.xmlrpcserver.properties file.
The documentation seems to point there with this block:
TargetServer Block
The section
specifies a Web service address (currently only http(s) is possible)
contains the IDL-XML mapping files (XMM)
allows specification of basic authentication with a fixed user/password within the tag :
attribute user : Name of default user
attribute password : Password of default user
optional attribute password-encryption; possible values: base64, plainText (default). Specifies how the password is encrypted.
attribute httpConnectionTimeout : HTTP connection timeout in seconds
See Reference - HTTP and Java Interface for explanation of attributes.
Is this where I add this timeout parm?
I am also a bit confused because Douglas seemed to explain how the use of Reliable RPC would allow us to make these asynchronous web service calls. Now you are saying that you can never make asynchronous web service calls directly. Possibly if I can figure out how to do this I can call some code in Java that hides this from me so I call THAT from the XML RPC Service instead of the service itself to simulate a put-and-forget scenario.
Please advise if I seem to understand this at the most microbial level.
Looks like there is some confusion about the relationship of web services and HTTP. HTTP is a transport protocol which has nothing to do with web services (it has been invented for browser to web server communication). HTTP can be used as a transport for web services (“SOAP over HTTP”). So you can still have asynchronous web services using (synchronous) HTTP. To achieve this either the web server (which receives the HTTP call) or the web service stack (which processes the web service) have to send back a reply to the waiting HTTP client before actually executing the web service.
But as I have already mentioned you can bypass the standard HTTP logic of the XML RPC Server and use your own one in a custom Java class which could look similar to the following (very basic and completely untested):
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Properties;
import com.softwareag.entirex.xml.rt.XMLRPCServerInterface;
import com.softwareag.entirex.xml.rt.XMLRPCServer;
public class MyXMLRPCServer implements XMLRPCServerInterface {
private XMLRPCServer xmlRpcServer;
public MyXMLRPCServer() {
xmlRpcServer = new XMLRPCServer();
// register your implementation of XMLRPCServerInterface
xmlRpcServer.registerXMLRPCServerClass(this);
}
private void start(String[] args) throws Exception {
xmlRpcServer.start(args);
}
public byte[] invoke(byte[] requestDocument, Properties properties)
throws Exception {
String url = "http://myserver:8001/soa-infra/services/default/myservice";
HttpURLConnection http = (HttpURLConnection) new URL(url).openConnection();
http.setDoOutput(true);
http.getOutputStream().write(requestDocument);
http.getOutputStream().close();
return new byte[0];
}
public static void main(String[] args) throws Exception {
MyXMLRPCServer myServer = new MyXMLRPCServer();
// start XML/SOAP RPC Server with arguments (same as command line)
myServer.start(args);
}
}