Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

working with one to many relationship in web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chad - 04 Feb 2005 20:19 GMT
I am new to web services and biztalk, but I recently created an orchestration
to handle a purchase order approval process.  I used biztalk to publish the
orchestration as a web service.  My goal is to access all of the properties
of the request...date, delivery date, vendor info and purchase items through
a custom web interface I have developed.  My hang up is how to work with
purchase items since it has a one to many relationship to the request itself.


Does anyone have suggestions on how to build that "set of data" and return
it to the code behind in my web project?  Is there a way to build it as an
array, collection, dataset???

The autogeneration of the web service classes look like this for purchase
items...
public class POResponsePurchaseItemsPurchaseItem
   {
       
       /// <remarks/>
       
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
       public System.UInt32 Quantity;
       
       /// <remarks/>
       
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
       public string PartNumber;
       
       /// <remarks/>
       
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
       public string Description;
       
       /// <remarks/>
       
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
       public System.Decimal UnitCost;
       
       /// <remarks/>
       
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
       public System.Decimal ExtendedCost;
   }

Where purchase items are a node of the requisition and each purchase item is
inside purchase items.

Thanks in advance for any help.
erymuzuan - 06 Feb 2005 03:38 GMT
The best practice for designing web services is always rely on schema
for contracts, not type. So use element or complex type and set the
maxOccurs to unbounded. Never do dataset.

regards
erymuzuan

> I am new to web services and biztalk, but I recently created an orchestration
> to handle a purchase order approval process.  I used biztalk to publish the
[quoted text clipped - 43 lines]
>
> Thanks in advance for any help.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.