5 Replies Latest reply on Aug 18, 2007 3:21 AM by Brant_Levinson

    DecodingError

    Shah_Mohamed
      When I send a request to a webservice by setting the resultformat as xml, it works fine. But when I do the same thing without setting the resultformat property it throws an exception which is as below...

      faultcode = DecodingError
      faultString = The element referenced by id 'urn:tva:metadata:cs:ContentCS:2005:3.5.4' was not found.
      faultDetail ='null'

      Actually, the result returned from the service is an object. We need to access the response as an object.

      Can any one help me out in this regard?
        • 1. Re: DecodingError
          Shah_Mohamed Level 1
          This is what the trace shows. The response is obtained but still exception is thrown.


          8/16/2007 18:05:03.187 [DEBUG] mx.messaging.Channel 'direct_http_channel' channel sending message:
          (mx.messaging.messages::SOAPMessage)#0
          body = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
          <SOAP-ENV:Body>
          <tns:get_Data xmlns:xml=" http://www.w3.org/XML/1998/namespace" xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/" xmlns:mpeg7="urn:tva:mpeg7:2005" xmlns:tva="urn:tva:metadata:2005" xmlns:tns="urn:tva:transport:2005" xmlns:tva2="urn:tva:metadata:extended:2005" xmlns:tvap="urn:tva:profile:2005">
          <tns:QueryConstraints>
          <tns:PredicateBag type="AND">
          <tns:BinaryPredicate fieldID="Genre" fieldValue="Surprise" test="contains"/>
          </tns:PredicateBag>
          </tns:QueryConstraints>
          <tns:RequestedTables>
          <tns:Table type="ProgramInformationTable"/>
          </tns:RequestedTables>
          </tns:get_Data>
          </SOAP-ENV:Body>
          </SOAP-ENV:Envelope>"
          clientId = "DirectHTTPChannel0"
          contentType = "text/xml; charset=utf-8"
          destination = "DefaultHTTP"
          headers = (Object)#1
          httpHeaders = (Object)#2
          SOAPAction = ""urn:getData""
          messageId = "EEEDC1B9-081A-58D0-3D51-6EAB71835282"
          method = "POST"
          recordHeaders = false
          timestamp = 0
          timeToLive = 0
          url = " http://localhost:8081/metasoft/services/MetasoftTVAService"
          8/16/2007 18:05:04.671 [INFO] mx.messaging.Producer 'A55AE2C4-EAEE-C344-4478-6EAB6D5D9321' producer acknowledge of 'EEEDC1B9-081A-58D0-3D51-6EAB71835282'.
          8/16/2007 18:05:04.671 [INFO] mx.rpc.soap.SOAPDecoder Decoding SOAP response
          8/16/2007 18:05:04.671 [DEBUG] mx.rpc.soap.SOAPDecoder Encoded SOAP response <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><get_Data_Result xmlns="urn:tva:transport:2005" serviceVersion="1" truncated="false"><TVAMain xmlns="urn:tva:metadata:extended:2005" xml:lang="en"><ProgramDescription xmlns="urn:tva:metadata:2005"><ProgramInformationTable><ProgramInformation programId="crid://nexxusnet.com/MediaFile_1"><BasicDescription><Title>&lt;![CDATA[Media File]]&gt;</Title><Synopsis>&lt;![CDATA[Media File]]&gt;</Synopsis><Keyword>&lt;![CDATA[Media File]]&gt;</Keyword><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.5.4"><Name>Surprise</Name></Genre><ParentalGui dance><ParentalRating xmlns="urn:tva:mpeg7:2005" href="none" /></ParentalGuidance><Language /><RelatedMaterial><MediaLocator><MediaUri xmlns="urn:tva:mpeg7:2005"> http://www.google.com</MediaUri></MediaLocator></RelatedMaterial><Thumbnail>&lt;![CDATA[11 870212781403.jpg
          8/16/2007 18:05:04.671 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP response envelope
          8/16/2007 18:05:04.671 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP response headers
          8/16/2007 18:05:04.671 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP response body
          (mx.messaging.messages::AcknowledgeMessage)#0
          body = "<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><get_Data_Result xmlns="urn:tva:transport:2005" serviceVersion="1" truncated="false"><TVAMain xmlns="urn:tva:metadata:extended:2005" xml:lang="en"><ProgramDescription xmlns="urn:tva:metadata:2005"><ProgramInformationTable><ProgramInformation programId="crid://nexxusnet.com/Mpeg_2"><BasicDescription><Title>&lt;![CDATA[Mpeg]]&gt;</ Title><Synopsis>&lt;![CDATA[Mpeg]]&gt;</Synopsis><Keyword>&lt;![CDATA[Mpeg]]&gt;</Keyword> <Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.5.4"><Name>Surprise</Name></Genre><ParentalGui dance><ParentalRating xmlns="urn:tva:mpeg7:2005" href="none" /></ParentalGuidance><Language /><RelatedMaterial><MediaLocator><MediaUri xmlns="urn:tva:mpeg7:2005">repository/others/1187011791500Hardwork.mpeg</MediaUri></Media Locator></RelatedMaterial><RelatedMaterial><MediaLocator><MediaUri xmlns="urn:tva:mpeg7:2005">1187011791500rose.jpg</MediaUri></MediaLocator></RelatedMateri al><Thumbnail>&lt;![CDATA[1187011791500MayilIragu.gif]]&gt;</Thumbnail><Preview>&lt;![CDAT A[1187011791500rose.jpg]]&gt;</Preview></BasicDescription></ProgramInformation><ProgramInf ormation programId="crid://nexxusnet.com/MediaFile_1"><BasicDescription><Title>&lt;![CDATA[Media File]]&gt;</Title><Synopsis>&lt;![CDATA[Media File]]&gt;</Synopsis><Keyword>&lt;![CDATA[Media File]]&gt;</Keyword><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.5.4"><Name>Surprise</Name></Genre><ParentalGui dance><ParentalRating xmlns="urn:tva:mpeg7:2005" href="none" /></ParentalGuidance><Language /><RelatedMaterial><MediaLocator><MediaUri xmlns="urn:tva:mpeg7:2005"> http://www.google.com</MediaUri></MediaLocator></RelatedMaterial><Thumbnail>&lt;![CDATA[11 870212781403.jpg
          clientId = "DirectHTTPChannel0"
          correlationId = "EEEDC1B9-081A-58D0-3D51-6EAB71835282"
          destination = ""
          headers = (Object)#1
          messageId = "C4143F62-83ED-9630-1A26-6EAB775F0891"
          timestamp = 0
          timeToLive = 0
          • 2. Re: DecodingError
            kcell Level 2
            Hi Shah,

            Have you noticed that the
            <Thumbnail>&lt;![CDATA[11870212781403.jpg
            is not closed?

            Please post the logged response from the axis.log or check how the message look there.

            From the debug output it seems that the incoming response is not well formed.

            best regards,
            kcell
            • 3. DecodingError
              Brant_Levinson
              It seems as we have cut that </thumbnail> out of the posting:
              • 4. DecodingError
                Brant_Levinson Level 1
                Here is what we are getting for the debug now:
                8/18/2007 02:09:23.677 [DEBUG] mx.rpc.soap.SOAPDecoder Encoded SOAP response
                8/18/2007 02:04:38.179 [DEBUG] mx.rpc.soap.SOAPDecoder Encoded SOAP response <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><get_Data_Result xmlns="urn:tva:transport:2005" serviceVersion="1" truncated="false"><TVAMain xmlns="urn:tva:metadata:extended:2005" xml:lang="en"><ProgramDescription xmlns="urn:tva:metadata:2005"><ProgramInformationTable><ProgramInformation fragmentVersion="164076" programId="crid://mediaaddiction.com/MV001815460000"><BasicDescription><Title>&lt;![CDATA [Happy Feet: The IMAX Experience]]&gt;</Title><MediaTitle><TitleImage xmlns="urn:tva:mpeg7:2005"><MediaUri>56846/46948_ce_t.jpg</MediaUri></TitleImage></MediaT itle


                <MediaTitle><TitleImage xmlns="urn:tva:mpeg7:2005"><MediaUri>56846/46948_cb_t.jpg</MediaUri></TitleImage></MediaT itle><MediaTitle><TitleImage xmlns="urn:tva:mpeg7:2005"><MediaUri>56846/46948_cc_t.jpg</MediaUri></TitleImage></MediaT itle><MediaTitle><TitleImage xmlns="urn:tva:mpeg7:2005"><MediaUri>56846/46948_cd_t.jpg</MediaUri></TitleImage></MediaT itle><Synopsis>&lt;![CDATA[Mumble (Elijah Wood), a young emperor penguin, lives in Antarctica. Like others of his kind, he needs to be able to sing to attract a mate, but he has a terrible voice. Instead, Mumble must express himself, and lure a female through his amazing talent for tap-dancing.]]&gt;</Synopsis><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.4"><Name>Fiction/Drama</Name></Genre><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.8.7"><Name>Personal/Lifestyle/Family</Name></G enre><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.4.6.1"><Name>Adventure</Name></Genre><Genre metadataOriginIDRef="" href=" urn:tva:metadata:cs:ContentCS:2005:3.5.7"><Name>Comedy</Name></Genre><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.4.10"><Name>Musical</Name></Genre><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:FormatCS:2005:2.3"><Name>Cartoon/Animation/Puppetry</Name></Gen re>


                <Title>&lt;![CDATA[Academy Award]]&gt;</Title><Year>2006-07:00</Year><Award><Category>&lt;![CDATA[Best Animated Feature Film]]&gt;</Category><Recipient /></Award></AwardsListItem></AwardsList><RelatedMaterial><Format><Name /></Format><MediaLocator><MediaUri xmlns="urn:tva:mpeg7:2005"> http://www2.warnerbros.com/happyfeet/</MediaUri></MediaLocator></RelatedMaterial><ReleaseI nformation><ReleaseDate><Year>2006-07:00</Year><DayAndYear>2006-11-17-07:00</DayAndYear></ ReleaseDate></ReleaseInformation><Duration>PT1H48M</Duration><Thumbnail>&lt;![CDATA[46948/ 46948_cf_t.jpg

                8/18/2007 02:09:23.715 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP response envelope
                8/18/2007 02:09:23.715 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP response headers
                8/18/2007 02:09:23.726 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP response body
                [RPC Fault faultString="The element referenced by id 'urn:tva:metadata:cs:ContentCS:2005:3.5.7' was not found." faultCode="DecodingError" faultDetail="null"]

                Why would urn:tva:metadata:cs:ContentCS:2005:3.5.7 be the only one with issues.

                This seems that a resolution with one of these issues would solve both (this one and the encoding error).

                We are using the same webservice for this, if you need to bring back the same data, please use this service
                http://www.mediaaddiction.com:8081/metasoft/services/MetasoftTVAService?wsdl

                Here it the method:

                public function getDataObject(callBack:Function):void {
                initializeWS();
                metasoftWS.getData.addEventListener("result", callBack);
                metasoftWS.getData.resultFormat = "object";
                metasoftWS.getData(getSampleCriteria());
                }

                Here is the XML:
                <tns:get_Data xmlns:xml=" http://www.w3.org/XML/1998/namespace"
                xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/"
                xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
                xmlns:xsd=" http://www.w3.org/2001/XMLSchema"
                xmlns:mpeg7="urn:tva:mpeg7:2005"
                xmlns:tva="urn:tva:metadata:2005"
                xmlns:tns="urn:tva:transport:2005"
                xmlns:tva2="urn:tva:metadata:extended:2005"
                xmlns:tvap="urn:tva:profile:2005">
                <tns:QueryConstraints>
                <tns:PredicateBag type="AND">
                <tns:BinaryPredicate fieldID="Genre" fieldValue="Fiction" test="contains"/>

                </tns:PredicateBag>
                </tns:QueryConstraints>
                <tns:RequestedTables>
                <tns:Table type="ProgramInformationTable"/>
                </tns:RequestedTables>
                </tns:get_Data>;


                We are using this method for the initialization:
                private function initializeWS():void {
                if (metasoftWS == null)
                {
                if (wsdlLoaded) {
                m_bWSloaded = false;
                // initLogging();
                metasoftWS = new WebService();
                metasoftWS.useProxy = false;
                // metasoftWS.concurrency = "single" ; // try "single" m which means that only one call can be made per time otherwise a fault occure
                metasoftWS.wsdl = wsdl;
                metasoftWS.addEventListener("fault", faultHandler);
                metasoftWS.addEventListener("load" ,wsdlLoaded);
                metasoftWS.loadWSDL();
                }}}

                Do you guys have an expert in XSD that could assist? The service seems to be working in our testing and in the C sharp and java bindings that we've tested. We would really like to utilize a flex RIA.
                • 5. Re: DecodingError
                  Brant_Levinson Level 1
                  What might be an easier data set to deal with would be using this XML request:

                  <tns:get_Data xmlns:xml=" http://www.w3.org/XML/1998/namespace"
                  xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/"
                  xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:xsd=" http://www.w3.org/2001/XMLSchema"
                  xmlns:mpeg7="urn:tva:mpeg7:2005"
                  xmlns:tva="urn:tva:metadata:2005"
                  xmlns:tns="urn:tva:transport:2005"
                  xmlns:tva2="urn:tva:metadata:extended:2005"
                  xmlns:tvap="urn:tva:profile:2005">
                  <tns:QueryConstraints>
                  <tns:PredicateBag type="AND">
                  <tns:BinaryPredicate fieldID="Genre" fieldValue="Fiction" test="contains"/>
                  <tns:BinaryPredicate fieldID="Title" fieldValue="Happy Feet" test="contains"/>
                  <tns:BinaryPredicate fieldID="Title" fieldValue="IMAX" test="contains"/>
                  </tns:PredicateBag>
                  </tns:QueryConstraints>
                  <tns:RequestedTables>
                  <tns:Table type="ProgramInformationTable"/>
                  </tns:RequestedTables>
                  </tns:get_Data>;

                  It produces a different error:
                  url = " http://www.mediaaddiction.com:8081/metasoft/services/MetasoftTVAService"
                  8/18/2007 03:06:00.130 [INFO] mx.messaging.Producer '09661B31-5EBE-CE42-276A-786F9265A9BD' producer acknowledge of 'DF1356DE-EE43-231F-1DB1-786FB1444223'.
                  8/18/2007 03:06:00.131 [INFO] mx.rpc.soap.SOAPDecoder Decoding SOAP response
                  8/18/2007 03:06:00.132 [DEBUG] mx.rpc.soap.SOAPDecoder Encoded SOAP response <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><get_Data_Result xmlns="urn:tva:transport:2005" serviceVersion="1" truncated="false"><TVAMain xmlns="urn:tva:metadata:extended:2005" xml:lang="en"><ProgramDescription xmlns="urn:tva:metadata:2005"><ProgramInformationTable><ProgramInformation fragmentVersion="164076" programId="crid://mediaaddiction.com/MV001815460000"><BasicDescription><Title>&lt;![CDATA [Happy Feet: The IMAX Experience]]&gt;</Title><MediaTitle><TitleImage xmlns="urn:tva:mpeg7:2005"><MediaUri>56846/46948_ce_t.jpg</MediaUri></TitleImage></MediaT itle><Synopsis>&lt;![CDATA[Mumble (Elijah Wood), a young emperor penguin, lives in Antarctica. Like others of his kind, he needs to be able to sing to attract a mate, but he has a terrible voice. Instead, Mumble must express himself, and lure a female through his amazing talent for tap-dancing.]]&gt;</Synopsis><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.4"><Name>Fiction/Drama</Name></Genre><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.8.7"><Name>Personal/Lifestyle/Family</Name></G enre><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.4.6.1"><Name>Adventure</Name></Genre><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.5.7"><Name>Comedy</Name></Genre><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:ContentCS:2005:3.4.10"><Name>Musical</Name></Genre><Genre metadataOriginIDRef="" href="urn:tva:metadata:cs:FormatCS:2005:2.3"><Name>Cartoon/Animation/Puppetry</Name></Gen re><ParentalGuidance><ParentalRating xmlns="urn:tva:mpeg7:2005" href="General Audience (G)" /></ParentalGuidance><CreditsList><CreditsItem role="urn:tva:metadata:cs:TVARoleCS:2005:V708"><PersonName><GivenName xmlns="urn:tva:mpeg7:2005">&lt;![CDATA[Elijah Wood]]&gt;</GivenName></PersonName></CreditsItem><CreditsItem role="urn:mpeg:mpeg7:cs:RoleCS:2001:COMPOSER"><PersonName><GivenName xmlns="urn:tva:mpeg7:2005">&lt;![CDATA[John Powell]]&gt;</GivenName></PersonName></CreditsItem><CreditsItem role="Production Design"><PersonName><GivenName xmlns="urn:tva:mpeg7:2005">&lt;![CDATA[Mark Sexton]]&gt;</GivenName></PersonName></CreditsItem><CreditsItem role="urn:mpeg:mpeg7:cs:RoleCS:2001:ART-DIRECTOR"><PersonName><GivenName xmlns="urn:tva:mpeg7:2005">&lt;![CDATA[David Nelson]]&gt;</GivenName></PersonName></CreditsItem></CreditsList><AwardsList><AwardsListI tem><Title>&lt;![CDATA[Academy Award]]&gt;</Title><Year>2006-07:00</Year><Award><Category>&lt;![CDATA[Best Animated Feature Film]]&gt;</Category><Recipient /></Award></AwardsListItem></AwardsList><RelatedMaterial><Format><Name /></Format><MediaLocator><MediaUri xmlns="urn:tva:mpeg7:2005"> http://www2.warnerbros.com/happyfeet/</MediaUri></MediaLocator></RelatedMaterial><Duration >PT1H48M</Duration><Thumbnail>&lt;![CDATA[56846/46948_cf_t.jpg
                  8/18/2007 03:06:00.134 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP response envelope
                  8/18/2007 03:06:00.134 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP response headers
                  8/18/2007 03:06:00.135 [DEBUG] mx.rpc.soap.SOAPDecoder Decoding SOAP response body
                  [RPC Fault faultString="The element referenced by id 'urn:tva:metadata:cs:ContentCS:2005:3.4' was not found." faultCode="DecodingError" faultDetail="null"]