我正在编写一个小的 windows phone 7 应用程序。它应该使用网络服务。我在 xammp(本地)环境中成功测试了代码,但如果在免费的 webhoster 上,我收到错误“notFound”。我已经测试了一切,现在我需要帮助。
wsdl 文件
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tns="http://schwarzes-imperium.de/witzeAppWp"
targetNamespace="http://schwarzes-imperium.de/witzeAppWp">
<wsdl:types>
<xs:schema targetNamespace="http://schwarzes-imperium.de/witzeAppWp.wsdl" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="loginCheckRequest">
<wsdl:part name="name" type="xs:string"/>
<wsdl:part name="password" type="xs:string"/>
</wsdl:message>
<wsdl:message name="loginCheckResponse">
<wsdl:part name="Result" type="xs:string"/>
</wsdl:message>
<wsdl:message name="ausgabeRequest">
<wsdl:part name="text" type="xs:string"/>
</wsdl:message>
<wsdl:message name="ausgabeResponse">
<wsdl:part name="Result" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="witzeAppWpPortType">
<wsdl:operation name="loginCheck">
<wsdl:input message="tns:loginCheckRequest"/>
<wsdl:output message="tns:loginCheckResponse"/>
</wsdl:operation>
<wsdl:operation name="ausgabe">
<wsdl:input message="tns:ausgabeRequest"/>
<wsdl:output message="tns:ausgabeResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="witzeAppWpBinding" type="tns:witzeAppWpPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="loginCheck">
<soap:operation soapAction="urn:#loginCheck" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ausgabe">
<soap:operation soapAction="urn:#ausgabe" 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="witzeAppWpService">
<wsdl:port name="witzeAppWpPort" binding="tns:witzeAppWpBinding">
<soap:address location="http://schwarzes-imperium.de/witzeAppWp.php"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
php 文件
<?php
include 'sql.php';
function loginCheck($name, $password){
if ($password == "test")
{
return "JA";
}else
{
return "NEIN";
}
}
function ausgabe($id){
#$result = sqlQuery("SELECT * FROM witze_tb");
#return mysql_result($result, $id, 1);
return $id;
}
$server = new SoapServer("witzeAppWp.wsdl");
$server->addFunction("loginCheck");
$server->addFunction("ausgabe");
$server->handle();
?>
任何想法?谢谢