Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: xsi:nil="true"

  1. #1
    New Coder
    Join Date
    Jan 2006
    Location
    South Central, KS
    Posts
    81
    Thanks
    2
    Thanked 2 Times in 2 Posts

    xsi:nil="true"

    Hello,

    I am a newb on ASP.NET and am attempting to create a Web Service. The problem i am running into is that when the service Soap definition comes up on the asmx page is displayed, i am getting a node with xsi:nil="true" instead of it's children.

    (shortening code for brevity)

    PHP Code:

    using System
    ;
    using System.Linq;
    using System.Web;
    using System.Web.Services;
    using System.Web.Services.Protocols;
    using System.Xml.Linq;
    using System.Collections;

    [
    WebService(Namespace "http://wsdl.myunqiegenamespacethingyyesthisissettomydomain.com/")]
    public class 
    SignService System.Web.Services.WebService {

        public 
    struct SignWebOrderCopyLine {
            public 
    string cLabel;
            public 
    string cValue;
        }

        public 
    struct SignWebOrderItem {
            public 
    string cProdNo;
            public 
    int nQty;
            public 
    string cColor;
            public 
    SignWebOrderCopyLine[] lstCopyLines;
        }
        
        public 
    struct SignWebOrderCart {
            public 
    string cCustomerNo;
            public 
    SignWebOrderItem[] lstItems;
        }


        public 
    struct SignWebOrderReturn {
            public 
    string status;
            public 
    string code;
            public 
    string orderNumber;
            public 
    string message;
        }



        public 
    SignService () {
            
    //Uncomment the following line if using designed components 
            //InitializeComponent(); 
        
    }

        [
    WebMethod(Description "Used to remotely add and submit a cart with Lowen Sign Company")]
        public 
    SignWebOrderReturn AddRemoteOrder(SignWebOrderCart oCart) {
        
    // code to process
        



    the XML i get as an example shows
    Code:
    <?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>
        <AddRemoteOrder xmlns="http://wsdl.myunqiegenamespacethingyyesthisissettomydomain.com/">
          <oCart>
            <cCustomerNo>string</cCustomerNo>
            <lstItems>
              <SignWebOrderItem>
                <cProdNo>string</cProdNo>
                <nQty>int</nQty>
                <cColor>string</cColor>
                <lstCopyLines xsi:nil="true" />
              </SignWebOrderItem>
              <SignWebOrderItem>
                <cProdNo>string</cProdNo>
                <nQty>int</nQty>
                <cColor>string</cColor>
                <lstCopyLines xsi:nil="true" />
              </SignWebOrderItem>
            </lstItems>
          </oCart>
        </AddRemoteOrder>
      </soap:Body>
    </soap:Envelope>

    see how the lstCopyLines node isn't showing the information on what is expected? I've done some testing and it appears that it refuses to show anything deeper then 2 levels. Is this a hard coded limitation, or can i change a setting somewhere?

    thanks in advance

  • #2
    New to the CF scene
    Join Date
    Dec 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I also have this problem, if someone discover the solution of this problem, please contact to me or post in this forum.
    Obs, in my case, this occurs only in the method example, where is SOAP description. In the WSDL definition the XML is showed correctly.
    Last edited by Savio Sabino; 12-15-2008 at 05:05 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •