Benim WSDL edilir: Ben SOAP_ACTION, METHOD_NAME, NAMESPACE ve URL için koymak gerektiğiniAndroid uygulaması benim wcf web servisine erişim için ad alanı, sabun eylemi ve url ne olmalıdır? gibi
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="ABCWcfService" targetNamespace="http://www.ABC.com/ABCWcfService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://www.ABC.com/ABCWcfService" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<wsdl:types>
<xsd:schema targetNamespace="http://www.ABC.com/ABCWcfService/Imports">
<xsd:import schemaLocation="http://desktop/ABCWcfService/ABCWcfService.svc?xsd=xsd0" namespace="http://www.ABC.com/ABCWcfService"/>
<xsd:import schemaLocation="http://desktop/ABCWcfService/ABCWcfService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="IABCWcfService_GetWhatsOnData_InputMessage">
<wsdl:part name="parameters" element="tns:GetWhatsOnData"/>
</wsdl:message>
<wsdl:message name="IABCWcfService_GetWhatsOnData_OutputMessage">
<wsdl:part name="parameters" element="tns:GetWhatsOnDataResponse"/>
</wsdl:message>
<wsdl:portType name="IABCWcfService">
<wsdl:operation name="GetWhatsOnData">
<wsdl:input wsaw:Action="http://www.ABC.com/ABCWcfService/IABCWcfService/GetWhatsOnData" message="tns:IABCWcfService_GetWhatsOnData_InputMessage"/>
<wsdl:output wsaw:Action="http://www.ABC.com/ABCWcfService/IABCWcfService/GetWhatsOnDataResponse" message="tns:IABCWcfService_GetWhatsOnData_OutputMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IABCWcfService" type="tns:IABCWcfService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetWhatsOnData">
<soap:operation soapAction="http://www.ABC.com/ABCWcfService/IABCWcfService/GetWhatsOnData" 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="ABCWcfService">
<wsdl:port name="BasicHttpBinding_IABCWcfService" binding="tns:BasicHttpBinding_IABCWcfService">
<soap:address location="http://desktop/ABCWcfService/ABCWcfService.svc"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
merak ediyorum?
SOAP_ACTION = "http://www.ABC.com/ABCWcfService/IABCWcfService/GetWhatsOnData"
METHOD_NAME = "GetWhatsOnData"
NAMESPACE = "http://www.ABC.com/ABCWcfService"
URL = "http://desktop/ABCWcfService/ABCWcfService.svc"
Ama benim kodunda çalışmıyor görünüyor: sanırım
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject result = (SoapObject) envelope.getResponse();
Satır androidHttpTransport.call (SOAP_ACTION, zarf) de istisna gider; istisna nesnesi e değeri null.
ben Manifest dosyasında
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
eklemek zorunda
kimse neyin yanlış olduğunu söyleyebilir misiniz?
Çok teşekkür ederim.
Hem wcf web hizmeti hem de referans için ksoap2 erişim istemcisi ile iyi bir öğretici veya kod örneği var mı? –
Bu sorunun çözümü var mı? –
İlk Ad alanına a/sonrası ekleyin ve –