PDA

View Full Version : خطا در xml به خاطر وجود کلمه array



pooria_googooli
جمعه 30 دی 1390, 13:01 عصر
سلام دوستان . من برای ارسال اس ام اس میخواهم از یک وب سرویس استفاده کنم . وب سرویس هم که به زبان xml نوشته میشه . این وب سرویس مشکلی که داره این هست که در یک قسمت یک چیزی از نوع array تعریف میکنه که برای .net ناشناختست . من کد xml را در زیر میذارم در خط های 6 و 19 کلمه array استفاده شده . لطف کنید بگید چه چیزی را به جاش بنویسم یا چه تغییری بدم تا مشکل حل شه .
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:typens="urn:SMSServer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="SMSServer" targetNamespace="urn:SMSServer" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types />
<wsdl:message name="GetCredit" />
<wsdl:message name="GetCreditResponse">
<wsdl:part name="GetCreditReturn" type="soapenc:Array">
<documentation>An array containing 'state', 'message', 'errnum', 'credit' keys</documentation>
</wsdl:part>
</wsdl:message>
<wsdl:message name="enqueue">
<wsdl:part name="from" type="xsd:string" />
<wsdl:part name="rcpt_array" type="xsd:anyType" />
<wsdl:part name="msg" type="xsd:anyType" />
<wsdl:part name="type" type="xsd:string">
<documentation>Can be 'normal', 'wap', 'flash' for different message types</documentation>
</wsdl:part>
</wsdl:message>
<wsdl:message name="enqueueResponse">
<wsdl:part name="enqueueReturn" type="soapenc:Array">
<documentation>An array containing 'state', 'message', 'errnum', 'cost', 'batchid' keys</documentation>
</wsdl:part>
</wsdl:message>
<wsdl:portType name="gwiPortType">
<wsdl:operation name="GetCredit">
<documentation>Get user remained credit</documentation>
<wsdl:input message="typens:GetCredit" />
<wsdl:output message="typens:GetCreditResponse" />
</wsdl:operation>
<wsdl:operation name="enqueue">
<documentation>Add a message in queue, message encoding will be determined automatically </documentation>
<wsdl:input message="typens:enqueue" />
<wsdl:output message="typens:enqueueResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="gwiBinding" type="typens:gwiPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
<wsdl:operation name="GetCredit">
<soap:operation soapAction="urn:gwiAction" />
<wsdl:input>
<soap:body use="encoded" namespace="urn:SMSServer" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output>
<soap:body use="encoded" namespace="urn:SMSServer" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="enqueue">
<soap:operation soapAction="urn:gwiAction" />
<wsdl:input>
<soap:body use="encoded" namespace="urn:SMSServer" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output>
<soap:body use="encoded" namespace="urn:SMSServer" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SMSServerService">
<wsdl:port name="gwiPort" binding="typens:gwiBinding">
<soap:address location="http://www.smsmelli.com/class/sms/webservice/server.php" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

pooria_googooli
جمعه 30 دی 1390, 15:26 عصر
من به جای array نوشتم string . دیگه ارور نداد یک کلاس ازش ساختم وقتی استفاده میکنم از اون کلاس ارور زیر را میده :
There is an error in XML document (2, 780).