형식이 잘못했다 (C 번호 /의 WinForm 응용 프로그램에서 호출) :입력 문자열이 나는 동일한 인터페이스를 두 개의 웹 서비스 기능을
string[] f1(int, string[])
및 string[] f2(int, string[])
난을 보내고있다하기 똑같은 데이터. f1을 호출하면 올바르게 작동하고 문자열 []을 반환하지만 f2를 호출하면 "입력 문자열이 올바른 형식이 아닙니다"라는 SOAPException이 발생합니다.
하나가 작동하고 다른 하나가 작동하지 않을 수있는 원인은 무엇입니까?
private void backgroundWorkerUploadNew_DoWork(object sender, DoWorkEventArgs e)
{
List<String> submittedList = new List<String>();
StreamReader reader = new StreamReader(this.textBoxFilename.Text);
String data;
while ((data = reader.ReadLine()) != null)
{
submittedList.Add(data);
}
reader.Close();
// Send array of handset names to service
int channelId = 0;
string[] listToSubmit = submittedList.ToArray();
channelId = AppStatus.CurrentChannel.ChannelID;
String[] newHandsetsList = service.Function2(channelId, listToSubmit);
...
}
public List<String> Function2(int integer, List<String> strings)
{
List<String> newList = new List<string>();
DataTable tempDt = null;
foreach (String s in strings)
{
String q = @"** SOME QUERY **";
tempDt = Database.RunSql(q);
...
}
return newList;
}
문자열에 날짜가 들어 있습니까? –
데니스, 코드 스 니펫을 게시 할 수 있습니까? –
또한 전송할 데이터를 추가하십시오. 두 서비스가 동일한 시스템에서 실행되고 있습니까? – Flawless