webservice/soap
Jeg kan squ ikke finde ud af det.Jeg skal lave et kald til soap, men hvordan gør jeg det via php?
Det eneste jeg har er hvad jeg skal sende:
POST /Services/ProductInfoService.asmx HTTP/1.1
Host: service.xxx.dk
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://v2.services.trade.xdev.dk/GetAllProductInfos"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<Authentication xmlns="http://v2.services.trade.xdev.dk/">
<User>string</User>
<Password>string</Password>
</Authentication>
</soap:Header>
<soap:Body>
<GetAllProductInfos xmlns="http://v2.services.trade.xdev.dk/" />
</soap:Body>
</soap:Envelope>
og hvad jeg skal modtage:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetAllProductInfosResponse xmlns="http://v2.services.trade.xdev.dk/">
<GetAllProductInfosResult>
<Products>
<Product InfoTimeStamp="dateTime" ProductId="string" Exists="boolean" ProductName="string" Manufacturer="string" Vendor="string" InStockDate="dateTime" ProductMasterGroupId="string" ProductGroupId="string" EAN="string" InStockQty="decimal" LeadDays="int" ItemStatus="int" UnitsColi="decimal" SpiltAllowed="boolean" IsTaxable="boolean" IsInCampaign="boolean" IsNew="boolean" HasQtyDiscount="boolean" FirstQtyDiscountQty="decimal" FirstQtyDiscountPrice="decimal" GN="string" MN="string">
<UnitsInStock xsi:nil="true" />
<Price xsi:nil="true" />
<ListPrice xsi:nil="true" />
</Product>
<Product InfoTimeStamp="dateTime" ProductId="string" Exists="boolean" ProductName="string" Manufacturer="string" Vendor="string" InStockDate="dateTime" ProductMasterGroupId="string" ProductGroupId="string" EAN="string" InStockQty="decimal" LeadDays="int" ItemStatus="int" UnitsColi="decimal" SpiltAllowed="boolean" IsTaxable="boolean" IsInCampaign="boolean" IsNew="boolean" HasQtyDiscount="boolean" FirstQtyDiscountQty="decimal" FirstQtyDiscountPrice="decimal" GN="string" MN="string">
<UnitsInStock xsi:nil="true" />
<Price xsi:nil="true" />
<ListPrice xsi:nil="true" />
</Product>
</Products>
</GetAllProductInfosResult>
</GetAllProductInfosResponse>
</soap:Body>
</soap:Envelope>
Nogen der kan lave en php kode det kan bruges til det ?
