cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the tag values sent by PCo to MII transaction

Former Member
0 Kudos

Hi everybody,

I have an Agent created inside PCo and its listening to a data server. I have also created a notification object which triggers my MII Transaction (after certain condition is getting fulfilled).

Now, I want to pass certain values from PCo to MII using the notification object. For this I have tried 2 options:

1. I defined one input parameter in transaction of type 'XML'. But this did not work. When I used 'Tracer' to check the received values, it showed empty.

2. Since XML variable did not work, I tried with 'String' variable. It worked but the entire input data was in 'String' format.

Actually I used XML_Saver to save the string and given filename as '.xml'. When I opened that xml file, it was looking like this:

<<unable to write XML here>>

Considering the above 2nd option, how can I extract the particular 'Tag' values from XML string. Since the string is not in the format of 'Rowset/Row/Row', I cannot specifically assign/map those tag values to any other variable inside MII transaction.

===========

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Shyamal,

if you can receive the value in a string variable, it should also work with a xml property. The tracer had some problems in displaying xml nodes in early versions of MII 12.0. Which version are you using? If you are not sure about the tracer, try to save the value to a file and check the contents.

If the contents is XML, then MII can handle it, no matter if it is in an Illuminator format (/Rowsets/Rowset/Row) or any other xml format. You can always use XPath to extract you tag values. Say your xml property is "MyXML", then the contents usually can be linked with an XPath expression like "MyXML.Output{/rootnode/node/value}".

Michael

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi, I was trying to post the xml string. It was not possible yesterday (because, SDN editor has converted xml part into some irregular string).

Now, I am trying to post the string by removing the special characters. Please try to understand it.

Now, my question is how to retrieve the CDATA value 5599999999 using xpath. Please help.

NotificationMessage

Body

Values

Expression1 type xsd string

CDATA 5599999999

/Expression1

/Values

/Body

Faults /

/NotificationMessage

Former Member
0 Kudos

Shyamal,

can you post the XML source code? You can use the "code" markup as explained in the "Further Markup Possibilities" on the right side of the thread editor window.

Michael

Former Member
0 Kudos
<?xml version="1.0" encoding="UTF-8" ?> 
- <NotificationMessage>
- <Header>
  <Name>SocketNot1</Name> 
- <Description>
- <![CDATA[ SocketNot1
   
  
  MIItest 
  2010-08-05T06:52:01 
  800b3cfa-f5a3-49e9-97f7-f321ff493a0f 
  Delivered 
  
- 
- 
- 
-  5599999999
   
  
  
  
   
  ]]>
Former Member
0 Kudos

Thanks.

Link the node "Expression1" to the target property in the MII link editor. MII will automatically use the value that is marked in the CDATA section.

Michael

Former Member
0 Kudos

Thanks Michael. As you said, it worked just by linking "Expression" node.

Issue resolved.

former_member196557
Active Contributor
0 Kudos

Create a Transaction Input parameter of type XML and define a default value with the XML you saved. Then Have PCo post the notification to that input parameter. Now you can access the nodes of the paramater directy without having to use XPath and you can code the transaction prior to actually receiving the "live" parameter data and can use the default values in the input parameter for MII testing.

- Steve

Former Member
0 Kudos

Hi,

Please Go through the Configuration Documentation pco , available in the service market place [https://websmp107.sap-ag.de/support] you will get the requried answer