Anonymous_User Absent Member.
Absent Member.
241 views

Make Java calls from SOAP driver


Is it possible to use java to write three text files after retrieving
information from a SOAP response?Is there a way to do this in the SOAP
driver or there is a other way to do this?Can anybody post a sample code
for the same?


--
joydeepg
------------------------------------------------------------------------
joydeepg's Profile: https://forums.netiq.com/member.php?userid=7638
View this thread: https://forums.netiq.com/showthread.php?t=53439

Labels (1)
0 Likes
5 Replies
Knowledge Partner
Knowledge Partner

Re: Make Java calls from SOAP driver

On 5/6/2015 10:44 AM, joydeepg wrote:
>
> Is it possible to use java to write three text files after retrieving
> information from a SOAP response?Is there a way to do this in the SOAP
> driver or there is a other way to do this?Can anybody post a sample code
> for the same?


Link the LibAJC EMCA policy. (Part of almost every driver in IDM 4.x,
and available as of IDM 3.6). There is a Common, ECMA Script package
that includes it.

There is either a writeTofIle() or appendToLog() function in there for
writing out to files.

So you need a file name ($FILE variable, say), a message ($MESSAGE
variable, say).

Then you would set local variable DUMMY to XPATH
es:writeToFile($FILE,$MESSAGE) or whatever the actual real function is.

Works fine.


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Make Java calls from SOAP driver

Geoffrey Carman <geoffreycarmanNOSPAM@NOSPAMgmail.com> wrote:
> On 5/6/2015 10:44 AM, joydeepg wrote:
>>
>> Is it possible to use java to write three text files after retrieving
>> information from a SOAP response?Is there a way to do this in the SOAP
>> driver or there is a other way to do this?Can anybody post a sample code
>> for the same?

>
> Link the LibAJC EMCA policy. (Part of almost every driver in IDM 4.x,
> and available as of IDM 3.6). There is a Common, ECMA Script package that includes it.
>
> There is either a writeTofIle() or appendToLog() function in there for
> writing out to files.


Keep in mind that these ECMAScript functions are not thread safe so:

Try to only write to each specific file from a single policy in a driver.
That way you avoid scenarios where two threads try and update the same file
at the same time (publisher and subscriber channels are separate threads)


--
If you find this post helpful and are logged into the web interface, show
your appreciation and click on the star below...
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Make Java calls from SOAP driver


Hi,

I'm new to ECMA, I was trying to write a modify event for an attribute
to a file. Could you please show me a sample code on how to write the
modify events of an attribute from log to a file?


Thanks,
Agnel


--
Agnel_Vincent
------------------------------------------------------------------------
Agnel_Vincent's Profile: https://forums.netiq.com/member.php?userid=8450
View this thread: https://forums.netiq.com/showthread.php?t=53439

0 Likes
Knowledge Partner
Knowledge Partner

Re: Make Java calls from SOAP driver

On 5/8/2015 2:24 AM, Agnel Vincent wrote:
>
> Hi,
>
> I'm new to ECMA, I was trying to write a modify event for an attribute
> to a file. Could you please show me a sample code on how to write the
> modify events of an attribute from log to a file?


At the driverset level, add the Package from the catalog:
Common
ECMASCript
Advanced Java Class


Now this library is available in the tree. IN your driver,
Configuration side tab in Designer, then ECMA top tab, add it to link it
in, by browsing to the Driverset, then Library, then NOVLLIBAJC-JS object.

Then in a policy where you wish to write to a file:

Get your filename into a variable lv-FILE
Get your message to append built and stored in a variable lv-MESSAGE

Then use this one token:

<do-set-local-variable name="DOESNT-MATTER" scope="policy">
<arg-string>
<token-xpath expression="es:writeLog($lv-FILE,$lv-MESSAGE)"/>
</arg-string>
</do-set-local-variable>

Key is, you are not the one writing the ECMA function. You are just
calling a pre-written one in IDM. Much simpler.




0 Likes
Knowledge Partner
Knowledge Partner

Re: Make Java calls from SOAP driver

On Wed, 06 May 2015 14:44:01 +0000, joydeepg wrote:

> Is it possible to use java to write three text files after retrieving
> information from a SOAP response?


Yes. You can do that with xpath. You're better off with ECMAscript,
though.


--
--------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.microfocus.com

Please post questions in the forums. No support provided via email.
If you find this post helpful, please click on the star below.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.