?? ???????? ??? ?? InfoPath 2003 ??? ?? ??? ???? ???? ?? ??? ?????? XML ???? ????? ???? ?? ????

???? ?????? ???? ??????
???? ID: 826989 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

?????

?? ?? ??????? ????? ?? ??? InfoPath ??????? ?????????? InfoPath ?? ????? ?? ???? ??? ???? ?? ????? ???????????, ?? ????? ??????? ??? ?? ???? ?? ?? ????? ?? ???? ??:
  • ???? ?? ?????? ????? ??????? ?? ???? ??? ?????? ????? ???? ????? ?? ?????? ?? ?????? ???????? ???? ?? ??? ?? ??????? ?? ???, ?? ?? ??? ???? ?? ?????? ???? ?? ??? ?? ?? ??? ???? ?? ?????? ?? ????
  • ????????? ???? ??? ???? ??? ????? ???? ?? ??? ???? ????
?? ???? ?? ????? ???? ????? ??:
  • ???? InfoPath ??? ???? ?? ???? ?????
  • ??????? ?? ??? InfoPath ??????? ???? ??? ???? ?? ????? ???? ?? ??? ?? ????????

????

InfoPath ??? ???? ?? ???? ???? ???? ???, ?? XML ??? ?? ???????? ?? ??? ??? ????? ??????? ????, ????? XML ??? ????? ????? ???? ??? ?? ????????: ?? ???? ?????? ?? ???, ?? ???? ??? ???? ???? ?????????? ?? ??? ??:
[WebMethod]
   public void SendSampleString( string sampleString )
   {
      //Do something interesting with the sample string.
   } 
??? ?? ?? ??? ???? ???? ???? ?? ??? ????? XML ???? ????? ????sampleString???????? ?? ??? ??? ??? ??"Hello, ??????!"(?? ??? ??? ?? ???????)?
<sampleElement>"Hello, World!"</sampleElement>
???????????, ?? ??????? ?? XML ??? ?? ???? InfoPath ??????? ???? ??? ???? ?? ????? ???? ?? ??? ???? ??? ???? ???? ?????? ?? ???, ?? ???? ??? ???? ???? ?????????? ?? ??? ??:
[WebMethod]
   public string SendXMLElement( System.Xml.XmlElement theElement )
   {
      //Report how many children the submitted node had.
      return "Node with " + theElement.ChildNodes.Count + " children submitted.";
   }
?? ?????????? InfoPath ????? ??????????? ?? ??????? ?? ????? ?? ?????? XML ???? ?? ???? ?? ??? ????????theElement???????? ??????? ??? ??????? ?? ?????? ??????? ???? ?? ??????? ??? ???? ???? ???? ?? ??? ("Hello, ??????!"), XML ???? ?? ???? ??????? ??? ??? ????? ??????? ???????? ???? ????? XML ???? ???? ?????? ????? ?????? ????? ???? ??; InfoPath ??? ?????? ????? ????? ???? ???

??? ?? ??????? ?????? ??? ???? ???? ???? ?? ??? InfoPath ??????? ????? ???? ?? ?????? ?? ???? ?????? ???? ??? ?? ?????? ???, InfoPath ???? InfoPath ??????? ?? ??? ?????? ???, ????? ??? ??? ????? ????? ???????? ???? ?? ??? ???? ????-???? XML ??? ??? ??????? ??????? ?? ?? ????? XML ???? ?????? ????? ???? ????-???? XML ??? ?? ??? ???? ??, ?? ?? ??? ??? ??? ?? ????? ???? ??theElement????????? ????? ??? ????? ?? ????? ???? ???? ??, ?? ?? ?????? ???? ????? ??? ?? ?? ?? ???? ???? ???

????????

?? ?????? ?? Microsoft Office 2003 ?????? ??? 1 ??? ??? ???? ??? ?? ?????? ?? ?? ???? ?? ???, Microsoft Office 2003 ?? ??? ?????? ?????? ??? ??????? ?????

???????? ??????? ?? ???, Microsoft ???????? ??? ???? ????? ?? ??? ?????????? ???? ?????? ????? ????:
870924Office 2003 ?? ??? ?????? ?????? ??? ??????? ???? ?? ??? ????

????? ?????????

?? ?????? ?? ?? ???? ?? ???, ???? ????? ????? ?????? ?????????? ?? ????? ??????? ?? ????? ?? ???? ???:
  • ????? ???????? ???? ?? ??? ???? ???????? ???? ????? ?? ????? ?????
  • ?? ??? ????? SOAP ????? ????? ?? ?? ?? ?? ????? ?? ??? ???? ?? ??? ??? ??????

???????? ???? ????? ?? ????? ????

  1. ??????????? ??, ????? ???????????? ???? ?????.
  2. ??????????? ???? ?????????? ????? ???, ????? ??????????.
  3. ???? ????? ?????? ????? ????? ????????, ????? ??????? ????, ?? ??? ????? ????????.
  4. ?? ????? ????, ?? ???? ??? ???? ????? ??? ??? ???? ?? ????? ???? ????????.
  5. ??? ???? ???? ?? ????? ????, ?? ???? ??? ???? ????? ??? ?? ??? ????????.
  6. InfoPath ??? ???? ???? ???????? ?? ???? ?? ??? ???? ????? ??? ?? ?? ?????? ?? ???? ?? ??? ???? ?? ??? ????? ???? ??, ?? ?????????? ?? ???? ???? ???, ?? ???? ???????.
  7. ???? ???? ?? ??? ????? ????"??????? ????? ?? ?? ???????? ???? ????? ?? ??????"????? ?? ??? ????, ????? ??????????, ?? ??? ????? ?????????? ???? ?? ??????????? ???? ?????????? ??????
  8. ??????????? ??, ????? ??????????? ????? ????.
  9. ?????????? ????? ????????? ????? ???, ????? ????????? ????? ????.
  10. ???????? ????????? ????, ????????? ????????? ?? ????? ????? ????, ?? ??? ????? ???????Microsoft ????????? ?????? ?? ????? ?? ????
  11. ???XDocument::OnSubmitRequest????, ????????? ?? ????? ??????? ??????? ????? ???? ?? ??? ????? ????????? ???? ??????

    ????? ???-??? ??? ??? ???? ????? ?? ???? ????
    try{
          //Get a reference to the SendXMLElement secondary data source.
          var objSendXMLElement = XDocument.GetDOM("SendXMLElement");
          objSendXMLElement.setProperty( "SelectionNamespaces",
             'xmlns:s1="http://joelallxp.microsoft.com/schema" ' +
             'xmlns:s0="http://tempuri.org/" ' +
             'xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"' );
     
          //Remove any data from the SendXMLElement secondary data source.
          var objData = objSendXMLElement.selectSingleNode(
             "/dfs:myFields/dfs:queryFields/s0:SendXMLElement/s0:theElement");
          var objCurrentData = objData.selectNodes("@* | node()");
          objCurrentData.removeAll();
     
          //Clone the XDocument.
          var objClonedDocument = XDocument.DOM.documentElement.cloneNode(true );
          objData.appendChild( objClonedDocument );
       
          //Call the "Query" method of the secondary data source to send the data.
          XDocument.DataObjects("SendXMLElement").Query();
       
          //Report the results of the submit.
          XDocument.UI.Alert( 
             objSendXMLElement.selectSingleNode(
                "/dfs:myFields/dfs:dataFields/s0:SendXMLElementResponse/s0:SendXMLElementResult").text );
          eventObj.ReturnStatus = true;
       }
       catch(ex)
       {
          eventObj.ReturnStatus = false;
       }

??? ?????

  1. ??????????? ??, ????? ??????????? ????? ????.
  2. ?????????? ????? ????????? ????? ???, ????? ????????? ????? ????.
  3. ???????? ????????? ????, ????????? ????????? ?? ????? ????? ????, ?? ??? ????? ???????Microsoft ????????? ?????? ?? ????? ?? ????
  4. ???XDocument::OnSubmitRequest????, ????????? ?? ????? ??????? ??????? ????? ???? ?? ??? ????? ????????? ???? ??????

    ????? ???-??? ??? ??? ???? ????? ?? ???? ????
    try
       { 
          //Create a SOAP object.
          var objSOAPConnector = new ActiveXObject("MSOSOAP.HttpConnector30");
       
          //Set the EndPointURL property to point to the Web service.
          objSOAPConnector.Property("EndPointURL") = "http://server/WebService1/Submit.asmx";
     
          //Set the SoapAction property to point to the Web service method. You can find this URI 
          //in the WSDL file of the Web service.
          objSOAPConnector.Property("SoapAction") = "http://tempuri.org/SendXMLElement";
          objSOAPConnector.Connect();
          
          //Begin construction of a SOAP message to send to the Web service.
          objSOAPConnector.BeginMessage();
     
          var objSOAPSerializer = new ActiveXObject("MSOSoap.SoapSerializer30");
          objSOAPSerializer.Init( objSOAPConnector.InputStream );
          objSOAPSerializer.startEnvelope();
          objSOAPSerializer.startBody();
     
          //Construct the structure that marks the method name and the parameter name 
          //that you are sending.
          objSOAPSerializer.StartElement( "SendXMLElement", "http://tempuri.org/" );
          objSOAPSerializer.StartElement( "theNode", "http://tempuri.org/" );
     
          //Write out the XML of the document.
          objSOAPSerializer.WriteXml( XDocument.DOM.documentElement.xml );
     
          //Finish each element.
          objSOAPSerializer.EndElement();
          objSOAPSerializer.EndElement();
     
          //Call EndMessage to complete the SOAP message and send it to the Web service method.
          //This results in the Web service method being called.
          objSOAPSerializer.endBody();
          objSOAPSerializer.endEnvelope(); 
          objSOAPConnector.EndMessage();
     
          //Use a SoapReader to read the response from the Web service method .
          var ResponseReader = new ActiveXObject("MSOSOAP.SoapReader30");
          ResponseReader.Load( objSOAPConnector.OutputStream );
     
          //If there was no error, return true.
          if (ResponseReader.Fault != null)
          {
             eventObj.ReturnStatus = false;
             throw "Error submitting data: " + ResponseReader.Fault.xml;
          }
          eventObj.ReturnStatus = true;
       } 
       catch (ex)
       { 
          XDocument.UI.Alert("Failed to submit document: " + ex.description); 
       }

??????

?? ??????? ??????? ?? ?????? ???

Microsoft Office InfoPath 2003 ??? ??????? ???? ?? ??????? ??? Microsoft Office InfoPath 2003 ?????? ??? 1 ?????? ?? ??????? ??? ??? ???

???? ???????

??????? ?? ???: ??????? ???? ?? ??? ???

  1. ?????????? ?? ??????? ??? ???? ??? ???? ?????:
    • ???? 1
      [WebMethod]
         public void SendSampleString( string sampleString )
         {
            //Do something interesting with the sample string.
         } 
    • ???? 2
      [WebMethod]
         public string SendXMLElement( System.Xml.XmlElement theElement )
         {
            //Report how many children the submitted node had.
            return "Node with " + theElement.ChildNodes.Count + " children submitted.";
         }
  2. ?? ??? ?? ??? ??? InfoPath ??????? ??????? ???????? ????? ?? ???.
  3. ??????? ????? ????? ????????, ?? ??? ??????? ????, ?? ??? ????? ????????.
  4. ????? ??????????? ?? ???? ????? ????, ?? ??? ????? ????????.
  5. ?? ??????? ??????? ??????? ???? ????, ?? ????? ?? ???? ????:
    1. ??? ???? ???? ?? ??? ???? ???? ???? ????? ?? URL ???? ????, ?? ???? ???????.
    2. ??????? ???????? ?? ??? ????????? ????, ????SendXMLElement, ?? ??? ????? ????????.
  6. ?? ??????? ????? ??????? ???? ????, ?? ????? ?? ???? ????:
    1. ??? ???? ???? ?? ??? ???? ???? ???? ????? ?? URL ???? ????, ?? ???? ???????.
    2. ??????? ???????? ?? ??? ????????? ????, ????SendXMLElement, ?? ??? ????? ????????.
  7. ????? ??????????? ??????? ????? ???????? ???? ?? ??? ????? ?? ????
  8. ???dataFields????? ????, ????SendXMLElementResult, ????? ???????, ?? ??? ????? ????????.
  9. ?? ??? ???????? ???? ???? ????? ??????? ????, ?? ??? ????? ????????????? ???? ?? ??????? ????? ????? ????????????? ??????
  10. ??????SendXMLElementResult?? ?????? ?? ??? ????????
  11. ??????? ?? ??????????? ?????
  12. ???XML ??? ?????? ????????????? ??????Hello, ??????!
  13. ??????????? ??, ????? ????????? ????.

    ???? ????? ?????? ????? ??????? ???? ??:
    InfoPath ??????? ????? ???? ?? ?????
    ??????? ????? ???? ?? ??? ?? ?? ??? ?????? ??????? ????

    ????? ??????:
    SOAP ???????? ????? ???? ?? ?? ??? ?????? ??????? ???:
    ????? ?????? ????? ??? ????? ??? ????--> XML ????????? (1,409) ??? ??? ?????? ??? --> ????????? cast ????? ???? ???
  14. ??????????? ????? ?? ??? ????, ?? ?? ??????? ??????? ??? ??? ?????
?? ?????? ?? ?? ???? ?? ???, ???? ?? ??? ?? ???? ?? ?? ?? ???? ?? "??????" ??? ?? ????? ?????

???

???? ID: 826989 - ????? ???????: 22 ??????? 2011 - ??????: 5.0
???? ???? ???? ??:
  • Microsoft Office InfoPath 2003
??????: 
kbtshoot kbprb kbbug kbmt KB826989 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:826989

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com