on 10-19-2012 7:40 PM
Hi,
We are creating webservice on SAP ECC which will be consumed by other system (messages are sending to SAP ECC). We need to implement below requirement:
<xsd:element name="Currency">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="USD"/>
<xsd:enumeration value="EUR"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
1. We would like to process only those messages (webservices) where Currency = USD or Currency = EUR. for all other values, messages should be rejected by SOAP layer.
2. In WSDL provided by webservice on SAP ECC we would like to have to such information (only USD or EUR - as it is in code above)
Please note that we are not using SAP PI - we have direct connection with SAP ECC by Webservice.
Thanks,
Kari
For your second question you can validate using restriction on the xsd. Please refer below standard example
http://www.w3schools.com/schema/schema_facets.asp
If you use PI you can use xml validation in the pipeline step. Since you dont use PI, you cannot handle through pi. But in the processing side at ECC, you can use xml parsers to handle the data against wsdl xsd definition first to catch it before parsing the data at the coding side. That's one approach.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kari,
>> We don't use SAP PI.Could be describe me required steps to achieve that ? What I should do on SAP ECC side in order to have such validation in WSDL generated directly from SAP ECC ?
Since you publish from ECC, create the WSDL file and write the validation in the ECC to handle Currency = USD or Currency = EUR
Cheers
Agasthuri
>> We don't use SAP PI.Could be describe me required steps to achieve that ? What I should do on SAP ECC side in order to have such validation in WSDL generated directly from SAP ECC ?
Since you publish from ECC, create the WSDL file and write the validation in the ECC to handle Currency = USD or Currency = EUR
How I can change WSDLe published from SAP ECC ? I transaction SE80 I see WSDL generated by SAP ECC - and I can't change it.
Did You mean that I should write WSDL file to my desktop - then add "<xsd:enumeration value="USD"/>" etc. directly in WSDL and such file publish to other system which will consume my webservice ?
Thanks,
Hi Kari,
I think what the guys mean is that you will need to add some Abap code in ECC to do this validation - i.e. block requests (maybe with the appropriate message to the systems initiating the requests). I'm not aware of Abap being able to handle enumerations but things may hav changes since I last checked - maybe check it against the Abap Forum here on SCN.
I also came across a custom built solution that might help but it will take more time:
http://scn.sap.com/blogs/edward.pelyavskyy2/2010/03/09/validating-xml-with-xml-schema-xsd
Regards, Trevor
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.