Export a Gateway object through soma script in datapower - ibm-datapower

I have 50 MPGW's, i want to export specific/individual gateway through soma script.I tried few scripta but didnt worked out. I tried domain export it is working but specific objecf export is not working.Please help me on it

It is fairly simple, really, you just need to point out the objects you want to export, e.g.:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<dp:request xmlns:dp="http://www.datapower.com/schemas/management">
<dp:do-export format="ZIP" all-files="false">
<dp:user-comment>This is a SOMA Export...</dp:user-comment>
<dp:object class="MultiProtocolGateway" name="MPGW_1" ref-objects="true" ref-files="true"/>
<dp:object class="MultiProtocolGateway" name="MPGW_2" ref-objects="true" ref-files="true"/>
</dp:do-export>
</dp:request>
</env:Body>
</env:Envelope>

Related

Windev: Looking for suggestions on how to decrypt a string to a zip file

I am consuming a web service that answers the xml:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns0:getStatusCdrResponse xmlns:ns0="http://service.sunat.gob.pe">
<statusCdr>
<content>UEsDBBQACAgIABqiRFUAAAAAAAAAAAAAAAAiAAAAUi0yMDU1NDA2MDQ5OS0wMS1GMDA1LTAwMDAwMDc2LnhtbLVZW3OqShZ+n19h5TxmJ1wU1FSSqW5uooByVah5QUBEuQko6K+fRqMx+2TX7D01kzykWevrdfnWopvuvP6zSeLOISjKKEvfHohn/KETpF7mR2n49mAa/NPg4Z/v/3h1ixeQ53HkuRUCakGZZ2kZdNDktHx72BfpS+aWUfmSuklQvpR54EWrD/DLfhm/lN46SNyXpvRfxPSQRV7wRD5cpr+4xR9a+CaST2tBU/2hOSZLkizlmipIWxbQIzIZpFX5adRbev+VUYjg3rcG3f/OIAjDIgjdKvjOqI9Ksa6q/AXD6rp+rrvPWRFiJI7jGD7EEMYvo/CvK7rM3PyGvzgqn5GqlZ8ntgMsSA9BnOUBdnOCnN+mBU0ZV2dwKy6f3NR/qiKUy83JNc9yn7rVL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SLTIwNTU0MDYwNDk5LTAxLUYwMDUtMDAwMDAwNzYueG1sUEsFBgAAAAABAAEAUAAAAN4NAAAAAA==</content>
<statusCode>0004</statusCode>
<statusMessage>La constancia existe</statusMessage>
</statusCdr>
</ns0:getStatusCdrResponse>
</S:Body>
</S:Envelope>
The <content> is supposed to be a ZIP file, unfortunately I have no idea how to convert those characters to a ZIP, any suggestions on windev options I can use.
Use WINDEV 21.
Greetings.
Try to decode "content" to file.
bufZip is buffer = Decode(content,encodeBASE64)
fsavebuffer("c:\your folder\file.zip",bufZip)

XPROC p:file-mkdir not found

I'm using XPROC and the XPROC Processor MorganaXProc-IIIse. I'm actually just trying to create a directory through XPROC. However, all I get is this error message:
No visible declaration for '{http://www.w3.org/ns/xproc-step/filesystem}file-mkdir' found: Check spelling, imports or #use-when values.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:pf="http://www.w3.org/ns/xproc-step/filesystem" name="pipeline" version="3.0">
<p:variable name="base.dir" select="'.'"/>
<pf:file-mkdir href="${basedir}/lib"/>
</p:declare-step>
Since documentation is very limited, any hint is appreciated.
Thanks
In the context of XProc 3, the file-mkdir step is in the namespace http://www.w3.org/ns/xproc so using the prefix p your pipeline declares for that should work: <p:file-mkdir href="${basedir}/lib"/> instead of <pf:file-mkdir href="${basedir}/lib"/>.

Why does my query report "Steps within a path expression must yield nodes"?

I'm relatively new to XQuery and I'm using a XML with the following format (MODSXML):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<modsCollection xmlns="http://www.loc.gov/mods/v3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.loc.gov/mods/v3
http://www.loc.gov/standards/mods/v3/mods-3-0.xsd">
<mods ID="ISI:000330282600027" version="3.0">
<titleInfo>
<title>{Minimum Relative Entropy for Quantum Estimation: Feasibility and General
Solution}</title>
</titleInfo>
I'm trying to retrieva all titles of the articles contained on the XML file. The expression I'm using is the following:
for $x in collection("ExemploBibtex")/"quantuminformation.xml"/modsCollection/mods/titleInfo/title
return <title>$x/text()</title>
When I try to run this expression on Base, I get the following error:
"[XPTY0019] Steps within a path expression must yield nodes; xs:string
found."
Can anybody tell me what's wrong? The result I was expecting was a list with all the titles in the document.
Okay, problem solved in the BaseX Mailing List :D
I needed to declare the namespace. So now I'm using:
declare namespace v3 ="http://www.loc.gov/mods/v3";
for $doc in collection('ExemploBibtex')
where matches(document-uri($doc), 'quantuminformation.xml')
return $doc/v3:modsCollection/v3:mods/v3:titleInfo/v3:title/text()
And it works.
The problem is here:
collection("ExemploBibtex")/"quantuminformation.xml"/modsCollection
This returns a string with content quantuminformation.xml for each file/root node in the ExemploBibtex collection, and then tries to perform an axis step on each of these strings -- which is not allowed.
It seems you want to access to document quantuminformation.xml within the collection ExemploBibtex. To open a specific file of a collection, use following syntax instead:
collection("ExemploBibtex/quantuminformation.xml")/modsCollection
I cut of the last axis steps for readability and keeping the code lines short; simply add them again, they're fine.

Use REST in R, httpPUT method

I am implementing an application on R and now I'm trying to use REST protocol to communicate with an external application interface. It allows the app because this interaction has indicated in its documentation. I'm using a library called RCurl. Specifically I am using the function httpPUT. I have no idea about I'm doing wrong, but there is no change in the parameter that I want to modify it. My function is:
httpput_power<-function(DF_DEVICE_IDE_value){
require(XML)
require(RCurl)
power<-""
host<-"http://localhost:3171/devices/"
id_devices<-DF_DEVICE_IDE_value[1,1]
reader<-"/reader/parameter/RF_READ_POWER"
half_url<-paste(host,id_devices,"")
full_url<-paste(half_url,reader,"")
url_reader<-gsub(" ","", full_url , fixed=TRUE)
request="14.5"
httpPUT(url_reader, request)
}
Does anyone know a library for REST in R?. I not sure if RCurl is the most suited to do this task.
then there is an example in the documentation for the application to do a PUT with REST:
PUT http://host_address:3161/devices/{device-id}/reader/parameter/
{PARAM_NAME}
The value of the parameter.
Example: 30.5
Example:
<result>
<class>
com.keonn.impl.protocol.DefaultISO18000_6CParameters$Filter
</class>
<noFilter>false</noFilter>
<active>false</active>
<truncate>UNSPECIFIED</truncate>
<mask>
<bank>EPC</bank>
<pointer>32</pointer>
<maskLength>2</maskLength>
<mask>FF00</mask>
</mask>
</result>
I'm sure the URL is generated correctly, and in my case the parameter is RF_READ_POWER

What Data Format Exchange uses * and # instead of tags brackets?

There is a Web Service that returns this XML as a result for a GET.
I want to know is this a famous Data Exchange Format ? or it just needs to be parsed normally ?
or should I replace the * and # with normal brackets and handle it as a normal XML ?
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">Count=56,*ProjectDataSet#
*Project#
*PROJ_UID#f6f08258-52dd-481a-83a5-013cce51d901*/PROJ_UID#
*PROJ_NAME#5-2 Disaster Recovery site*/PROJ_NAME#
*DVI#0*/DVI#
*/Project#
*Project#
*PROJ_UID#7abd8857-2a9a-4d2d-82c3-139fdac26994*/PROJ_UID#
*PROJ_NAME#4-1 Automated Land Releasing System Phase II*/PROJ_NAME#
*DVI#0*/DVI#
*/Project#
*/ProjectDataSet# ###Duration: 00:00:24.5568479</string>

Resources