cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid XML Character Test In SOAP-to-File

former_member207703
Active Participant
0 Kudos

Hi Experts, We done a Java Mapping to pass a invalid XML Characters. Its working fine with File-to-File Scenario, and we are getting perfect message from PI that we desire. But when we are trying same thing in SOAP-to-File scenario, and use SOAPUI tool to test it, with invalid xml characters as "&&&". We are getting an error as following:                             MESSAGE.XML_MSG_NOT_WELL_FORMED              XML message not well-formed in node And we didn't get any trace in SAP PI. Is there any possible way to test it? We have requirement to pass such Invalid Characters in SOAP to File scenario. Regards, Anoop Rai

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Anoop,

If you want to send & to PI in the request message via soap ui, then in the soap ui in the request message in one of the field send it as & instead of &

Regards,

Praveen.

former_member207703
Active Participant
0 Kudos

I know about that, and also about CDATA. But problem is this message will come from Third Party and don't want to handle it at their end. So we have to do something at PI end only to tackle this problem. As i already mention we can able to handle it in case of File-to-File Scenario by Java mapping, but in case of SOAP-to-File Scenario  SOAP message with invalid xml char can't able to reach to PI while testing it from SOAPUI. So can we able to test it by any other tool like SOAPUI with invalid xml char?

former_member186851
Active Contributor
0 Kudos

Hello Anoop,

You can try sending an message from Run time workbench test message.

former_member182412
Active Contributor
0 Kudos

Hi Anoop,

It is failing in soap adapter message servlet while parsing the xml using SAX parser not in soap ui. so it will fail if you use any tool to send the message.

Regards,

Praveen.

former_member207703
Active Participant
0 Kudos

I am using PI 7.0, is it possible to use this mention method? I already used it in 7.3 to test AAE configuration, but its not working with PI 7.0.

former_member207703
Active Participant
0 Kudos

Actually i have no idea about soap adapter message servlet, can you please provide some details, how can we pass it to SAP PI? And please tell me how you got this error, i can't trace it after trying a lot.

former_member182412
Active Contributor
0 Kudos

Hi Anoop,

You can see this error in soap ui itself in the response tab.

Using file adapter you can send binary data so you can send any characters, but soap adapter is XML based communication so it must be valid XML, by default soap adapter is validating the incoming xml so you cannot send invalid XML to soap adapter, you cannot handle it in the custom adapter module also because it is failing before it reach that step.

So conclusion is you cannot send invalid xml to soap adapter like file adapter.

Regards,

Praveen.

former_member207703
Active Participant
0 Kudos

Hi Praveen,

Thanks for response and provide a very useful detail.

Can we develop customise adapter for it? As you already specified its not possible but then only i just want to conform for it.

One more thing, i seen some people are using CDATA in XML to send information as text. But i can't able to implement CDATA in WSDL file generated by PI. Do you have any idea how we can able to do it only for some elements?

Regards,

Anoop Rai.

former_member182412
Active Contributor
0 Kudos

Hi Anoop,

You can define the element as string and send the CDATA from third party.

You can receive this in PI like below.


<urn:FileSenderData xmlns:urn='urn:ch:test:prototype' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>        

         <Row>

            <Field1>AAA</Field1>

            <Field2>AAA&#38;&#38;&#38;&#38;AAA</Field2>

         </Row>

      </urn:FileSenderData>

Regards,

Praveen.

former_member207703
Active Participant
0 Kudos

Praveen,

Problem is that third party don't want to make any change at there end.

They just want whatever changes we want to make must made by PI only. They just only do one thing that change previous WSDL with new one.

Is it possible to add CDATA tag in WSDL that we are going to provide them. So that whenever they make any entry in field that directly come under CADATA [?].

Regards,

Anoop rai.

former_member207703
Active Participant
0 Kudos

Praveen,

I tried this thing and its working perfectly, but we have to write CDATA manually in element field.

But is it possible that CDATA come automatically in SOAP request message.

Regards,

Anoop Rai.

iaki_vila
Active Contributor
0 Kudos

Hi Anoop,

XSD or WSDL don't have a type to determine the value as CDATA, you can do a comment in the schema pointing this necessity. You can try with the pattern clause and to figure out if you can find any way to do it with one regular expression: XML Schema Restrictions/Facets

Regards.

Answers (0)