-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wsdl file fetch with NTLM? #4
Comments
Came here looking for the same. Sadly it looks like rolling your own is the only way to do it at the moment. I found this, which seems promising. |
@benyanke: I'm having the same issue with NAV 2015. Could you post an example of how you are using local WDSL file? |
In essence, I'm just manually storing them in my repository, but my soap client constructor is below. In short, $wsdl contains the filesystem path to the XML file I manually downloaded and stored, and then this getSoapClient function is used in place of the <?php
use \jamesiarmes\PhpNtlm\SoapClient;
[...]
class NavBaseModel {
[...]
public static function getSoapclient(string $pagename) {
$wsdl = base_path().
"/resources/nav/wsdlfiles/".config('nav.soapconnection.pages.'.$pagename).
".xml";
return new SoapClient(
$wsdl,
array(
'user' => config('nav.soapconnection.username'),
'password' => config('nav.soapconnection.password')
)
);
}
[...]
} |
OK, that's what I was trying, but I kept getting I am having more success with https://github.com/matejsvajger/ntlm-soap-client, I'm able to make SOAP calls without needing local copies of WSDL files. |
I will check that out. That package must properly fetch the WSDL files using NTLM auth. |
Note: I was able to fetch my WSDL file using the following code. Have zero time to implement this in the package and turn this into a PR, but if someone else wants to, here it is:
|
I have read PHP bugs (I wish I could find them again....) that even if the SOAP connection is using a given auth, the WSDL file can not be fetched using the same auth.
Currently, even with your library, I'm having to manually download my WSDL files from my Navision 2013 R2 instance, and point the SoapClient at the filesystem instead of the URL. Is there a workaround for this with your library?
The text was updated successfully, but these errors were encountered: