-1

I'm developing an online system in PHP that needs to consult a cloud DB. The provider documentation brings a C# code to access the external data. It brings a XML doc with the query result.

The problem is: I have no idea of how to do this access through the PHP system code, even send the user and password (that needs to be sent as well). I cannot provide the real code, but I made a change to show you how it is.

example.consulta.ws wsConsulta = new example.consulta.ws();
string Retorno = wsConsulta.WSCSB("Name","LastName","Age","user","password");
XmlDocument objXML = new XmlDocument();
XmlNode node;
objXML.LoadXml(Retorno);
  • What did I wrong to get my ask downvoted? :/ – Diogo Muniz Feb 06 '17 at 10:52
  • a) You can run exec (http://php.net/manual/en/function.exec.php) in PHP to call on other languages using cli but that is not advisable. b) You probably want to create your own PHP class to interface in the same way your `ws` class is. Though without even knowing what the `ws` class nor the `WSCSB` method even does then I doubt anyone here can help. – Kal Feb 06 '17 at 10:55
  • 2
    Maybe because this has been asked before. Have a look at [this question](http://stackoverflow.com/a/14825009/579895) for example. If that is not what you want, please edit your question and try to explain your problem better – Pikoh Feb 06 '17 at 10:57

1 Answers1

1

From your question, I understand that the other party has exposed a classic SOAP web service to you.

You don't need to use C# code to consume it. It's only provided as a sample. Web services are meant for interoperability.

Use PHP to consume the web service.

Community
  • 1
  • 1
Zesty
  • 2,922
  • 9
  • 38
  • 69