약간의 문제가 생겼습니다. 문제가 있는지는 확실하지 않지만 조언이 필요합니다.메서드 및 형식을 참조하는 C# webservice에 문제가 발생했습니다.
내가 VS2010에서 교류 #의 웹 서비스를 개발하고 난 서비스를 디버깅 할 때 내가 이제 실제 수업에서 내 코드에서 "VoucherResponse"를 찾고
The XML element 'VoucherResponse' from namespace 'http://test.org/' references a method and a type. Change the method's message name using WebMethodAttribute or change the type's root element using the XmlRootAttribute.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The XML element 'VoucherResponse' from namespace 'test.org' references a method and a type. Change the method's message name using WebMethodAttribute or change the type's root element using the XmlRootAttribute.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
브라우저에서이 오류가 난,이
public class VoucherResponse : AResponse
{
public Voucher Voucher { get; set; }
}
그리고 바우처 객체는 하나 오 지금이
public class Voucher
{
public string PIN { get; set; }
public string Serial { get; set; }
public string Batch { get; set; }
}
처럼 보인다 f 내 웹 메서드 VoucherResponse를 반환하고이 오류가 반영되고 점검 될 때이 오류가 발생한다고 가정합니다.
누구나 전에 이와 비슷한 문제가 있었습니까? 아니면 아무에게도 이것에 대해 조언 해 줄 수 있습니까?
감사
그게 도움이되지 않는 것 같아요, 당신이 제안한 것을 시도하고 같은 오류가 발생합니다 - 편집 : 오히려 그 대신 내 실제 웹 메서드를 VoucherResponse를 반환하고 그것을 사용 .. 감사합니다 –