Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / XML, XSL, XPath, XQuery [игнор отключен] [закрыт для гостей] / Неправильный WSDL. Проблема с minOccurs="0". HELP ME PLEASE / 4 сообщений из 4, страница 1 из 1
03.10.2006, 12:34
    #34028284
dima_dodger
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Неправильный WSDL. Проблема с minOccurs="0". HELP ME PLEASE
.net генерирует неправильный WSDL
Пишу WebService (.asmx)
Предположем дана структура:
public struct Authors{
public int AuthorKey;
public string AuthorFName;
public string AuthorLName;
};
генерируется WSDL:
<s:complexType name="Authors">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="AuthorKey" type="s:int" />
<s:element minOccurs=" 0 " maxOccurs="1" name="AuthorFName" type="s: string " />
<s:element minOccurs=" 0 " maxOccurs="1" name="AuthorLName" type="s: string " />
</s:sequence>
</s:complexType>

должно быть:
<s:complexType name="Authors">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="AuthorKey" type="s:int" />
<s:element minOccurs=" 1 " maxOccurs="1" name="AuthorFName" type="s: string " />
<s:element minOccurs=" 1 " maxOccurs="1" name="AuthorLName" type="s: string " />
</s:sequence>
</s:complexType>

неправильно генерирует только для типа string
перепробывал все атрибуты... ничего хорошего не нашел

КАК ЭТО ИСПРАВИТЬ???
...
Рейтинг: 0 / 0
03.10.2006, 12:56
    #34028403
maXmo
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Неправильный WSDL. Проблема с minOccurs="0". HELP ME PLEASE
если так?
Код: plaintext
1.
2.
3.
4.
5.
public struct Authors{
	public int AuthorKey;
	[XmlElement(IsNullable = false)]
	public string AuthorFName;
	public string AuthorLName;
};
...
Рейтинг: 0 / 0
03.10.2006, 12:59
    #34028424
dima_dodger
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Неправильный WSDL. Проблема с minOccurs="0". HELP ME PLEASE
maXmoесли так?
Код: plaintext
1.
2.
3.
4.
5.
public struct Authors{
	public int AuthorKey;
	[XmlElement(IsNullable = false)]
	public string AuthorFName;
	public string AuthorLName;
};


[XmlElement(IsNullable = true )]

решение: http://www.sql.ru/forum/actualthread.aspx?tid=345422
...
Рейтинг: 0 / 0
25.07.2007, 16:44
    #34683639
Elizabeth Talor
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Неправильный WSDL. Проблема с minOccurs="0". HELP ME PLEASE
cbqqnb A number of universities have awarded her honorary degrees, and she earned a prestigious job on the staff of Detroit congressman John Conyers. In 1988 Roxanne Brown noted: "Thirty-two years after she attracted international attention for sparking the Montgomery Bus Boycott, Mrs. Parks's ardent devotion to human rights still burns brightly, like a well-tended torch that ignites her spirit and calls her to service whenever she is needed."
...
Рейтинг: 0 / 0
Форумы / XML, XSL, XPath, XQuery [игнор отключен] [закрыт для гостей] / Неправильный WSDL. Проблема с minOccurs="0". HELP ME PLEASE / 4 сообщений из 4, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]