php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48165 SoapClient and external import in WSDL make ns1, ns2, ns3 alias
Submitted: 2009-05-06 15:31 UTC Modified: 2009-05-06 15:42 UTC
Votes:17
Avg. Score:4.7 ± 0.7
Reproduced:16 of 16 (100.0%)
Same Version:7 (43.8%)
Same OS:11 (68.8%)
From: apaella at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: 5.2.9 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
48 - 38 = ?
Subscribe to this entry?

 
 [2009-05-06 15:31 UTC] apaella at gmail dot com
Description:
------------
1) When a wsdl import external xsd, bad ns1:"defaultnamespace",  Envelope namespace bindings iscreated. Is there a way to drop it off?

2) Impossible to add custom namespace bindings to the root element


See http://cert.webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_CancelLLSRQ.wsdl for a sample WSDL

Reproduce code:
---------------
<?php
$objClient = new SoapClient(
	"http://cert.webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_CancelLLSRQ.wsdl"
	,array('trace'       => 1
		,'exceptions'   => 0
		, 'encoding'    => 'utf-8'
	)
);
$objClient->__setLocation("https://cert.webservices.sabre.com/tsts");

$xml =
'<OTA_CancelRQ />';

$soapvar = new SoapVar($xml, XSD_ANYXML);
$objResponse = $objClient->__soapCall("OTA_CancelRQ", array($soapvar));
var_dump($objClient->__getLastRequest());


Expected result:
----------------
<SOAP-ENV:Envelope 
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
	xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" 
	xmlns:xlink="http://www.w3.org/1999/xlink" 
	xmlns:xsd="http://www.w3.org/1999/XMLSchema">

Actual result:
--------------
<SOAP-ENV:Envelope 
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"  
    xmlns:ns1="http://webservices.sabre.com/sabreXML/2003/07">

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Sep 16 07:01:26 2019 UTC