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

Re: Missing tags in the web service XML creation



The problem is that WSDL2RPG does not yet understand <extension> in
conjunction with <sequence> as shown here:

 <xsd:complexType name="authorization">
   <xsd:complexContent>
    <xsd:extension base="Q1:source">
     <xsd:sequence>
      <xsd:element name="orderId" type="xsd:string"/>
      <xsd:element ref="Q1:giftCards"/>
     </xsd:sequence>
    </xsd:extension>
   </xsd:complexContent>
 </xsd:complexType>

I already did some corrections and enhancements to solve that issue but
frankly it may take a while to get it completely fixed because there is no
time next week.

Thomas.


ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 26.08.2009 19:28:57:

> Von:
>
> KTirumamidi@xxxxxxxxxxxxxxx
>
> An:
>
> ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>
> Datum:
>
> 26.08.2009 19:54
>
> Betreff:
>
> Missing tags in the web service XML creation
>
> Gesendet von:
>
> ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>
> Hi all - I am using the HTTP API and another tool WSDL2RPG supplied by
> Thomas Raddatz to generate the RPG stubs for the web service.
> Unfortunately the RPGLE module is able to generate only the XML root
> nodes but not the child nodes. Here is what is happening. The tags
> between <q0:paymentRequest> and </q0:paymentRequest> are not being
> generated.
>
>
>
> My XML is supposed to be like this.
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:q0="http://www.eps.in.com";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>
>                 <soapenv:Body>
>
>                                 <q0:paymentRequest>
>
>                                                 <q0:balanceInquiry>
>
>
> <security>
>
>
> <username>test</username>
>
>
> <password>test</password>
>
>
> </security>
>
>
> <sourceId>W0045</sourceId>
>
>
> <q0:giftCards>
>
>
> <q0:giftCard>
>
>
> <cardNumber>6035718888881000609</cardNumber>
>
>
> <transactionAmount>232</transactionAmount>
>
>
> <externalReferenceId>2323</externalReferenceId>
>
>
> </q0:giftCard>
>
>
> <q0:giftCard>
>
>
> <cardNumber>6035718888881000619</cardNumber>
>
>
> <transactionAmount>132</transactionAmount>
>
>
> <externalReferenceId>2323</externalReferenceId>
>
>
> </q0:giftCard>
>
>
> <q0:giftCard>
>
>
> <cardNumber>6035718888881000629</cardNumber>
>
>
> <transactionAmount>332</transactionAmount>
>
>
> <externalReferenceId>2323</externalReferenceId>
>
>
> </q0:giftCard>
>
>
> </q0:giftCards>
>
>                                                 </q0:balanceInquiry>
>
>                                 </q0:paymentRequest>
>
>                 </soapenv:Body>
>
>  </soapenv:Envelope>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
> What I was able to generate is this with the call to test program:
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:in="http://www.eps.in.com";
> xmlns:tns="http://www.1800flowers.payment.org/PaymentMessageSet";>
>
>        <soapenv:Body>
>
>
> <in:paymentRequest>useruserW018568888888812abcd</in:paymentRequest>
>
>        </soapenv:Body>
>
> </soapenv:Envelope>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
> I am attaching the RPG source and WSDL here:
>
>
>
> Since the XML generation logic in the WS0001 has only the following
> logic I had to pass only the simple string and I thought somewhere down
> the line the tool converts the text to the child tags - but it is not.
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> request =
>
>     '<?xml version="1.0" encoding="UTF-8"?>'                     +
>
>     '<soapenv:Envelope'                                          +
>
>     ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";' +
>
>     ' xmlns:in="http://www.eps.in.com";' +
>
>     ' xmlns:tns="http://www.1800flowers.payment.org/PaymentMessag+
>
>     eSet"' +
>
>     '>'                                                          +
>
>     '<soapenv:Body>'                                             +
>
>     '<in:paymentRequest>' +
>
>  Marshaller_toAnyType(
>
>     i_in_paymentRequest) +
>
>     '</in:paymentRequest>' +
>
>     '</soapenv:Body>'                                            +
>
>     '</soapenv:Envelope>';
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
> As you can see I would have expected in the place of
> Marshaller_toAnyType(i_in_paymentRequest) there will be the
> BalanceInquiry nodes. Instead it is expecting simple string.
>
>
>
> I am thinking either the WSDL2RPG is not able to generate the XML
> generation logic in the RPGLE based on how the WSDL is written or my
> driver program WS0001T should have more logic to generate that tag data
> first and then pass that data here.
>
>
>
> As of this afternoon I am going in the route of dropping web service
> plan and use any other way like a IBM MQ Client or something and pass
> the XML as the project deadlines are closing too fast one me.
>
>
>
> The only problem I will have in that is I should write a XML parser (or
> use EXPAT) when the response comes back.
>
>
>
> Any help / thoughts would really help me. Thank you in advance.
>
> Kalyan Tirumamidi
> Desk   +1 516-237-4795
> Mobile +1 516-279-8632
>
>
>
>
>
>
>
>
>
>
> -----------------------------------------
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or
> entity to which it is addressed. If the reader of this e-mail is
> not the intended recipient or his or her authorized agent, the
> reader is hereby notified that any dissemination, distribution or
> copying of this e-mail is prohibited. If you have received this
> e-mail in error, please notify the sender by replying to this
> message and delete this e-mail immediately.[Anhang "image001.gif"
> gelöscht von Thomas Raddatz/GfD/DE] [Anhang "WS0001T.RPGLE" gelöscht
> von Thomas Raddatz/GfD/DE] [Anhang "WS0001.rpgle" gelöscht von
> Thomas Raddatz/GfD/DE] [Anhang "PaymentMessageSetService.wsdl"
> gelöscht von Thomas Raddatz/GfD/DE]
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> 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.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------