cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with specail characters < ,>

former_member262051
Participant
0 Kudos

Hello Guru's

I have a scenario Proxy--> PI --> Soap Web service and carrying
attachments from the SAP system to third party using the soap connection.

Whenever a new Purchase order created in sap system and order
will be carried out along with the attachments through PI interface.

PI reading the attachments name through dynamic UDF and same attachments
name is need to be populated at target pay load along with the attachment.

while processing the Purchase Order from PI noticed Below special
character(highlighted in red color) at target payload and it is causing issue
at third party.

Current format :

<ns3:Id>&lt;payload-55FFB95E7F2E2464E10000000A0C051D@sap.com&gt; </ns3:Id>

Expected format :

<ns3:Id>payload-55FFB95E7F2E2464E10000000A0C051D@sap.com
</ns3:Id>

I tried to remove these speical characters by using below UDF.

But no luck

//int index_in = 0;

int index_in1 = InputFileName.indexOf("&lt;");

int index_in2 = InputFileName.indexOf("&gt;");

if((index_in1 != -1)||(index_in2 != -1))

{

InputFileName = InputFileName.replaceAll("&lt;","");

InputFileName = InputFileName.replaceAll("&gt;","");

}

return InputFileName;

Can some one suggest me, how can i procced to remove these special characters
from the target pay laod

Regards,

Uday.

Accepted Solutions (1)

Accepted Solutions (1)

RaghuVamseedhar
Active Contributor
0 Kudos

Uday,

Please try this UDF,

return var1.replace("&lt;", "").replace("&gt;", "").replace("<", "").replace(">", "");

Answers (2)

Answers (2)

engswee
Active Contributor
0 Kudos

IMO, I don't think the "payload-xxxx" is the correct name for the attachments. That name is related to the Main document in the SOAP body.

The actual attachment's name is normally included in the Content Type of the attachment, which normally looks something like below.

text/plain;charset="UTF-8";name="file.txt"

former_member186851
Active Contributor
0 Kudos