[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is my DS sub fields ?



   You got me down to my knees. The problem is a bug in procedure
   produceNameForRpgArray() of module WSDL2R59. Please change the
   following lines at the end of the procedure to:
       if (tmpNS = '');
          refTypeName = cGENERATOR_RPG_ARRAY_PREFIX + tmpLName;
       else;
          refTypeName = tmpNS + ':' + cGENERATOR_RPG_ARRAY_PREFIX +
   tmpLName;
       endif;
    -> tmpQName = QName_newName(refTypeName);         // produce
   qualified name
    -> tmpQName = TypeDef_produceName(tmpQName: '');  // and ensure that
   it is unique
       refTypeName = QName_toXml(tmpQName);
       return refTypeName;
   Then compile the module and link program WSDL2RPG like this:
     CRTRPGMOD MODULE(RADDATZ/WSDL2R59) SRCFILE(RADDATZ/QWSDL2RPG)
       SRCMBR(WSDL2R59) DBGVIEW(*LIST) TRUNCNBR(*NO)
     UPDPGM PGM(RADDATZ/WSDL2RPG) MODULE(RADDATZ/WSDL2R59)
   That should fix the problem.
   Thomas.
   ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 07.07.2011 10:32:54:
   > Von: dhanushkamanjula@xxxxxxxxx
   > An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   > Datum: 07.07.2011 10:51
   > Betreff: Re: Where is my DS sub fields ?
   > Gesendet von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   >
   > Hi Thomas,
   > Many thank for your quick response,
   >
   > The request parameters makes me confuse because it is not the way
   wsdl was
   > define
   >
   > In wsdl this is the way to post a message......
   >
   >   <wsdl:message name="ZbapiAccDocumentPost">
   >     <wsdl:part name="parameters"
   element="tns:ZbapiAccDocumentPost"/>
   >   </wsdl:message>
   >
   > Inside the post message, it has many parameters (I'm only going
   through the
   > Accountgl yet)
   >
   > <xsd:element name="ZbapiAccDocumentPost">
   >         <xsd:complexType>
   >           <xsd:sequence>
   >             <xsd:element name="Accountgl"
   type="tns:TableOfBapiacgl09"
   > minOccurs="0"/>
   >             <xsd:element name="Accountpayable"
   type="tns:TableOfBapiacap09"
   > minOccurs="0"/>
   >
   > You can see, the Accountgl type is TableOfBapiacgl09 and It was
   define in
   > someting like this in wsdl
   >
   >       <xsd:complexType name="TableOfBapiacgl09">
   >         <xsd:sequence>
   >           <xsd:element name="item" type="tns:Bapiacgl09"
   minOccurs="0"
   > maxOccurs="unbounded"/>
   >         </xsd:sequence>
   >       </xsd:complexType>
   >
   > It name is 'item' & type is 'Bapiacgl09'
   >
   >       <xsd:complexType name="Bapiacgl09">
   >         <xsd:sequence>
   >           <xsd:element name="ItemnoAcc" type="n0:numeric10"/>
   >           <xsd:element name="GlAccount" type="n0:char10"/>
   >           <xsd:element name="ItemText" type="n0:char50"/>
   >           <xsd:element name="StatCon" type="n0:char1"/>
   >           <xsd:element name="LogProc" type="n0:char6"/>
   >           <xsd:element name="AcDocNo" type="n0:char10"/>
   >           <xsd:element name="RefKey1" type="n0:char12"/>
   >           <xsd:element name="RefKey2" type="n0:char12"/>
   >           <xsd:element name="RefKey3" type="n0:char20"/>
   >
   >
   > now 'Bapiacgl09' has fields for ItemnoAcc,GlAccount,, ect.
   >
   > but in RPG stub, it is map to another DS called 'Bapiackec9' which
   is not
   > correct..
   > What should I do?
   >
   > Thanks
   >
   >
   > On Thu, Jul 7, 2011 at 1:11 PM, <thomas.raddatz@xxxxxx> wrote:
   >
   > >
   > >   I am not sure that I completely unterstand the problem.
   > >   First there is no need for changing the stub module in order to
   assign
   > >   data to the SOAP request (post) message.
   > >   All you have to do is to fill structure
   "tns_ZbapiAccDocumentPost_t"
   > >   and pass it to procedure
   > >   ZBAPI_ACC_DOCUMENT_POST_ZbapiAccDocumentPost(). The attached
   test
   > >   program clearly shows how to access the fields of structure
   > >   "Accountgl":
   > >            // Set the paramater values of the request message
   > >            // of the web service.
   > >            //    assign values here
   > >            // Set number of array items:
   > >            parameters.Accountgl.item.x = 1;
   > >            // Set array item values:
   > >
   > >   parameters.Accountgl.item.Bapiackec9(parameters.Accountgl.item.x
   > >            ).ItemnoAcc = '0000000010';
   > >
   > >   parameters.Accountgl.item.Bapiackec9(parameters.Accountgl.item.x
   > >            ).Fieldname = 'string';
   > >
   > >   parameters.Accountgl.item.Bapiackec9(parameters.Accountgl.item.x
   > >            ).Character = 'string';
   > >   Another option to get an overview of the structure of the
   messages of
   > >   a given web service operation is to generate a stream file
   showing
   > >   that structure. In order to produce that stream file you need to
   > >   specify PARMSTRUCT(*STMF) and STRUCTSTMF('pathofTheStreamfile')
   at the
   > >   WSDL2RPG command prompt:
   > >     WSDL2RPG
   URL('wsdl2rpg/wsdl/ZBAPI_ACC_DOCUMENT_POST_WO_AUTH.wsdl')
   > >       SRCFILE(RADDATZ/QWSDL2RPG) SRCMBR(XXX001 *YES)
   > >       PARMSTRUCT(*STMF)
   > >
   STRUCTSTMF('wsdl2rpg/wsdl/ZBAPI_ACC_DOCUMENT_POST_WO_AUTH.txt')
   > >   First lines of the stream file:
   > >   WSDL2RPG Service Request and Response Parameter Structures
   > >   ----------------------------------------------------------
   > >   Generated at:  07.07.2011 / 08:46:58
   > >   WSDL URL    :
   > >   [1][1]file:wsdl2rpg/wsdl/ZBAPI_ACC_DOCUMENT_POST_WO_AUTH.wsdl
   > >   Operation   :  tns:ZbapiAccDocumentPost
   > >   Service Request Parameters
   > >   --------------------------
   > >   i_tns_ZbapiAccDocumentPost(tns_ZbapiAccDocumentPost_t)
   > >     Accountgl(tns_TableOfBapiacgl09_t)
   > >       item(tns_RpgArrayOfItem_t)
   > >         x(10I 0, *ARRAY_INDEX)
   > >         Bapiackec9(tns_Bapiackec9_t, *STATIC_ARRAY)
   > >           ItemnoAcc(n1_numeric10_t)
   > >           Fieldname(n1_char30_t)
   > >           Character(n1_char18_t)
   > >     Accountpayable(tns_TableOfBapiacap09_t)
   > >   Does that answer your question?
   > >   Thomas.
   > >   ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 07.07.2011
   07:25:41:
   > >   > Von: dhanushkamanjula@xxxxxxxxx
   > >   > An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   > >   > Datum: 07.07.2011 07:38
   > >   > Betreff: Where is my DS sub fields ?
   > >   > Gesendet von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   > >    >
   > >   > Hi again,
   > >   >
   > >   > I have a WSDL file. the post message have sub DS called
   'Accountgl'
   > >   which is
   > >   > type of TableOfBapiacgl09
   > >   > The TableOfBapiacgl09 is define with DS called 'Bapiacgl09'
   > >   >
   > >   > The 'Bapiacgl09' DS contain sub fields named
   > >   > ItemnoAcc,GlAccount,ItemText..ect
   > >   >
   > >   > In my generated STUB source, I can't find those sub fields,
   due to
   > >   that
   > >   > reason I have no idea to how to assign the data according to
   SOAP
   > >   message
   > >   >
   > >   > (not only 'Accountgl' but also 'Accountpayable',
   'Accountreceivable'
   > >   gives
   > >   > same issues)
   > >   >
   > >   > - <Accountgl>
   > >   > - <item>
   > >   >   <ItemnoAcc>0000000010</ItemnoAcc>
   > >   >   <GlAccount>0051300000</GlAccount>
   > >   >   <ItemText />
   > >   > .
   > >   > .
   > >   > - </Accountgl>
   > >   > - </item>
   > >   >
   > >   >
   > >   > WSDL, STUB source & PGM source are attached.
   > >   >
   > >   > Please give me an idea of this...
   > >   >
   > >   > Thanks
   > >    > [Anhang "SAP0004.txt" gelöscht von Thomas Raddatz/OBI/DE]
   [Anhang
   > >   > "SAP0004t.txt" gelöscht von Thomas Raddatz/OBI/DE] [Anhang
   > >   > "ZBAPI_ACC_DOCUMENT_POST_WO_AUTH.wsdl" gelöscht von Thomas
   Raddatz/
   > >   > OBI/DE]
   > >   >
   > >
   ----------------------------------------------------------------------
   > >   -
   > >   > This is the FTPAPI mailing list.  To unsubscribe, please go
   to:
   > >   > [2][2]http://www.scottklement.com/mailman/listinfo/ftpapi
   > >   >
   > >
   ----------------------------------------------------------------------
   > >   -
   > >
   > >   --
   > >   IMPORTANT NOTICE:
   > >   This email is confidential, may be legally privileged, and is
   for the
   > >   intended recipient only. Access, disclosure, copying,
   distribution, or
   > >   reliance on any of it by anyone else is prohibited and may be a
   > >   criminal
   > >   offence. Please delete if obtained in error and email
   confirmation to
   > >   the sender.
   > >
   > > References
   > >
   > >   1. [3]file://wsdl2rpg/wsdl/ZBAPI_ACC_DOCUMENT_POST_WO_AUTH.wsdl
   > >   2. [4]http://www.scottklement.com/mailman/listinfo/ftpapi
   > >
   > >
   ----------------------------------------------------------------------
   -
   > > This is the FTPAPI mailing list.  To unsubscribe, please go to:
   > > [5]http://www.scottklement.com/mailman/listinfo/ftpapi
   > >
   ----------------------------------------------------------------------
   -
   > >
   > >
   >
   >
   > --
   > Shoot for the moon, even if you miss, you'll land among the stars.
   >
   ----------------------------------------------------------------------
   -
   > This is the FTPAPI mailing list.  To unsubscribe, please go to:
   > [6]http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   ----------------------------------------------------------------------
   -

   --
   IMPORTANT NOTICE:
   This email is confidential, may be legally privileged, and is for the
   intended recipient only. Access, disclosure, copying, distribution, or
   reliance on any of it by anyone else is prohibited and may be a
   criminal
   offence. Please delete if obtained in error and email confirmation to
   the sender.

References

   1. file://wsdl2rpg/wsdl/ZBAPI_ACC_DOCUMENT_POST_WO_AUTH.wsdl
   2. http://www.scottklement.com/mailman/listinfo/ftpapi
   3. file://wsdl2rpg/wsdl/ZBAPI_ACC_DOCUMENT_POST_WO_AUTH.wsdl
   4. http://www.scottklement.com/mailman/listinfo/ftpapi
   5. http://www.scottklement.com/mailman/listinfo/ftpapi
   6. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------