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

Services Header (was Re: Unresolved symbols when creating WSDL2RPG Service Program)



   Note: This e-mail is subject to the disclaimer contained at the bottom
   of this message.
     _________________________________________________________________

   Thanks so much for your analysis Thomas.



   I hope this discussion provides a guide for other newbies.



   I've actually got the whole thing working! With a lot of help from our
   web services people. I am progressing but still have questions.



   After our first attempt which failed, our services people discovered
   that the Service Header was not included in the Soap request, and I
   haven't found any reference in the list to this. We inserted the
   string into the request manually and it worked. Is there something
   more I have to do or should the WSDL included below have caused the
   WSDL2RPG program to generate the correct request inclusive of the
   Services header?



   When the interface program generated by WSDL2RPG runs, it receives the
   response into rtnValue. I can see the correct values through debug.
   However when the procedure ends, the calling program crashes with
   'Pointer not set for location'. Here is the invocation code:



     tns_GetCoverOptionsResponse_t=

     GetCoverOptionsPort_GetCoverOptions(

           parameters:

           errText);



   Lastly, I also wanted to cover the last problem I raised. I've
   included the xml at the end of this email.



   I went back to square one to stay as close as possible to your example
   code.



   I've included the XML used as input to WSDL2RPG so that the following
   references make sense.

   I traced all the references back to obtain the names of the parameters
   but when I compiled the test harness it failed with:



   *RNF7030 30        008701  The name or indicator FROMDATE is not
   defined.

   *RNF7030 30        008702  The name or indicator PRODUCT... is not
   defined.



   This is on the two fields being set into parameters:



   008701     parameters.FromDate= '20100324';

   008702     parameters.ProductTypeCode= 'PLL';

   008800     // Now let's call the web service.

   008801      tns_GetCoverOptionsResponse_t=

   008900      GetCoverOptionsPort_GetCoverOptions(

   009100            parameters:

   009200            errText);



   And here is the trail of parameter declaration:



        *  Request message

        *  These fields needs to be filled with reasonable values

        *  right before calling the web service.



        D parameters    DS
   likeds(tns_GetCoverOptionsRequest_t)

        D                                     inz

   ==================

        D tns_GetCoverOptionsRequest_t...

        D               DS                based(pDummy)

        D                                     qualified

        D  CoverOptionsStandardRequest...

        D
   likeds(ns1_RefDataStandardRequest_t)

   ==================

        D ns1_RefDataStandardRequest_t...

        D               DS                based(pDummy)

        D                                     qualified

        D  FromDate                   10A  varying

        D  ProductTypeCode...

        D                              3A  varying





   Because it wasn't compiling, I ended up changing the parameters
   declaration by hand to the initial structure.



        D parameters    DS
   likeds(ns1_refdatastandardRequest_t)





   This let me compile as the 2 parameter fields were recognized.



   I realize that this would have to be done every time I created the
   application interface but it enables me to continue the R&D. Any
   advice you have would be wonderful. I created the module and program
   as per your PDF and have been able to test.





   Here is the wsdl:



   <?xml version="1.0" encoding="UTF-8"?>

   <!-- $Id: GetUserIdentity_0.001.wsdl 4380 2009-06-30 01:30:56Z s62466
   $ --><wsdl:definitions
   targetNamespace="urn:au.com.iag.xml:service.thebuzz.home.GetCoverOptio
   ns.0.001" xmlns:wsdl="[1]http://schemas.xmlsoap.org/wsdl/";
   xmlns:soap="[2]http://schemas.xmlsoap.org/wsdl/soap/";
   xmlns:http="[3]http://schemas.xmlsoap.org/wsdl/http/";
   xmlns:xs="[4]http://www.w3.org/2001/XMLSchema";
   xmlns:soapenc="[5]http://schemas.xmlsoap.org/soap/encoding/";
   xmlns:mime="[6]http://schemas.xmlsoap.org/wsdl/mime/";
   xmlns:hdr="urn:au.com.iag.xml:service.eventures.common.ServiceHeader.1
   "
   xmlns:tns="urn:au.com.iag.xml:service.thebuzz.home.GetCoverOptions.0.0
   01"
   xmlns:ns1="urn:au.com.iag.xml:service.thebuzz.home.GetCoverOptions.0.0
   01">

           <wsdl:types>

                   <xs:schema>

                           <xs:import
   namespace="urn:au.com.iag.xml:service.thebuzz.home.GetCoverOptions.0.0
   01" schemaLocation="a.xsd"/>

                           <xs:import
   namespace="urn:au.com.iag.xml:service.eventures.common.ServiceHeader.1
   " schemaLocation="b.xsd"/>

                   </xs:schema>

           </wsdl:types>

           <wsdl:message name="ServiceHeader">

                   <wsdl:part name="service-header"
   element="hdr:ServiceHeader"/>

           </wsdl:message>

           <wsdl:message name="GetCoverOptionsRequest">

                   <wsdl:part name="parameter"
   element="ns1:GetCoverOptionsRequest"/>

           </wsdl:message>

           <wsdl:message name="GetCoverOptionsResponse">

                   <wsdl:part name="parameter"
   element="ns1:GetCoverOptionsResponse"/>

           </wsdl:message>

           <wsdl:portType name="GetCoverOptionsType">

                   <wsdl:operation name="GetCoverOptions">

                           <wsdl:input
   message="tns:GetCoverOptionsRequest"/>

                           <wsdl:output
   message="tns:GetCoverOptionsResponse"/>

                   </wsdl:operation>

           </wsdl:portType>

           <wsdl:binding name="SoapBinding"
   type="tns:GetCoverOptionsType">

                   <soap:binding style="document"
   transport="[7]http://schemas.xmlsoap.org/soap/http"/>

                   <wsdl:operation name="GetCoverOptions">

                           <soap:operation
   soapAction="urn:#GetCoverOptions"/>

                           <wsdl:input>

                                   <soap:header
   message="tns:ServiceHeader" part="service-header" use="literal"/>

                                   <soap:body use="literal"/>

                           </wsdl:input>

                           <wsdl:output>

                                   <soap:header
   message="tns:ServiceHeader" part="service-header" use="literal"/>

                                   <soap:body use="literal"/>

                           </wsdl:output>

                   </wsdl:operation>

           </wsdl:binding>

           <wsdl:service name="GetCoverOptionsService">

                   <wsdl:port name="GetCoverOptionsPort"
   binding="tns:SoapBinding">

                           <soap:address
   location="[8]http://int-eventures-esb:11000/"/>

                   </wsdl:port>

           </wsdl:service>

   </wsdl:definitions>





     _________________________________________________________________

   The information transmitted in this message and its attachments (if
   any) is intended only for the person or entity to which it is
   addressed.

   The message may contain confidential and/or privileged material. Any
   review, retransmission, dissemination or other use of, or taking of
   any action in reliance upon this information, by persons or entities
   other than the intended recipient is prohibited.

   If you have received this in error, please contact the sender and
   delete this e-mail and associated material from any computer.

   The intended recipient of this e-mail may only use, reproduce,
   disclose or distribute the information contained in this e-mail and
   any attached files, with the permission of the sender.

   This message has been scanned for viruses.
     _________________________________________________________________

References

   1. http://schemas.xmlsoap.org/wsdl/
   2. http://schemas.xmlsoap.org/wsdl/soap/
   3. http://schemas.xmlsoap.org/wsdl/http/
   4. http://www.w3.org/2001/XMLSchema
   5. http://schemas.xmlsoap.org/soap/encoding/
   6. http://schemas.xmlsoap.org/wsdl/mime/
   7. http://schemas.xmlsoap.org/soap/http
   8. http://int-eventures-esb:11000/
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------