hno2002 Posted July 28, 2022 Share Posted July 28, 2022 I've a webservice this is the wsdl <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <Header> <ValidationSoapHeader xmlns="KyanOnlineSaleService"> <Token>[string?]</Token> </ValidationSoapHeader> </Header> <Body> <GetItemList xmlns="KyanOnlineSaleService"> <StartDate>[string?]</StartDate> <EndDate>[string?]</EndDate> </GetItemList> </Body> </Envelope> this is my code $url = 'mywebservice/KyanOnlineSaleService.asmx?WSDL'; $client = new SoapClient($url); $result = $client->GetItemList(); print_r($result); I need to send the token code to this page . how can I do so ? Quote Link to comment https://forums.phpfreaks.com/topic/315095-how-to-add-authentication-codes-to-a-soap/ Share on other sites More sharing options...
requinix Posted July 28, 2022 Share Posted July 28, 2022 SoapClient::__setSoapHeaders looks relevant. Quote Link to comment https://forums.phpfreaks.com/topic/315095-how-to-add-authentication-codes-to-a-soap/#findComment-1598677 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.