EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
Expand all | Collapse all

Error calling iSeries Web Services

  • 1.  Error calling iSeries Web Services

    Posted Mon May 11, 2015 04:30 PM

    Hi

    when i try to run iSeries Web Service from RUIhandler i receive this error:

    Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

    EGL1621E:EGL1621E is occurred an error during the attempt to call the function :getartt on WebService:http://myiseries:10066/web/services/GETART.  
    EGL0001I L' error is occurred in EGL Rich UI Proxy.  
        detail1:500  
        detail2:FAILED  
        detail3:namespace mismatch require http://getart.wsbeans.iseries/xsd found http://getart.wsbeans.iseries

    can some help to find the error ?

    thanks in advance

    giocot


  • 2.  Re: Error calling iSeries Web Services

    Posted Tue May 12, 2015 03:45 AM

    Hi

    Any idea ?? 

    attached my source project ..   a doubt .. i have used an unique project (Rich UI) where i imported and created the Client interface , pheraps is this the problem  ??    where can i find a example/tutorial how to consume a RPG  Web Service ?

    Thanks in advance

    giocot

    Attachments



  • 3.  Re: Error calling iSeries Web Services

    Posted Tue May 12, 2015 10:57 AM

    Hi,

    One way to setup and consume an RPG web service is to use the Wizard within RDi/RBD to setup up one.   There is an overview and then a subsection with keystroke details in the EGL Knowledge Center

    The title of the section is:

     

    Accessing IBM i programs as web services: overview

    Here is the link:

    http://www-01.ibm.com/support/knowledgecenter/SSMQ79_9.1.1/com.ibm.egl.pg.doc/topics/pegl_core_rest_service_stateful.html

    As mentioned above, this requires the install of RDi for RPG and COBOL in the same Software package as RBD since the services wizard is based on their tooling.

    In addition, you should be able to do the work based on existing WSDL as well.

    Mark

     

     

    markevans


  • 4.  Re: Error calling iSeries Web Services

    Posted Tue May 12, 2015 11:53 AM

    Hi Mark

    thanks for your reply.. i will read it in the next days, also if i realise that is not so symple like other Web Services , to consume a Web Service written in RPG that run in iSeries ...  very strange thinghs .. i though that would be the opposite, or pheraps to call a Rpg program / Rpg procedure is better use other tecniques ..  if you or other expert could do better me understand, i would be gratefull

    Thanks anyway in advance

    giocot


  • 5.  Re: Error calling iSeries Web Services

    Posted Tue May 12, 2015 12:36 PM

    Hi,

    there are multiple ways to invoke an RPG program or service program.   I will let others who do this more on a day to day basis provide some feedback on what they have found works best and what might need to be in place from an infrastructure viewpoint to allow it to work.  

    This could be a straight "call" from EGL (using remotecall in the  JT400 toolkit), a HostProgramType service call (as I sent in the previous post), or invoking a service created through some other means and EGL is just invoking a 3rd party service.

    Additional item:  there are a couple of other sources of info that you might want to look at:

    - old book written by Joe Pluta (from V7.5.1 days) - http://www.amazon.com/Developing-Web-2-0-Applications-EGL/dp/1583470891

    - A Redbook on IBM I modernization - http://www.redbooks.ibm.com/abstracts/sg248185.html?Open    Chapter 11 covers EGL and gives a step by step tutorial.

     

     

    markevans


  • 6.  Re: Error calling iSeries Web Services

    Posted Tue May 12, 2015 04:41 PM

     

    Hi  Mark thanks again for your answer.. anyway i was considering this thought

    Following the tutorial "Web Service Tutorial EGLRBDServicesWorkShop.ppt"  i have downloaded the globalweather.wsdl, imported it , created the EGL Client Interface and consumed the Web Service from RichUiHandler without any problem; as I  thought that to this point, every Web Service independently from  the language (RPG / Java or other) and from the server (iSeries / Linux / Windows or other) could be consumed from EGL in this way, I have downloaded the rpg's Web Service  Wsdl file and followed the same instruction. But unfortunately , this time I'm not able to consume the Web Service.

    Now my doubts are:

    • Why if I use the rpg's WSDL file with SoapUi  it works regularly like the globalweather's WSDL file ?
    • Why if I test the RPG Web Service with RBD Web Service explorer (click on my Rpg's WSDL à Web Service à Test with Web Service) it's works fine ?
    • I If I need to use "special" code in EGL source, when I have to consume RPG's Web Service, every time that I have to use a Web Service, I need ask the Web Service language and the Server where it run ?  and if the Web Service provider change the language (from Rpg to Java or vice versa) I need to change my Egl code ?  

    seem me very strange !! I am confused .. it seems that iSeries generate differents WSDL file from rest of the world ? in other post  (https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014544376&ps=25) I see other that had this problem and solved "removing the soap12 references from the wsdl and ADDING the xsd to all references in the wsdl file"  regarding the "ADDING the xsd to all references ..", I have not understand what to do exactly

    I would be gratefull if you could help to clarify me these doubts

    thanks again

     

     

    giocot


  • 7.  Re: Error calling iSeries Web Services

    Posted Thu May 14, 2015 07:51 AM

    I have asked one of our other team members to look at your questions also...but at a high level, RBD does not support SOAP 1.2 in all cases.   Some things will work, but we have not made changes to support all areas.  Therefore, maybe what you are trying to do is one of the areas not supported. 

    The Web Services Explorer is a component we inherit from RAD and it does support SOAP 1.2.

    SOAP 1.2 is a known requirement for EGL and we are looking into what is required to support across the product.

     

    Mark

    markevans


  • 8.  Re: Error calling iSeries Web Services

    Posted Thu May 14, 2015 08:43 AM

    Hi Mark 

    ia have also tried , following the post at  " https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014544376&ps=25 "  

    There are a few reasons a wsdl file contains a reference to soap12; it references it but doesn't use it, it contains a port for soap and a port for soap12, it only uses soap12. I've seen very few service that only support soap12, most fall into the first 2 categories. The reason you get a warning is we need to add SOAP12 support to really determine if the soap12 reference in the definitions is actually used.

    Here's a basic wsdl service structure:
    <wsdl:service name="ConvertTemp">
    <wsdl:port name="ConvertTempSOAP11port_http" binding="axis2:ConvertTempSOAP11Binding">
    <soap:address location="http://as4sysd.gbpias.loc:10010/web/services/ConvertTemp"/>
    </wsdl:port>
    </wsdl:service>
    A service contains 1 or more ports. Each port should have an endpoint address and EGL only supports endpoints that use a "http://schemas.xmlsoap.org/wsdl/soap/" address.

    Depending on how well the wsdl is written it's fairly easy to determine if there is a soap port that can be used by RBD. Since a wsdl file is an XML file you can take advantage of wsdl file validation in RBD.
    1. In RBD copy the wsdl file.
    2. Open the file delete the soap12 references, then right click and select validate.
    3. If there are no errors the soap12 reference is not used so the wsdl file is safe to use.
    4. If there are errors delete the ports, bindings, etc that are in error. These will be the ones that use soap12. If the file still contains a port that uses an xmlns reference to "http://schemas.xmlsoap.org/wsdl/soap/" then the file is safe to use. If there are no ports that use "http://schemas.xmlsoap.org/wsdl/soap/" then EGL can't invoke the service.

    pheraps is not a soap12  problem  !!  i followed the steps above and after deleted the soap12 reference , the validate  function NOT give errors, but the problem persists .

    Thanks

     

     

    giocot


  • 9.  Re: Error calling iSeries Web Services

    Posted Thu May 14, 2015 09:01 AM

    Can you please post your modified wsdl/code ?

    And is this a sample RPG program or one that you have written?

    What tools did you use to create the wsdl file from the RPG program?    Or did you just copy it from somewhere?

    Note..this is not related to the fact that the target program is RPG or Java or any other language.  There is something that is a mismatch in the wsdl that was used as the source and then either how RBD is processing it (SOAP level, etc) or something other reason.   This could happen with any 3rd party WSDL.

    Again, I might encourage you to look at the HostProgram Type we have in RBD...but we can also try to get to the root of the issue here.

    Finally, you are welcome to open a PMR on this.  The forum is not a place that a response/solution is guaranteed.  We try to respond to all and appreciate all the help from other user's as well.   But PMRs are the process that IBM uses to provide a more structured criteria to responding.

     

    take care.

    Mark

    markevans


  • 10.  Re: Error calling iSeries Web Services

    Posted Thu May 14, 2015 10:03 AM

    I am working on this. you can also open a PMR

    JoshuaLyn


  • 11.  Re: Error calling iSeries Web Services

    Posted Fri May 15, 2015 04:16 PM

    Giocot,

    I also spent some time looking at this today.   My issue is I am not an RPG programmer.   I have access to an iSeries machine.

    Can you provide a simple RPG program that I can use to test this out with.     Also, as asked before, can you tell me what tool or process you used to create the web service from the RPG program which also resulted in creating the WSDL file.  

    Finally, are you using a full WAS on your iSeries machine or just the web server that was described in the ppt by Al Grega?

    take care.

    Mark

    markevans


  • 12.  Re: Error calling iSeries Web Services

    Posted Sun May 17, 2015 10:33 PM

    Hi Giocot,

    Will you try to use this WSDL?I just modify the targetNamespace of the <wsdl:definitions> to http://getart.wsbeans.iseries/xsd

    JoshuaLyn

    Attachments