Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Call a webservice using DM
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Call a webservice using DM
 Login/Join
 
Member
posted
Does anyone have an example/tutorial on how to call a web service in Data Migrator?

I'm able to configure an adapter & create synonym for web service but unsure how to use these synonyms in the data flow to call and handle the return information from web service.

Thanks for your suggestion.

Regards,
David Nguyen

This message has been edited. Last edited by: <Kathryn Henning>,


iWay Data Migrator v7704M
Windows, All Outputs
 
Posts: 23 | Registered: January 29, 2014Reply With QuoteReport This Post
Guru
posted Hide Post
I did a Summit presentation in 2010 on Real Time use of DataMigrator including calling a Web Service. I found it here Data Migrator 7.7 in Real Time. You may find it helpful.
 
Posts: 382 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
Member
posted Hide Post
Clif,
Thanks a lot for your suggestion. The example really helps me to get started.
In my case, I need to query a SQL Server, format the output to XML then pass this XML to a web service. The web service will returns result as XML as well.
I intend to:
1. Create a DBMS SQL flow to query output to XML
2. Create a data flow to pass the XML to web service. I'm still unclear on how to do this 2nd step & still playing with the data flow.

Do you think this is a good approach? Thank you.


iWay Data Migrator v7704M
Windows, All Outputs
 
Posts: 23 | Registered: January 29, 2014Reply With QuoteReport This Post
Guru
posted Hide Post
It does sound a bit roundabout. Does your web service takes an entire xml document as an input parameter? If so then create a synonym with a single A32767V or TX field to describe the xml file you created and join to it.
 
Posts: 382 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
Member
posted Hide Post
Clif,
Thank you so much for your advice. My webservice takes entire xml document as an input. Following your suggestion:

I'm not sure how to create the flat file synonym and add data to flat file manually. So I create a DBMS SQL flow that output to a flat file. Then I edit the synonym field to TEXT and paste my real XML data to the data file.

After that, I create the data flow to join the flat file and web service. After running, the returned message from webservice said that

"Processor Deserialize/Process Document failed.
EXCEPTION details:
Message: Value cannot be null.
Parameter name: s
Source: mscorlib
Stack: at System.IO.StringReader..ctor(String s)"

Please view the screenshot here:
https://docs.google.com/docume...1cQ/edit?usp=sharing

Do you think my input file has problem?


iWay Data Migrator v7704M
Windows, All Outputs
 
Posts: 23 | Registered: January 29, 2014Reply With QuoteReport This Post
Guru
posted Hide Post
It does look like the XML is getting passed properly to the WS.

When creating a synonym for XML and related data types and a length isn't available it defaults to 30 which you can edit.

It looks like you are building your data flow ok, the only thing I would change is data types and lengths of the two fields in the "join" so that they match.

If that doesn't help please open a hottrack case and upload the synonyms, a sample xml document, and if it's a public web service the URL.
 
Posts: 382 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
Member
posted Hide Post
Clif,
I figure out that the web service required login credential inside the XML itself. My flow works OK now.
Thanks for taking time reviewing the issue. I really appreciate it.

Regards,
David Nguyen


iWay Data Migrator v7704M
Windows, All Outputs
 
Posts: 23 | Registered: January 29, 2014Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Call a webservice using DM

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.