473,498 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need PHP SOAP assistance

1 New Member
Need assistance in using PHP to connect to webservice using SoapClient (I am fairly new to SOAP)

Here is the WSDL URL: https://uat.fiadmin.com/scs.webservi...toService.asmx

Here is the SOAP request from SoapUI with correct data in the fields:

Expand|Select|Wrap|Line Numbers
  1. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:scs="http://www.natinc.com/SCSAutoService/">
  2.    <soapenv:Header/>
  3.    <soapenv:Body>
  4.       <scs:GetRates>
  5.          <!--Optional:-->
  6.          <scs:objGetRatesRequest>
  7.             <!--Optional:-->
  8.             <scs:UserId>VPP</scs:UserId>
  9.             <!--Optional:-->
  10.             <scs:Password>jBH5Mspc</scs:Password>
  11.             <!--Optional:-->
  12.             <scs:TpaCode>DEMO</scs:TpaCode>
  13.             <!--Optional:-->
  14.             <scs:ErrorMessage>0</scs:ErrorMessage>
  15.             <!--Optional:-->
  16.             <scs:ErrorCode>0</scs:ErrorCode>
  17.             <!--Optional:-->
  18.             <scs:RequestGroup>0</scs:RequestGroup>
  19.             <!--Optional:-->
  20.             <scs:Trim>0</scs:Trim>
  21.             <scs:ChromeStyle>0</scs:ChromeStyle>
  22.             <!--Optional:-->
  23.             <scs:VINPattern>0</scs:VINPattern>
  24.             <!--Optional:-->
  25.             <scs:DealerNo>MENU004</scs:DealerNo>
  26.             <!--Optional:-->
  27.             <scs:NewUsed>N</scs:NewUsed>
  28.             <!--Optional:-->
  29.             <scs:VIN>1N4AL3AP1DC121302</scs:VIN>
  30.             <scs:VehicleYear>0</scs:VehicleYear>
  31.             <!--Optional:-->
  32.             <scs:VehicleMake>0</scs:VehicleMake>
  33.             <!--Optional:-->
  34.             <scs:VehicleModel>0</scs:VehicleModel>
  35.             <scs:VehiclePurchasePrice>0.00</scs:VehiclePurchasePrice>
  36.             <scs:VehicleOdometer>24001</scs:VehicleOdometer>
  37.             <!--Optional:-->
  38.             <scs:TonRating>0</scs:TonRating>
  39.             <!--Optional:-->
  40.             <scs:AspirationCode>0</scs:AspirationCode>
  41.             <!--Optional:-->
  42.             <scs:DrivingWheels>0</scs:DrivingWheels>
  43.             <!--Optional:-->
  44.             <scs:SegmentationCode>0</scs:SegmentationCode>
  45.             <!--Optional:-->
  46.             <scs:Cylinders>0</scs:Cylinders>
  47.             <scs:SaleDate>2014-03-26T00:00:00</scs:SaleDate>
  48.             <scs:FinancedAmount>0</scs:FinancedAmount>
  49.             <scs:GIPIteration>0</scs:GIPIteration>
  50.             <scs:MonthlyPayment>0</scs:MonthlyPayment>
  51.             <scs:FinanceTerm>0</scs:FinanceTerm>
  52.             <!--Optional:-->
  53.             <scs:FinanceType>0</scs:FinanceType>
  54.             <scs:InserviceDate>2014-03-26T00:00:00</scs:InserviceDate>
  55.             <scs:DOBBuyer>0001-01-01T00:00:00</scs:DOBBuyer>
  56.             <scs:DOBCoBuyer>0001-01-01T00:00:00</scs:DOBCoBuyer>
  57.             <!--Optional:-->
  58.             <scs:FuelType>0</scs:FuelType>
  59.             <scs:VehiclePurchaseDate>0001-01-01T00:00:00</scs:VehiclePurchaseDate>
  60.             <scs:FullManufWarrMonths>0</scs:FullManufWarrMonths>
  61.             <scs:FullManufWarrMiles>0</scs:FullManufWarrMiles>
  62.             <scs:PowerTrainManufWarrMonths>0</scs:PowerTrainManufWarrMonths>
  63.             <scs:PowerTrainManufWarrMiles>0</scs:PowerTrainManufWarrMiles>
  64.             <scs:FinanceApr>0</scs:FinanceApr>
  65.             <!--Optional:-->
  66.             <scs:Surcharges>0</scs:Surcharges>
  67.             <scs:MSRP>0</scs:MSRP>
  68.             <!--Optional:-->
  69.             <scs:ProductCollection>
  70.                <!--Zero or more repetitions:-->
  71.                <scs:Product>
  72.                   <!--Optional:-->
  73.                   <scs:Code>0</scs:Code>
  74.                   <!--Optional:-->
  75.                   <scs:Description>0</scs:Description>
  76.                   <scs:ExtractPosition>0</scs:ExtractPosition>
  77.                </scs:Product>
  78.             </scs:ProductCollection>
  79.             <!--Optional:-->
  80.             <scs:CultureName>0</scs:CultureName>
  81.          </scs:objGetRatesRequest>
  82.       </scs:GetRates>
  83.    </soapenv:Body>
  84. </soapenv:Envelope>
  85.  
Here are the first few lines of the SOAP response that comes back in SoapUI:

Expand|Select|Wrap|Line Numbers
  1. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  2.    <soap:Body>
  3.       <GetRatesResponse xmlns="http://www.natinc.com/SCSAutoService/">
  4.          <GetRatesResult>
  5.             <PlanRates>
  6.                <PlanRate>
  7.                   <Plan>
  8.                      <PlanDescriptions/>
  9.                      <ProgramDescriptions/>
  10.                      <ProductTypeCode>VSC</ProductTypeCode>
  11.                      <ProductTypeDescription>Vehicle Service Contract</ProductTypeDescription>
  12.                      <PlanCode>M6</PlanCode>
  13.                      <PlanDescription>Silver</PlanDescription>
  14.                      <ContractType>1</ContractType>
  15.                      <PlanId>860</PlanId>
  16.                      <RateBook>422</RateBook>
  17.                      <OwnershipTypeCode>A</OwnershipTypeCode>
  18.                      <ContractPlanName/>
  19.                      <ProgramDescription>Menu Integration VSC</ProgramDescription>
  20.                      <ProgramID>68</ProgramID>
  21.                      <Discountable>0</Discountable>
  22.                   </Plan>
  23.                   <RateClassMoneys>
  24.                      <RateClassMoney>
  25.                         <TermMile>
  26.                            <TermId>6</TermId>
  27.                            <Term>12</Term>
  28.                            <Mileage>12000</Mileage>
  29.                         </TermMile>
  30.                         <Deductible>
  31.                            <DeductTypeDescriptions/>
  32.                            <DeductId>1</DeductId>
  33.                            <DeductAmt>0.00</DeductAmt>
  34.                            <DeductType/>
  35.                            <ReducedAmount>0</ReducedAmount>
  36.                         </Deductible>
  37.                         <Rate>
  38.                            <BandCode/>
  39.                            <OverrideFlag>false</OverrideFlag>
  40.                            <OptionGroupId>188</OptionGroupId>
  41.                            <RateId>519461</RateId>
  42.                            <RetailRate>1145.00</RetailRate>
  43.                            <NetRate>1145.00</NetRate>
  44.                            <MaxRetailRate>0</MaxRetailRate>
  45.                            <MinRetailRate>0</MinRetailRate>
  46.                            <RegulatedRuleId>0</RegulatedRuleId>
  47.                            <PDFFormNo>VSC</PDFFormNo>
  48.                            <VehicleClass>1</VehicleClass>
  49.                            <ExpirationDate>2015-03-26T00:00:00</ExpirationDate>
  50.                            <ExpirationMileage>36001</ExpirationMileage>
  51.                            <MarkupMin>0</MarkupMin>
  52.                            <MarkupMax>0</MarkupMax>
  53.                         </Rate>
  54.  
  55.  
Can you show me the PHP code using SoapClient to connect to the webservice, send the data in the request and bring back the response fields. I need to see how to write any of the fields that are returned back onto my site or store them in a PHP variable for use later.

The main field I want to bring back to my website is: <netrate>1145.00</netrate> but would also like to know how to capture all the fields into PHP variables if necessary.

I do have a basic understanding of SOAP and PHP but i havent been able to make this to work all the way yet!

Thanks for your help!
Apr 22 '14 #1
0 1110

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1105
by: Rossz | last post by:
I'm trying to integrate with a product procurement system that is set up for SOAP w/WSDL. I have the portion that grabs new purchase orders working, but I am failing when it comes to the PO...
1
2148
by: Numberwhun | last post by:
Hello everyone! I am trying to learn java and have run into kind of a snag. Here is the code that I have so far: ------ <begin_code> ---------- import javax.swing.*; import...
0
1394
by: 45 pretoria 45 pretoria | last post by:
From:Dr.Garus Umoh Union Bank PLC. Head office: 40 Marina Lagos. Dear friend, A foreigner, late Engr. Johnson Creek, an Oil Merchant, until his death three years ago, banked with us here...
9
293
by: Aaron Smith | last post by:
Our company is trying to decide to go .Net or not and which language to use if we do. I have been doing a lot of research on .Net and VB.Net. I used to be a VB 6 developer till I started to work...
2
1085
by: Ivan | last post by:
Recently i have encounter some problem with C# programming. The application of mine can't seem to run well with sql server 2000 and i think the reason for this is the connection between this two...
23
2380
by: Bloke at the pennine puddle | last post by:
This query is for me, but I think that it'll be of use to just about everyone who participates in this news group. I learn better if I have a decent example to study, so I'm looking for publicly...
2
903
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Hi, I need to pass back multiple selection from an asp.net app datagrid and update a table. How should I handle this? I get the values by looping he datagrid, but, do I execute the update stored...
7
2000
by: Rnykster | last post by:
I know a little about Access and have made several single table databases. Been struggling for about a month to do a multiple table database with no success. Help! There are two tables. First...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.