5

How do you define the endpoint in PHP CURL?

 2 years ago
source link: https://www.codesd.com/item/how-do-you-define-the-endpoint-in-php-curl.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How do you define the endpoint in PHP CURL?

advertisements

When I send this request I receive this error: The endpoint reference (EPR) for the Operation not found is /services/OrderWebService?wsdl=&tenant=virtual and the WSA Action = null

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://app.onebillsoftware.com/services/OrderWebServicewsdl
=&tenant=virtual",

CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<soap:Envelopexmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\"  xmlns:ser=\"http://service.order.webservice.onebill.tarshan.com\"  xmlns:xsd=\"http://request.order.webservice.onebill.tarshan.com/xsd\">\r\n    <soap:Header/>\r\n   <soap:Body>\r\n      <ser:getOrder>\r\n         <!-- Optional:-->\r\n         <ser:getOrderRequest>\r\n            <!--Optional:-- >\r\n            <xsd:orderNumber>OR8126</xsd:orderNumber>\r\n          </ser:getOrderRequest>\r\n      </ser:getOrder>\r\n    </soap:Body>\r\n</soap:Envelope>",
 CURLOPT_HTTPHEADER => array(
 "authorization: Basic ZHNjb3R0QHZ0Z3VzLmNvbTpBa29vc3dhZzQxOQ==",
 "cache-control: no-cache",
 "postman-token: 2a90fa5f-a68c-39d2-dadb-bf39424a7535",
 "tenant: virtual"
 ),
 ));

$response = curl_exec($curl); $err = curl_error($curl);

curl_close($curl);

 if ($err) {
 echo "cURL Error #:" . $err;
} else {
echo $response;


http://php.net/manual/en/curl.examples-basic.php

$ch = curl_init("http://www.example.com/");

That was one google search.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK