简体   繁体   中英

SOAP service client, “No update available”

I am writing an application to consume SOAP service. The work flow is like this:

Pull in order from SOAP server (Request Order) POST/Response with changes to SOAP server (Response to Order) Request PO changes from server (Request order changes)

The third party server already set up a testing environment for us. The first thing I am trying to do is request and download the order from server. But seems the problem is that I can only download/pull the order per application once. After the first time I requested the order, I will get the exception: "System.Web.Services.Protocols.SoapException: No order updates available". If I create another application do the same thing, it will be able to request the order again, but only for once. Is there any place I can set/config so that my application could pull order regardless it is an newer order or not, or it's something to do with the server side?

The test code I am pulling order:

    /// <summary>
    /// Used by supplier to check Order
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void btnRequestPO_Click(object sender, EventArgs e)
    {
        string t_return;
        SupplierServices supplierServices = new SupplierServices();

        LoginDetails lgDetails = new LoginDetails();
        lgDetails.UserName = "user";
        lgDetails.Password = "password";
        supplierServices.LoginDetailsValue = lgDetails;

        RequestPurchaseOrder requestPO = new RequestPurchaseOrder();
        requestPO.SupplierCode = "1234";
        try
        {
            Order returned_order = supplierServices.SupplierRequestPO(requestPO);
            if (returned_order != null)
            {
                t_return = returned_order.ToString();
                MessageBox.Show(t_return);
            }
            else
                MessageBox.Show("Returned order is empty!");
        }
        catch (Exception ex)
        {
            String responseFromServer = ex.Message.ToString() + " ";
            if (ex!= null)
            {
              MessageBox.Show(responseFromServer);
            }
        }

It appears from your code that the response "No order updates available" is being returned from the third party. You are going to have to ask them why you are getting that error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM