Focal Point
[SOLVED] Call a webservice using DM

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/4937093576

April 01, 2015, 04:51 PM
David Nguyen
[SOLVED] Call a webservice using DM
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
April 03, 2015, 11:01 AM
Clif
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.


N/A
April 09, 2015, 04:50 PM
David Nguyen
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
April 10, 2015, 10:18 AM
Clif
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.


N/A
April 13, 2015, 11:56 AM
David Nguyen
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
April 14, 2015, 11:26 AM
Clif
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.


N/A
April 14, 2015, 02:37 PM
David Nguyen
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