| | | | |
| |||||||
| PHP-Fortgeschrittene Arbeiten mit PHP ohne Einschränkungen |
|
| | LinkBack | Themen-Optionen | Thema bewerten |
| | |
| Neuer Benutzer Registriert seit: 14.02.2007
Beiträge: 1
![]() | Hallo, ich habe mir einen kleinen einfachen PHP SOAP Server geschrieben dem ich einen einen beliebigen Wert als Funktionsargument übergebe und einen complexType als Rückgabewert erwarte. Das Ganze funktioniert auch soweit als dass mir getLastResponse() in der Ausgabe anzeigt, dass die Werte in der SOAP Response zu finden sind. Wie kann ich nun auf die einzelnen Elemente des zurückgegebenen SoapVar Objekts zugreifen? $o2->MyProperty2 liefert kein Ergebnis zurück. Was muss ich tun um auf die Rückgabewerte zugreifen zu können? Anbei noch mein Source WSDL: Code: <?xml version ='1.0' encoding ='UTF-8' ?> <definitions name='StockQuote' targetNamespace='http://example.org/StockQuote' xmlns:tns=' http://example.org/StockQuote ' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' xmlns='http://schemas.xmlsoap.org/wsdl/'> <types> <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:ExampleAPI"> <complexType name="MyWSDLStructure"> <sequence> <element name="MyProperty1" type="xsd:integer"/> <element name="MyProperty2" type="xsd:string"/> </sequence> </complexType> </xsd:schema> </types> <message name='getQuoteRequest'> <part name='symbol' type='xsd:string'/> </message> <message name='getQuoteResponse'> <part name='Result' type='tns:MyWSDLStructure'/> </message> <portType name='StockQuotePortType'> <operation name='getQuote'> <input message='tns:getQuoteRequest'/> <output message='tns:getQuoteResponse'/> </operation> </portType> <binding name='StockQuoteBinding' type='tns:StockQuotePortType'> <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/> <operation name='getQuote'> <soap:operation soapAction='urn:xmethods-delayed-quotes#getQuote'/> <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='StockQuoteService'> <port name='StockQuotePort' binding='StockQuoteBinding'> <soap:address location='http://www.elbe-net.de/test/server2.php'/> </port> </service> </definitions> PHP-Code: PHP-Code: |
| | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Moderator und Wett-König | Hallo kuschky, ich bin auf dem SOAP-Gebiet nicht fit, aber ich würde auf Client-Seite erwarten, dass ich mir das aktuelle Response-Objekt holen muss und dort per $oResponse->MyProperty1 auf die Inhalte des Objekts zugreifen kann. Korrigiere mich, wenn ich irre...
__________________ Viele Grüße, Dr.E. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Think about software design before you start to write code! 2. Discuss and review it together with experts! 3. Choose good tools (-> Adventure PHP Framework (APF))! 4. Write clean and reusable software only! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| | |
| | ||
| Moderator und Wett-König | Zitat:
__________________ Viele Grüße, Dr.E. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. Think about software design before you start to write code! 2. Discuss and review it together with experts! 3. Choose good tools (-> Adventure PHP Framework (APF))! 4. Write clean and reusable software only! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| | |
|
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Zugriff auf verschachteltes Objekt aus Funktion | FloMX | PHP-Fortgeschrittene | 10 | 28.03.2006 17:01 |
| [Erledigt] PHP5 OOP Zugriff aus einem Objekt auf ein externes Objekt | PHP Tipps 2006 | 5 | 28.01.2006 16:05 | |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.