cancel
Showing results for 
Search instead for 
Did you mean: 

XML validation in sender file adapter

former_member474221
Participant
0 Kudos

Hi

I am using FCC on the sender file adapter ....i need to make sure that one of the fields should always be integer else the sender adapter should give error

Can i use xml validation with FCC on the sender file adapter?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hema

Use xml validation in the sender adapter. FCC will not be able to do this.

Check this

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

If you are in 7.3 version, then you don't need to put the XSD on the server.

former_member474221
Participant
0 Kudos

Hi

I know that i need to use xml validation in the sender agreement but my question is can I use it even if I am using FCC or it can be use only when we are reading a normal xml file

Muniyappan
Active Contributor
0 Kudos

Hi,

you can use in both the ways.

FCC is going to produce a normal xml only. so no issue.

Regards,

Muni.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Hema,

As per understanding you need to check one or few fields value is integer or not.

You can achieve in 2 ways :

Case1:Using inbuilt xml validation options.

For 7.11 and below

1)In ESR/Message type/Export the xsd to local machine.

2)Insert the xsd file in the below loc

/usr/sap/<sid>/DVEBMGS00/j2ee/cluster/server0/validation/schema/

<guid>/<namespace1>/<service_interface_name>/<namespace2>

<sid>: System ID of the server instance.

<guid>: The GUID of the SWCV.

<namespace1> : The namespace within which the service interface is defined.

<service_interface_name> : The name of the service interface.

<namespace2>

: The namespace of the Message Type used by the service interface. In many

instances, namespace1 and namespace2 are the same.

Italic path folders need to create by you.

For 7.3 and above

Case 2 :Handling using simple UDF.

Input-->UDF-->Output

try {
  
Integer.parseInt(input);

   return input ;
  
}

catch(NumberFormatException e) {   


throw new StreamTransformationException( "Input field value for xyz field "+input+"is not in integer format.Plz correct it"); 
  
}

Regards

Venkat

iaki_vila
Active Contributor
0 Kudos

Hi Hema,

Also you can validate the fields in the UDF in message mapping and to throw an exception if the validation is not fullfilled (Alessandro Guarneri's blog  ).

Regards.

Muniyappan
Active Contributor
0 Kudos

Hi,

i dont thing you can validate it in FCC.

but you can use xml validation in adapter engine.

please let us know your pi version.

Regards,

Muni