|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76142 Error generating request when /definitions/types/schema.targetNamespace not set
Submitted: 2018-03-23 11:24 UTC Modified: 2018-03-23 14:27 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: VadimZelenin at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: 5.6.34 OS: linux
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:
Bug Type:
From: VadimZelenin at gmail dot com
New email:
PHP Version: OS:


 [2018-03-23 11:24 UTC] VadimZelenin at gmail dot com
I need interoperate with service for which /definitions/types/schema.targetNamespace is not set.

SoapUI 5.3.0 can form request template to such service -

<soapenv:Envelope xmlns:soapenv="">
</soapenv:Envelope> too -
<s11:Envelope xmlns:s11=''>
    <ns1:AddLocation xmlns:ns1=''>
<!-- optional -->
      <ns1:prefix />

But SoapClient from php (5.6.33) can not. 

Please advise workaround.

Test script:

class CustomSoapClient extends SoapClient
    public function __doRequest($aRequest, $aLocation, $aAction, $aVersion, $aOneWay=0)
        print_r( $aRequest );

$WSDL='<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="" xmlns:s="" xmlns:soap="" xmlns:tns="urn:AddLocationService" targetNamespace="urn:AddLocationService">
        <s:schema elementFormDefault="qualified">
            <s:complexType name="AddLocationRequest">
                    <s:element name="id" type="s:string"/>
                    <s:element name="placeId" type="s:string"/>
                    <s:element minOccurs="0" name="prefix"/>
            <s:element name="AddLocation" type="AddLocationRequest"/>
    <wsdl:message name="AddLocationSoapIn">
        <wsdl:part name="parameters" element="AddLocation"/>
    <wsdl:message name="AddLocationSoapOut"/>
    <wsdl:portType name="ERLocationScheduleServiceSoap">
        <wsdl:operation name="AddLocation">
            <wsdl:input message="tns:AddLocationSoapIn"/>
            <wsdl:output message="tns:AddLocationSoapOut"/>
    <wsdl:binding name="ERLocationScheduleServiceSoap" type="tns:ERLocationScheduleServiceSoap">
        <soap:binding style="document" transport=""/>
        <wsdl:operation name="AddLocation">
            <soap:operation soapAction="" style="document"/>
                <soap:body use="literal"/>
                <soap:body use="literal"/>
    <wsdl:service name="ERLocationScheduleService">
        <wsdl:port name="ERLocationScheduleServiceSoap" binding="tns:ERLocationScheduleServiceSoap">
            <soap:address location="http://private.serv/bogus.cls"/>

ini_set('soap.wsdl_cache_enabled', 0);

$client = new CustomSoapClient('data:application/wsdl+xml;base64,' . base64_encode($WSDL));

$request = array( 'id'=>'1',
                  'placeId' => '123',
                  'prefix'  => 'xyz',



Expected result:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="">

Actual result:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="">


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-03-23 14:27 UTC] VadimZelenin at gmail dot com
oops, Expected result must be:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="">
 [2023-06-12 07:05 UTC] fitnessguideas at gmail dot com
fitness Guide exert are sharing latest news about health, fitness, diet, food, treatment, weight loss, asthma etc. More info to visit: (
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 25 09:01:28 2024 UTC