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 / December 2005

Tip: Looking for answers? Try searching our database.

webmethod based on a xsd

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roger Moquin - 06 Dec 2005 16:53 GMT
Hi,

i have to build a webservice for a client of mine who sent me a xsd and a
sample xml so i can build my stuff around his xml.

i used xsd.exe to build a class from the xsd.  That went fine.

Now, when i create my web service and the webmethod that receives the class
as a parameter, the webservice puts the webmethod name and parameter name in
the xml tag it wants to receive.

Am i doing it the right way ?  what can i do ?

Here is the exemple:

this is what i get from the client

<?xml version="1.0" encoding="UTF-8" ?>
   <PROCESS_PO_007
xmlns="http://www.openapplications.org/003_process_po_007">
        <CNTROLAREA>
             <BSR>
               etc.....

and this is how i created my web service

<WebMethod()> _

Public Function Submit(ByVal PO As PROCESS_PO_007) As String

   Return "GOT IT"

End Function

where PROCESS_PO_007 is the class that was created by xsd.exe

now, here is what the webservice says it want's to receiver:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Body>
   <Submit xmlns="http://tempuri.org/AlcoaPI/PO">
     <PO xmlns="http://www.openapplications.org/003_process_po_007">
       <CNTROLAREA>
         <BSR>

Please help !!!
GCR - 07 Dec 2005 10:21 GMT
By getting the xsd from your customer you're in the position of developing
your web service using the "contract first" pattern. You can find a very
usefull information+tool under:
http://www.thinktecture.com/Resources/Software/WSContractFirst/default.html

> Hi,
>
[quoted text clipped - 45 lines]
>
> Please help !!!

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.