3 Replies Latest reply on Feb 27, 2009 9:13 PM by Newsgroup_User

    Help with webservice request

    TransoniqHacker Level 1
      I am trying to use an internal WSDL in which some of the attributes have a . in the name. For example"

      <xsd:attribute name="DT.RCVD" use="optional">
      <xsd:simpleType>
      <xsd:restriction base ="xsd:string">
      <xsd:maxLength value = "8" />
      <xsd:minLength value = "8" />
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:attribute>

      I can't seem to use this in the request section as it throws an error in compiling.

      Does anyone know a way to handle these types of WSDL's? I have used them before and everything works great as long as there isn't a dot(.) in the attribute name.

      Thanks.
      Matt
        • 1. Re: Help with webservice request
          Level 7

          "TransoniqHacker" <webforumsuser@macromedia.com> wrote in message
          news:go9hb9$fng$1@forums.macromedia.com...
          >I am trying to use an internal WSDL in which some of the attributes have a
          >. in
          > the name. For example"
          >
          > <xsd:attribute name="DT.RCVD" use="optional">
          > <xsd:simpleType>
          > <xsd:restriction base ="xsd:string">
          > <xsd:maxLength value = "8" />
          > <xsd:minLength value = "8" />
          > </xsd:restriction>
          > </xsd:simpleType>
          > </xsd:attribute>
          >
          > I can't seem to use this in the request section as it throws an error in
          > compiling.
          >
          > Does anyone know a way to handle these types of WSDL's? I have used them
          > before and everything works great as long as there isn't a dot(.) in the
          > attribute name.

          myXML.attribute('DT.RCVD')


          • 2. Re: Help with webservice request
            TransoniqHacker Level 1
            Thanks for the response...

            I don't have trouble getting at the data once it is returned, but sending the data. See the code below.
            When I try and run this code, I get a "syntax error: expecting colon before dot." error on the <mx:request> line.

            Thanks...
            M
            • 3. Re: Help with webservice request
              Level 7

              "TransoniqHacker" <webforumsuser@macromedia.com> wrote in message
              news:go9qie$qqc$1@forums.macromedia.com...
              > Thanks for the response...
              >
              > I don't have trouble getting at the data once it is returned, but sending
              > the
              > data. See the code below.
              > When I try and run this code, I get a "syntax error: expecting colon
              > before
              > dot." error on the <mx:request> line.
              >
              > Thanks...
              > M
              >
              > <mx:WebService id="userRequest" wsdl="xyz.wsdl">
              > <mx:operation name="UpdateUnsecuredParcel" resultFormat="object"
              > fault="defaultFault(event);" result="remotingCFCHandler(event)">
              > <mx:request xmlns="">
              > <Batch>4000</Batch>
              > <TaxYear>2009</TaxYear>
              > <Mode>C</Mode>
              > <UserID>90654</UserID>
              > <Fields>
              > <APN>{APN.text}</APN>
              > <ACCT>{Acct.text}</ACCT>
              > <DT.RCVD>{dtReceived.text}</DT.RCVD>
              > </Fields>
              > </mx:request>
              > </mx:operation>
              > </mx:WebService>

              Do it in actionscript.

              var tmpXML:XMLList = <Batch>4000</Batch>
              <TaxYear>2009</TaxYear>
              <Mode>C</Mode>
              <UserID>90654</UserID>
              <Fields>
              <APN>{APN.text}</APN>
              <ACCT>{Acct.text}</ACCT>
              <foo>{dtReceived.text}</foo>
              </Fields>

              node:XMLNode = tmpXML.descendents('foo')[0];
              node.name = 'DT.RCVD';

              userRequest.request = tmpXML;

              HTH;

              Amy