Topic
4 replies Latest Post - ‏2013-07-13T19:32:47Z by HermannSW
SystemAdmin
SystemAdmin
6772 Posts
ACCEPTED ANSWER

Pinned topic Custom SOAP 1.1 xsd on datapower encodingStyle problem

‏2011-09-29T09:17:29Z |
Hi All,

We are facing the following problem using the datapower:

Several applications generate their SOAP messages automatically using the xsd that is used as a standard within my company. However when this message is sent to the datapower, it results in an xsd validation error which is as follows:

'cvc-complex-type 3: element Envelope of type Envelope had undefined attribute encodingStyle'

We use soap version 1.1 (namespace: schemas.xmlsoap.org/soap/envelope) and when we check the datapower's xsd, we found that is was based on soap 1.2 with specific datapower modifications that allow encodingStyle to be used on any element (on DP filesytem store://schemas/soap-envelope-1.1.xsd).

When validating with the standard SOAP1.1 online xsd in xml-spy we receive the same error however.

Anybody has any idea on how to solve this, functionally the encoding style is allowed on the envelope element, but technically is seems to fail using xsd validation........
  • VenkataGadde
    VenkataGadde
    5 Posts
    ACCEPTED ANSWER

    Re: Custom SOAP 1.1 xsd on datapower encodingStyle problem

    ‏2013-07-12T19:39:36Z  in response to SystemAdmin

    Hi ,

      How did you resolve the above issue ?

    We are also facing the same issue where the request message has the attribute "SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" and its failing schema compliance in Datapower.  Below is the error during schema validation:

    cvc-complex-type 3: element {http://test.com}findCustomer with anonymous type had undefined attribute {http://schemas.xmlsoap.org/soap/envelope/}encodingStyle
     

    Thanks

    Venkat

    • HermannSW
      HermannSW
      4251 Posts
      ACCEPTED ANSWER

      Re: Custom SOAP 1.1 xsd on datapower encodingStyle problem

      ‏2013-07-12T22:59:04Z  in response to VenkataGadde

      What problem do you have?

      I just took Example1 from SOAP 1.1 spec (with encodingStyle) and sent it against a SOAP request service without issues:

      $ curl --data-binary @Example_1.xml http://dp1-l3:2049; echo
      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
         <SOAP-ENV:Header>
             <t:Transaction SOAP-ENV:mustUnderstand="1" xmlns:t="some-URI">
                     5
             </t:Transaction>
         </SOAP-ENV:Header>
         <SOAP-ENV:Body>
             <m:GetLastTradePrice xmlns:m="Some-URI">
                 <symbol>DEF</symbol>
             </m:GetLastTradePrice>
         </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
      $

       

      Btw, the spec example is buggy, the top level element should not be closed directly at end of line 3.

       

      Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

  • VenkataGadde
    VenkataGadde
    5 Posts
    ACCEPTED ANSWER

    Re: Custom SOAP 1.1 xsd on datapower encodingStyle problem

    ‏2013-07-12T23:15:32Z  in response to SystemAdmin

    Hi herman,

      Its failing if the format is given as below where "SOAP-ENV:encodingStyle" is given at "GetLastTradePrice"element.

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header>
           <t:Transaction SOAP-ENV:mustUnderstand="1" xmlns:t="some-URI">
                   5
           </t:Transaction>
       </SOAP-ENV:Header>
       <SOAP-ENV:Body>
           <m:GetLastTradePrice xmlns:m="Some-URI"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
               <symbol>DEF</symbol>
           </m:GetLastTradePrice>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

     

    Thanks

    Venkata

    • HermannSW
      HermannSW
      4251 Posts
      ACCEPTED ANSWER

      Re: Custom SOAP 1.1 xsd on datapower encodingStyle problem

      ‏2013-07-13T19:32:47Z  in response to VenkataGadde

      Hi,

      lets talk about firmware version, this is you modified file sent successfully againts a 5.0.0.8 SOAP request type XML FW:

      $ curl --data-binary @2.xml http://dp1-l3:2049; echo
      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
         <SOAP-ENV:Header>
             <t:Transaction SOAP-ENV:mustUnderstand="1" xmlns:t="some-URI">
                     5
             </t:Transaction>
         </SOAP-ENV:Header>
         <SOAP-ENV:Body>
             <m:GetLastTradePrice SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:m="Some-URI">
                 <symbol>DEF</symbol>
             </m:GetLastTradePrice>
         </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
      $

       

      Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>