cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI 7.11 Soap sender perform XML validation

Former Member
0 Kudos

Hi everybody,

In the Soap Sender , it is possible to validate the XML .

I there someone who can help me about that stuff?

I found a how-to guide but for PI 7.1, I tried the way purposed but that seems not working.

We are in PI 7.1 ehp 1 SP 10.

Thanks for your collaboration.

Regards

Eric Koralewski

Accepted Solutions (1)

Accepted Solutions (1)

markus_schalk
Participant
0 Kudos

Dear Eric,

here are the relevant URLs you need to configure the sender validation.

Sender agreement:

http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce4bd3a0d7154ee10000000a421937/content.htm?frames...

XML Validation:

http://help.sap.com/saphelp_nwpi711/helpdata/en/44/0bf1b3ec732d2fe10000000a11466f/frameset.htm

Setting up schemas:

http://help.sap.com/saphelp_nwpi711/helpdata/en/44/23641dc2b36491e10000000a1553f7/content.htm?frames...

Be aware where you want to perform validation:

In IE, you can reprocess asynchronous messages. This is afaik not able in adapter engine, error is thrown back to sender application.

Probably you used the wrong directory, so that you provided the file for Integration Server but chose to validate in AE. Typical error...

Best regards,

Markus

Former Member
0 Kudos

Hi ,

I followed the how-to guide for PI 7.1 and documents from help for PI 7.11 and that doesn't work.

I expose in the same webservice 2 functions.

The scenario is SOAP => PI => 2 RFCs.

And I call 2 RFC functions  from the same web service.

Can you tell how to convert the joined wsdl (the file has xml extension but the content is the wsdl ) to xsd and what could it be the filename, please?

Thanks for you help.

Kind Regards

markus_schalk
Participant
0 Kudos

Hi Eric,

to export the External Definition, proceed as follows: 

a. In the Enterprise Services Repository, select the required External Definition whose WSDL definition you want to export.

b. Navigate to the WSDL tab page.

c. Copy the contents of the schematag from the WSDL display to a file.

d. Enter the XML statement < ?xml version="1.0" encoding="UTF-8"?> as the header in the file in front of the schema tag.

e. Save the schema with the <root element name> as the name for the file.

The file name must have the file extension .xsd.

I attached one example file, resulting from your wsdl. It's for the Z_GET_DIRECT_STOCK_DETAIL element. (Rename it to *.xsd again, as this is not allowed on SCN in changed it to *.xml)

I never used validation for synchronous scenarios, but i am sure you have to provide all 4 root elements as xsd in your case (request+response).

Best regards,

Markus

Former Member
0 Kudos

Hi Markus,

You reply was very helpfull.

I created the 4 xsd files .

The 4 files are in the right directory.

This time I receive an  error

"XIServer:CX_XMS_SYSERR_VALIDATION:not used at the moment"

as reply.

I join document of request (DirectListRequest.xml) the reply (Untitled27.xml) and the XSD renamed in xml (Z_GET_DIRECT_STOCK_LIST.xml).

Kind Regards.

Eric Koralewski

markus_schalk
Participant
0 Kudos

Dear Eric,

nice to hear that i was helpful, I would appreciate if you mark it as such in SCN then .

I guess validation works now, and you are facing an error, because of targetnamespace.

Watch your step when creating the mandatory folders:

2. Convert the <Repository Namespace of Service Interface> to a valid folder name by replacing the following characters with ~:

/,\,:,*,?,",<,>,|,;,,,=,&,%,[,],#

If there are more than one special characters one after the other, replace them with a single ~. For example, A%&B becomes A~B. If there is a period at the end (.), then the system automatically deletes it.

3. Under the above directory structure, create the directory /<Service Interface>.

4. If the schema contains the targetNamespace attribute in the xsd definition, then proceed as follows:

a. Create the /<targetNamespace> directory under the above directory.

You can find the <targetNamespace> in the Enterprise Services Repository on the WSDL or XSD tab page.

b. Repeat step 2 to convert the <targetNamespace> to a valid folder name.

c. Export the schema and save it under the /<targetNamespace> directory.

Check this please.

Regards,

Markus

Former Member
0 Kudos

Dear Markus,

The xsd files are well posted in the right directory (based on the targetnamespace of the xsd) as you tell but I receive the error "XIServer:CX_XMS_SYSERR_VALIDATION:not used at the moment" as mentionned in the joined file Untitle27.xml.

When I didnt't place the XSD file in the right directory , the error says that the xsd file is missing  but here that's not the case.

For me everything looks ok but I receive an error.

Kind Regards.

Eric Koralewski

markus_schalk
Participant
0 Kudos

Dear Eric,

please post the path(s) where your files are located. I still guess these are wrong.

Regards,

Markus

Former Member
0 Kudos

Hi Markus,

The path where the xsd file is

S:\usr\sap\PI1\DVEBMGS00\j2ee\cluster\server0\validation\schema\3be65c70fed711de9ff5f9c3ac1011e0\http~toyota.be~xi~TBEL~DirectStock\MIOS0022_DirectStock\urn~sap-com~document~sap~rfc~functions

If the path was wrong, the validation tells that the file was not found in the directory.

and the full path is specified.

Regards.

Eric koralewski

markus_schalk
Participant
0 Kudos

Hi Eric,

could you please post a screenshot of your sender agreement?

Regards,

Markus

Muniyappan
Active Contributor
0 Kudos

Hi Eric,

For me everything looks ok but I receive an error.

i guess your xml validation is working fine.

please check the screen shot for sxi_monitor mentioned in the document. you are receiving error because your sender file is not valid.

could you paste screen shots of error you are getting for adapter engine.

Regards,

Muniyappan.

Former Member
0 Kudos

Hi Markus and Muniyappan.

Thank you verymuch for you help.

I checked in SXMB_MONI.

I placed the xsd validation of the response in the directory specfied by the error message.

And that works.

Normally, that directory is related to validation by Integration Engine

That means that the emessage entry is checked at level of adapter but the check of the reply is made at level Integration Engine despite I checked <Validation by Adapter>

Thank You very much for your help

markus_schalk
Participant
0 Kudos

Dear Eric,

you are welcome and nice to hear you solved the problem. As i thought, there was something wrong with your path. You probably missed the .response part of the xsd file, right ?

Please close the thread with correct answer, to let others know, that it's solved.

Best regards,

Markus

Former Member
0 Kudos

Hi Markus,

the xsd file for the response should be in the directory /usr/sap/<sid>/SYS/global/xi/runtime_server/validation/schema/<guid of sofware component> /<namespace1>/<service_interface_name>/<namespace2> and the xsd of the send message should be in dir /usr/sap/<sid>/DVEBMGS00/j2ee/cluster/server0:validation:schema/<guid_of_software_component>/<namespace1>/<service_interface_name>/<namespace2>

Kind regards.

Eric Koralewski

markus_schalk
Participant
0 Kudos

Hi Eric,

thanks for sharing this information with us.Thus it seems to be necessary, to perform the response validation on the Integration Server even if you choose to validate in the adapter engine due to sender agreement configuration. Sap help doesn't point that out.

Best regards,

Markus

Answers (3)

Answers (3)

former_member190624
Active Contributor
0 Kudos

Hi Eric,

Yes you can do XML validation, you have option in sender agreement for validating incoming message over xml schema that was defined in ESR. Look into below screen shot for

Thanks

Hari.

Muniyappan
Active Contributor
0 Kudos

Hi,

i hope you are using this doc.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83...

since you are at sp 10 it should not be an issue for you.

where exactly you found that it is not working.

you have to run the interface and see the results. at run-time only you will get the results.

if you are checking by doing test message mapping in ESR it will not work.

Regards,

Muniyappan.

Former Member
0 Kudos

Hi Muniyappan,

That the document I followed and of course I checked the checkbox in the sender agreement

That document is normally for release 7.1 and we are in 7.11.

Could it be something different at that level?

I never used that XML validation, but I would like to use it for the exposed webservice I have.

Regards.

Eric Koralewski

Former Member
0 Kudos

Hi Eric,

Did you try to check the Radio Button in Sender Agreement to perform Validation By Adapter.  Try the option and run the test and check.

Thanks,

Satish.