php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57181 Latest SDO generates WSDL with double elements
Submitted: 2006-08-17 13:12 UTC Modified: 2006-10-30 06:38 UTC
From: mfp@php.net Assigned: slaws (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.1.4 OS: WinXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mfp@php.net
New email:
PHP Version: OS:

 

 [2006-08-17 13:12 UTC] mfp@php.net
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>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-18 07:02 UTC] simonslaws at googlemail dot com
Have duplicated this using wsdl11 schema
 [2006-08-21 06:37 UTC] mfp@php.net
This is fixed in commonj/sdo/TypeImpl.cpp revision 1.8
 [2006-08-22 05:13 UTC] simonslaws at googlemail dot com
Actually fixed in Tuscany as http://issues.apache.org/jira/browse/TUSCANY-644
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC