K
K
Koal Koalich2017-05-04 10:38:21
PHP
Koal Koalich, 2017-05-04 10:38:21

Why is there no first parameter in the soap request request?

ini_set('soap.wsdl_cache_enabled', 0);

// Создание клиента
$client = new SoapClient (
        'http://url/soap.xml',
   array(
        'trace'=> 1,
        'exceptions' => 0,
        'encoding' => 'UTF-8',
        'login' => 'lxlxlxlx',
        'password' => 'xxx',
        'cache_wsdl' => WSDL_CACHE_NONE,
  'soap_version' => SOAP_1_2,
       )
);

// Загружаем данные
$client->__soapCall("Load", 
array(
  "ProjectCode" 	        => null, //$GLOBALS["ProjectCode_SOAP"], 		
        "SiteCode" 		=> "000008",
        "ProposalType" 	=> null,
        "ClientName" 	        => "Name",
  "Email"      	        => "[email protected]",
...
...

But echo $client->__getLastRequest(); returns this (only the beginning is shown):
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://url/crm">
<env:Body>
<ns1:Load/>
<param1>000008</param1>
<param2/>
<param3>Name</param3>
<param4>[email protected]</param4>

First, is it normal that and not ?
Secondly, it doesn't matter if the ProjectCode is null or otherwise, it will never appear in the lastrequest. Why? What am I doing wrong? I suspect that's why I get the error "soap:Sender Unknown error. Insufficient operation parameters due to: Insufficient operation parameters".
The WSDL ProjectCode has:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs1="http://v8.1c.ru/8.1/data/core" xmlns:xs2="http://url/crm" targetNamespace="http://url/crm" elementFormDefault="qualified">
<xs:import namespace="http://v8.1c.ru/8.1/data/core"/>
<xs:element name="Load">
<xs:complexType>
<xs:sequence>
<xs:element name="ProjectCode" type="xs:string" nillable="true"/>
<xs:element name="SiteCode" type="xs:string"/>
<xs:element name="ProposalType" type="xs:string"/>
<xs:element name="ClientName" type="xs:string"/>
<xs:element name="Email" type="xs:string" nillable="true"/>
<xs:element name="Mobile" type="xs:string"/>
<xs:element name="Message" type="xs:string" nillable="true"/>
<xs:element name="AppCode" type="xs:string" nillable="true"/>
<xs:element name="SitePrice" type="xs:double" nillable="true"/>
<xs:element name="Urls" type="xs:string" nillable="true"/>
<xs:element name="Subscribe" type="xs:boolean" nillable="true"/>
<xs:element name="RSource" type="xs:string" nillable="true"/>
<xs:element name="ManagerID" type="xs:string" nillable="true"/>
<xs:element name="SessionID" type="xs:string" nillable="true"/>
<xs:element name="Agent" type="xs:string" nillable="true"/>
<xs:element name="Agent_email" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sasha, 2017-05-04
@tmman

work goes on WSDL (' url/soap.xml ') this module before making a request goes to wsdl to see if there is such a thing and if not, it cuts it off. From here I can make an assumption that your ProjectCode is not in wsdl and that is why you get an error of insufficient parameters.

A
Anton Anton, 2017-05-04
@Fragster

'features' => SOAP_USE_XSI_ARRAY_TYPE must be passed as constructor options

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question