0

soap-ui を使用すればデータを取得できますが、php soapclient を使用する必要があり、データを取得できません。

soap-ui の出力

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://webservice.bc/Interaction">
   <SOAP-ENV:Body>
      <ns1:QueryInteractionResponse>
         <productWarningArray>
            <ProductWarning>
               <Product>
                  <id>10008</id>
               </Product>
               <Color>
                  <id>4</id>
               </Color>
               <Value>Besinler, asetilsalisilik asitin emilimini yavaşlatır. Hızlı analjezi gerekliyse besinlerle birlikte verilmemelidir. Uzun süreli asetilsalisilik asit kullanımında, besinler, mide mukozasını korumaya yardımcı olur.</Value>
            </ProductWarning>
            <ProductWarning>
               <Product>
                  <id>10008</id>
               </Product>
               <Color>
                  <id>4</id>
               </Color>
               <Value>Besinler, psödoefedrinin emilimini yavaşlatır.</Value>
            </ProductWarning>
            <ProductWarning>
               <Product>
                  <id>2322</id>
               </Product>
               <Color>
                  <id>1</id>
               </Color>
               <Value>Besinler sildenafil absorbsiyonunu geciktirir.</Value>
            </ProductWarning>
         </productWarningArray>
      </ns1:QueryInteractionResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

ここに本当のものがあります...

<Value>Besinler, asetilsalisilik asitin emilimini yavaşlatır. Hızlı analjezi gerekliyse besinlerle birlikte verilmemelidir. Uzun süreli asetilsalisilik asit kullanımında, besinler, mide mukozasını korumaya yardımcı olur.</Value>

しかし、php soapclientを使用すると

$client = new SoapClient("http://webservice.bc/web.wsdl", array(
                        'exceptions'=>true,
                        'cache_wsdl'=>WSDL_CACHE_NONE,
                        'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
                        'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
                        'encoding'=>' utf-8'
                    //  'features' => SOAP_SINGLE_ELEMENT_ARRAYS

                ));
                $result = $client->QueryInteraction($requestData);
                echo "<pre>";
                print_r($result);

値が得られませんでした...

Array
(
    [productWarningArray] => stdClass Object
        (
            [ProductWarning] => Array
                (
                    [0] => stdClass Object
                        (
                            [Product] => stdClass Object
                                (
                                    [id] => 10008
                                )

                            [Color] => stdClass Object
                                (
                                    [id] => 4
                                )

                            [Value] => stdClass Object
                                (
                                )

                        )

                    [1] => stdClass Object
                        (
                            [Product] => stdClass Object
                                (
                                    [id] => 10008
                                )

                            [Color] => stdClass Object
                                (
                                    [id] => 4
                                )

                            [Value] => stdClass Object
                                (
                                )

                        )

                    [2] => stdClass Object
                        (
                            [Product] => stdClass Object
                                (
                                    [id] => 2322
                                )

                            [Color] => stdClass Object
                                (
                                    [id] => 1
                                )

                            [Value] => stdClass Object
                                (
                                )

                        )

                )

        )

)

そのヌル...

[Value] => stdClass Object
                            (
                            )

どうすれば問題を解決できますか?

ありがとうございました...

4

1 に答える 1