PHP & XML - How to generate a soap request in PHP from this XML?

前端 未结 2 1328
旧时难觅i
旧时难觅i 2020-12-31 23:46

I am completly new to SOAP operations.

I have been provided with an XML document (SOAP) to get some collection points for a shipping method.

From the manual

2条回答
  •  一个人的身影
    2021-01-01 00:01

    following example might help you.

    SOAP XML schema

    
            
            
                
                    10
                
            
        
    

    PHP code

      $wsdl = 'http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL';
    
    
        try{
            $clinet=new SoapClient($wsdl);
    
            $ver =array("dNum"=>"2002");
            $quates=$clinet->NumberToDollars($ver);
    
            var_dump($quates);
    
    
        }
    
        catch(SoapFault $e)
        {
            echo $e->getMessage();
        }
    

提交回复
热议问题