Topic
1 reply Latest Post - ‏2013-05-07T02:25:07Z by swlinn
rdp87
rdp87
32 Posts
ACCEPTED ANSWER

Pinned topic SOMA Script to enable or disable validation

‏2013-05-06T05:39:48Z |

Hi,

I am in search of SOMA script to enable or disable request or response validation in WebServiceProxy. I am using dp-modifyconfig inside my soma script but its not working.

Thanks....

Updated on 2013-05-06T05:40:09Z at 2013-05-06T05:40:09Z by rdp87
  • swlinn
    swlinn
    1330 Posts
    ACCEPTED ANSWER

    Re: SOMA Script to enable or disable validation

    ‏2013-05-07T02:25:07Z  in response to rdp87

    If you have more than your default processing rule in your policy, this can't be done with the current firmware.  These flags are in the WSP object in a complex object called "UserToggles".  I always find it instructive to open the export.xml from an export of a WSP to see these properties ...

    [code]

                <UserToggles>
                    <WSDLName />
                    <ServiceName />
                    <ServicePortName />
                    <PortTypeName />
                    <BindingName />
                    <OperationName />
                    <Toggles>
                        <Enable>on</Enable>
                        <Publish>on</Publish>
                        <VerifyFaults>on</VerifyFaults>
                        <VerifyHeaders>off</VerifyHeaders>
                        <NoRequestValidation>on</NoRequestValidation>
                        <NoResponseValidation>on</NoResponseValidation>
                        <SuppressFaultsElementsForRPCWrappers>off</SuppressFaultsElementsForRPCWrappers>
                        <NoWSA>off</NoWSA>
                        <NoWSRM>off</NoWSRM>
                        <AllowXOPInclude>on</AllowXOPInclude>
                    </Toggles>
                    <Subscription />
                    <UseFragmentID>on</UseFragmentID>
                    <FragmentID>http://wwwibm.com/xmlschema/resource#dp.wsdlName(MyService.wsdl)</FragmentID>
                </UserToggles>

    [code]

    So if you only have one UserToggles, match on UserToggles/Toggles/NoRequestValidation for a Value=.* and set the value to "on".   I didn't see in the GUI for deployment policies where this field is selectable, so you'll need to enter in the xpath directly, something like:

    */*/services/ws-proxy?Name=SomeWSP&Property=UserToggles/Toggles/NoRequestValidation&Value=.*

    change

    new value = "on"

    Note how UserToggles/FragmentID has my namespace#dp.wsdlName(MyService.wsdl) which is how the appliance determines this particular complex object is associated.  If you have another processing rule, say something special for a specific operation, you'll have another UserToggles node with a different FragmentID.  The current firmware you must match on a specific property and value, in your case the NoRequestValidation element which can only have a value to match on of "on" or "off", which could be the case for both UserToggles nodes, so the match isn't unique.  An RFE is on the books where you could match on one element, say the UserToggles/FragmentID element, but change a sibling element, in this case UserToggles/Toggles/NoRequestValidation, but that RFE is currently in "Accepted for a future release" state, so one day this will be possible with more than one UserToggles nodeset, but not today.

    Regards,

    Steve