0

I have a Wordpress website and I'm trying to allow the case system that I have created to file cases electronically in an automated fashion. Here's a link to the documentation and such for what I'm trying to do....

https://www.courts.mo.gov/exchanges/display/MOJXECFAF/Missouri+Judicial+Exchanges+Electronic+Case+Filing+-+Automated+Filing

There is an example of Java web service in the documentation, but I'm trying to create a PHP version of this. The documentation and help that I've gotten says this... You will need to submit a SOAP Request with the XML payload and binary documents to our Automated Filing Web Service. The end point is documented in the WSDL in the Automated Filing IEPD. I have my own credentials that I can plug into the request.xml file in the documentation, but I have no idea how to send this SOAP request using PHP to the appropriate endpoint. I have tried a bunch of different things, but nothing has worked so far.

Any help would be greatly apprecaited.

Thanks!

  • What have you tried and why hasn't it worked? – Bogdan Jun 25 '22 at 13:34
  • Here are a few things that I've tried.... https://stackoverflow.com/questions/18723216/how-to-build-a-correct-soap-request-with-php https://stackoverflow.com/questions/471115/how-to-post-soap-request-from-php https://www.php.net/manual/en/class.soapclient.php https://reqbin.com/req/php/yemanjjt/make-soap-request. Where I'm struggling the most is to understand if I'm supposed to somehow post the XML to the URL and the XML file has my authentication inside of it? or if I'm supposed to connect to the URL and then authenticate using functions. I don't think the documentation is very clear. – Patrick Sasser Jun 26 '22 at 14:45
  • I have the sample xml file on my server with my specific authentication information inside of it. I'm getting it like this `$data = file_get_contents('xml file on my server');` then I'm posting it with a soap request `$client = new SoapClient($data);` In this case the URL doesn't come into play. I have tried many other solutions using the URL, but those also haven't worked. – Patrick Sasser Jun 26 '22 at 14:51
  • @Bogdan Any thoughts or suggestions here? I'm still at a loss with what to do here. When I visit this URL directly https://wwwtest.courts.mo.gov/ecf-af-web/services/MoEcfAfV1 I do get an XML response so I know that the service is working. I just cannot figure out how to send a SOAP request to that URL using PHP and almost all that I try results in a Curl error: Empty reply from server. I'm glad to share some of the code that I have tried, but nothing has worked. – Patrick Sasser Jul 27 '22 at 21:30
  • I cannot access any of those links (at least not from my region). Do you have a WSDL file for that service? By using the WSDL file can you make successful [calls using SoapUI](https://www.soapui.org/docs/soap-and-wsdl/working-with-wsdls/) for example? Try to find the lowest hanging fruit (i.e. the simplest operation on the service that you could invoke). – Bogdan Jul 30 '22 at 09:32
  • @Bogdan Ok I do have a WSDL file and I do have the sample XML payload. I did try to do the SoapUI, but it was just a little bit over my head. I do have specific authentication credentials, but I don't see where to put those into the WSDL file to validate. Can I share the WSDL file and the XML payload via Google Drive (or something) and you can see if you can successfully generate some kind of PHP code for me to work from? The WSDL and the XML are located here [here](https://www.courts.mo.gov/exchanges/display/MOJXECFAF/Missouri+Judicial+Exchanges+Electronic+Case+Filing+-+Automated+Filing). – Patrick Sasser Jul 31 '22 at 13:21
  • @Bogdan One recurring thought that I have here is that this service is closed to web requests as most people are accessing via Java instead of web based PHP. Either it is closed to PHP requests or my PHP curl tests are incorrect. I think it must be the former since I keep getting a Curl error: Empty reply from server. I would think that I would at least get some PHP response besides Empty reply. I have tried dozens of things all with the same response. – Patrick Sasser Aug 04 '22 at 13:56
  • That's not how a web service works. Calling from Java or PHP makes no difference. Either the service is down, that address is invalid, or the service could be protected somehow (being a .gov domain it makes sense for me to be made available only withing that country - but this is an assumption). So 1) make sure you know the address on which the service is available, 2) use the WSDL of the service to make successful SoapUI calls, 3) only then start to write PHP code to try to call the service. If you think using SoapUI is too difficult, then writing the PHP code for it will be impossible. – Bogdan Aug 07 '22 at 08:59

0 Answers0