cancel
Showing results for 
Search instead for 
Did you mean: 

Error

Former Member
0 Kudos

Hi, I'm getting this error in the sxmb_moni: System.InvalidOperationException: Instance validation error: 'PROVISION' is not a valid value for OperationTypeEnum.

I know that it means that 'PROVISION' is not valid as a value but the thing is that if the input is 'provision' with lower case then it is accepted. and since it is a xslt mapping then i need to correct it in the code.

But I have tried almost everything without getting any positive result. I basically doesn't understand the following parameters:

<simpleType name="OperationTypeEnum">

<restriction base="string">

* <enumeration value="provision"/>*

* <enumeration value="PROVISION"/>*

at first there were only 'provision' but i thought that if I add 'PROVISION' into the enumeration value then it would be accepted but it doesn't. I just want to make it accept upper case input.

can somebody help with this? // Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Give pattern type is {[[A-Z]]}*.It will allow upper case value.

If pattern type is {[[a-z]][[A-Z]]} then it will allow both upper case and lower case values.

Regards,

Prakasu

Edited by: prakasu on Feb 18, 2009 10:13 AM

Edited by: prakasu on Feb 18, 2009 10:14 AM

Edited by: prakasu on Feb 18, 2009 10:15 AM

Former Member
0 Kudos

Hi, is this what you had in mind?

<xs:element name="XXX">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:pattern value="([a-z][A-Z])+"/>

</xs:restriction>

</xs:simpleType></xs:element>

Thanks

Former Member
0 Kudos

hi,

<xs:element name="XXX">

<xs:simpleType>

<xs:restriction base="xs:string">

<xs:pattern value="(a-zA-Z)*"/>

</xs:restriction>

</xs:simpleType></xs:element>

Use * for to allow unlimited value.

Regards,

Prakasu

udo_martens
Active Contributor
0 Kudos

Hi Sonny,

you did everything right. May be you forgot to activate or you have a cache problem (update it in SXI_CACHE) or something else, but your xsd part is ok.

Regards,

Udo

Former Member
0 Kudos

Hi,

Take out enumeration value below from your element in the XSD or WSDL.

<enumeration value="provision"/>*

<enumeration value="PROVISION"/>*

It basically means that the XML element only takes those values you mentioned in the enumeration.

Regards,

Lim...

Former Member
0 Kudos

Hi thanks for your answer,

you mean that i only need to erase these two fields?

<enumeration value="provision"/>

<enumeration value="PROVISION"/>

or all: <simpleType name="OperationTypeEnum">

* <restriction base="string">*

* <enumeration value="provision"/>*

* <enumeration value="PROVISION"/>*

</restriction>

</simpleType>

Doesn't <enumeration value="PROVISION"/> mean that it should accept upper case? (the input always is either 'provision' or 'PROVISION'

Former Member
0 Kudos

Hi,

Just take these 2 out will do, as you might want to still restrict the element type to string, right?

<enumeration value="provision"/>

<enumeration value="PROVISION"/>

Regards,

Lim...

Former Member
0 Kudos

Hi, yes I still want to keep it as String. But if I erase these two fields...wouldn't I get error when the field gets filled with 'provision' or 'PROVISION' since they are no longer given as a value?