CodeDredd/laravel-soap

Transfer-Encoding : Chunked Issue

erguntech opened this issue · 4 comments

Hi CodeDredd;

I can get data from most of them. Only one function is returning a pdf file as byte format. When i try to read the response, i only got a blank data. When i use The SoapUI, it returns me back the pdf file. But in PHP it's not working somehow.

For example, this code returns data without problem.

public function getSupplyCarryTypes(Request $request)
{
    $response = Soap::baseWsdl('https://servis.turkiye.gov.tr/services/g2g/kdgm/test/uetdsesya?wsdl')
        ->withBasicAuth('999999', '999999testtest')
        ->withOptions([
            'trace' => false,
            'encoding' => 'UTF-8',
            'cache_wsdl' => WSDL_CACHE_NONE,
        ])
        ->call('paramTehlikeliMaddeTasimaSekli',array(
            'wsuser' => array('kullaniciAdi' => '999999', 'sifre' => '999999testtest')));

    dd($response['return']['tehlikeliMaddeTasimaSekliListesi']);
}

But when i try this one, it returns null. It normally returns a PDF file as bytes. At least it's working well in SoapUI.After cheking the raw codes in SoapUI, i saw that the only difference is "Transfer Encoding : chunked".

public function getVoyageReport() // Not Working
{
    $response = Soap::baseWsdl('https://servis.turkiye.gov.tr/services/g2g/kdgm/test/uetdsesya?wsdl')
        ->withBasicAuth('999999', '999999testtest')
        ->withOptions([
            'trace' => false,
            'encoding' => 'UTF-8',
            'cache_wsdl' => WSDL_CACHE_NONE,
        ])
        ->call('seferRaporuV3', array(
            'wsuser' => array('kullaniciAdi' => '999999', 'sifre' => '999999testtest'),
            'seferId' => '21042300246027'));

    return $response->body();
}

Am i missing something? I would be really happy, if you take a look...
Thanks...

I solved the problem by using standart Php Soap Client.

@erguntech Hey. Sorry for answering so late. Last weeks i had a lot of work.
So the problem you describe is not really solved. I hope i come this week to tackle all the issues.

stale commented

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

stale commented

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Laravel Soap!