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***
<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