Hitachi Vantara Pentaho Community Forums
Results 1 to 16 of 16

Thread: WebService

  1. #1

    Smile WebService

    Hi guys,

    I have downloaded version 3.0 of PDI. I was wondering how to invoke a webservice. I have seen several post regarding working with webservices, but nothing that can tell me where to start.

    I have the following XML input and Output:

    Output values from the server
    Parameter Name Parameter Value Return Value No Activo
    Request sent to the server
    <!--REQUEST.................-->
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <m:verficaRUC xmlns:m="http://www.bea.com/education/webservices/examples/basic/javaclass">
    <ruc xsi:type="xsd:string">20502452682</ruc>
    </m:verficaRUC>
    </env:Body>
    </env:Envelope>
    Response from the server
    <!--RESPONSE.................-->
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <m:verficaRUCResponse xmlns:m="http://www.bea.com/education/webservices/examples/basic/javaclass">
    <estado xsi:type="xsd:string">No Activo</estado>
    </m:verficaRUCResponse>
    </env:Body>
    </env:Envelope>

    Anys advice on how to start?


    Regards,

    Ben

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Ben,

    In version 2.5 we had a "Web services lookup" step, but it needed some work, cleaning, etc before I could let it into the 3.x branch again.
    I'm happy to say that I've completed most of the work there. In the next couple of days this should be fixed and you should see it appear again in version 3.0.1.

    You could try the 2.5.2 version for the time being. I think it should work for these simple requests / responses.

    All the best,

    Matt

  3. #3

    Cool WebService Error Version 2.5

    Hi Matt,

    Thanks for your last reply. I am trying the WebService Step.

    The first parameter that is requiered needs an URL, I write the URL posted below, and the click on the bottom load:

    http://www.aduanet.gob.pe/ws-ad-pd/w...oke=verficaRUC

    Then, the following error arises:

    Could not load WSDL file: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://www.aduanet.gob.pe/ws-ad-pd/ws-ad-pd?'.: org.xml.sax.SAXParseException: Attribute name "nowrap" associated with an element type "TD" must be followed by the ' = ' character.

    Any clues?

    Regards,

    Ben

  4. #4
    Join Date
    Nov 2007
    Posts
    2

    Default

    That URL isn't to a WSDL. If you put a URL to a WSDL on there and then click "Load" you will see a list of the supported Web Services available from that. I changed your URL to http://www.aduanet.gob.pe/ws-ad-pd/ws-ad-pd?wsdl and was able to pull back a list of the Web Services. Give it a try.
    Last edited by dpeete; 11-29-2007 at 11:28 AM.

  5. #5

    Default Web Service Issue

    Thanks dpeete,

    I was able to pull the list of WebServices. Now my question is how to call for example: verificaRUC using the following input: 20502452682, the result should be and XML file with estado=No Activo

    My question is how do I invoke the webservice and where do I paste de value of the parameter it requires to give an answer.

    Any help will be appreciated.

    Regards,

    Ben

  6. #6
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Hi Ben,

    If you have a recent (today for example) patch of 3.0.1 installed, you should find the "Web service lookup" step in the "Lookup" category.
    It's a cleaned up version of the one in 2.5.2 and allows you to specify the parameters.

    Please note that the step still has a problem with Complex (composite) and unknown data types like the Base64Binary type I detected.

    Other than that it should work fine.

    Matt

  7. #7

    Thumbs up Web Service

    Hi guys,

    Sorry for keep bothering you people with the webservice step. I have upgraded to the latest .jar and I am attaching the webservice transformation.

    It executes ok? But what does it do?

    Any advice,

    Regards,

    Ben
    Attached Files Attached Files

  8. #8
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Ben, Ben, Ben,

    The "Web Service lookup" step is a ... euh... lookup step. You look up data with it using input from other steps.
    So, for example, you generate a single row using a Row Generator.
    Put a field in it, say a String, give it a name and a value, say "20136165667".

    Like the 2 steps, pass the name in the "In" tab and you're done.

    WebServiceTest.ktr

    Do a preview on the step. The output is "Activo" or something.

    Matt

  9. #9

    Thumbs up WebServices

    Hi Matt,

    Thanks a lot, I have it working now.

    One last thing:
    Can I use for example a Table input step a pass that value to the webservice or I can only use the Generate rows step?

    Ok, now I have the results, can I send the input and/or output parameters to a file or database? or only the result of the webservice result?
    For example my parameter was: Ruc=20136165667 and the result was estado='ACTIVO' y want these two parameters on an output table, text or XML.

    Any advice,

    Regards,

    Ben

  10. #10

    Thumbs up Webservice

    Matt,

    In other words, how can I relate the input with the output.

    For example: I have row1 with ID=20136165667 in DB "XX" and I want to pass the parameter ID to the webservice. The result must be stored in the same record belonging to the same ID used as a parameter.

    Any thoughts on how to do this?

    Regards,

    Ben

  11. #11
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    I have to agree with you Ben that this is a serious limitation of the step.
    Unfortunately, I didn't write it, I'm just the janitor, cleaning it up.

    I'll probably be adding a check box to keep the input as well "pretty soon"... :-)

    Matt

  12. #12

    Default WebService

    Matt,

    Keep us posted.

    Thanks for your words and time.

    Regards,

    Be

  13. #13
    Join Date
    Nov 2007
    Posts
    2

    Default

    I hope this isn't hijacking Ben's message, but the reason I was able to provide some support was because I have been playing with the Web Service piece as well. From a use case standpoint I have Web Services that perform query and update operations to a system. My initial use case is a transformation which pulls data from LDAP and then for each row calls a web service to load that data into another system. I haven't figured that out yet as I got sidetracked after showing Ben the WSDL, but that is my use case where the Web Service is more of an Input or Output.

  14. #14

    Smile WebService Step

    Hi Matt,

    Any ideas on when the webservice step:

    I'll probably be adding a check box to keep the input as well "pretty soon"... :-)

    Regards,

    Ben

  15. #15

    Default

    Where can I get my hands on the 3.1 patch for this?

    Thanks in advance.

    Marc Pike

  16. #16
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    it doesn't exist yet. When I do change it, it will be in the SVN code (trunk) of 3.1.0-M1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.