We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Web Service Visual Studio 2010

Medium Priority
670 Views
Last Modified: 2012-08-13
Hi,

I'm new to web services and I need to create a web service that will receive XML files and attachments (jpgs and pdfs).  I will be using http and I need it to update a SQL Server 2005 backend after a check has been done on the data.  I have Visual Studio 2010.

I'm really struggling to know where to start.  I have been sent an example XML file and then individual pdf and jpgs and was wondering if anyone could give me some pointers...

Any help would be appreciated.

<?xml version="1.0"?>
<TestJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Id>ea9c7d87-fcdb-42c1-b03d-db2fa3983fa5</Id>
  <BasePageAddress>21.8888.0.50</BasePageAddress>
  <DateOfLastTransaction>2010-06-23T16:30:23</DateOfLastTransaction>
  <User>
    <Id>90575e9e-5869-473a-b013-3553851e8b35</Id>
    <PenID>AJX-AAJ-DNE-AM</PenID>
    <FirstName>Fred</FirstName>
    <Surname>Blogs</Surname>
    <Username>fbloggs</Username>
    <Admin>true</Admin>
  </User>
  <Status>Sent</Status>
  <FormType>TestWorksReport</FormType>
  <JobNo>1115128</JobNo>
</TestJob>

Open in new window

Comment
Watch Question

Commented:
Create the web service by creating the asmx file and Web Service Project.  If you want to transfer the PDFs and/or jpeg, I'd suggest encoding the file in BASE64 and then sending it through the web service.  The recipient can then decode the BASE64 field into that file type.
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks for your help, I'm still looking into it.  

Was after code examples if at all possible.  I'm new to both Visual Studio and Web Services...

Thanks again
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
>Was after code examples if at all possible.  I'm new to both Visual Studio and Web Services...

The trouble is that you are new and we can only provide generic code samples so it would be more confusing for you. Hence I posted links to tutorials so that you can learn and possibly use code from tutorials.

Author

Commented:
Thanks, will take a look at the links.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.