2

I am currently building a system that requires me to make SOAP requests. I have utilised SOAP before but it was a long time ago and now I am having trouble trying to recall!

Here is the example request I have been given:

    POST /FITSPACE/MHservice.asmx HTTP/1.1
    Host: fitspace.m-cloudapps.com
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://m-hance.com/FITratelist"

   <?xml version="1.0" encoding="utf-8"?>
       <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
           <soap:Body>
               <FITratelist xmlns="http://m-hance.com/" />
           </soap:Body>
       </soap:Envelope>

This SOAP example should allow a returned list of rates for me to manipulate. Can anyone shed any light as to what URL I should be posting to for the request as that is the first obstacle I have come across. Whenver I construct the URL I thikn I should be using it brings no result back.

Thanks in advance!

1 Answer 1

1

You should ask for wsdl url to post this request.

Edit: I have tried below code. It seems working fine from here, giving me list of methods.

$url = 'https://XXXXXXXX.m-XXXXXX.com:XXX/FITSPACE/MHservice.asmx?WSDL';
$options["connection_timeout"] = 25;
$options["location"] = $url;
$options['trace'] = 1;

$client = new SoapClient($url,$options);
print_r($client->__getFunctions());
Sign up to request clarification or add additional context in comments.

6 Comments

Hi, thanks for your reply. I don't understand what you mean? Could you explain a little further? If you mean the URL of the WSDL I have that but whenever I try to start a new SoapClient with the URI it says there is a problem.0 SOAP-ERROR: Parsing WSDL: Couldn't load from
yes you will get this error if your webservice (wsdl) url is wrong. Try contacting your webservice provider to get this url.
your url is using https check your php_openssl is enabled in phpinfo.
Yes it is enabled. I can't seem to work out why it doesn't like that URL
How strange. I copied your code and it doesn't seem to like it all all. There must be something on my server that is preventing the SOAP call from happening. Thanks for all your help though. Much appreciated.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.