رفتن به مطلب
  • 0

اتصال به وب سرویس Service1.svc


azad222

سوال

سلام

من یک وب سرویس با استفاده از asp.net نوشتم که یک متد بنام gethogh داره که یک عدد رو میگیره و بعد خروجی یک رشته متنی به کاربر میده.

آدرس وب سرویسی که به من داده بصورت زیر هست.

http://namesiteman.ir/Service1.svc?wsdl
 

من به راحتی با استفاده از کد سی شارپ زیر به اون وصل میشم.

serviceman.Service1 newservice = new serviceman.Service1();
Interaction.MsgBox(newservice.gethogh(30));
 

از کد  بیسیک فور اندروید زیر هم استفاده می کنم ولی جوابی نگرفتم.

Sub Button1_Click
	SendParam.Download2("http://namesiteman.ir/Service1.svc?wsdl",Array As String("gethogh","30"))
	Log("Send")
		
End Sub

Sub JobDone(job As HttpJob)
	Log("jobdone")
	ProgressDialogHide
	If job.Success Then
		Log("success!")
		If job.JobName = "Translate" Then
			Msgbox(job.GetString , "khoroji")
		End If
		Else
			Msgbox(job.ErrorMessage,"")
	End If

فایل ایکس ام ال سرویس من هم بصورت زیر هست.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" name="Service1" targetNamespace="http://tempuri.org/">
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import schemaLocation="http://namesiteman.ir/Service1.svc?xsd=xsd0" namespace="http://tempuri.org/"/>
<xsd:import schemaLocation="http://namesiteman.ir/Service1.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
<xsd:import schemaLocation="http://namesiteman.ir/Service1.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/WcfService1"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="IService1_GetData_InputMessage">
<wsdl:part name="parameters" element="tns:GetData"/>
</wsdl:message>
<wsdl:message name="IService1_GetData_OutputMessage">
<wsdl:part name="parameters" element="tns:GetDataResponse"/>
</wsdl:message>
<wsdl:message name="IService1_gethogh_InputMessage">
<wsdl:part name="parameters" element="tns:gethogh"/>
</wsdl:message>
<wsdl:message name="IService1_gethogh_OutputMessage">
<wsdl:part name="parameters" element="tns:gethoghResponse"/>
</wsdl:message>
<wsdl:message name="IService1_GetDataUsingDataContract_InputMessage">
<wsdl:part name="parameters" element="tns:GetDataUsingDataContract"/>
</wsdl:message>
<wsdl:message name="IService1_GetDataUsingDataContract_OutputMessage">
<wsdl:part name="parameters" element="tns:GetDataUsingDataContractResponse"/>
</wsdl:message>
<wsdl:portType name="IService1">
<wsdl:operation name="GetData">
<wsdl:input wsaw:Action="http://tempuri.org/IService1/GetData" message="tns:IService1_GetData_InputMessage"/>
<wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataResponse" message="tns:IService1_GetData_OutputMessage"/>
</wsdl:operation>
<wsdl:operation name="gethogh">
<wsdl:input wsaw:Action="http://tempuri.org/IService1/gethogh" message="tns:IService1_gethogh_InputMessage"/>
<wsdl:output wsaw:Action="http://tempuri.org/IService1/gethoghResponse" message="tns:IService1_gethogh_OutputMessage"/>
</wsdl:operation>
<wsdl:operation name="GetDataUsingDataContract">
<wsdl:input wsaw:Action="http://tempuri.org/IService1/GetDataUsingDataContract" message="tns:IService1_GetDataUsingDataContract_InputMessage"/>
<wsdl:output wsaw:Action="http://tempuri.org/IService1/GetDataUsingDataContractResponse" message="tns:IService1_GetDataUsingDataContract_OutputMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IService1" type="tns:IService1">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetData">
<soap:operation soapAction="http://tempuri.org/IService1/GetData" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="gethogh">
<soap:operation soapAction="http://tempuri.org/IService1/gethogh" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetDataUsingDataContract">
<soap:operation soapAction="http://tempuri.org/IService1/GetDataUsingDataContract" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service1">
<wsdl:port name="BasicHttpBinding_IService1" binding="tns:BasicHttpBinding_IService1">
<soap:address location="http://namesiteman.ir/Service1.svc"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

لطفا راهنمایی کنید.

لینک ارسال
به اشتراک گذاری در سایت های دیگر

1 پاسخ به این سوال تاکنون داده شده است

ارسال‌های توصیه شده

بایگانی شده

این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.

  • کاربران آنلاین در این صفحه   0 کاربر

    • هیچ کاربر عضوی،در حال مشاهده این صفحه نیست.
×
×
  • اضافه کردن...