cancel
Showing results for 
Search instead for 
Did you mean: 

Empty payload received for CDATA mapping

PavanKumar
Active Contributor
0 Kudos

Hi,

I am working on sftp to jdbc scenarion in po7.4 for this i am using cdata mapping to convert complete file into a single field.

I have done mapping and tested in test tab it is converting into cdata, but while doing testing received jdbc adapter error.

where unable to see converted cdata payload in message monitoring empty payload received

In logs able to see wrong number type of arguments errors at receiver jdbc channel.

where my file structure look like this.

<xml>

<employer>

....

...

....

...

<employees>

   <emp>

     ....

    .....

    ...

   </emp>

   <emp1>

     .....

    ....

   .

     .

    </emp1>

</employees>

</employers>

</xml>

Kindly help how to convert this whole payload into single field.

Regards

Pavan

Accepted Solutions (0)

Answers (2)

Answers (2)

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Pavan,

This is what i have understood as your requirement correct me if i m wrong.

Sender is sending an XML file in encrypted format you are decrypting it ans using the XML in message mapping , now the encrypted XML doesn't has the message type name and hence the message mapping gets executed successfully but generate empty payload.

so 2 ways you can handle this :

1.As sender is sending an XML file you can ask them the respective XSD and use the same in MM or you need to give your message type XSD and ask sender application to generate XML using this XSD.

2.if you don't want ot go on the exchange of XSD file process i.e which you have implemented now and all you want is to embed the message type name to the decrypted XML then this can be done using java mapping i guess this can be done using graphical too ( please provide a decyrpted payload and also what exactly you are trying to embed so that we can help here).

Br,

Manoj

former_member186851
Active Contributor
0 Kudos

Yes Manoj,Guess your correct,Because his query,mapping seems to be generating proper XML for his scenario.

I forgot the term decrypted message.What you suggested should work out.

PavanKumar
Active Contributor
0 Kudos

Hi Manoj,




1)Sender is sending an XML file in encrypted format you are decrypting it ans using the XML in message mapping ,


Yes from sender i have received encrypted file and My sender is SFTP where i am using PGP decryption module to decrypt the file. This decrypted file i have to insert in to DB

2)now the encrypted XML doesn't has the message type name and hence the message mapping gets executed successfully but generate empty payload.


No, decrypted file doesn't have message type the same i have to insert into DB.


I thought due to this reason it is not inserting into DB, Empty payload received at receiver end.



I am able to decrypt but that shouldn't embedded with my message type name

former_member186851
Active Contributor
0 Kudos

Pavan still I doubt with your query..

Did you try posting in to DB without PI?

PavanKumar
Active Contributor
0 Kudos

with PI only..

My scenario is

SFTP(PGP Decrypt)(cdata mapping to one target field)-----PI----------DB(Empty payload received) error at channel receiver channel

manoj_khavatkopp
Active Contributor
0 Kudos

can you show us a part of decrypted xml file and also the screnshot of message mapping.

PavanKumar
Active Contributor
0 Kudos

Hi Manoj,

pls see mapping snap, decrypted file.

PavanKumar
Active Contributor
0 Kudos

Hi Manoj,

I have used xslt mapping now for cdata, then it is working.

As i came to know in PO 7.4 it is not required to use xslt /java mapping for send whole xml to single field.

But i have used return as xml option to convert to cdata. but i didn't worked.

can i achieve with out xslt/java mapping. ? using return as xml option

Regards

Pavan

former_member186851
Active Contributor
0 Kudos

Hello Pavan,

Return as xML should work,

I guess since your data is not well formatted so its working with XSLT.

PavanKumar
Active Contributor
0 Kudos

can't i achieve with return XML option with this payload.?

former_member186851
Active Contributor
0 Kudos

Since your XML is not formatted I doubt it.

And its working with XSLT right?

PavanKumar
Active Contributor
0 Kudos

Yes, it is converting. some problem with sp that have to check.

former_member186851
Active Contributor
0 Kudos

Ok Pavan..let us in case if its problem with SP.

PavanKumar
Active Contributor
0 Kudos

Hi raghu,

Please see my mapping screenshot and kindly tell me did i missed out anything.

Because when i using xslt it is working but using returnasxml option it is not>>

how can i achieve this using returnasxml option.?

manoj_khavatkopp
Active Contributor
0 Kudos

Pavan,

This is not Patch problem.

your source message type and the decrypted xml doesn't match so return as xml doesn't work until and unless these two matches this is the reason why i suggested you for the XSD approach .

you xslt approach works because it dosnt validate these two (source message type and decrypted xml) all it does is take in incoming xml and map it to target field.

so if you still want to go for return as xml approach then you need to make the source message type and decrypted xml to match easiest way is to take xsd from the sender application and make it as source message in your mapping.

or else you can proceed with your xslt approach which is currently working.

Br,

Manoj

former_member186851
Active Contributor
0 Kudos

Hello Pavan,

ITs not working of decrypted message as Manoj Suggested.(I also told the same before).

And I would suggest you to use the XSL which is already working fine.

former_member182412
Active Contributor
0 Kudos

Hi Pavan,

Create the sender message type like below because your sender XML after the decryption the root node name is 'xml' so you create the root node as xml.

Map payload_xml field like below and xml field must be return as xml.

Mapping result.

Regards,

Praveen.

former_member186851
Active Contributor
0 Kudos

Hello Pavan,

In JDBC how your inserting the payload?using query string or stored procedure?

and in JDBC in a single field you wish to add the wrapped XML?

PavanKumar
Active Contributor
0 Kudos

yes raghu i want to send whole xml into a single field of jdbc

Inserting payload using sp.

former_member186851
Active Contributor
0 Kudos

Pavan,

Map the root node to the required o/p field as use the option " return as XML"

And in the receiver channel write the requried query.

PavanKumar
Active Contributor
0 Kudos

This is how my scenario look

we are receiving signed file i am decrypting using PGP(this is happening) and sending the whole xml payload into single .

Sender side i have defined complete structure but didn't mapped.

I have created a root node for cdata mapping selected return as xml, but at DB i am receiving empty payload

Regards

Pavan

former_member186851
Active Contributor
0 Kudos

Pavan why don't you try using return as xml option.

PavanKumar
Active Contributor
0 Kudos

Hi raghu,

using return as xml option i am trying to convert.

At message mapping cdata struture able to see at when executing at mapping level.

But while processing the message empty payload i am getting at DB.

former_member186851
Active Contributor
0 Kudos

Pavan.

1.Check the query used in JDBC channel.

2.check inserting the XML directly in DB without PI.

We will get some idea after this.

PavanKumar
Active Contributor
0 Kudos

query is perfect.

In decrypted data i can see the payload but it is not embedded with message type name.

Due to this it is failing and at DB end receiving empty payload.

can you please suggest how should get it done ??