Hallo,
ich erhalte immer folgende Fehlermeldung:
Zitat:
|
DTD are not supported by SOAP
|
dabei nutze ich meiner Meinung nach garkeine DTD...
Also ich habe eine ganz simple Server-Datei (b2trans.php):
Code:
<?php
class b2_transfer {
/**
* Hier werden die Daten
* @param string
* @return b2output_all
*/
public function b2_out($last) {
$b2output_all = new b2output_all();
$b2output_all->b2output = new b2output();
$b2output_all->b2output->bid =1;
$b2output_all->b2output->title ="test";
$b2output_all->b2output->title ="test";
$b2output_all->b2output->description ="test";
$b2output_all->b2output->rubricID =1;
$b2output_all->b2output->offer ="y";
$b2output_all->b2output->startdate ="test";
$b2output_all->b2output->last_change ="test";
$b2output_all->b2output->state ="test";
$b2output_all->id = 1;
$ret[] = $b2output_all;
//debugObject("contacten: ",$ret);
return $ret;
}
}
try {
$server = new SOAPServer('b2_transfer.wsdl');
$server->setClass('b2_transfer');
$server->handle();
}
catch (SOAPFault $f) {
print $f->faultstring;
}
?>
, eine Client-Datei (client.php):
Code:
<?php
try {
$client = new SOAPClient('http://localhost/soap/b2_transfer.wsdl');
$test = $client->b2_out("");
//print $test[]->$id;
// print $client->hallo();
}
catch (SOAPFault $f) {
print $f->faultstring;
}
?>
und natürlich meine WSDL-Datei (b2_transfer.wsdl):
Code:
<?xml version="1.0"?>
<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://localhost" targetNamespace="http://localhost">
<wsdl:types>
<xsd:schema targetNamespace="http://localhost">
<xsd:complexType name="b2output_all">
<xsd:all>
<xsd:element name="b2output" type="tns:b2output"/>
<xsd:element name="id" type="xsd:int"/></xsd:all>
</xsd:complexType><xsd:complexType name="b2output">
<xsd:all><xsd:element name="bid" type="xsd:int"/>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="last_change" type="xsd:string"/>
<xsd:element name="offer" type="xsd:string"/>
<xsd:element name="rubricID" type="xsd:int"/>
<xsd:element name="startdate" type="xsd:string"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="title" type="xsd:string"/>
</xsd:all></xsd:complexType></xsd:schema></wsdl:types><message name="b2_outRequest">
<part name="last" type="xsd:string"/>
</message>
<message name="b2_outResponse">
<part name="b2_outReturn" type="tns:b2output_all"/>
</message><wsdl:portType name="b2_transferPortType"><wsdl:operation name="b2_out">
<wsdl:input message="tns:b2_outRequest"/>
<wsdl:output message="tns:b2_outResponse"/>
</wsdl:operation></wsdl:portType><binding name="b2_transferBinding" type="tns:b2_transferPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="b2_out">
<soap:operation soapAction="http://localhost/webtor/service.php?class=b2_transfer&method=b2_out" style="rpc"/>
<wsdl:input>
<soap:body use="encoded" namespace="http://localhost" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:input>
<wsdl:output>
<soap:body use="encoded" namespace="http://localhost" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output></wsdl:operation>
</binding>
<wsdl:service name="b2_transfer">
<wsdl:port name="b2_transferPort" binding="tns:b2_transferBinding"><soap:address location="http://localhost/soap/b2trans.php"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Voran liegt das, dass ich die ganze Zeit diesen Fehler bekomme? Ich bin da echt ratlos...
Bin für jede Hilfe dankbar.
Gruß,
Michael