Sending Array to WSDL

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

Sending Array to WSDL

Post by dspxguy »

I have input as in one record I will have 3 phone numbers--->
phone0
phone1
phone2
3 input phone number from one row in to one column
I have to send all the phone numbers from one record in one call to WSDL so that WSDL can take them in to one phone(array) then WSDL should be updated for example like the below
- <Phones>
<Phone>
<Type />
<Number>phone0</Number>
</Phone>
<Phone>
<Type />
<Number>phone1</Number>
</Phone>
<Phone>
<Type />
<Number>phone2</Number>
</Phone>
</Phones>
In my job I have a sequential file-->web services trnsformer-->sequential file.
The web service will validate the information I am sending and will give me an ID which I will store in the output file.
Thanks in advance for the help...........
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: Sending Array to WSDL

Post by sud »

Use a transformer before the web services transformer to create the input xml for the web service. In this transformer concatenate the xml tags for each phone number until you have all the phone numbers and then push out the consolidated xml.

I am not clear about how you are getting the data though. How are you getting all phone numbers in the same column.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

Re: Sending Array to WSDL

Post by dspxguy »

I concatinated the phonenumbers with space.....xmltags....they didn't work
so i tried with
Make vector...I got the following error message
Web_Services_Transformer: Error when checking operator: When binding input interface field "Number" to field "Number": Fixed-length vectors have differing lengths.
Then i tried Make subrecords.....I got the following error message
Web_Services_Transformer: Error when checking operator: Input "Number" is not a value field.

when i used XML Tags the tags are being converted to some charecters and displays all number in between one tag in one string.
<Phones>
<Phone>
<Type />
<Number>phone0!&phone1!&phone2</Number>
</Phone>
<Phone>
<Type />
</Phones>
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: Sending Array to WSDL

Post by sud »

Well so the problem is that the web services stage is throwing errors. Try this, the xml data that you are creating change the "<" to "<" and ">" into ">".
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

Re: Sending Array to WSDL

Post by dspxguy »

sud wrote:Well so the problem is that the web services stage is throwing errors. Try this, the xml data that you are creating change the "<" to "<" and ">" into ">".
I tryed that i got follewong meesage in WSDL
<Number>3232962643&lt;Phone&gt;&lt;Type /&gt;&lt;Number&gt;0000000000&lt;/Number&gt;&lt;/Phone&gt;&lt;/Phones&gt;</Number>

My actual code is
PNumber:"<Phone><Type /><Number>":LNK_TRN_Split.BP1WKP:"</Number></Phone></Phones>"
Pnumber and LNK_TRN_Split.BP1WKP are phone numbers
Post Reply