Why lose xml headers? Xml declaration and xsl instruction

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default Why lose xml headers? Xml declaration and xsl instruction

    Hi,

    I have a WebServices in ASP.NEt VisualBasic, the declaration of the method
    is :
    Public Function saveDocumentXML(ByVal pvXmlDocument As Xml.XmlDocument) As
    String

    And i call to this method with a webreference in this way:
    Dim myString as String = myWS.saveDocumentXML(myXMlDocument)

    Wherein myXmlDocument is something like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="testlayer24.xsl"?>
    <testlayer>
    <text1>Text test1</text1>
    <text12>Text test12</text12>
    <text2>Text test2</text2>
    <text22>Text test22</text22>
    <text3>Text test3</text3>
    <text32>Text test32</text32>
    </testlayer>

    But in the webservices i receive:
    <testlayer xmlns="">
    <text1>Text test1</text1>
    <text12>Text test12</text12>
    <text2>Text test2</text2>
    <text22>Text test22</text22>
    <text3>Text test3</text3>
    <text32>Text test32</text32>
    </testlayer>

    This means that i ve lost the header of the XML in the WebServices, the
    declaration and the Xsl transformation reference.
    Anyone knows why? What is wrong?

    Thanks,
    Pikulo.



    Piculo Guest

  2. Similar Questions and Discussions

    1. complete instruction in trigger?
      Hi... People, I wanna know how can i know inside of a function what the trigger called, i mean which instruction SQL it called. I do not wanna...
    2. Illustrator CS Scripting Instruction or Tutorials
      Can someone point me to a person, place on the internet (tutorials) or book to learn scripting in Adobe Illustrator CS. Please?!?!?
    3. #25956 [Opn]: Apache: Illegal Instruction
      ID: 25956 User updated by: zefram at zefram dot net Reported By: zefram at zefram dot net Status: Open Bug Type: ...
    4. Declaration
      How should i declare this in my server component? Looks like this now and i wants to declare arrTemp as ???? Private arrTemp Used like this: ...
    5. Dreamweaver MX - instruction book
      I'm new to Dreamweaver MX and am looking for a good book to get me started. Anyone got recommendations for something which is UK friendly and...
  3. #2

    Default Re: Why lose xml headers? Xml declaration and xsl instruction

    can you explain what you were trying to do ?
    In web services the response is contained in a soap envelope. soap is just
    an XML container. the declaration lines which apply once per XML document
    will apply to the soap Envelope and not to what is contained within the
    Envelope. when you extract what is contained within the envelope then there
    are no declaration lines.


    "Piculo" <PakPiculo(NoSPam.at)gmail.com> wrote in message
    news:OXj8DtnuEHA.3972@TK2MSFTNGP15.phx.gbl...
    > Hi,
    >
    > I have a WebServices in ASP.NEt VisualBasic, the declaration of the method
    > is :
    > Public Function saveDocumentXML(ByVal pvXmlDocument As Xml.XmlDocument) As
    > String
    >
    > And i call to this method with a webreference in this way:
    > Dim myString as String = myWS.saveDocumentXML(myXMlDocument)
    >
    > Wherein myXmlDocument is something like this:
    > <?xml version="1.0" encoding="UTF-8"?>
    > <?xml-stylesheet type="text/xsl" href="testlayer24.xsl"?>
    > <testlayer>
    > <text1>Text test1</text1>
    > <text12>Text test12</text12>
    > <text2>Text test2</text2>
    > <text22>Text test22</text22>
    > <text3>Text test3</text3>
    > <text32>Text test32</text32>
    > </testlayer>
    >
    > But in the webservices i receive:
    > <testlayer xmlns="">
    > <text1>Text test1</text1>
    > <text12>Text test12</text12>
    > <text2>Text test2</text2>
    > <text22>Text test22</text22>
    > <text3>Text test3</text3>
    > <text32>Text test32</text32>
    > </testlayer>
    >
    > This means that i ve lost the header of the XML in the WebServices, the
    > declaration and the Xsl transformation reference.
    > Anyone knows why? What is wrong?
    >
    > Thanks,
    > Pikulo.
    >
    >
    >

    Dino Chiesa [Microsoft] Guest

  4. #3

    Default Re: Why lose xml headers? Xml declaration and xsl instruction

    I was supposing that this was the problem but i dont know why when i get the
    Xml document from the webservices i get the header (the xsl declaration) and
    when i pass the xmldocument to the gebServices i lost the header (the header
    i mean it is the declaration of the xsl related).

    This is the declaration of the SaveDocument whitin i lost the header:

    SOAP
    The following is a sample SOAP request and response. The placeholders shown
    need to be replaced with actual values.

    POST /WebService1/Service1.asmx HTTP/1.1
    Host: localhost
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://tempuri.org/WebService1/Service1/saveDocumentXML"

    <?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>
    <saveDocumentXML xmlns="http://tempuri.org/WebService1/Service1">
    <pvXmlDocument>xml</pvXmlDocument>
    </saveDocumentXML>
    </soap:Body>
    </soap:Envelope>HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length

    <?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>
    <saveDocumentXMLResponse
    xmlns="http://tempuri.org/WebService1/Service1">
    <saveDocumentXMLResult>string</saveDocumentXMLResult>
    </saveDocumentXMLResponse>
    </soap:Body>
    </soap:Envelope>

    And this is the declaration of the method that return the xml document with
    the headers about xsl:


    SOAP
    The following is a sample SOAP request and response. The placeholders shown
    need to be replaced with actual values.

    POST /WebService1/Service1.asmx HTTP/1.1
    Host: localhost
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://tempuri.org/WebService1/Service1/returnDocumentXML"

    <?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>
    <returnDocumentXML xmlns="http://tempuri.org/WebService1/Service1">
    <idXML>string</idXML>
    </returnDocumentXML>
    </soap:Body>
    </soap:Envelope>HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length

    <?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>
    <returnDocumentXMLResponse
    xmlns="http://tempuri.org/WebService1/Service1">
    <returnDocumentXMLResult>xml</returnDocumentXMLResult>
    </returnDocumentXMLResponse>
    </soap:Body>
    </soap:Envelope>HTTP POST
    The following is a sample HTTP POST request and response. The placeholders
    shown need to be replaced with actual values.

    POST /WebService1/Service1.asmx/returnDocumentXML HTTP/1.1
    Host: localhost
    Content-Type: application/x-www-form-urlencoded
    Content-Length: length

    idXML=stringHTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length

    <?xml version="1.0"?>
    xml
    Cheers.


    "Dino Chiesa [Microsoft]" <dinoch@online.microsoft.com> escribió en el
    mensaje news:OiysEb3uEHA.2200@TK2MSFTNGP11.phx.gbl...
    > can you explain what you were trying to do ?
    > In web services the response is contained in a soap envelope. soap is just
    > an XML container. the declaration lines which apply once per XML document
    > will apply to the soap Envelope and not to what is contained within the
    > Envelope. when you extract what is contained within the envelope then
    > there are no declaration lines.
    >
    >
    > "Piculo" <PakPiculo(NoSPam.at)gmail.com> wrote in message
    > news:OXj8DtnuEHA.3972@TK2MSFTNGP15.phx.gbl...
    >> Hi,
    >>
    >> I have a WebServices in ASP.NEt VisualBasic, the declaration of the
    >> method
    >> is :
    >> Public Function saveDocumentXML(ByVal pvXmlDocument As Xml.XmlDocument)
    >> As
    >> String
    >>
    >> And i call to this method with a webreference in this way:
    >> Dim myString as String = myWS.saveDocumentXML(myXMlDocument)
    >>
    >> Wherein myXmlDocument is something like this:
    >> <?xml version="1.0" encoding="UTF-8"?>
    >> <?xml-stylesheet type="text/xsl" href="testlayer24.xsl"?>
    >> <testlayer>
    >> <text1>Text test1</text1>
    >> <text12>Text test12</text12>
    >> <text2>Text test2</text2>
    >> <text22>Text test22</text22>
    >> <text3>Text test3</text3>
    >> <text32>Text test32</text32>
    >> </testlayer>
    >>
    >> But in the webservices i receive:
    >> <testlayer xmlns="">
    >> <text1>Text test1</text1>
    >> <text12>Text test12</text12>
    >> <text2>Text test2</text2>
    >> <text22>Text test22</text22>
    >> <text3>Text test3</text3>
    >> <text32>Text test32</text32>
    >> </testlayer>
    >>
    >> This means that i ve lost the header of the XML in the WebServices, the
    >> declaration and the Xsl transformation reference.
    >> Anyone knows why? What is wrong?
    >>
    >> Thanks,
    >> Pikulo.
    >>
    >>
    >>
    >
    >

    Piculo Guest

  5. #4

    Default Re: Why lose xml headers? Xml declaration and xsl instruction

    I was wrong, in both cases, return and save i lost the headers.
    So, if i want obtain a xmlDocument (with xsl declaration) i must pass the
    document as String, and convert in the other side to xmlDocument. Isnt?

    Cheers,
    Piculo.

    "Piculo" <PakPiculo(NoSPam.at)gmail.com> escribió en el mensaje
    news:e%23t1TzBvEHA.3828@TK2MSFTNGP12.phx.gbl...
    >I was supposing that this was the problem but i dont know why when i get
    >the Xml document from the webservices i get the header (the xsl
    >declaration) and when i pass the xmldocument to the gebServices i lost the
    >header (the header i mean it is the declaration of the xsl related).
    >
    > This is the declaration of the SaveDocument whitin i lost the header:
    >
    > SOAP
    > The following is a sample SOAP request and response. The placeholders
    > shown need to be replaced with actual values.
    >
    > POST /WebService1/Service1.asmx HTTP/1.1
    > Host: localhost
    > Content-Type: text/xml; charset=utf-8
    > Content-Length: length
    > SOAPAction: "http://tempuri.org/WebService1/Service1/saveDocumentXML"
    >
    > <?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>
    > <saveDocumentXML xmlns="http://tempuri.org/WebService1/Service1">
    > <pvXmlDocument>xml</pvXmlDocument>
    > </saveDocumentXML>
    > </soap:Body>
    > </soap:Envelope>HTTP/1.1 200 OK
    > Content-Type: text/xml; charset=utf-8
    > Content-Length: length
    >
    > <?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>
    > <saveDocumentXMLResponse
    > xmlns="http://tempuri.org/WebService1/Service1">
    > <saveDocumentXMLResult>string</saveDocumentXMLResult>
    > </saveDocumentXMLResponse>
    > </soap:Body>
    > </soap:Envelope>
    >
    > And this is the declaration of the method that return the xml document
    > with the headers about xsl:
    >
    >
    > SOAP
    > The following is a sample SOAP request and response. The placeholders
    > shown need to be replaced with actual values.
    >
    > POST /WebService1/Service1.asmx HTTP/1.1
    > Host: localhost
    > Content-Type: text/xml; charset=utf-8
    > Content-Length: length
    > SOAPAction: "http://tempuri.org/WebService1/Service1/returnDocumentXML"
    >
    > <?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>
    > <returnDocumentXML xmlns="http://tempuri.org/WebService1/Service1">
    > <idXML>string</idXML>
    > </returnDocumentXML>
    > </soap:Body>
    > </soap:Envelope>HTTP/1.1 200 OK
    > Content-Type: text/xml; charset=utf-8
    > Content-Length: length
    >
    > <?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>
    > <returnDocumentXMLResponse
    > xmlns="http://tempuri.org/WebService1/Service1">
    > <returnDocumentXMLResult>xml</returnDocumentXMLResult>
    > </returnDocumentXMLResponse>
    > </soap:Body>
    > </soap:Envelope>HTTP POST
    > The following is a sample HTTP POST request and response. The placeholders
    > shown need to be replaced with actual values.
    >
    > POST /WebService1/Service1.asmx/returnDocumentXML HTTP/1.1
    > Host: localhost
    > Content-Type: application/x-www-form-urlencoded
    > Content-Length: length
    >
    > idXML=stringHTTP/1.1 200 OK
    > Content-Type: text/xml; charset=utf-8
    > Content-Length: length
    >
    > <?xml version="1.0"?>
    > xml
    > Cheers.
    >
    >
    > "Dino Chiesa [Microsoft]" <dinoch@online.microsoft.com> escribió en el
    > mensaje news:OiysEb3uEHA.2200@TK2MSFTNGP11.phx.gbl...
    >> can you explain what you were trying to do ?
    >> In web services the response is contained in a soap envelope. soap is
    >> just an XML container. the declaration lines which apply once per XML
    >> document will apply to the soap Envelope and not to what is contained
    >> within the Envelope. when you extract what is contained within the
    >> envelope then there are no declaration lines.
    >>
    >>
    >> "Piculo" <PakPiculo(NoSPam.at)gmail.com> wrote in message
    >> news:OXj8DtnuEHA.3972@TK2MSFTNGP15.phx.gbl...
    >>> Hi,
    >>>
    >>> I have a WebServices in ASP.NEt VisualBasic, the declaration of the
    >>> method
    >>> is :
    >>> Public Function saveDocumentXML(ByVal pvXmlDocument As Xml.XmlDocument)
    >>> As
    >>> String
    >>>
    >>> And i call to this method with a webreference in this way:
    >>> Dim myString as String = myWS.saveDocumentXML(myXMlDocument)
    >>>
    >>> Wherein myXmlDocument is something like this:
    >>> <?xml version="1.0" encoding="UTF-8"?>
    >>> <?xml-stylesheet type="text/xsl" href="testlayer24.xsl"?>
    >>> <testlayer>
    >>> <text1>Text test1</text1>
    >>> <text12>Text test12</text12>
    >>> <text2>Text test2</text2>
    >>> <text22>Text test22</text22>
    >>> <text3>Text test3</text3>
    >>> <text32>Text test32</text32>
    >>> </testlayer>
    >>>
    >>> But in the webservices i receive:
    >>> <testlayer xmlns="">
    >>> <text1>Text test1</text1>
    >>> <text12>Text test12</text12>
    >>> <text2>Text test2</text2>
    >>> <text22>Text test22</text22>
    >>> <text3>Text test3</text3>
    >>> <text32>Text test32</text32>
    >>> </testlayer>
    >>>
    >>> This means that i ve lost the header of the XML in the WebServices, the
    >>> declaration and the Xsl transformation reference.
    >>> Anyone knows why? What is wrong?
    >>>
    >>> Thanks,
    >>> Pikulo.
    >>>
    >>>
    >>>
    >>
    >>
    >
    >

    Piculo Guest

  6. #5

    Default Re: Why lose xml headers? Xml declaration and xsl instruction

    yes, that is one way.

    if you want a complete document (with xsl) why use SOAP?

    or, if you want SOAP , why not include the XSL sheet as a separate
    parameter?



    "Piculo" <PakPiculo(NoSPam.at)gmail.com> wrote in message
    news:uaFTs$CvEHA.568@TK2MSFTNGP09.phx.gbl...
    >I was wrong, in both cases, return and save i lost the headers.
    > So, if i want obtain a xmlDocument (with xsl declaration) i must pass the
    > document as String, and convert in the other side to xmlDocument. Isnt?
    >
    > Cheers,
    > Piculo.
    >
    > "Piculo" <PakPiculo(NoSPam.at)gmail.com> escribió en el mensaje
    > news:e%23t1TzBvEHA.3828@TK2MSFTNGP12.phx.gbl...
    >>I was supposing that this was the problem but i dont know why when i get
    >>the Xml document from the webservices i get the header (the xsl
    >>declaration) and when i pass the xmldocument to the gebServices i lost the
    >>header (the header i mean it is the declaration of the xsl related).
    >>
    >> This is the declaration of the SaveDocument whitin i lost the header:
    >>
    >> SOAP
    >> The following is a sample SOAP request and response. The placeholders
    >> shown need to be replaced with actual values.
    >>
    >> POST /WebService1/Service1.asmx HTTP/1.1
    >> Host: localhost
    >> Content-Type: text/xml; charset=utf-8
    >> Content-Length: length
    >> SOAPAction: "http://tempuri.org/WebService1/Service1/saveDocumentXML"
    >>
    >> <?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>
    >> <saveDocumentXML xmlns="http://tempuri.org/WebService1/Service1">
    >> <pvXmlDocument>xml</pvXmlDocument>
    >> </saveDocumentXML>
    >> </soap:Body>
    >> </soap:Envelope>HTTP/1.1 200 OK
    >> Content-Type: text/xml; charset=utf-8
    >> Content-Length: length
    >>
    >> <?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>
    >> <saveDocumentXMLResponse
    >> xmlns="http://tempuri.org/WebService1/Service1">
    >> <saveDocumentXMLResult>string</saveDocumentXMLResult>
    >> </saveDocumentXMLResponse>
    >> </soap:Body>
    >> </soap:Envelope>
    >>
    >> And this is the declaration of the method that return the xml document
    >> with the headers about xsl:
    >>
    >>
    >> SOAP
    >> The following is a sample SOAP request and response. The placeholders
    >> shown need to be replaced with actual values.
    >>
    >> POST /WebService1/Service1.asmx HTTP/1.1
    >> Host: localhost
    >> Content-Type: text/xml; charset=utf-8
    >> Content-Length: length
    >> SOAPAction: "http://tempuri.org/WebService1/Service1/returnDocumentXML"
    >>
    >> <?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>
    >> <returnDocumentXML xmlns="http://tempuri.org/WebService1/Service1">
    >> <idXML>string</idXML>
    >> </returnDocumentXML>
    >> </soap:Body>
    >> </soap:Envelope>HTTP/1.1 200 OK
    >> Content-Type: text/xml; charset=utf-8
    >> Content-Length: length
    >>
    >> <?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>
    >> <returnDocumentXMLResponse
    >> xmlns="http://tempuri.org/WebService1/Service1">
    >> <returnDocumentXMLResult>xml</returnDocumentXMLResult>
    >> </returnDocumentXMLResponse>
    >> </soap:Body>
    >> </soap:Envelope>HTTP POST
    >> The following is a sample HTTP POST request and response. The
    >> placeholders shown need to be replaced with actual values.
    >>
    >> POST /WebService1/Service1.asmx/returnDocumentXML HTTP/1.1
    >> Host: localhost
    >> Content-Type: application/x-www-form-urlencoded
    >> Content-Length: length
    >>
    >> idXML=stringHTTP/1.1 200 OK
    >> Content-Type: text/xml; charset=utf-8
    >> Content-Length: length
    >>
    >> <?xml version="1.0"?>
    >> xml
    >> Cheers.
    >>
    >>
    >> "Dino Chiesa [Microsoft]" <dinoch@online.microsoft.com> escribió en el
    >> mensaje news:OiysEb3uEHA.2200@TK2MSFTNGP11.phx.gbl...
    >>> can you explain what you were trying to do ?
    >>> In web services the response is contained in a soap envelope. soap is
    >>> just an XML container. the declaration lines which apply once per XML
    >>> document will apply to the soap Envelope and not to what is contained
    >>> within the Envelope. when you extract what is contained within the
    >>> envelope then there are no declaration lines.
    >>>
    >>>
    >>> "Piculo" <PakPiculo(NoSPam.at)gmail.com> wrote in message
    >>> news:OXj8DtnuEHA.3972@TK2MSFTNGP15.phx.gbl...
    >>>> Hi,
    >>>>
    >>>> I have a WebServices in ASP.NEt VisualBasic, the declaration of the
    >>>> method
    >>>> is :
    >>>> Public Function saveDocumentXML(ByVal pvXmlDocument As Xml.XmlDocument)
    >>>> As
    >>>> String
    >>>>
    >>>> And i call to this method with a webreference in this way:
    >>>> Dim myString as String = myWS.saveDocumentXML(myXMlDocument)
    >>>>
    >>>> Wherein myXmlDocument is something like this:
    >>>> <?xml version="1.0" encoding="UTF-8"?>
    >>>> <?xml-stylesheet type="text/xsl" href="testlayer24.xsl"?>
    >>>> <testlayer>
    >>>> <text1>Text test1</text1>
    >>>> <text12>Text test12</text12>
    >>>> <text2>Text test2</text2>
    >>>> <text22>Text test22</text22>
    >>>> <text3>Text test3</text3>
    >>>> <text32>Text test32</text32>
    >>>> </testlayer>
    >>>>
    >>>> But in the webservices i receive:
    >>>> <testlayer xmlns="">
    >>>> <text1>Text test1</text1>
    >>>> <text12>Text test12</text12>
    >>>> <text2>Text test2</text2>
    >>>> <text22>Text test22</text22>
    >>>> <text3>Text test3</text3>
    >>>> <text32>Text test32</text32>
    >>>> </testlayer>
    >>>>
    >>>> This means that i ve lost the header of the XML in the WebServices, the
    >>>> declaration and the Xsl transformation reference.
    >>>> Anyone knows why? What is wrong?
    >>>>
    >>>> Thanks,
    >>>> Pikulo.
    >>>>
    >>>>
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >

    Dino Chiesa [Microsoft] Guest

  7. #6

    Default Re: Why lose xml headers? Xml declaration and xsl instruction

    But it is possible use a WebServices without SOAP?

    Thanks,
    Piculo.

    "Dino Chiesa [Microsoft]" <dinoch@online.microsoft.com> escribió en el
    mensaje news:%23ua6NGDvEHA.1984@TK2MSFTNGP14.phx.gbl...
    > yes, that is one way.
    >
    > if you want a complete document (with xsl) why use SOAP?
    >
    > or, if you want SOAP , why not include the XSL sheet as a separate
    > parameter?
    >
    >
    >
    > "Piculo" <PakPiculo(NoSPam.at)gmail.com> wrote in message
    > news:uaFTs$CvEHA.568@TK2MSFTNGP09.phx.gbl...
    >>I was wrong, in both cases, return and save i lost the headers.
    >> So, if i want obtain a xmlDocument (with xsl declaration) i must pass the
    >> document as String, and convert in the other side to xmlDocument. Isnt?
    >>
    >> Cheers,
    >> Piculo.
    >>
    >> "Piculo" <PakPiculo(NoSPam.at)gmail.com> escribió en el mensaje
    >> news:e%23t1TzBvEHA.3828@TK2MSFTNGP12.phx.gbl...
    >>>I was supposing that this was the problem but i dont know why when i get
    >>>the Xml document from the webservices i get the header (the xsl
    >>>declaration) and when i pass the xmldocument to the gebServices i lost
    >>>the header (the header i mean it is the declaration of the xsl related).
    >>>
    >>> This is the declaration of the SaveDocument whitin i lost the header:
    >>>
    >>> SOAP
    >>> The following is a sample SOAP request and response. The placeholders
    >>> shown need to be replaced with actual values.
    >>>
    >>> POST /WebService1/Service1.asmx HTTP/1.1
    >>> Host: localhost
    >>> Content-Type: text/xml; charset=utf-8
    >>> Content-Length: length
    >>> SOAPAction: "http://tempuri.org/WebService1/Service1/saveDocumentXML"
    >>>
    >>> <?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>
    >>> <saveDocumentXML xmlns="http://tempuri.org/WebService1/Service1">
    >>> <pvXmlDocument>xml</pvXmlDocument>
    >>> </saveDocumentXML>
    >>> </soap:Body>
    >>> </soap:Envelope>HTTP/1.1 200 OK
    >>> Content-Type: text/xml; charset=utf-8
    >>> Content-Length: length
    >>>
    >>> <?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>
    >>> <saveDocumentXMLResponse
    >>> xmlns="http://tempuri.org/WebService1/Service1">
    >>> <saveDocumentXMLResult>string</saveDocumentXMLResult>
    >>> </saveDocumentXMLResponse>
    >>> </soap:Body>
    >>> </soap:Envelope>
    >>>
    >>> And this is the declaration of the method that return the xml document
    >>> with the headers about xsl:
    >>>
    >>>
    >>> SOAP
    >>> The following is a sample SOAP request and response. The placeholders
    >>> shown need to be replaced with actual values.
    >>>
    >>> POST /WebService1/Service1.asmx HTTP/1.1
    >>> Host: localhost
    >>> Content-Type: text/xml; charset=utf-8
    >>> Content-Length: length
    >>> SOAPAction: "http://tempuri.org/WebService1/Service1/returnDocumentXML"
    >>>
    >>> <?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>
    >>> <returnDocumentXML xmlns="http://tempuri.org/WebService1/Service1">
    >>> <idXML>string</idXML>
    >>> </returnDocumentXML>
    >>> </soap:Body>
    >>> </soap:Envelope>HTTP/1.1 200 OK
    >>> Content-Type: text/xml; charset=utf-8
    >>> Content-Length: length
    >>>
    >>> <?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>
    >>> <returnDocumentXMLResponse
    >>> xmlns="http://tempuri.org/WebService1/Service1">
    >>> <returnDocumentXMLResult>xml</returnDocumentXMLResult>
    >>> </returnDocumentXMLResponse>
    >>> </soap:Body>
    >>> </soap:Envelope>HTTP POST
    >>> The following is a sample HTTP POST request and response. The
    >>> placeholders shown need to be replaced with actual values.
    >>>
    >>> POST /WebService1/Service1.asmx/returnDocumentXML HTTP/1.1
    >>> Host: localhost
    >>> Content-Type: application/x-www-form-urlencoded
    >>> Content-Length: length
    >>>
    >>> idXML=stringHTTP/1.1 200 OK
    >>> Content-Type: text/xml; charset=utf-8
    >>> Content-Length: length
    >>>
    >>> <?xml version="1.0"?>
    >>> xml
    >>> Cheers.
    >>>
    >>>
    >>> "Dino Chiesa [Microsoft]" <dinoch@online.microsoft.com> escribió en el
    >>> mensaje news:OiysEb3uEHA.2200@TK2MSFTNGP11.phx.gbl...
    >>>> can you explain what you were trying to do ?
    >>>> In web services the response is contained in a soap envelope. soap is
    >>>> just an XML container. the declaration lines which apply once per XML
    >>>> document will apply to the soap Envelope and not to what is contained
    >>>> within the Envelope. when you extract what is contained within the
    >>>> envelope then there are no declaration lines.
    >>>>
    >>>>
    >>>> "Piculo" <PakPiculo(NoSPam.at)gmail.com> wrote in message
    >>>> news:OXj8DtnuEHA.3972@TK2MSFTNGP15.phx.gbl...
    >>>>> Hi,
    >>>>>
    >>>>> I have a WebServices in ASP.NEt VisualBasic, the declaration of the
    >>>>> method
    >>>>> is :
    >>>>> Public Function saveDocumentXML(ByVal pvXmlDocument As
    >>>>> Xml.XmlDocument) As
    >>>>> String
    >>>>>
    >>>>> And i call to this method with a webreference in this way:
    >>>>> Dim myString as String = myWS.saveDocumentXML(myXMlDocument)
    >>>>>
    >>>>> Wherein myXmlDocument is something like this:
    >>>>> <?xml version="1.0" encoding="UTF-8"?>
    >>>>> <?xml-stylesheet type="text/xsl" href="testlayer24.xsl"?>
    >>>>> <testlayer>
    >>>>> <text1>Text test1</text1>
    >>>>> <text12>Text test12</text12>
    >>>>> <text2>Text test2</text2>
    >>>>> <text22>Text test22</text22>
    >>>>> <text3>Text test3</text3>
    >>>>> <text32>Text test32</text32>
    >>>>> </testlayer>
    >>>>>
    >>>>> But in the webservices i receive:
    >>>>> <testlayer xmlns="">
    >>>>> <text1>Text test1</text1>
    >>>>> <text12>Text test12</text12>
    >>>>> <text2>Text test2</text2>
    >>>>> <text22>Text test22</text22>
    >>>>> <text3>Text test3</text3>
    >>>>> <text32>Text test32</text32>
    >>>>> </testlayer>
    >>>>>
    >>>>> This means that i ve lost the header of the XML in the WebServices,
    >>>>> the
    >>>>> declaration and the Xsl transformation reference.
    >>>>> Anyone knows why? What is wrong?
    >>>>>
    >>>>> Thanks,
    >>>>> Pikulo.
    >>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >

    Piculo Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139