In webservice, the input of DateTime type parameters is incorrect.

Source: Internet
Author: User

In webservice, the input of DateTime type parameters is incorrect.

This step-by-step article describes how to format DateTime and Date values in the XML that is extracted from an ADO. NETDataSet object. in ADO. NET, the DateTime and Date values of DataTable columns are written in the XSD DateTime and Dateformats when the DataSet is saved as XML. the standard XSD DateTime and Date formats are CCYY-MM-DDThh: mm: ss, and CCYY-MM-DD, respectively, because the underlying XSD schema of the DataSet maps the DateTime and Date columns of the database to the DateTime and XSD Date data types.

As in the original official Microsoft text, T connections are used between dates and times, otherwise they cannot be identified.

Pay attention to this issue during Android and ios development.



Hello, the webservice I wrote in java, the parameter is String type, but our docking partner directly passes in the String, I receive null

No! Generally, this problem does not occur! Do you have any contact information, such as QQ or MSN?
 
In java, how does one call web service to input parameters and return xml?

Js Code

Function ajaxRequest ()
{
Var url = "http: // ********. asmx ";

// Set webService input parameters
//
// Note:
//
// Call the webservice written by. Net (for example, webservicedemo. asmx In the example)
// HelloTo (String name) must be written as <name> </name> wqj for the name parameter, and more parameters must be written in the same way, matching by name
// The number of input parameters cannot be equal to (more than or less than) the number of parameters required by the Method
//
// Call the webService released by java (xfire)
// The number of input parameters must be the same as the number of parameters used to call the method and must be matched in the order of input values
//

Var para = "<name> </name> wqj"; this should be a standard xml format. This should be taken into account when the source code is published. Please refer to the source code of the attachment.

Var op = {
Data: para,
OnComplete: showResponse,
OnFailure: showError,
Update: 'axaxback'
};

Var service = new WebService (url, "HelloTo", op );
Service. request ();
Return false;
}
Function showError (obj)
{
// Obj is an xmlHttpRequest object.
Alert ("error ");
}
Function showResponse (requestText, requestXML)
{
// The text returned by requestText
// XML returned by requestXML
Alert ("OK ");
}... Remaining full text>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.