Results 1 to 4 of 4

Thread: new here

  1. #1
    Join Date
    Jun 2006
    Posts
    1

    new here

    Hi All, new here

  2. #2
    Join Date
    Jun 2006
    Posts
    2

    xsi:nil=true error

    hi every body i try to make request from web service using .net2 and i need to generate xml
    so i need to make xml collections and attributes using classes here is the code
    public class GuestCount
    {
    private string _AgeQualifyingCode;
    private string _Count;
    //[System.Xml.Serialization.XmlAttribute("AgeQualifyi ngCode")]
    [System.Xml.Serialization.XmlAttribute("AgeQualifyi ngCode")]
    public string AgeQualifyingCode
    {
    set
    {
    _AgeQualifyingCode = value;
    }
    get
    {
    return _AgeQualifyingCode;
    }
    }

    // [System.Xml.Serialization.XmlElement()]
    [System.Xml.Serialization.XmlAttribute("Count")]
    public string Count
    {
    set
    {
    _Count = value;
    }
    get
    {
    return _Count;
    }
    }
    }

    public class GuestCounts
    {
    [System.Xml.Serialization.XmlElement("GuestCount")]//("GuestCount")]
    public GuestCount GuestCount;
    }

    public class RoomStayCandidate
    {

    [System.Xml.Serialization.XmlElement("GuestCounts", IsNullable=true)]
    public GuestCounts GuestCounts;

    private string _quantity;
    // [System.Xml.Serialization.XmlElement()]
    [System.Xml.Serialization.XmlAttribute("Quantity")]
    public string Quantity
    {
    set
    {
    _quantity = value;
    }
    get
    {
    return _quantity;
    }
    }

    }
    public class RoomStayCandidates
    {
    [System.Xml.Serialization.XmlElement("RoomStayCandi date", IsNullable = false)]
    public RoomStayCandidate RoomStayCandidate;
    }


    after this i call the root with the web method
    public string HelloWorld(RoomStayCandidates RoomStayCandidates)
    {
    return "Hello World";
    }
    to generate the collections inside <hello world tag>
    so i have the following result with error xsi:nil=true
    POST /ServicesTest/Service.asmx HTTP/1.1
    Host: localhost
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://tempuri.org/HelloWorld"

    <?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>
    <HelloWorld xmlns="http://tempuri.org/">
    <RoomStayCandidates>
    <RoomStayCandidate Quantity="string">
    <GuestCounts>
    <GuestCount xsi:nil="true" />
    </GuestCounts>
    </RoomStayCandidate>
    </RoomStayCandidates>
    </HelloWorld>
    </soap:Body>
    </soap:Envelope>
    what can i do to get the right structure for collection i need

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Quote Originally Posted by mosbah
    hi every body i try to make request from web service using .net2 and i need to generate xml
    so i need to make xml collections and attributes using classes here is the code .......
    .......what can i do to get the right structure for collection i need
    A good starting point will be to decide which thread would be best for your question

    I don't know: it could be
    the .NET thread
    OR
    the XML & XSL thread
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Jun 2006
    Posts
    2
    hello
    i'm still face serious problem in making new module using dotnetnuke
    i succeeded in creating sample of the article and other one using vb but i face aserious problem that is
    i working in very large project with c# language and i have a number of user controls contains basic fanctionality of the project made by vs2005 c# and these control have alot of public properties i handle for satisfy user requirements
    now in dotnetnuck i succeeded to add one control successfully in view mode but i need atechnique or smooth method to enable user to access all public properties inside the control and make edit
    i failed to make edit for the control
    what can i do to make this fastly because i have ahug delay in this task
    thanks

Posting Permissions

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