cancel
Showing results for 
Search instead for 
Did you mean: 

HRXML generation

Former Member
0 Kudos

Hi,

we have requirement where we need to generate SOAP structure and call webservice of target system.

We do not have proper wsdl files from target system and they are using standard HRXML.

The format of xml  has envelope and in envelope there is field payload in which all the payload along with CDATA wrapper has to be passed through as single string.

<Envelope>

                   <Sender>

                                          <Id>HRXMLEMPLID</Id>

                                          <Credential>1234</Credential>

                    </Sender>

                    <Recipient>

                                          <id/>

                     </Recipient>

                     <TransactInfo>

                                           <TransactId>123</TransactId>

                                           <TimeStamp>datetime</TimeStamp>

                      </TransactInfo>

                      <Packet>

                                             <PacketInfo>

                                                                <PacketId>1</PacketId>

                                                                 <Action>SET</Action>

                                                                 <Manifest>xyz</Manifest>

                                               </PacketInfo>

                                <Payload>payload with CDATA tag</Payload>

                          </Packet>

</Envelope>

Note: we have to do mapping to generate the payload then put the payload in CDATA tag and then insert in payload node of envelope.

Please provide steps on how to achieve this.

Thanks,

Vinayak

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Vinayka,

You can easily achieve this using XSLT mapping.

Since this is standard structure so you can write the standard structure in XSLT mapping structure itself.

As far as CDATA is concered, you need to make sure that you are using - <xsl:text disable-output-escaping="Yes"> before CDATA like below -

            <xsl:text
disable-output-escaping="yes">
<![CDATA[<![CDATA[<?xml version="1.0"?><JCDD
language="en" template="Global
Requisition">]]></xsl:text>

Regards,

Ashish

Former Member
0 Kudos

Hi Ashish,

You mean the envelope structure also needs to be generated in xslt mapping only.Then in payload field use the xsl code for CDATA?

Can you please help or explain how the envelope xml structure is generated using xslt as i am new to xslt mapping.

Thanks,

Vinayak

ambrish_mishra
Active Contributor
0 Kudos

Hi Vinayaka,

This seems like a Kenexa HR scenario. I have done a similar HTTPS scenario but inbound into ECC wherein we were required to strip the payload from the CDATA section through Java mapping and output the result to a graphical mapping and then populate an IDoc in ECC side.

Here a reverse process is required. Please import the WSDL and then map the values other than CDATA tag in the target structure. If no transformation is required in PI, then you can use "return as XML" functionality to map/populate the source data into the CDATA section through a UDF.

Do revert back if you have any queries.

cheers,

Ambrish

Former Member
0 Kudos

Hi Ambrish,

Yes this is Kenexa HR scenario. Here we dont have any wsdl files from target.we have to create a structure using  sample xml we have. Then after graphical mapping transformation we need to add the CDATA tag to the xml payload generated.then send this payload with CDATA tag to the field payload in envelope. If you have worked with Kenexa before do you have wsdl files from them as you might have used in source side?

Thanks,

Vinayaka Akkasali.

ambrish_mishra
Active Contributor
0 Kudos

Hi Vinayaka.

I did an inbound candidate data scenario long back but it was not WSDL and was an HTTP call from Kenexa to PI integration server.

Here it is a outbound scenario.

Get a clarification from Kenexa if it is going to be HTTP call to them. In that case, create the XSD with the sample XML and populate the CDATA tag with payload in graphical mapping as suggested earlier.

Do revert back if you have any issues.

hope it helps!

Ambrish

Former Member
0 Kudos

Hi Ambarish,

When i try to add CDATA using UDF i am getting special characters like

&lt;Header&gt;

         &lt;Plan/&gt;

         &lt;Identifier/&gt; in moni and also test map.

How to avoid these special characters in a UDF.

Thanks,

Vinayaka Akkasali.

ambrish_mishra
Active Contributor
0 Kudos

Hi Vinayaka,

You can create a Java mapping after this mapping and simply replace the characters like below:

str = str.replaceAll("&lt;","<");

str = str.replaceAll("&gt;",">");  

this should work.

Ambrish

Former Member
0 Kudos

Hi,

I am doing the same interface where we have to call the sae webservice.

I wrote a custom java program (as I have never done XLST mapping before). I verified the output in Integration Builder by doing a 'Test' in Interface mapping, and the XML seems to be in the correct format.

When I try to post the data to the webservice, I am using SOAP receiver adapter and transport protocol is HTTP. I gave the URL for the webservice as the Target URL in adapter configuration, and for SOAP Action, I entered "http://trm.brassring.com/HRIS/Dispatch"

When I do a test message from RWB, I dont see any errors and in both sxmb_moni and communication channel monitoring; However, the data didnt reach the destination. I am guessing that it might have to do with the configuraion of adapter.

If anyone got the receiver SOAP adapter to Kenexa working, then can you please share the conversion parameters or relevant settings in the adapter? Thanks in advance.

Thanks,

Archana

ambrish_mishra
Active Contributor
0 Kudos

Hi Archana,

Did you check with Kenexa if it is going to be a HTTP post or a web service call?

Ambrish

Former Member
0 Kudos

Hi Ambrish,

I checked with the partner and they provided both options. We could either use HTTP (the URL is https URL) or use webservices.

I am not even sure if the way I am declaring the ojects is correct. Backend ECC systems sends data via proxy which is working correctly. Once I receive this data in PI, I configured receiver determination to be a custom service under a party. The destination interface is an Asynchrous inbound interface with message type 'DispatchSoapIn' - I imported the wsdl into IR, and selected this message type from the imported object directly. This message type has only one element called HRXML of type string.

And in the interface mapping, I just selected custom Java mapping that returns a string. I am not explicityly mapping this string to HRXML.

We are still on PI 7.0, so we dont have the option to send input data as XML.

Thanks,

Archana

ambrish_mishra
Active Contributor
0 Kudos

hi Archana,

You are on the right track.

Few problems here...

>>>>> This message type has only one element called HRXML of type string.

What does Kenexa expect in this element. Have they provided a format? You need to map the data to this element and I guess it would contain all data which Kenexa needs in a specific format.

What is your Java mapping doing. If you are using Java mapping to populate this HRXML, you need to provide proxy output to this mapping and then the output(specific structure) of Java mapping should be populated in HRXML under DispatchIn.

Hope it helps!

Ambrish

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You can do soap adapter without envelope and use this structure as target structure. Use xslt mapping or java mapping to collect all the data from cdata tag to payload node.  See if that helps. Please search scn for soap receiver scenario.