ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

integrated web services server - IWS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: integrated web services server - IWS

    Hi,

    I am still having the problem in receiving the returned values from C program while consuming web service.

    Value is returning properly from C program, but when it is getting received in RPG , its showing null value.

    Find attached the document contains the screenshots(in this i am trying to convert from US dollars to Japanese Yen).

    I think i have not declared properly the receiving parametes in RPG program. Please help me in resolving this.

    Thanks ,
    Yuvaraj
    Attached Files

    Comment


    • #17
      Re: integrated web services server - IWS

      Yuvaraj,

      I *believe* the issue is that XmlStr is not based on the return pointer XmlDoc. ( It appears to be what you are trying to do ) Add the keyword Based( XmlDoc ) to the definition for XmlString and see if that will do it.
      Michael Catalani
      IS Director, eCommerce & Web Development
      Acceptance Insurance Corporation
      www.AcceptanceInsurance.com
      www.ProvatoSys.com

      Comment


      • #18
        Re: integrated web services server - IWS

        thanks Michael,

        I tried with that also like

        D xmldoc S *
        D xmlstr S 9999A based(xmldoc)

        Monitor;
        xml-into currency %xml( xmlstr );

        but it returns some improper values.

        Comment


        • #19
          Re: integrated web services server - IWS

          oh I didn't notice your returns type is double...
          Code:
          <s:element name="ConversionRateResponse">
                  <s:complexType>
                    <s:sequence>
                      <s:element minOccurs="1" maxOccurs="1" name="ConversionRateResult" type="s:double" />
                    </s:sequence>
                  </s:complexType>
                	</s:element>
          Last edited by dhanuxp; June 14, 2012, 02:17 AM.

          Comment


          • #20
            Re: integrated web services server - IWS

            I tried by declaring double field in rpg and tried to receive the value from C as shown.

            **********************************
            D Rate1 S 8F

            rate1 = ConversionRate(CurCnWS:'USD':'JPY');
            ************************************

            But while compilation its throwing error, that

            RNF7416 30 1 The types of the right and left hand side do not match in t
            EVAL operation.

            *************

            Comment


            • #21
              Re: integrated web services server - IWS

              did you change your prototype to return 8F ?
              Code:
                  DConversionRate   PR              8f   EXTPROC('ConversionRate')
                   D pCurCnWS                        *   Value
                   D pFrmoCurr                       *   Value
                   D pToCurr                         *   Value

              Comment


              • #22
                Re: integrated web services server - IWS

                I missed to change it in the prototype. now I changed it, its working fine

                Thank you so much for your help and time in resolving the issue.

                Yuvaraj

                Comment

                Working...
                X