• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

DCD Http Service

New Here ,
Apr 18, 2011 Apr 18, 2011

Copy link to clipboard

Copied

Hi ,

Im new to Flex, im retreiving data using http url, after  accessing http url, im trying to bind data to dropdown but when running  the application it gives TypeError: Error #1085: The element type  "input" must be terminated by the matching end-tag "</input>".

This is my mxml code

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      xmlns:pgroup="services.pgroup.*"
      xmlns:lookup="services.lookup.*">
   <fx:Script>
      <![CDATA[
         import com.adobe.serializers.utility.TypeUtility;
        
         import mx.events.FlexEvent;

        
         protected function dropDownList_creationCompleteHandler(event:FlexEvent):void
         {
            pgroupResult.token  = lookup.pgroup(/*Enter value(s) for */ "2.5", "data", "1156",  "0a0fb7ff-eb61-47e2-9674-77d51b900b73", "2.0", "dse1","r");
         }
        
      ]]>
   </fx:Script>
   <fx:Declarations>
      <s:CallResponder id="pgroupResult"/>
      <lookup:Lookup id="lookup"/>


     
   </fx:Declarations>
   <s:DropDownList id="dropDownList" x="228" y="74"
               creationComplete="dropDownList_creationCompleteHandler(event)" labelField="row">
      <s:AsyncListView list="{TypeUtility.convertToCollection(pgroupResult.lastResult)}"/>
   </s:DropDownList>
</s:View>


HTTP urls response
------------------


<?xml version="1.0" encoding="UTF-8"?>
<SERVICE-DATA-RESPONSE>
  <RESULT STATUS="ok"/>
  <STATUS_NUM> QUERY_SUCCESS</STATUS_NUM>
  <STATUS_MESSAGE> Service Query Successful </STATUS_MESSAGE>
  <SECTION TYPE="TABLE">
    <DATA-DEFINITION>
      <OUTPUT-LIST>
        <OUTPUT-PARAM NAME="Product Group"/>
      </OUTPUT-LIST>
      <DATA-RESULT>
        <ROW>
          <COLUMN>
            <DATA><![CDATA[Body Care]]></DATA>
          </COLUMN>
        </ROW>
        <ROW>
          <COLUMN>
            <DATA><![CDATA[Skin Care]]></DATA>
          </COLUMN>
        </ROW>
        <ROW>
          <COLUMN>
            <DATA><![CDATA[Hair Care]]></DATA>
          </COLUMN>
        </ROW>
        <ROW>
          <COLUMN>
            <DATA><![CDATA[Detergents]]></DATA>
          </COLUMN>
        </ROW>
        <ROW>
          <COLUMN>
            <DATA><![CDATA[Oral Care]]></DATA>
          </COLUMN>
        </ROW>
      </DATA-RESULT>
    </DATA-DEFINITION>
  </SECTION>
</SERVICE-DATA-RESPONSE>

Thanks in advance
Kiss

Views

2.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 19, 2011 Apr 19, 2011

Copy link to clipboard

Copied

The error message points to malformed XML element named <input>. However in the XML you posted there is no such element. Are you sure you are looking at the right data.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 19, 2011 Apr 19, 2011

Copy link to clipboard

Copied

Thank you for the reply. Yes, you are right in your observation and i am baffled too. Incidentally i saw a post in the forum with similar issue and no response or resolution for the same. Hope some one from the Adobe team looks at the same and provides feedback.

The link for the identical issue is given below

http://forums.adobe.com/thread/804747?tstart=0

My http service call url is also given below

http://192.168.2.50:8080/ExtensioInfoServer/j2me/J2MERequest?version=2.5&cmd=data&sid=39&schemaVerNum=0a0fb7ff-eb61-47e2-9674-77d51b900b73&j2meAppVersion=2.0&userId=admin&authToken=11

The test operation works fine but after data bind it gives the following error.

TypeError: Error #1085: The element type "input" must be terminated by the matching end-tag "</input>".

at com.adobe.serializers.xml::XMLSerializationFilter/deserializeResult()

at mx.rpc.http::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::processResult()

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()

at mx.rpc::Responder/result()

at mx.rpc::AsyncRequest/acknowledge()

at DirectHTTPMessageResponder/completeHandler()

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/onComplete()

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 20, 2011 Apr 20, 2011

Copy link to clipboard

Copied

We tried with the XML you posted but couldn't reproduce the runtime error you reported in XMLSerializationFilter.

Can you give more information and the exact steps to reproduce this issue?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 20, 2011 Apr 20, 2011

Copy link to clipboard

Copied

Thank You very much for trying out.

I tried the xml too at my end and it's not binding the property.Assume it is throwing error because of the '-' in the tag <Service-Data-Response>. Because when i remove the '-' in the tag and used the static xml it worked fine.

The error is in the dynamic httpservice call. I am sharing the screenshots for your reference. Grateful for a resolution.

Error while configuring the return type.

http3.JPG

The test operation goes without error.

http5.JPG

The actual error while binding and running the app.

http7.JPG

I am also providing you with the dynamic http url which i am trying in http service

http://www.extensio.com/TestInstance/j2me/J2MERequest?version=2.5&cmd=data&sid=4&schemaVerNum=0a0fb7ff-eb61-47e2-9674-77d51b900b73&j2meAppVersion=2.0&inputKeys=P002&userId=demo&authToken=22

Thank you for the time.

Regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 20, 2011 Apr 20, 2011

Copy link to clipboard

Copied

I can repro the runtime error now by creating a Mobile project and using the URL you provided.

Can you log this bug here - https://bugs.adobe.com/

Please post the bug number here after logging the bug.

The workaround is to comment the line operation.serializationFilter = serializer0; in the constructor of the _Super_SERVICE_NAME class.

Regarding the error you get when to configure return type - the xml contains tags with hyphen (-) such as SERVICE-DATA-RESPONSE, OUTPUT-LIST, etc.. and we can't make AS properties in a VO with hyphen in them. There is a already a bug logged for supporting these cases.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 20, 2011 Apr 20, 2011

Copy link to clipboard

Copied

Thank you so much for the reply.

As suggested, I have logged a bug report and the no is FB-30887

I will try the workaround and get back to you.

Thank You

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

Hi , i tried the workaround as suggested. The Input tag error is not appearing now but couldn't see the data result while running the application.

Have you been able to view the results at your end while running the app ? If you have been able to run at your end with data results, could you provide us with details to run the app successfully at our end ?

Regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

I looked into this issue and it seems that the real issue is with the response that you are getting.

The response I'm getting on running the app is -

<HTML><HEAD></HEAD><BODY><TABLE class="ErrClass" bgcolor="#D6EFFF"><TR><TD><P>Request from non-mobile devices is not allowed.</P></TD></TR></TABLE><input type="hidden"  name="ERROR_CODE" value="ERROR"></BODY></HTML>

The XMLParser is not able to parse this response and an error is thrown.

Are you trying this on a computer or a phone? If you are on a computer, can you try on your phone?

Note that, you'll get an Object and you've decide what properties to show in your UI control.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

Thank you. The url shared with you is for mobile devices only. If you check the same from the browser on a PC, you will get this error.

Having said that, you could try the same url under opera mini browser which will show you the xml result (attaching a copy for your ref).

opera_result_xml.JPG

We are trying to query this url through flash builder burrito (flex mobile project) which in ideal scenario will result in a xml response. You could see the same under our screenshot 2 titled 'The test operation goes without error.' and you can see the xml result. While we try to bind this to the ui controls and run the app, we are facing the error.Hope my narration is clear.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 21, 2011 Apr 21, 2011

Copy link to clipboard

Copied

LATEST

From TestOperation, it works because the service thinks that the request didn't come from a browser. But when you run the app, the service thinks that the request came from a browser and hence it returns an invalid response.

You can add a resultHandler and faultHandler in the CallResponder and see the details.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines