Note that there are some explanatory texts on larger screens.

plurals
  1. POComplex SOAP Request - Error: Bad Request
    primarykey
    data
    text
    <p>I will try to make a SOAP request. I found many topics, but all time I've get Bad Request.</p> <p>At first I make this:</p> <pre><code>$client = new SoapClient('h**p://....CategoryService.Soap.svc?singleWsdl', array('trace' =&gt; 1, 'exceptions' =&gt; 1, 'soap_version' =&gt; SOAP_1_2)); $functions = $client-&gt;__getFunctions(); $types = $client-&gt;__getTypes(); </code></pre> <p>The result: Functions:</p> <pre><code>[8] =&gt; GetMainCategoriesResponse GetMainCategories(GetMainCategories $parameters) </code></pre> <p>Types:</p> <pre><code>[22] =&gt; struct GetMainCategories { GetMainCategoriesParameter getMainCategoriesParameter; } [23] =&gt; struct GetMainCategoriesParameter { MainCategoryFilter MainCategoryFilter; boolean OnlyActive; } [24] =&gt; string MainCategoryFilter [25] =&gt; struct GetMainCategoriesResponse { GetMainCategoriesResult GetMainCategoriesResult; } [26] =&gt; struct GetMainCategoriesResult { ArrayOfMainCategoryResult MainCategories; } </code></pre> <p>Now I try this:</p> <pre><code>$client = new SoapClient('h**p://....CategoryService.Soap.svc?singleWsdl', array('trace' =&gt; 1, 'exceptions' =&gt; 1, 'soap_version' =&gt; SOAP_1_2)); $request = array('getMainCategoriesParameter' =&gt; array( 'MainCategoryFilter' =&gt; 'AllMainCategories', 'OnlyActive' =&gt; 'true' ), ); $response = $client-&gt;__soapCall("GetMainCategories", $request);&lt;/code&gt; </code></pre> <p>But after 20 seconds I received this error:</p> <pre><code>Fatal error: Uncaught SoapFault exception: [HTTP] Bad Request in ....php:15 Stack trace: #0 [internal function]: SoapClient-&gt;__doRequest('&lt;?xml version="...', 'h**ps://...', 'h**p://....', 2, 0) #1 ....php(15): SoapClient-&gt;__soapCall('GetMainCategories', Array) #2 {main} thrown in ... </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload