Topic
3 replies Latest Post - ‏2012-11-01T12:35:22Z by Thomas909
Thomas909
Thomas909
4 Posts
ACCEPTED ANSWER

Pinned topic Help to find my way in SOMA

‏2012-10-31T12:44:48Z |
Hello,

I need to create SOMA requests in order to enable and disable an HTTP frontsidehandler. I am not only interested in the mere code, but also how I can find my way in the XSDs in order to retrieve the required information from there.
I have found the readpaper which also helped me with some other tasks. Furthermore, I found the following forum post, from which I conclude that I need to use the dp:modify-config command. But how to find the xml nodes to enter for the frontsidehandler?
URLhttps://www.ibm.com/developerworks/forums/thread.jspa?messageID=14293611&#14293611[/URL]
Updated on 2012-11-01T12:35:22Z at 2012-11-01T12:35:22Z by Thomas909
  • RCW
    RCW
    232 Posts
    ACCEPTED ANSWER

    Re: Help to find my way in SOMA

    ‏2012-10-31T13:27:21Z  in response to Thomas909
    Hi Thomas,

    the request sample is:

    <?xml version="1.0" encoding="UTF-8" ?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Body>
    <dp:request domain="mydomain" xmlns:dp="http://www.datapower.com/schemas/management">
    <dp:modify-config>
    <HTTPSourceProtocolHandler name="myFSH">
    <mAdminState>enabled</mAdminState>
    </HTTPSourceProtocolHandler>
    </dp:modify-config>
    </dp:request>
    </env:Body>
    </env:Envelope>

    to disable use <mAdminState>disabled</mAdminState>
    • RCW
      RCW
      232 Posts
      ACCEPTED ANSWER

      Re: Help to find my way in SOMA

      ‏2012-10-31T14:05:14Z  in response to RCW
      For finding your way thru the schemas:

      There are 4 files in the store:/// directory that you will need to look at:

      1 WSDL:
      xml-mgmt.wsdl

      and the 3 schemas:

      xml-mgmt-ops.xsd
      xml-mgmt-base.xsd
      xml-mgmt.xsd

      The xml-mgmt-ops.xsd will show you all the operations that you can use. Such as get-file, do-action, modify-config etc. It describes the different complextypes and you'll see what you need to specify for your request.

      In the xml-mgmt-base.xsd you will find the basic simpletypes and how they are defined, like the mAdminState element used in the example above, or the filestore-location element and the strings it is limited to.

      The xml-mgmt.xsd gives you insight on how the different objects are built up. Like the HTTP Frontsidehandler:
      <xsd:complexType name="ConfigHTTPSourceProtocolHandler">
      <xsd:complexContent>
      <xsd:extension base="tns:ConfigSourceProtocolHandler">
      <xsd:choice maxOccurs="unbounded">
      <xsd:element name="UserSummary" type="tns:dmString" minOccurs="0" maxOccurs="1" />
      <xsd:element name="LocalAddress" type="tns:dmLocalIPHostAddress" minOccurs="1" maxOccurs="1" />
      <xsd:element name="LocalPort" type="tns:dmIPPort" minOccurs="1" maxOccurs="1" />
      <xsd:element name="HTTPVersion" type="tns:dmHTTPVersion" minOccurs="0" maxOccurs="1" />
      <xsd:element name="AllowedFeatures" type="tns:dmSourceHTTPFeatureType" minOccurs="0" maxOccurs="1" />
      <xsd:element name="PersistentConnections" type="tns:dmToggle" minOccurs="0" maxOccurs="1" />
      <xsd:element name="AllowCompression" type="tns:dmToggle" minOccurs="0" maxOccurs="1" />
      <xsd:element name="MaxURLLen" type="tns:dmUInt32" minOccurs="0" maxOccurs="1" />
      <xsd:element name="MaxTotalHdrLen" type="tns:dmUInt32" minOccurs="0" maxOccurs="1" />
      <xsd:element name="MaxHdrCount" type="tns:dmUInt16" minOccurs="0" maxOccurs="1" />
      <xsd:element name="MaxNameHdrLen" type="tns:dmUInt16" minOccurs="0" maxOccurs="1" />
      <xsd:element name="MaxValueHdrLen" type="tns:dmUInt16" minOccurs="0" maxOccurs="1" />
      <xsd:element name="MaxQueryStringLen" type="tns:dmUInt16" minOccurs="0" maxOccurs="1" />
      <xsd:element name="ACL" type="tns:dmReference" minOccurs="0" maxOccurs="1" />
      </xsd:choice>
      <xsd:attributeGroup ref="tns:ConfigAttributes" />
      </xsd:extension>
      </xsd:complexContent>
      </xsd:complexType>

      It'll give you an idea which element is required etc.

      So using all schemas, you can build your requests.

      What helps a lot are tools like XMLSpy, as they offer a tree view which makes it easy to generate requests.
      I hope that helps
      • Thomas909
        Thomas909
        4 Posts
        ACCEPTED ANSWER

        Re: Help to find my way in SOMA

        ‏2012-11-01T12:35:22Z  in response to RCW
        That was helpful, indeed. I had found those xsd's, but only in the treeview you can actually find your way in them. Thank you so much.