cancel
Showing results for 
Search instead for 
Did you mean: 

Send XML from ERP TO PI and then to vendor without any additional xml tags

Former Member
0 Kudos

Hi All,

We have an xml document in ERP which we want to sign and send it to an external provider using the SOAP Adapter.

We have signed the xml by using java mapping.

Then the integration server is to take this String and resend it as is to the external provider using the SOAP adapter.

This however doesn't work because the message sent to the external provider is already an xml document like the following:

<?xml version="1.0" encoding="UTF-8" ?>

<ns0:request_DT xmlns:ns0="um:ournamespace">

<payment>

here is a hexadesimal for singed xml.

</payment>

</ns0:request_DT>

i tryed to use java class to remove extra tags from operation mapping but once i tested it i got the following error message

"Unable to display tree view; Error when parsing an XML document..."

Also i used XSL in the operatin mapping to replace unwanted tags. but i got same error.

Nw , how can i remove the additional tags ?

Thanks & BR,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

under testing

former_member200962
Active Contributor
0 Kudos
i tryed to use java class to remove extra tags from operation mapping but once i tested it i got the following error message 
"Unable to display tree view; Error when parsing an XML document..."

Also i used XSL in the operatin mapping to replace unwanted tags. but i got same error.

Are you trying to remove <ns0:request_DT xmlns:ns0="um:ournamespace"> and <payment> tags and just send hexadesimal for singed xml

If above is the case then you cannot such a scenario. The mapping should produce a valid structure with a valid root node.

Regards,

Abhishek.

Former Member
0 Kudos

Thanks for your valuable replay.

Yes.I am trying to remove <ns0:request_DT xmlns:ns0="um:ournamespace"> and <payment> tags and just send hexadesimal for singed xml.

But as you said "If above is the case then you cannot such a scenario".

So, what is the solution?

Thanks & BR,

Former Member
0 Kudos

Thanks for your valuable replay.

Yes.I am trying to remove <ns0:request_DT xmlns:ns0="um:ournamespace"> and <payment> tags and just send hexadesimal for singed xml.

But as you said "If above is the case then you cannot such a scenario".

So, what is the solution?

Thanks & BR,

Former Member
0 Kudos

Thanks for your valuable replay.

Yes.I am trying to remove <ns0:request_DT xmlns:ns0="um:ournamespace"> and <payment> tags and just send hexadesimal for singed xml.

But as you said "If above is the case then you cannot such a scenario".

So, what is the solution?

Thanks & BR,

former_member200962
Active Contributor
0 Kudos

The message always requres a valid root node (at least XI needs this). If you remove the root node itself then the message wont be XML any more....it may be a string or hexadecimal (as in your case it is)....and then XI cannot process it....so as a requirement your message should be enclosed within some node.

And Since you are using a SOAP adapter to send message you should be using the WSDL provided by the external vendor (as the vendor is on receiver end)

Regards,

Abhishek.

former_member187339
Active Contributor
0 Kudos

Hi,

>>So, what is the solution?

As a workaround I would ask you to use an adapter module in the receiver soap adapter. this module shoudl remove the un-necesary tags of XML and get the plain signed content.

Also you can try using MessageTranasformBean in receiver SOAP channel and call a XSLT/java mapping which will remove the non-required nodes..

Regards

Suraj

Former Member
0 Kudos

Thanks for both of you.

Do i need to enter complete package name like com.sap.sdf.removeTags

or only class name removeTage.

I did like this:

Parameter name: Transform.contentType

Parameter Value: com.sap.sdf.removeTags

thanks again.

former_member187339
Active Contributor
0 Kudos

Hi,

Complete name com.sap.sdf.removeTags

removeTags is a java program to do your requirement? Is my understanding correct?

Regards

Suraj

Former Member
0 Kudos

Yes.

Let me try and i will inform you.

Thanks for your valuable re

Former Member
0 Kudos

Hi Suraj,

I have imported writeFile jar in the IR .

This class reading inputStream and then write the content on the hard disk.

I tested in the operation mappings and it is working well. but i used it in ID with AF_Modules/MessageTransformBean.

as the following:

In the Module configuration :

Parameter name: Transform.contentType

Parameter value: com.abb.write.writeFile <---- Package name for my imported class.

but it is not working?????

Moreover you maintain that I should use XSL/Java Mapping .

I have XSL for removing extra tags and java mapping as well.

But how can I use it with com. channel.

Thanks.

former_member187339
Active Contributor
0 Kudos

Hi,

>>Moreover you maintain that I should use XSL/Java Mapping .I have XSL for removing extra tags and java mapping as well.

Check these blog

/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken]

for seeing how to use XSLT with the communication channel

In the mean time let me try to find the blog for java mapping usage with communication channel

Regards

Suraj

Former Member
0 Kudos

Thanks.

I will try to use it with XSL .

And i am waiting for java mapping.

BR,