Webservice hvordan??
Hej Har lavet et lille vb.NET program der henter priser fra sanistål's hjemmeside. Nu vil jeg gerne have porteret servicen til php.Jeg har efterhånden kodet meget i php, men har aldrig arbejdet med webservices.
Er der nogle der kan hjælpe mig igang?
her er to af de filer der laver arbejdet
1. SaniWebservice.wsdl
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:tns="https://www.sanistaal.dk/ws/ws" xmlns:STNS="https://www.sanistaal.dk/ws/wsSTNS" xmlns="www.sanistaal.dk/PrisBeholdning" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:p1="www.sanistaal.dk/PrisBeholdning" targetNamespace="https://www.sanistaal.dk/ws/ws" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="https://www.sanistaal.dk/ws/wsSTNS" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="SaniWebservice1.xsd" namespace="www.sanistaal.dk/PrisBeholdning" />
</xs:schema>
</wsdl:types>
<wsdl:message name="PrisOgBeholdningInput">
<wsdl:part name="body" element="p1:PrisRequest" />
</wsdl:message>
<wsdl:message name="PrisOgBeholdningOutput">
<wsdl:part name="body" element="p1:PrisResponse" />
</wsdl:message>
<wsdl:portType name="SaniWebservicePortType">
<wsdl:operation name="PrisOgBeholdning">
<wsdl:input message="tns:PrisOgBeholdningInput" />
<wsdl:output message="tns:PrisOgBeholdningOutput" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SaniWebserviceSoapBinding" type="tns:SaniWebservicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="PrisOgBeholdning">
<soap:operation soapAction="PrisOgBeholdning" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SaniWebservice">
<wsdl:port name="SaniWebservicePort" binding="tns:SaniWebserviceSoapBinding">
<soap:address location="https://ehandel.sanistaal.dk/ws/ws" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
2. SaniWebservice1.xsd
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="www.sanistaal.dk/PrisBeholdning" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="PrisRequest">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="Saninummer">
<xs:complexType>
<xs:attribute name="Nummer" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Bruger" type="xs:string" use="required" />
<xs:attribute name="Password" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="PrisResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Saninummer">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Beholdning" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="Nettopris" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="1" name="Fejl" type="xs:string" />
</xs:sequence>
<xs:attribute name="Nummer" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Fejl" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:schema>
Håber der er en der kan hjælpe mig igang
