|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-18 07:02 UTC] simonslaws at googlemail dot com
[2006-08-21 06:37 UTC] mfp@php.net
[2006-08-22 05:13 UTC] simonslaws at googlemail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 16:00:01 2025 UTC |
Description: ------------ Using latest SDO checked out from PECL and proper versions of the WSDL xsds, when I serialize the wsdl object I get WSDL with the same element twice I can supply a zip file with the client program and wsdls Reproduce code: --------------- $xmldas = SDO_DAS_XML::create('wsdl/wsdl-all.xsd'); $wsdl_doc = $xmldas->createDocument(); $wsdl = $wsdl_doc->getRootDataObject(); // this is the <definitions> element $class_name="Donkey"; $ops = array('Punch'=>'sausages'); /******************************************************************************** * Create the <portType> element ********************************************************************************/ $portType = $wsdl->createDataObject('portType'); $portType->name = "{$class_name}PortType"; foreach ($ops as $op_name => $params) { $portType_operation = $portType->createDataObject('operation'); $portType_operation->name = $op_name; $pt_input = $portType_operation->createDataObject('input'); $pt_input->message = "{$op_name}Request"; $pt_output = $portType_operation->createDataObject('output'); $pt_output->message = "{$op_name}Response"; } $str = $xmldas->saveString($wsdl_doc,2); echo $str; Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xsi:type="tDefinitions" xmlns:tns2="" xmlns:tns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <portType name="DonkeyPortType"> <operation name="Punch"> <input message="tns2:PunchRequest"/> <output message="tns2:PunchResponse"/> </operation> </portType> </definitions> Actual result: -------------- <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xsi:type="tDefinitions" xmlns:tns2="" xmlns:tns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <portType name="DonkeyPortType"> <operation name="Punch"> <input message="tns2:PunchRequest"/> <output message="tns2:PunchResponse"/> <output message="tns2:PunchResponse"/> <input message="tns2:PunchRequest"/> </operation> </portType> </definitions>