Order thru webservice using SOAP

My co. gets a customer and they want to place an order thru webservice.

I have set up a web service @ wwww.myco.com/Order.asmx  (the method is PurchaseOrder). I am stuck right here since I don't know how to get the Order posted by the customer. Please help me out by pointing me to some tutorials or sample simple code, or just anything.

 thanks a lot.

0
ca714
1/10/2008 10:57:29 PM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

17 Replies
308 Views

Similar Articles

[PageSpeed] 1

Have a look at:


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
1/11/2008 1:11:41 AM

Thanks TATWORTH.

I've read all suggested links above. They're very informative and helpful.

Next is the coding, any simple sample of SOAP server would be greatly appreciated.

 thanks again for the time + help

0
ca714
1/11/2008 8:33:23 AM

 First of all SOAP is just the plumbing! Unless you use the WSE or WCF logging to look at the serialised data, you need not be very much concerned about soap and format of the WSDL. (If you are working cross-platform, from Intel/Microsoft to Unix ect then you have to very aware of how the data is defined and how it is sent.

Have a look at:

A practical tip is to create classes to encapsulate input and return data. Whilst you can define multiple input parameters, you only have one return value, however this return can  be a class with multiple values.

Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
1/11/2008 12:45:00 PM

Thanks again for help.

 Reading your post, I have the feeling that I'm looking at SOAP wrongly. I play around with the code and here's my other question.

Say I have a service Order.asmx and a method Purchase() taking no param.

[webmethod]

void Purchase ()

{

 return "welcome";

}

I give the url as http://www.mycom.com/ws/Order.asmx and the method name Purchase to my customer. They then post an order in soap with info about the order. How do I capture the order info.

Your help is greatly appreciated.

--ca714

0
ca714
1/11/2008 6:38:28 PM

Your test method should have a return type of string not void:

[webmethod]
string Purchase ()
{
 return "welcome";
}

 Your order will need to pass in some information
[webmethod]
string Purchase (OrderInput xInout)
{
 return "welcome";
}

However the output needs to be a structure

  Your order will need to pass back some information
[webmethod]
PurchaseResponse Purchase (OrderInput xInout)
{
 return "welcome";
}

There are two schools of thought. One school of thought is that the response should be minimalistic such as Accepted flag, delivery date and confirmation number. The other is that the response should include all the input.

You should map out all the business process.

 


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
1/11/2008 9:15:52 PM

 Here is a sample class for web service return. This one is a general purpose return structure.

using System;
using System.Collections.Generic;
using System.Text;

namespace ClassLibrary1
{
  [Serializable]
  public class WebReturn
  {
    private int  iErrorCode   ; // Runtime set to 0
    private string sErrorText = String.Empty;
    private Boolean bSuccess;  // Runtime set to false

    public int ErrorCode
    {
      get
      {
        return iErrorCode;
      }
      set
      {
        iErrorCode = value;
      }
    }
    public string ErrorText
    {
      get
      {
        return sErrorText;
      }
      set
      {
        sErrorText = value;
      }
    }
    public bool Success
    {
      get
      {
        return bSuccess;
      }
      set
      {
        bSuccess = value;
      }
    }   
  }
}


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
1/11/2008 9:26:05 PM

Thank you so much for helpingYes.

The structure looks clear. However, ... never mind, I'll do some coding and will come back for the question.

Thanks again.

0
ca714
1/12/2008 9:34:38 AM

I'm back.

I have coded the skeleton of my web service as follow:

[webmethod]

string Purchase(Order objOrder)

{

}

[webmethod]

Reciept Purchase (Order objOrder)

{

return RecieptObject;

}

 Here is my question: I was given a sampel order.xml file. It's quite long. As suggested above, I should create a class for this order object. Is there any other way to just use the order.xml directly since the order.xml structure is fixed?

thanks in advance.

0
ca714
1/14/2008 5:19:19 PM

Anyone knows details about how XML Web Services have evolved in terms of setup, coding, and deployment from VS2003 thru VS2008?


Please mark the post(s) that have helped you as "Answer"
0
thuhue
1/14/2008 7:28:22 PM

 Before you get into the detailed design, consider if you should use a GetQuote(Order objOrder) returning a structure returning (QuoteId, TotalValue, CurrencyCode, ValidTo, EstimatedDelivery), to which AcceptQuote(quoteid) accepts the quote.

It is simplest to set up a class. 


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
1/14/2008 7:34:21 PM

>Anyone knows details about how XML Web Services have evolved in terms of setup, coding, and deployment from VS2003 thru VS2008?

WSE (Web Service Enhancements) brought many improvements. WSE is an add-on for VS2005, whereas it is built-in for VS2008. 


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
1/14/2008 7:38:10 PM

So VS2008 is the most up to date tool for developing WS and make all its predecessors obsolete?


Please mark the post(s) that have helped you as "Answer"
0
thuhue
1/14/2008 9:23:33 PM

>So VS2008 is the most up to date tool for developing WS and make all its predecessors obsolete?
If you have both VS2005 and VS2008 available to you, choose VS2008. However in this context, is a somewhat excessive term as you can install the 3.0 Framework onto  VS2005 and develop WCF with it; however ongoing support will be better with VS2008.


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
1/14/2008 10:08:26 PM

I am back with a bad news.

I gave up on microsoft technology!!!

So many thanks to TATWORTH for the help all the way from the very first post.

I've tried different ways to save the submitted soap order and send back a soap reciept, but no luck. Sometimes I thought I had it, but when I moved the code to the server, it generated another error. For WS experts, it may be a simple or a moderate task, unfortunately I am not an experts. Still.... they (MS) should have clear enough documents on this and the support.

Anyway, I have a simple webservice (using c# from microsuck) recieving a string, and I dump the whole xmldoc.innerxml string into it. It works, but I don't like it as a programmer.

I am looking into java for an alternative now.

thanks all again for reading and helping.

0
ca714
1/16/2008 11:32:48 PM

 >I gave up on

Having written a very successful ordering system using web services using VB.NET I am a little surprised, however please mark the post as closed.
 


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
1/17/2008 7:13:33 AM

TATWORTH, I just want to mark the post as closed, but found no means on the page.

Please advise.

0
ca714
1/17/2008 5:47:28 PM

Please click on the "Mark as answer" button. 


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
1/17/2008 8:22:16 PM
Reply:

Similar Artilces:

Re: Using XML Web Service in VS.NET
Dear all, I added a "test.asmx" file in my current project and I coded all Web Method in the test.asmx.cs in VS.NET. Now I want to ask how can I call the web methods in other C# Class? Suppose the class name of the asmx is "test". How can I instantiate the object of that class? Regards, Joe someone can correct me on this.... i hav done a walkthrough using XML webservice. I have created a windows application that can call methods from the webservice, with the use of a dataset in the webservice. after "adding a web reference" to my windows appli...

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

XML Web Service Message from .NET to NonStop SOAP Server
Here's the XML parsing error the NonStop (Tandem) SOAP Server is generating as a result of a Web Service request from my .NET web client.  The web service in question works fine when the XML request comes from the "test" html client.  My question is, is this a lack of carriage returns a problem?  (see trace information below) >> 2008/10/15 14:32:3::Y7H3:<< Unmarshal Error: Invalid input document: Unexpected extra node(s) at the end of the document>> 2008/10/15 14:32:3::Y7H3:<< SoapDocumentHandler::process:Fault occurre...

How do I set a session ID in a web service SOAP header using a .NET proxy?
I have a web service proxy set up in PB 10.5. I need to set a session ID in the SOAP header so the web service can validate subsequent requests for this session. Is this possible? You can't modify the SOAP headers unfortunately. That capability is supposed to be forthcoming in an EBF/Maintenance Release, but I do not now of an specific timeframe. On 20 Apr 2006 13:40:54 -0700, "Libby Engelbret" <lengelbret@npomn.com> wrote: >I have a web service proxy set up in PB 10.5. I need to set a session ID in >the SOAP header so the web service can val...

web service SOAP Headers
If this isn't the right forum, let me know what is.Is there a difference between SOAP serialization and  and XML serialization.I have been reading heavily and am now quite confused.I understand that SOAP serialization produces XML, but perhaps without a specific schema or a scheme very different from XML. In the context of web services, the XML Serializer is used to produce XML in SOAP format. What you may be getting confused about is that there is also a "runtime serialization" subsystem. This can serialize data either using a Binary Formatter, or a SOAP Formatter. It...

Consuming a .NET web service in Delphi 2010 using a service reference
Hi, I've been asked to modify one of my existing applications (D2010 Win32) to interact with a web service written under VS2010/.Net 4. The information I have so far is :- "As communication is secured by .NET WsHttpBinding data encrypting, In order to consume it you have to add to your application a Service Reference (not a web reference) that joins the service available at the URL: http://ctm.mobilling.it/SmsComApi/Sms.svc . Assuming that the binding created in your app.confing is named "WSHttpBinding_ISms" you have to instantiate a client as shown below: {c...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

Missing Design Tab in using Web Matrix for XML Web Services
Did anyone come across the following situation? After selecting the XML Web Service template with VB.NET as the language, Sample as the class and MatrixDemo as the namespace, a code view was opened by Web Matrix. However, unlike the usually interface, I can't find any tabs underneath the code view. No design tab, no HTML tab and no ALL tab. Did I miss anything?...

Consuming Web service from .net 3.5 web application using ajax
Hi , Before in .net 2005 ,I use to consume the  web service from client side via Ajax and java script. that's just adding web service inside the script manger services.But  it was not possible with .net 2008 version WEB APPLICATION   , Even it works well with .net 2008 web sites. Please help me to solve the issue. I have no idea what you mean. Please post the code that "does not work". NC...   I have the same problem.  I have a .NET 3.5 Web Application not Web Site.  I fully qualify the web service with the namespace i,e,  &n...

new UsernameToken exception from web page that consumes web service using soap
I've the following problem, that is generating a UsernameToken in an asp.net page:1) a web service (.net 1.1, WSE 2.0 SP3) that requires soap authentication with myUsernameTokenManager implementation 2) a winForm client (.net 1.1, WSE 2.0 SP3) that consumes the web service passing a UsernameToken in the Soap messages. 3) a web client that does the same as the winForm client but with error when generating the UsernameToken to add to the SoapContext. Here is the piece of code: UsernameToken tok = new UsernameToken(CurrentUser.Instance.UserID, CurrentUser.Instance.Password, Passwor...

Changing URL in web.config for web service
I added a web reference to asmx file. In web.config - it adds - undefinedadd key="CoreService.CoreServices" value="http://test/CoreServices.asmx I then change it to <add key="CoreService.CoreServices" value="http://test2/CoreServices.asmx"/> But CoreService.CoreServices still looks for http://test/CoreServices.asmx.  What else do i have to change? I think CoreService.CoreServices are hard coded into the source code.  Girijeshhttp://www.girijesh.in/ I think CoreService.CoreServices are hard coded into the source code.  Girijeshhttp://www.girijesh.in/ So no ...

Cannot call a web service from java script using ajax in .net 3.5 web applications
As like 2005 .net websites i tried to consume a web service from client side java script  using Ajax script manager in  .net 3.5 (2008) version web application it was not working, Event it works with 3.5 web sites, What i have to do to solve the issue. Thanks in advance Hi, can you create the least amount of code to reproduce it and post it? This gives us the ability to check out your code and better guide you. Also please check out this article: Create a Simple WCF Web Service and Use In JavaScript With Visual Studio 2008 and .Net 3.5.  Grz, Kris.Read my blog. Handy Fire...

Using xml web service
I have created a web service consisting of 5 different functions. I would like to make the service available in another web project. My first thought is to add a web reference to the webserver (How): *goto project then add web reference *Set the url to reflect the path of the web reference *The add the web reference My next thought is instantiate the webservice *dim n as new webservicename. This is were I run into problems, if someone could please point me in the right direction I would greatly appreciate it. Thanks, Pink My next thought is instan...

Web resources about - Order thru webservice using SOAP - asp.net.xml-web-services

webservices Articles, Posts, Blogs, Videos - Technorati
— Authority: The job consist in a PHP program that read a file, compose a message (email or sms) and call an API of email provider (Amazon SES) ...

Section: software:webservices
Wired.com © 2012 Condé Nast. All rights reserved. Use of this Site constitutes acceptance of our User Agreement (effective 3/21/12) and Privacy ...

Products - CrunchBase
Product profiles

App Search on Flickr - Application Sharing!
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

Wikipedia:Press coverage 2005 - Wikipedia, the free encyclopedia
If you add an article, please cite both the title and the source. Note that if you're listing an article from a traditional press wire service ...

Entity–relationship model - Wikipedia, the free encyclopedia
In software engineering , an entity-relationship model ( ER model for short) is an abstract and conceptual representation of data . Entity-relationship ...

Entity-relationship model - Wikipedia, the free encyclopedia
In software engineering , an entity-relationship model ( ER model for short) is an abstract and conceptual representation of data . Entity-relationship ...

IT and Telecommunications Jobs in Melbourne Metro - MyCareer
Find IT and Telecommunications Jobs in Melbourne Metro on MyCareer. Fresh IT and Telecommunications Jobs posted daily. Free email alerts and ...

AWS Elastic Beanstalk: A Quick and Simple Way into the Cloud
Flexibility is one of the key principles of Amazon WebServices - developers can select any programming language and software package,any operating ...

How To Use the Amazon SDK for Android to Upload Photos to Amazon S3
This article demonstrates how to use the AWS SDK for Android to upload an image to Amazon Simple Storage Service (S3) from your mobile device ...

Resources last updated: 11/23/2015 11:14:10 PM