2

I'm trying to consume a commercial soap Api. I know their wsdl file but did not have any api endpoints to make request. I have searched on internet about how to get api endpoints from wsdl file but did not succeed. the wsdl file location is http://cbs.zong.com.pk/reachcwsv2/corporatesms.svc?wsdl.

Haseeb Mazhar Ranga
  • 555
  • 1
  • 5
  • 16

1 Answers1

1

According to this answer the end point url is obtained by removing the ?wsdl from the path to wsdl

So WSDL is: http://cbs.zong.com.pk/reachcwsv2/corporatesms.svc?wsdl then End-point is: http://cbs.zong.com.pk/reachcwsv2/corporatesms.svc


More accurately, the endpoint is defined in WSDL file by address <address/> tag as below. It could be different from what you get by just removing ?wsdl suffix from URL, but most often thats not the case.

<wsdl:port name="BasicHttpBinding_ICorporateCBS" binding="tns:BasicHttpBinding_ICorporateCBS">
<soap:address location="http://cbs.zong.com.pk/ReachCWSv2/CorporateSMS.svc"/>
</wsdl:port>
Community
  • 1
  • 1
Tumaini Mosha
  • 83
  • 3
  • 7
  • @HaseebMazharRanga I had to update my answer after your response. SOAPUI will parse WSDL file for
    tag and use this and endpoint. Using SOAPUI would thus more accurately return the WSDL endpoint.
    – Tumaini Mosha Mar 30 '16 at 07:32
  • sorry, yes in some case removing ?wsdl would help but here no doing zong has a fix for that. i used the follow code got connection error. which is different problem all together. 1,"exception" => 0)); $result=$client->GetAccountSummary(array('obj_GetAccountSummary'=>array('loginId'=>'923331234567','loginPassword'=>'Mypassword'))); echo "
    " . var_dump($result) . "

    ";
    – Ad Kahn Jun 17 '19 at 13:34