I'm using nusoap trying to access an existing web service however having trouble mapping the complextype parameters in php.
getFunctions() returns:
Array ( [0] => processResponse process(process $process) )
getTypes() returns:
Array ( [0] => struct process { catalogContainer arg0; }
[1] => struct catalogContainer { category categories; product products; sku skus; }
[2] => struct category { string absoluteName; string description; string displayName; string id; string keywords; string longDescription; string parentId; boolean delete; int menuPosition; }
[3] => struct product { string altImage; sku childSkus; string commodityCode; string description; string detailImage; string displayName; product fixedRelatedProducts; string id; string keywords; string largeImage; string longDescription; category parentCategories; string smallImage; string template; string thumbImage; boolean delete; }
[4] => struct sku { string color; string description; string detailImage; string displayName; string id; double listPrice; product parentProduct; double salePrice; string size; string swatch; boolean delete; }
[5] => struct processResponse { string return; }
)
Using SOAPUI I can create the xml request successfully as follows:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cat="/catalog">
<soapenv:Header/>
<soapenv:Body>
<cat:process>
<!--Optional:-->
<arg0>
<products delete="?">
<commodityCode>123</commodityCode>
<description>Shirt</description>
<detailImage>/images/catalog/detail/shirt.jpg</detailImage>
<displayName>Black Shirt</displayName>
<fixedRelatedProducts/>
<id>123</id>
<keywords>123, black, shirt</keywords>
<largeImage>/images/catalog/large/shirt.jpg</largeImage>
<longDescription>Butterfly Bra with double back wrap panels offers comfort for your back, bust and shoulders. This bra will eliminate back fat and bulges for a smoother look. Graduated push-up gel pads for a natural shape and seamless under wire contour cups are included. Delicate lace trim feature with gold butterfly charm gives this bra a more feminine look. Nylon/ Spandex. Machine Washable. Imported</longDescription>
<smallImage>/images/catalog/small/shirt.jpg</smallImage>
<template>productDetailTemplate</template>
<thumbImage>/images/catalog/thumb/shirt.jpg</thumbImage>
</products>
<skus delete="?">
<color>BLACK</color>
<description>Shirt</description>
<detailImage>/images/catalog/detail/shirt.jpg</detailImage>
<displayName>123</displayName>
<id>123</id>
<listPrice>10</listPrice>
<parentProduct delete="?">
<id>123</id>
</parentProduct>
<salePrice>10</salePrice>
<size>10</size>
<swatch>/images/catalog/swatch/shirt.gif</swatch>
</skus>
</arg0>
</cat:process>
</soapenv:Body>
</soapenv:Envelope>
Response:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<ns2:processResponse xmlns:ns2="/catalog">
<return><![CDATA[<?xml version="1.0" encoding="UTF-8"?><catalogIntegration><resultCode>SUCCESS</resultCode><resultMessage><![CDATA[]]]]>><![CDATA[</resultMessage></catalogIntegration>]]></return>
</ns2:processResponse>
</env:Body>
</env:Envelope>
How would I setup the parameters to pass through the process() function in this web service?
Any help would be great. I've had no luck with trial and error or searching online. PLEASE HELP!!!!
PHP soapclient payload gettype mapping
Moderator: General Moderators
Re: PHP soapclient payload gettype mapping
why are you using nusoap instead of what is supported already in the standard php5?
Do you have a wsdl defined? If you do, you can try this:
http://sourceforge.net/projects/easywsdl2php/
Let me know if it does not work for you.
Do you have a wsdl defined? If you do, you can try this:
http://sourceforge.net/projects/easywsdl2php/
Let me know if it does not work for you.