IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Web service help…

    Posted 03/02/09 03:52 PM

    Originally posted by: repanzer


    I’m trying to use DataStage to connect to a web service, and I was given a test site to test with. My question may be more so a web service question and not a DataStage one.

    So this guy gives me two links; one site where you put in the employee ID, hit the “submit” button, and it returns the employee info. The other is the WSDL, which looks the xml scheme for the employee information returned after you hit the submit button. If the employee number is not found, it returns a message “Sorry, cannot find this person.”

    My rule looks like this;

    =GET("HTTP", " -TV -URL http://kita.telecom.ups.com/caas/lookupUserProfile -METHOD POST ", PACKAGE(Inputtext)

    Every time I run it, I get the “Sorry, cannot find this person” HTML response, so it appears that it’s doing something.

    What I’m not sure is; what format does the data need to look like which I’m putting in the PACKAGE()?? Is it supposed to be an XML document? Should it resemble the WSDL?

    This is the first time I’m ever using a Web Service, so any information is greatly appreciated.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Web service help…

    Posted 03/02/09 05:47 PM

    Originally posted by: repanzer


    After doing a bunch of research, I think I'm getting closer to understanding this.

    I guess, if anyone knows; the WSDL describes the web service, but does it describe the format of the request message?

    The port shows the two messages with this operation;

    • <portType name="UserProfilePort">
    • <operation name="getUserProfile">
    <input message="tns:Request" />
    <output message="tns:Result" />
    </operation>
    </portType>

    The request fields are under "type";

    • <element name="UserProfileRequest">
    • <complexType>
    • <sequence>
    <element name="appkey" type="string" />
    <element name="UserID" type="string" />
    <element name="IDType" type="string" minOccurs="0" nillable="true" />
    </sequence>
    </complexType>
    </element>
    I'm just not sure how to format the message.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: Web service help…

    Posted 03/02/09 05:57 PM

    Originally posted by: lanapoli


    If you post your WSDL here I'd be happy to send you a sample request. It has to be in XML format and is described in the WSDL.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: Web service help…

    Posted 03/03/09 04:46 AM

    Originally posted by: cemeinz


    Posting the WSDL would improve our suggestions.

    Posting the trace from WTX (trace verbose please) would be a nice add-on.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: Web service help…

    Posted 03/03/09 09:10 AM
      |   view attached

    Originally posted by: repanzer


    I have attached the wsdl and the trace file.

    No matter what I use as input and pass in the PACKAGE of the GET(HTTP)), I always get the “Sorry, customer not found”.

    Thank you so much for taking a look, it really is appreciated.
    HTTP Adapter, Version 8.1(114)
    Copyright © 2004, IBM Corporation. All rights reserved
    Built for WIN32 - INTEL on Sep 15 2006 at 22:18:56.
    Windows NT CRT DLL is
    © Microsoft Corporation. All rights reserved..
    Using C:\WINNT\system32\MSVCRT.dll (Version 7.0.2600.2180 (xpsp_sp2_rtm.040803-2158)) for Visual C++ runtime.
    Retry Count is 0. Retry Interval is 0. OnFailure is Rollback.
    Fetch Unit is 0. Card Mode is Integral.
    Will process 578 bytes of data.
    Run Started at 18:08:48.905 on 03/02/09.
    Options used: trace,verbose,name,method,url
    URL user: ''.
    URL pass: '*****'.
    URL host: 'norika.telecom.ups.com'.
    URL port: '80'.
    URL path: '/caas/lookupUserProfile'.
    Using http: protocol.
    Using HTTP/1.1.
    WSAStart: Entering
    WSAStart: bWSStarted = 0, nWSClients = 0
    WSAStart: Attempting WinSock initialization.
    WSAStart: WinSock initialized successfully.
    Windows Sockets Version 1.1 will be used.
    Windows Sockets Version 2.2 is supported.
    Windows Socket Description is 'WinSock 2.0'.
    Windows Socket System Status is 'Running'.
    Windows Socket supports up to 32767 socket(s).
    Windows Socket supports UDP datagram of up to 65467 bytes.
    Windows Socket has no additional vendor-specific information.
    Sockets Client ID 1 enabled.
    WSAStart: Exiting (rc = 1)
    Server host is 'norika.telecom.ups.com'.
    Hostname: 'norika.telecom.ups.com'.
    Address #1: 10.246.22.20.
    Using port '80' for the connection.
    Connecting to 'norika.telecom.ups.com'.
    Checking user port 80.
    Service: 'http'.
    Alias #1: 'www'.
    Alias #2: 'www-http'.
    Port: 80.
    Protocol: 'tcp'.
    Socket Opened.
    Connected.
    <POST /caas/lookupUserProfile HTTP/1.1

    Host: norika.telecom.ups.com

    User-Agent: HTTP-Adapter/8.1(114)

    Content-Type: application/octet-stream

    Content-Length: 578

    X-Abandon-After: 2147483647

    Sending 578 bytes of message data.
    <50 4f 53 54 20 2f 53 74 6f 63 6b 51 75 6f 74 65 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 77 77 77 2e 73 74 6f 63 6b 71 75 6f 74 65 73 65 72 76 65 72 2e 63 6f 6d 0d 0a 43 6f 6e 74 65 POST /StockQuote HTTP/1.1..Host: www.stockquoteserver.com..Conte
    <6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 78 6d 6c 3b 0d 0a 63 68 61 72 73 65 74 3d 22 75 74 66 2d 38 22 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 6e 6e 6e 6e 0d 0a 53 4f 41 50 41 nt-Type: text/xml;..charset="utf-8"..Content-Length: nnnn..SOAPA
    <63 74 69 6f 6e 3a 20 22 53 6f 6d 65 2d 55 52 49 22 0d 0a 0d 0a 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 75 74 66 2d 38 22 3f 3e 0d 0a 3c 73 6f ction: "Some-URI"....<?xml version="1.0" encoding="utf-8"?>..<so
    <61 70 3a 45 6e 76 65 6c 6f 70 65 20 78 6d 6c 6e 73 3a 78 73 69 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 77 33 2e 6f 72 67 2f 32 30 30 31 2f 58 4d 4c 53 63 68 65 6d 61 2d 69 6e 73 74 61 6e 63 65 ap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
    <22 20 0d 0a 20 20 20 20 78 6d 6c 6e 73 3a 78 73 64 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 77 33 2e 6f 72 67 2f 32 30 30 31 2f 58 4d 4c 53 63 68 65 6d 61 22 20 78 6d 6c 6e 73 3a 73 6f 61 70 3d " .. xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap=
    <22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 78 6d 6c 73 6f 61 70 2e 6f 72 67 2f 73 6f 61 70 2f 65 6e 76 65 6c 6f 70 65 2f 22 3e 0d 0a 20 20 3c 73 6f 61 70 3a 42 6f 64 79 3e 0d 0a 20 20 20 "http://schemas.xmlsoap.org/soap/envelope/">.. <soap:Body>..
    <20 3c 55 73 65 72 50 72 6f 66 69 6c 65 52 65 71 75 65 73 74 20 78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 74 65 6d 70 75 72 69 2e 6f 72 67 2f 22 3e 0d 0a 20 20 20 20 20 20 3c 61 70 70 6b 65 79 <UserProfileRequest xmlns="http://tempuri.org/">.. <appkey
    <3e 3c 2f 61 70 70 6b 65 79 3e 0d 0a 20 20 20 20 20 20 3c 55 73 65 72 49 44 3e 33 32 36 39 37 33 37 3c 2f 55 73 65 72 49 44 3e 0d 0a 20 20 20 20 20 20 3c 49 44 54 79 70 65 3e 3c 2f 49 44 54 79 ></appkey>.. <UserID>3269737</UserID>.. <IDType></IDTy
    <70 65 3e 0d 0a 20 20 20 20 3c 2f 55 73 65 72 50 72 6f 66 69 6c 65 52 65 71 75 65 73 74 3e 0d 0a 20 20 3c 2f 73 6f 61 70 3a 42 6f 64 79 3e 0d 0a 3c 2f 73 6f 61 70 3a 45 6e 76 65 6c 6f 70 65 3e pe>.. </UserProfileRequest>.. </soap:Body>..</soap:Envelope>
    <0d 0a ..
    >HTTP/1.1 200 OK (S)
    >Date: Mon, 02 Mar 2009 23:06:11 GMT
    >Content-Type: text/html
    >Content-Length: 332
    Using Content-Length: 332 to delimit message.
    >3c 68 74 6d 6c 3e 0d 0a 3c 68 65 61 64 3e 0d 0a 3c 74 69 74 6c 65 3e 6c 6f 6f 6b 75 70 46 75 6c 6c 50 72 6f 66 69 6c 65 3c 2f 74 69 74 6c 65 3e 0d 0a 3c 2f 68 65 61 64 3e 0d 0a 3c 62 6f 64 79 <html>..<head>..<title>lookupFullProfile</title>..</head>..<body
    >3e 0d 0a 53 6f 72 72 79 2c 20 63 61 6e 6e 6f 74 20 66 69 6e 64 20 74 68 69 73 20 70 65 72 73 6f 6e 2e 0d 0a 3c 68 72 3e 0d 0a 76 65 72 73 69 6f 6e 3d 63 6f 6d 2e 75 70 73 2e 63 61 61 73 2e 55 >..Sorry, cannot find this person...<hr>..version=com.ups.caas.U
    >73 65 72 50 72 6f 66 69 6c 65 2f 31 2e 35 30 3c 62 72 3e 0d 0a 69 73 56 61 6c 69 64 3d 66 61 6c 73 65 3c 62 72 3e 0d 0a 69 73 43 6f 6d 70 6c 65 74 65 3d 66 61 6c 73 65 3c 62 72 3e 0d 0a 65 72 serProfile/1.50
    ..isValid=false
    ..isComplete=false
    ..er
    >72 6e 6f 3d 30 3c 62 72 3e 0d 0a 45 57 44 20 44 69 72 65 63 74 6f 72 79 20 53 65 72 76 65 72 3d 3c 62 72 3e 0d 0a 42 32 45 20 44 69 72 65 63 74 6f 72 79 20 53 65 72 76 65 72 3d 3c 62 72 3e 0d rno=0
    ..EWD Directory Server=
    ..B2E Directory Server=
    .
    >0a 41 70 70 6c 69 63 61 74 69 6f 6e 20 73 65 72 76 65 72 3d 6e 61 6e 61 6b 6f 3c 62 72 3e 0d 0a 50 72 6f 70 65 72 74 79 46 69 6c 65 3d 64 65 66 61 75 6c 74 3c 62 72 3e 0d 0a 3c 2f 62 6f 64 79 .Application server=nanako
    ..PropertyFile=default
    ..</body
    >3e 0d 0a 3c 2f 68 74 6d 6c 3e 0d 0a >..</html>..
    Run Completed at 18:08:48.921 on 03/02/09. Cleanup deferred.

    Socket Closed.
    Connection closed.
    WSATerm: Entering
    WSATerm: bWSStarted = 1, nWSClients = 1
    Sockets Client ID 1 disabled.
    WSATerm: nWSClients remaining = 0
    WSATerm: Attempting WinSock shutdown.
    WSATerm: Exiting
    Run Completed at 18:08:49.624 on 03/02/09.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange

    Attachment(s)



  • 6.  Re: Web service help…

    Posted 03/03/09 10:10 AM

    Originally posted by: lanapoli


    Based on the supplied WSDL, a sample request would be as follows:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="ws.ups.com">
    <soapenv:Header/>
    <soapenv:Body>
    <ws:UserProfileRequest>
    <appkey>string</appkey>
    <UserID>string</UserID>
    <IDType>string</IDType>
    </ws:UserProfileRequest>
    </soapenv:Body>
    </soapenv:Envelope>

    Hope this helps you.

    Lori Napoli
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 7.  Re: Web service help…

    Posted 03/03/09 05:57 PM

    Originally posted by: repanzer


    lanapoli, first, thanks for you help, I hope I can offer my help to you some day.

    After you had posted that, the person who set up the web service gave me this format, which looks just about exactly what you posted;

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="ws.ups.com">
    <soap:Body>
    <tns:UserProfileRequest>
    <appkey/>
    <UserID>testid</UserID>
    <IDType/>
    </tns:UserProfileRequest>
    </soap:Body>
    </soap:Envelope>
    Unfortunately, I still get the same response saying "Sorry, person not found" for an ID that when I run it manually, it returns the person's information.

    It must be the way I’m connecting or something, or maybe my "method" (POST). I guess I just have to keep testing different things.

    If you have any suggestions, that would wonderful.

    Thanks again!!
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 8.  Re: Web service help…

    Posted 03/03/09 06:20 PM

    Originally posted by: lanapoli


    Can you post your trees/maps? If you can post your artifacts I can look at them. Here is a sample rule I have successfully used, when building a soap message:

    GET("SOAP", "-TRANSPORT 'HTTP(-HDRI+ -TYPE text/xml -METHOD POST -TRACEV -URL <insertURLhere>)'", PACKAGE(Request))

    You can also post the mtr files from the HTTP adapter and if appropriate the SOAP adapter.

    Lori Napoli
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 9.  Re: Web service help…

    Posted 03/05/09 05:55 PM
      |   view attached

    Originally posted by: repanzer


    lanapoli , another project had taken my attention, so I haven't been back here until now.

    I've attached my code, but all that it is, is; A one blob of text on the input and one blob of text on the output, and I'm passing the xml soap message in the PACKAGE of the HTTP GET statment.

    =VALID(GET("HTTP", " -TV -URL http://norika.telecom.ups.com/caas/lookupUserProfile -METHOD POST ", PACKAGE(Input997)), FAIL("FAIL"))
    I do not see the "SOAP" adapter in my software. Do you think the SOAP adapter is required for what I'm trying to do??

    If so, do you know if DataStage is supposed to come with the SOAP adapter, or does it require an extra purchase? If it requires an extra purchase, I would probably try to build it with the custom adapter functionlity.

    Either way, thanks again for you help.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange

    Attachment(s)



  • 10.  Re: Web service help…

    Posted 03/06/09 02:11 AM

    Originally posted by: cemeinz


    Hello!

    It is easy to check, if you have the Web Service Package. Ahhh, well, maybe this is an important information.

    Until WTX 8.1 there is an extra package needed to receive web service functionality. WTX 8.2 contains this package in standard installation. At least this Web Service package contains the following:
    -SOAP adapter (if you have this package installed, you could see it in your in- and output card settings as an available adapter)
    -WSDL importer (if you have this package installed, you could be able to import WSDL files from Type Designer).

    At the moment, it seems you haven't. Ask your sales representive to give you a price for this product. As it is standard now in WTX 8.2, could probably get a good discount.

    Otherwise, you could implement a solution without the need of installed Web Service package. There are two topics, which you might be faced.

    The easy one: Using HTTP and BASE64 adapter in conjunction to emulate SOAP adapter. This works, I have tested it more than one time. The only thing is to send the information in the requested format to the web service endpoint. This will be a SOAP message. In this particular case, it is easy to build. Nevertheless, sometimes those message are a bit more complex. This let you face the second one.

    The complicated one: Building a TypeTree from a WSDL file without the WSDL importer. Well, this could be boring, because there are many problems you can come across. I could only speak for myself: I have never get it running without an imported TypeTree :(

    Hope this helps.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 11.  Re: Web service help…

    Posted 03/10/09 03:26 PM

    Originally posted by: repanzer


    "The only thing is to send the information in the requested format to the web service endpoint."

    This piece of info did it.
    In order to manually make this request, I go to the website:

    http://norika.telecom.ups.com/caas/lookupUserProfile

    I put in an ID, and it returns all the info, all the info I wanted to capture in the map.

    Instead of going to that site in my statment, I went to the site in the response of the WSDL:

    VALID(GET("HTTP", " -TV -URL http://nanako.telecom.ups.com/ws4id/XML-SOAP/UserProfile -TYPE text/xml -METHOD POST ", PACKAGE(Input997)), FAIL("FAIL"))
    I got the info returned.

    Thanks for the info!
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender