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.  Calling a WSDL from a WTX map - Need help

    Posted 04/02/09 03:33 PM

    Originally posted by: gaforce


    Hello Guys, I'm trying to call a WSDL from a map. The WSDL would return me a value.
    I haven't done this scenario before. How can I call a WSDL from the WTX map?
    I'm using WTX 8.2 and not having the Webservices pack. I appreciate your help.
    Thanks.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: Calling a WSDL from a WTX map - Need help

    Posted 04/03/09 06:39 PM

    Originally posted by: repanzer


    Hello Guys, I'm trying to call a WSDL from a map. The WSDL would return me a value.
    I haven't done this scenario before. How can I call a WSDL from the WTX map?
    I'm using WTX 8.2 and not having the Webservices pack. I appreciate your help.
    Thanks.
    I don't have the webservices pack either and just hit a situation that I got resolved, though I'm confused by what you mean (or I just don't understand enough to know what you mean).

    What you mean "Call a WSDL".

    Isn't a WSDL an xml file that has all the info in regards to the Web service you're hitting, and you want to hit a webservice with the request message and get a value returned??
    Anyway, that was the sitation I had. I used the WSDL which showed me how to format my request message, and had the address I needed to hit.

    Here' the top of my wsld;

    <?xml version="1.0" encoding="UTF-8" ?>
    • <definitions name="UserProfile" targetNamespace="ws.ups.com" xmlns:tns="ws.ups.com" xmlns:ns2="ws.ups.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
    • <types>
    • <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="ws.ups.com">
    • <element name="UserProfileRequest">

    ***HERE WAS MY REQUEST MESSAGE***

    • <complexType>
    • <sequence>
    <element name="appkey" type="string" />
    <element name="UserID" type="string" />
    <element name="IDType" type="string" minOccurs="0" nillable="true" />
    </sequence>
    </complexType>
    </element>

    ***HERE WAS WHAT I WAS EXPECTING TO GET RETURNED****
    • <complexType name="UserProfileRecord">
    • <all>
    <element name="uuid" type="string" />
    <element name="empid" type="string" />
    <element name="racfid" type="string" />
    <element name="name" type="string" />
    <element name="lastname" type="string" />
    <element name="firstname" type="string" />
    <element name="jgroup" type="string" />
    <element name="jclass" type="string" />
    <element name="center" type="string" />
    <element name="emptype" type="string" />
    <element name="jfunction" type="string" />
    <element name="country" type="string" />
    <element name="district" type="string" />
    <element name="region" type="string" />
    <element name="language" type="string" />
    <element name="upsEmail" type="string" />
    <element name="title" type="string" />
    <element name="department" type="string" />
    <element name="company" type="string" />
    <element name="office" type="string" />
    <element name="street" type="string" />
    <element name="city" type="string" />
    <element name="state" type="string" />
    <element name="zip" type="string" />
    <element name="telephone" type="string" />
    <element name="pager" type="string" />
    <element name="mobile" type="string" />
    </all>
    </complexType>

    Now this was all new to me and I was given a web address to show me the manual page where I would enter the "UserID" (that's in the request part of my wsdl) and it would return the "UserProfileRecord" (that was what I was expecting).

    So I have this website that I go to and it has a text box where I enter the ID and I click the "Submit" button, and I get the info for that ID and it looks like the UserProfileRecord from the WSDL above, and the address in the address bar stays the same.

    But now I want to do the same thing through my map. I build the request like it shows in the "request" part of my WSDL and I keep getting nothing back. l

    Then I read something here that showed me what to do. It said that rather then access the same web page where I would normally type in the ID and do it manually, access the end of the process web page. I study the WSDL and see;
    • <service name="UserProfileService">
    • <port name="UserProfilePort" binding="tns:UserProfileBinding">
    <soap:address location="http://nanako.telecom.ups.com/ws4id/XML-SOAP/UserProfile" />
    </port>
    </service>
    </definitions>

    I change my rule to point to the address in the Port name location, and it worked. Here is my rule;
    =VALID(GET("HTTP", " -TV -URL http://nanako.telecom.ups.com/ws4id/XML-SOAP/UserProfile -TYPE text/xml -METHOD POST ", PACKAGE(Input997)), FAIL("FAIL"))
    Like I mentioned, it didn't work until I changed the address I was using to the one in the wsdl;

    http://nanako.telecom.ups.com/ws4id/XML-SOAP/UserProfile

    I hope that made sence and I hope it helps. good luck!
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Calling a WSDL from a WTX map - Need help

    Posted 04/06/09 10:58 AM

    Originally posted by: gaforce


    Thanks a lot for your response.
    Yes, I want to hot the webservice with a request message and get a value in return.

    Here are the pieces of my WSDL.
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://ex.com/common/isTransformed/interface" targetNamespace="http://ex.com/common/isTransformed/interface">
    <wsdl:types>
    <xs:schema targetNamespace="http://ex.com/common/isTrans/interface" elementFormDefault="qualified">
    <xs:complexType name="NextMethodType">
    <xs:sequence>
    <xs:any/>
    </xs:sequence>
    </xs:complexType>
    ------------Heres the request----------------
    <xs:complexType name="GroupRequest">
    <xs:sequence>
    <xs:element name="groupId" type="xs:string"/>
    <xs:element name="subgroupId" type="xs:string"/>
    <xs:element name="dateOfRequest" type="xs:date"/>
    </xs:sequence>
    </xs:complexType>
    ----------------Heres the response--------------

    <xs:complexType name="TransformedResponse">
    <xs:sequence>
    <xs:element name="isTrans" type="xs:boolean"/>
    <xs:element name="nextMethodResponse" type="tns:NextMethodType"/>
    </xs:sequence>
    </xs:complexType>

    I'll be getting a boolean value in return.
    I just want to clarify what you replied. Should I create a request which looks like this or do I also need to include the xml tags around it? Does spacing matter or I just have to build the request with a <CR><LF> between the lines?
    <xs:complexType name="GroupRequest">
    <xs:sequence>
    <xs:element name="groupId" type="xs:string"/>
    <xs:element name="subgroupId" type="xs:string"/>
    <xs:element name="dateOfRequest" type="xs:date"/>
    </xs:sequence>
    </xs:complexType>
    I understand that this request has to be passed on to the rule like.
    =VALID(GET("HTTP", " -TV -URL http://app01:7090/ESB/Request"/ -TYPE text/xml -METHOD POST ", PACKAGE(request)), FAIL("FAIL"))
    Thank You.....I appreciate your help.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 4.  Re: Calling a WSDL from a WTX map - Need help

    Posted 04/06/09 12:14 PM

    Originally posted by: lanapoli


    The request needs the XML tags. If you use the WSDL importer to create a type tree for your WSDL, you will have the request message format defined within that type tree.

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


  • 5.  Re: Calling a WSDL from a WTX map - Need help

    Posted 04/06/09 02:23 PM

    Originally posted by: repanzer


    Ok, let me explain the exact sequance of events for me;

    I never used a webservice, I was sent to someone with webservice experience who sent me a link to two place; One was the WSDL, the other was the place where if I went there in internet explorer, it had a text box to enter the employee ID number to get a response.

    I formatted the request as best as I could, did the HTTP post to the website I was given, the one with the text box, and I never got the response I was hoping for.

    I then went back to the guy with the webservice experience, who had some little application which formatted the request for him, and he sent that to me, and I used my map to format it to that strutucre.

    When I post my WSDL here, the web site is messing with it and it doesn't look like the raw XML I had in my response to this thread.

    But here is what the actual request I'm sending to the site looks like;

    <?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>app1cjc</UserID>
    <IDType />
    </tns:UserProfileRequest>
    </soap:Body>
    </soap:Envelope>
    Now, the second item was, I was "hitting" the original website he sent to me with the text both for manual requests, but I never got back the data I wanted until I changed my pointer to the address from the WSDL, under "Port";

    service name="UserProfileService">
    <port name="UserProfilePort" binding="tns:UserProfileBinding">
    <soap:address location="http://nanako.telecom.ups.com/ws4id/XML-SOAP/UserProfile" />
    </port>
    </service>
    </definitions>
    So all in all, that's what your request should resemble (which is in the request part of the WSDL), and the address you need to access whould be in your WSDL also, under the structure of the messages.

    To gain a better understanding of WSDL's in general, I printed mine out and saw how all of it interacts with other pieces contained in it. The WSDL should contain all info needed to access any webservice successfully (I believe).
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 6.  Re: Calling a WSDL from a WTX map - Need help

    Posted 04/06/09 04:57 PM

    Originally posted by: gaforce


    Ok, I was able to hit the webservice with the request wrapped in the SOAP envelope. I'm getting some error responses back but should be able to figure out. Thanks for the help.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 7.  Re: Calling a WSDL from a WTX map - Need help

    Posted 04/09/09 09:10 AM

    Originally posted by: repanzer


    any luck with this? Being a noob with webservices myself, it would be nice to see how you figured it out.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 8.  Re: Calling a WSDL from a WTX map - Need help

    Posted 04/14/09 12:33 PM

    Originally posted by: gaforce


    I created a request based on the SOAP envelope and used the following rule to call the webservice.
    =GET("HTTP", " -TV -RAW -RETURN -URL http://dev01:7080/ESB/Request -TYPE text/xml -METHOD POST ", PACKAGE(Request))

    Request is basically the SOAP envelope. Initially I wasn't successfull because I thought that I have to only pass the parameters in the WSDL to get a response.
    Hope this helps..
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 9.  Re: Calling a WSDL from a WTX map - Need help

    Posted 04/15/09 01:42 PM

    Originally posted by: SystemAdmin


    I just noticed something you mentioned about your output card. I'm currently running into the same issue with my project now, attempting to call the webservice. Are you saying you only need the one output card with the "get (soap.... style message, or do you have two output cards (similar to IBM's example) 1 containing your "get" and the other with all of the parameters....because I noticed you mentioned you don't need to pass all of the parameters from the WSDL. I'm hoping we can both learn from eachother.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender