Добрый день. Делаю веб-клиент для Джабер-сервера. Вроде как все нормально, подключаюсь, получаю список контактов и т.д. Но не получается зарегистрировать нового пользователя нашел xlm-запрос, отсправляю на сервер: | Код | $xml = '<?xml version="1.0"?>'; $xml.='<xs:schema targetNamespace="jabber:iq:register" elementFormDefault="qualified"> <xs:import namespace="jabber:x:data" schemaLocation="http://xmpp.org/schemas/x-data.xsd"/> <xs:import namespace="jabber:x:oob" schemaLocation="http://xmpp.org/schemas/x-oob.xsd"/>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in XEP-0077: http://www.xmpp.org/extensions/xep-0077.html </xs:documentation> </xs:annotation>
<xs:element name="query">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0">
<xs:sequence minOccurs="0"> <xs:element name="registered" type="empty" minOccurs="0"/> <xs:element name="instructions" type="add" minOccurs="0"/> <xs:element name="username" type="chiffa" minOccurs="0"/> <xs:element name="nick" type="chiffa" minOccurs="0"/> <xs:element name="password" type="123" minOccurs="0"/> <xs:element name="name" type="ТЕСТ" minOccurs="0"/> <xs:element name="first" type="ТЕСТ1" minOccurs="0"/> <xs:element name="last" type="ТЕСТ2" minOccurs="0"/> <xs:element name="email" type="[email protected]" minOccurs="0"/> <xs:element name="address" type="my_addres" minOccurs="0"/> <xs:element name="city" type="NY" minOccurs="0"/> <xs:element name="state" type="ALabama" minOccurs="0"/> <xs:element name="zip" type="05569" minOccurs="0"/> <xs:element name="phone" type="0589652369" minOccurs="0"/> <xs:element name="url" type="http://www.google.com" minOccurs="0"/> <xs:element name="date" type="'.time().'" minOccurs="0"/> <xs:element name="misc" type="" minOccurs="0"/> <xs:element name="text" type="my text hear" minOccurs="0"/> <xs:element name="key" type="123456789" minOccurs="0"/> </xs:sequence> <xs:element name="remove" type="empty" minOccurs="0"/> </xs:choice> <xs:element ref="xdata:x" minOccurs="0"/> <xs:element ref="xoob:x" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element>
<xs:simpleType name="empty">
<xs:restriction base="xs:string"> <xs:enumeration value=""/> </xs:restriction> </xs:simpleType> </xs:schema>';
|
Сервер почему то возвращает пустоту и новый пользователь не создается. Как я понимаю ошибка в запросе, может кто подскажет что не так? И может есть где то примеры xml общения с джабер-сервером? Заранее всем спасибо за ответ
|