Hello, I'm here because I need help creating a query for the qpricer web service from Qwest.
First I just need to get a hardcoded version of it working.
Here's the xml I need to build.
<?xml version="1.0" encoding="utf-16"?>
<Circuits xmlns:scm="http://www.qpricer.com/Schema/Pricing" xmlns:srv="http://www.qpricer.com/Services/Pricing">
<srv:Circuit product="Dedicated Voice" term="1-Year" bandwidth="DS-3">
<scm:Loop npanxx="212255">
<scm:Address street="111 8 AV FLR 1 " city="MANHATTAN" state="NY" postal-code="10011" />
</scm:Loop>
</srv:Circuit>
</Circuits>
|
That's the body of the soap message anyway.
Here's what I have
(Price is the function)
$sample_circuit = array(
'product' => 'Dedicated Voice',
'term' => '1-Year',
'bandwidth' => 'DS-3',
);
$sample_loop = array(
'npanxx' => '212255'
);
$sample_address = array(
'street' => '111 8 AV FLR 1',
'city' => 'MANHATTAN',
'state' => 'NY',
'postal-code' => '10011'
);
$circuit = array('Circuit', $sample_circuit);
$loop = array('Loop',$sample_loop);
$address = array('ValidatedAddress', $sample_address);
$request = array('Circuits', $circuit, $loop, $address);
$result = $client->Price($request);
print_r($client->__getLastRequest());
print_r($result);
|
Or I also have
$result = $client->Price('Circuits',
array(
'Circuit' => array(
'product' => 'Dedicated Voice',
'term' => '1-Year',
'bandwidth' => 'DS-3'
),
'Loop' => array(
'npanxx' => '212255'
),
'Address' => array(
'street' => '111 8 AV FLR 1',
'city' => 'MANHATTAN',
'state' => 'NY',
'postal-code' => '10011')
));
// Display the result
print_r($client->__getLastRequest());
print_r($result);
|
Neither seem to work as they both give me this error.
"Fatal error: Uncaught SoapFault exception: [soap:Client] QPricer.API.Common.Model.ApiException: No circuits detected in pricing request. Check your XML namespaces, perhaps? at QPricer.API.QPricer.Price(Circuits circuits) in C:\wamp\www\soap.php:38 Stack trace: #0 C:\wamp\www\soap.php(38): SoapClient->__call('price', Array) #1 {main} thrown in C:\wamp\www\soap.php on line 38"
Line 38 is the $result = $client->Price line.
Is there any way I can view what I'm sending to the WSDL even if there is a fatal error?
Any help would be greatly appreciated!
(P.S. I'm sorry if I broke any forum rules, I kind of need to get this done quickly and, as you can probably tell, I've never really used soap or nusoap before...)