Why lose xml headers? Xml declaration and xsl instruction

Discussion in 'ASP .Net Web Services' started by Piculo, Oct 25, 2004.

  1. Piculo

    Piculo Guest

    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, Oct 25, 2004
    #1
    1. Advertising

  2. 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:...
    > 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], Oct 26, 2004
    #2
    1. Advertising

  3. Piculo

    Piculo Guest

    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]" <> escribió en el
    mensaje news:...
    > 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:...
    >> 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, Oct 27, 2004
    #3
  4. Piculo

    Piculo Guest

    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%...
    >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]" <> escribió en el
    > mensaje news:...
    >> 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:...
    >>> 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, Oct 27, 2004
    #4
  5. 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$...
    >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%...
    >>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]" <> escribió en el
    >> mensaje news:...
    >>> 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:...
    >>>> 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], Oct 27, 2004
    #5
  6. Piculo

    Piculo Guest

    But it is possible use a WebServices without SOAP?

    Thanks,
    Piculo.

    "Dino Chiesa [Microsoft]" <> escribió en el
    mensaje news:%...
    > 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$...
    >>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%...
    >>>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]" <> escribió en el
    >>> mensaje news:...
    >>>> 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:...
    >>>>> 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, Oct 31, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    3,613
    A. Bolmarcich
    May 27, 2005
  2. gouranga
    Replies:
    4
    Views:
    490
    Joe Kesselman
    Aug 3, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,996
    Smokey Grindel
    Dec 2, 2006
  4. Dhurandhar
    Replies:
    4
    Views:
    297
    Dhurandhar
    Nov 2, 2006
  5. Martin Welch
    Replies:
    4
    Views:
    541
    Martin Welch
    Sep 7, 2007
Loading...

Share This Page