Announcement

Collapse
No announcement yet.

WSDL: PHP mag es, Microsoft nicht

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • WSDL: PHP mag es, Microsoft nicht

    Hallo zusammen,

    ich bin noch nicht 100%ig firm in Sachen SOAP/WSDL & Co, aber ich habe soweit eine WSDL-Datei zusammengeschustert bekommen, die auch mit PHP funktioniert:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
        xmlns:tns="http://10.100.1.248/RemoteFormService.wsdl"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        name="RemoteForm"
        targetNamespace="http://10.100.1.248/RemoteFormService.wsdl">
        <wsdl:types>
            <schema
                targetNamespace="http://10.100.1.248/RemoteFormService.wsdl"
                xmlns="http://www.w3.org/2001/XMLSchema"
                xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
                <complexType name="responseDoubleString">
                    <complexContent>
                        <restriction base="soapenc:Array">
                            <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]" />
                        </restriction>
                    </complexContent>
                </complexType>
            </schema>
        </wsdl:types>
        <message name="formularRequest">
            <part name="postvars" type="tns:responseDoubleString[]"/>
            <part name="language" type="xsd:string"/>
        </message>
        <message name="formularResponse">
            <part name="responseReturn" type="tns:responseDoubleString"/>
        </message>
        <portType name="RemoteFormPortType">
            <operation name="GetFormular">
                <input message="tns:formularRequest"/>
                <output message="tns:formularResponse"/>
            </operation>
        </portType>
        <binding name="RemoteFormBinding" type="tns:RemoteFormPortType">
            <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
            <operation name="GetFormular">
                <soap:operation soapAction="http://10.100.1.248/GetFormular" />
                <input>
                    <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
                </input>
                <output>
                    <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
                </output>
            </operation>
        </binding>
        <service name="RemoteFormService">
            <documentation>Some stuff</documentation>
            <port name="RemoteFormPort" binding="tns:RemoteFormBinding">
                <soap:address location="http://10.100.1.248/RemoteFormService.php"/>
            </port>
        </service>
    </definitions>
    Funktioniert wie gesagt soweit alles. Jetzt will ich den Dienst auch unter VB.NET ansprechen und benutze dafür wsdl.exe um eine Proxy-Klasse zu erstellen. Nur merkwürdigerweise meckert er rum:
    Code:
    C:\>"C:\Programme\Microsoft SDKs\Windows\v6.0A\bin\wsdl.exe" /language:vb /protocol:soap /namespace:RemoteForm /out:client.vb http://10.100.1.248/RemoteFormService-test.wsdl
    Microsoft (R)-WSDL-Tool (Web Services Description Language)
    [Microsoft (R) .NET Framework, Version 2.0.50727.1432]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Warnung: Dieser Webverweis entspricht WS-I Basic Profile, Version 1.1, nicht.
    R2706: Ein wsdl:binding-Element in einer Beschreibung MUSS den literal-Wert für das Verwendungsattribut in allen soapbind:body-, soapbind:fault-, soapbind:header- und soapbind:headerfault-Elementen verwenden.
      -  Das soapbind:body-Eingabeelement des GetFormular-Vorgangs in portType-Objekt 'RemoteFormBinding' von Namespace 'http://10.100.1.248/RemoteFormService.wsdl'.
      -  Das soapbind:body-Ausgabeelement des GetFormular-Vorgangs für das portType-Objekt 'RemoteFormBinding' von Namespace 'http://10.100.1.248/RemoteFormService.wsdl'.
    
    Weitere Informationen zu WS-I Basic Profile Version 1.1 finden Sie in der Spezifikation unter
    http://www.ws-i.org/Profiles/BasicProfile-1.1.html.
    
    Datei 'client.vb' wird geschrieben
    Sache ist: Ich übergebe an eine SOAP-Function die Variable $_POST (muss mir später verschiedene Sachen rauspicken, deswegen kann ich das nicht genauer festmachen). Es funktioniert, solange ich beim soap:body encoded nutze. Nehme ich wie wsdl.exe es mir vorschlägt, literal, wird das $_POST-Array nicht mehr übertragen.
    Jemand eine Idee, was ich falsch mache?

    prodigy7

  • #2
    Also ich hab mir jetzt mal die Demo von Altova XMLSpy installiert und mir die WSDL-Datei dort reingeladen. Dort bekomme ich gesagt, dass der Bezug auf responseDoubleString[] ungültig sei weil nicht definiert.
    Wenn ich aber [] wegnehme, geht es nicht mehr in PHP.

    Comment

    Working...
    X