Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Nav web service halt and become inaccesible on error

$
0
0
Hi!

I have a web service to create sales order in NAV from Magento. All works fine but in some cases one of the items have no cross reference in NAV, then I get this error:
Fatal error: Uncaught SoapFault exception: [a:Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLDialogException] There are no items with cross reference: SMARTSC in C:\wamp\www\soap\grid\pedanav.php:120 Stack trace: #0 C:\wamp\www\soap\grid\pedanav.php(120): SoapClient->__call('Update', Array) #1 C:\wamp\www\soap\grid\pedanav.php(120): NTLMSoapClient->Update(Object(stdClass)) #2 C:\wamp\www\soap\grid\crearpednav.php(112): crearpedidonav(Array, Array, 3, 'http://localhos...') #3 {main} thrown in C:\wamp\www\soap\grid\pedanav.php on line 120

I loose this new sales order in NAV, but this is not the problem, the real problem is that the nav web service become inaccesible. If I try to create another sales order (in this case with all cross references ok) I get the next error, like the service is blocked:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in 'http://localhost:7047/DynamicsNAV/WS/Page/Sales_Order' in C:\wamp\www\soap\grid\pedanav.php:34 Stack trace: #0 C:\wamp\www\soap\grid\pedanav.php(34): SoapClient->SoapClient('http://localhos...') #1 C:\wamp\www\soap\grid\crearpednav.php(112): crearpedidonav(Array, Array, 2, 'http://localhos...') #2 {main} thrown in C:\wamp\www\soap\grid\pedanav.php on line 34

If I use Internet Explorer to navigate to the web service URL 'http://localhost:7047/DynamicsNAV/WS/Page/Sales_Order' I can see the web service definition and all become working again. I can use the web service to ceate new sales order without problem.

The quetions is... Why the service become unavalilable afther an error?... How can I solve or restart the service with code in php?

Note: In windows service configuration and services tab I have configured the service to restart in case of errors.

Resume:

All right creating sales order --> Error with not found cross reference in one new sales order --> web service become inavailable --> Cant create new sales order --> Navigate with browser to web service url --> All work right again.

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>