NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Web Service help - [SOLVED]


Joined: 28 Jul 2010
Posts: 4
Reply with quote
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.

Code:

<?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)
Code:

$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
Code:

$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...)


Last edited by Xavias on Mon Aug 09, 2010 3:54 pm; edited 1 time in total
View user's profileFind all posts by XaviasSend private message


Joined: 28 Jul 2010
Posts: 4
Reply with quote
Ok, so after working with the people I know the xml I need to send... I just need help building it correctly. Can anyone help me build this? (should be fairly simple)

I just need it to say this:
Code:

   <soapenv:Body>
  <Circuits xmlns="http://www.qpricer.com/Services/Pricing">
   <Circuit bandwidth="DS-3" port-billing-type="Flat" product="Dedicated Voice" term="1-Year">
    <ns1:Loop npanxx="212255" xmlns:ns1="http://www.qpricer.com/Schema/Pricing">
     <ns1:Address city="MANHATTAN" postal-code="10011" state="NY" street="111 8 AV FLR 1"/>
    </ns1:Loop>
   </Circuit>
  </Circuits>
 </soapenv:Body>


Again, any help would be so unimaginably appreciated... Smile

Thanks again.
View user's profileFind all posts by XaviasSend private message


Joined: 28 Jul 2010
Posts: 4
Reply with quote
Ok, so the body is fine.

All I need to do is go from this

Code:
<ns1:Identity><item><key>token</key><value>123456789</value></item></ns1:Identity>

to this
Code:
<ns1:Identity token="123456789"></ns1:Identity>

Any Ideas?
View user's profileFind all posts by XaviasSend private message


Joined: 28 Jul 2010
Posts: 4
Reply with quote
Solved.
View user's profileFind all posts by XaviasSend private message


Joined: 03 Mar 2011
Posts: 1
Location: los angeles
Reply with quote
Well, that is good for you if you solve the problem you have in web service. Can you tell us how you solve the problem you experience. So if we experience the same problem in you we know how to solve it right.

Aaron the with
View user's profileFind all posts by OrlandoSend private message
Web Service help - [SOLVED]
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic