Forum Discussion
Capturing response from a wsdl via a curl call in an iApp.
I'm working on creating an iApp template to try and implement the following:
Have tried doing this inline and via a bash script but the Application Service implementing the template fails. script
set variable [exec /path/soapcall.sh ]
inline
set variable [exec curl --cert certfile.pem [--options ] certfile.pem ]
I can get output back from the wsdl I'm calling but I'm not sure how to capture that output. I also tried with a SOAP monitor but the initial soap call and the POST for its response are two different web addresses. Please let me know if I can offer any additional information.
Thanks,
eblair84
8 Replies
- eblair84_141985
Nimbostratus
My endgame is to create a monitor from an iApp template. The monitor will call a remote web service wsdl whose presence of a return string will indicate that the web service is operational. If the service is not operational, the monitor will indicate that the pool is unavailable. - eblair84_141985
Nimbostratus
When the bash script is excuted in an SSH session, I get the desired output. So, the is just to get it to work within the iApp framework. - Dayne_Miller_19Historic F5 Account
Hello-
If you take a look at the latest version of the iApp template for Exchange Server (named 'f5.microsoft_exchange_2010_2013_cas.v1.3.0.tmpl' and available in the iapps-1.0.0.157.0.zip bundle from https://downloads.f5.com/esd/product.jsp?sw=BIG-IP&pro=big-ip_v11.x), you can see an example of a curl-based external monitor (an "EAV") that gets created to monitor the Autodiscover service. Although the URI and parameters are going to be different than what you what, it should otherwise serve as a good model for how to get an iApp to write an external script for use as a monitor, and what that script should look like.
Let us know if that gives you the information you need.
- eblair84_141985
Nimbostratus
I looked at the template and I can see a bit of what's going on there. The script is created inline and then turned into an external monitor. The I/O of the script makes sense. Where I'm getting stuck is this situation: curl script sends SOAP payload, receives response which is stored to a variable. The contents of the variable then need to dictate the status of a pool as being up/down. That piece is where I'm getting stuck. - eblair84_141985
Nimbostratus
I was going to try to use the soap monitor but the soap payload is sent to an https site, which requires a specific cert and ca as part of the curl call, which does not seem to be a feature of the soap monitor.
- Dayne_Miller_19Historic F5 Account
What error are you seeing? You say "the Application Service implementing the template fails", but what's the specific message?
Is there any way you can post your script here? Obfuscate or remove any credentials, of course, and feel free to cut out details of the POST of you need to. I'm mostly interested in seeing how you deal with parsing and acting upon the response. Remember, if anything gets sent to stdout, the monitor will mark the member "up". You want to suppress all output for the monitor to consider the member "down".
- eblair84_141985
Nimbostratus
I created a very barebones template. I put in there: set response [exec curl [credentials and site] ] It appears to execute the curl statement (the error shows the output of said curl statement) but says "the script did not successfully complete". It'll show the output of the curl call (which is a SOAP statement to a remote wsdl) but is unable to set the output back to the variable. Ultimately, I just want a solution that executes a SOAP call to a secure remote wsdl and will mark a member up or down, based on response parameters I set. I've look at the SOAP monitor but see no place for specifying certs. I look at customer external monitors but I don't see a place for a conditional statement. I might specify "variableA = X" but how does the system look at that? Does it specify that value for that variable or query that variable for the value? I tried installing soaplite but think my perl installation is corrupted because I cannot get to an MCPAN prompt without its throwing errors about config files. - eblair84_141985
Nimbostratus
Ultimately, I'd just like to be able to manually set the status of a monitor as up or down. Is there a way to do that natively within the F5 framework?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com