Workflow Soluiton

 View Only
  • 1.  Issue reading XML from a web service

    Posted Mar 04, 2012 12:02 PM

    I'm working on reading the XML from a web service.  I'm able to get the data back and read the first, last and count of records that come back fine, but I can't seam to get the feed to integrate with the rest of the Workflow.  I tried for loops on the data class from my web service reader object, and even examples from this article on "Reading XML Data into a Workflow", but I can't get to all the data.  I tried creating the exact example from that article and it worked as expected.  I was able to take an XML file, then read it into the object I created the XSD object and loop through the data no problem.  But that was reading an XML file, not the data from the web service.

    I think my issue is with the data class.  My data class is "Service1DynamicService.AuthenticateUserComponent" for the web service read, and "Generated.Login.groups" for the XSD object.  I tried to change the data type to my web service class on the XSD object, but that didn't work...
     
    Web Service Reader object
     
    XSD XML Reader object
     
    As you can see, I can't even select the variable from the web service.  What am I doing wrong?


  • 2.  RE: Issue reading XML from a web service

    Posted Mar 06, 2012 02:29 PM

    No one has anythign?



  • 3.  RE: Issue reading XML from a web service

    Posted Mar 06, 2012 02:55 PM

    Right click on the components and select Help to get the basic Help Window. This window should expose the types that the components expect as input/output to the stream, if any.



  • 4.  RE: Issue reading XML from a web service

    Posted Mar 07, 2012 12:01 AM

    Is the F1 help what you mean?

     

    Setup Page
    Setup Category
    Data Type Type Type (System.Type)
     
    File Data Type Variable Name Type FileDataType (LogicBase.Core.Data.DataTypes.FileDataType) 

    Seams like the "Data Type" by name isn't lining up but the mapping of the data should.  I created an xsd from the output of the web service that I'm reading from.  Just can't get the names/WF to see they are the same. 

    The "groupRead" is the object I made from the xsd.  "group.AuthenticateUser_Result" should be the type, but its not.  Even if I force the type, the my variable still doesn't show up.

     

    Here is what I see when I "Browse Data"

    Does that help clarify?



  • 5.  RE: Issue reading XML from a web service

    Posted Mar 07, 2012 09:26 AM

    In WF, data classes are very specific, so you can't force a Data Class onto another object. The Webservice is returning a specific Data Class, and your XSD file is creating a differnt class. It seems what you need to do is convert the Webservice return into the data class for the XML Schema.

    Try this, get the data back from the webservice, then use a Write Object to XML component to create a new XML object that is basically just a text file. Then use that result as the input file for your XML Read component using the generated XSD Schema.

    This should allow you to "convert" the Webservice return to the proper data class.

    rob