Pinned topicAccessing datapower XML Management interface from within a stylesheet
2013-12-19T16:43:15Z
|
Answered question
This question has been answered.
Unanswered question
This question has not been answered yet.
Hi,
I found a posting with same title on developer works to access xml management interface from within my stylesheet which I am using on a transform action in xmlfw service.
I am firing a plain xml using 'send a test message' to the datapower service that contains stylesheet with exact same config as posted above (the only change is instead of local host:5550, I have given <eth2>:5550 since this where our xml mgmnt interface is defined while I am firing the request through GUI which is defined on eth1) but I am not getting any response.
Could someone let me know as to how should my request message look like? I tried firing a soap message as well with empty header n body but didn't get any response either.
Thanks,
Mohit
Hi,
I found a posting with same title on developer works to access xml management interface from within my stylesheet which I am using on a transform action in xmlfw service.
I am firing a plain xml using 'send a test message' to the datapower service that contains stylesheet with exact same config as posted above (the only change is instead of local host:5550, I have given <eth2>:5550 since this where our xml mgmnt interface is defined while I am firing the request through GUI which is defined on eth1) but I am not getting any response.
Could someone let me know as to how should my request message look like? I tried firing a soap message as well with empty header n body but didn't get any response either.
No I didn't just copy and paste the code from somewhere on the internet; I pasted it from one of Hermann's post only on developer works. And yes, I have my own user id and password instead of soma and secret.
My needs and requirements are entirely different and since I have used soma multiple times but never made a call from within the service, so I wanted to test the same sample xslt for once that is given above.
Hermann,
I tested with the above code and the only changes that I made were my userId:pwd combination (which already has access on DP) and the call in the xslt was made on eth2:5550 instead of localhost:5550 as this is where our xml management interface is defined. I fired the request using 'Send a test message' option in datapower but I am not getting any response. Probe is also not showing anything.
No I didn't just copy and paste the code from somewhere on the internet; I pasted it from one of Hermann's post only on developer works. And yes, I have my own user id and password instead of soma and secret.
My needs and requirements are entirely different and since I have used soma multiple times but never made a call from within the service, so I wanted to test the same sample xslt for once that is given above.
Hermann,
I tested with the above code and the only changes that I made were my userId:pwd combination (which already has access on DP) and the call in the xslt was made on eth2:5550 instead of localhost:5550 as this is where our xml management interface is defined. I fired the request using 'Send a test message' option in datapower but I am not getting any response. Probe is also not showing anything.
I did redefine XML management interface to only listen on mgt0 interface and made my stylesheet go against mgt0:5550.
Everything works.
So please just take the stylesheet from my blog posting "as is" and then just change username, password and ip address.
Then try it with that stylesheet.
Have you used the user you specify in stylesheet to access XML management interface successfully from external?
Please set loglevel to debug (and perhaps enable internal logging) and look where/why the xmlmgmt call fails.
I did redefine XML management interface to only listen on mgt0 interface and made my stylesheet go against mgt0:5550.
Everything works.
So please just take the stylesheet from my blog posting "as is" and then just change username, password and ip address.
Then try it with that stylesheet.
Have you used the user you specify in stylesheet to access XML management interface successfully from external?
Please set loglevel to debug (and perhaps enable internal logging) and look where/why the xmlmgmt call fails.
I was facing issues that day due to some problems with "send a test message" option it seems. It worked fine with soapUI.
Currently, I am developing a service which will capture the domain that have probes enabled and loop through each of those domains to get the services where probe is enabled. Now I am putting a condition that if probe is enabled for 3 or more services for a domain, then only disable all of them else leave it like that.
I am facing two issues here:
1. For disabling the probes for a domain, I need to use modify-config where the syntax is such that I need to give debug mode off for mpgw, wsp and xmlfw separately. How do i do that since my output is displaying multiple service names which aren't categorized into service types? Is it possible to do it in a single shot for a domain?
2. Another thing is I am not able to do get-config for multiple domains for which I am getting the probe enabled status. I have to hard ciode the domain name to do get-config else I am getting authentication failure.
I was facing issues that day due to some problems with "send a test message" option it seems. It worked fine with soapUI.
Currently, I am developing a service which will capture the domain that have probes enabled and loop through each of those domains to get the services where probe is enabled. Now I am putting a condition that if probe is enabled for 3 or more services for a domain, then only disable all of them else leave it like that.
I am facing two issues here:
1. For disabling the probes for a domain, I need to use modify-config where the syntax is such that I need to give debug mode off for mpgw, wsp and xmlfw separately. How do i do that since my output is displaying multiple service names which aren't categorized into service types? Is it possible to do it in a single shot for a domain?
2. Another thing is I am not able to do get-config for multiple domains for which I am getting the probe enabled status. I have to hard ciode the domain name to do get-config else I am getting authentication failure.
Here the problem is < isn't getting displayed as <. I require this since the output of value-of select="name()" is a text value which needs to be displayed as an xml tag in order to do further processing on that. I tried using hex value of less than in a variable and then display but it's still coming as < This issue isn't happening with > (>). Also, CDATA is throwing internal error when changing xslt on datapower. I am sure this is the probl;em with xslt parser that we have on our appliance but then what is the workaround?
Here the problem is < isn't getting displayed as <. I require this since the output of value-of select="name()" is a text value which needs to be displayed as an xml tag in order to do further processing on that. I tried using hex value of less than in a variable and then display but it's still coming as < This issue isn't happening with > (>). Also, CDATA is throwing internal error when changing xslt on datapower. I am sure this is the probl;em with xslt parser that we have on our appliance but then what is the workaround?
I have deleted my previous posts as I got solution to most of them. CDATA problem got resolved using another stylesheet and it's working fine on DP. I am stuck at one thing though.
How do i pass domain name dynamically in get-config? If I do get-config, then there might be out of mem issue due to large number of domains and configurations within. So, first I am making a soma call do check domain status and from there, whichever domain has probe enabled will be passed as a parameter to get-config but it doesn't seem to be working.
It's only working when I am hard coding the domain name. Here is the code snippet which is causing issue:
I have deleted my previous posts as I got solution to most of them. CDATA problem got resolved using another stylesheet and it's working fine on DP. I am stuck at one thing though.
How do i pass domain name dynamically in get-config? If I do get-config, then there might be out of mem issue due to large number of domains and configurations within. So, first I am making a soma call do check domain status and from there, whichever domain has probe enabled will be passed as a parameter to get-config but it doesn't seem to be working.
It's only working when I am hard coding the domain name. Here is the code snippet which is causing issue: