service - Is it possible to add an attribute to an XML Root using nusoap's call() function? -


i creating class utilizing fedex web services. attempting communicate through nusoap php class's nosoapclient() function, passing wsdl file. seems fedex requires namespace attribute in document root of request.

i can use nusoap's call() function , pass xml string parameter agrument work properly. rather pass array through parameter argument, , running issue.

is possible pass array through nusoap's call() function , include namespace attribute in root?

fedex raterequest php exerpt
the following give idea of trying , not actual code

$client = new nusoapclient('raterequest_v9.wsdl',true); //thought work no avail. //$request_array multi-associative array keys required xml tag names , values tags inner value, did not include irrelevant problem //$root_attr = array('xmlns'=>'http://fedex.com/ws/rate/v9'); //$parameters = array('raterequest'=>new soapval('raterequest',false,$request_array,false,false,$root_attr));  $parameters = array('raterequest'=>$request_array);  //have tried , without third argument - namespace $response = $client->call('getrates',$parameters,'http://fedex.com/ws/rate/v9'); 

fedex raterequest xml excerpt
the following not full xml (look @ raterequest tag toward end see difference)

incorrect format

<?xml version="1.0" encoding="iso-8859-1"?><soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns="http://fedex.com/ws/rate/v9"><soap-env:body><raterequest>...</raterequest></soap-env:body></soap-env:envelope> 

correct format

<?xml version="1.0" encoding="iso-8859-1"?><soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns="http://fedex.com/ws/rate/v9"><soap-env:body><raterequest xmlns="http://fedex.com/ws/rate/v9">...</raterequest></soap-env:body></soap-env:envelope> 

my apologies in advance if have missed conversation elsewhere have been scouring net , trying think of make work, if not possible suggestions? thank in advance assistance.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -