NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
how to consume this webservice?


Joined: 21 Aug 2007
Posts: 11
Reply with quote
Hi guys.

I have the following wsdl and i need to consume the sendSMS section.

here is my code but its not really working (im not getting a response
from the server but its showing me the logs), is there anything I must
look for in particular in the logs? Is there anything else that one can
suggest?

Thanks in advance.

My code

=========================================

error_reporting(E_ALL);
require_once('lib/nusoap.php');

$wsdl = "http://www.blahblah?wsdl";

// instantiate the SOAP client object
$soap = new soapclient($wsdl,"wsdl");

$err = $soap->getError();
if ($err) {
// Display the error
echo '<p><b>Constructor error: ' . $err . '</b></p>';
// At this point, you know the call that follows will fail
}

$soap->debug_flag=true;

$username="a";
$password="b";

$parameters =
array(username=>$username,password=>$password,text=>"hello",
to=>"24224413355");

$result = $soap->call('sendSMS',$parameters);
echo "<br>CALL result: ";

print_r($result);

echo 'Request: <xmp>'.$soap->request.'</xmp>';
echo 'Response: <xmp>'.$soap->response.'</xmp>';
echo 'Debug log: <pre>'.$soap->debug_str.'</pre>';
=========================================



<definitions name="MessagingWSExternal" targetNamespace="http://www.xxx">
− <types>
− <schema elementFormDefault="qualified" targetNamespace="http://www.xxx">
− <complexType name="sendSMS">
− <sequence>
<element name="username" nillable="true" type="string"/>
<element name="password" nillable="true" type="string"/>
<element name="text" nillable="true" type="string"/>
<element name="to" nillable="true" type="string"/>
</sequence>
</complexType>
− <complexType name="sendSMSResponse">
− <sequence>
<element name="result" type="boolean"/>
</sequence>
</complexType>
<element name="sendSMS" type="tns:sendSMS"/>
<element name="sendSMSResponse" type="tns:sendSMSResponse"/>
</schema>
</types>
− <message name="MessagingEndPointExternal_sendSMSResponse">
<part element="tns:sendSMSResponse" name="result"/>
</message>
− <message name="MessagingEndPointExternal_sendSMS">
<part element="tns:sendSMS" name="parameters"/>
</message>
− <portType name="MessagingEndPointExternal">
− <operation name="sendSMS">
<input message="tns:MessagingEndPointExternal_sendSMS"/>
<output message="tns:MessagingEndPointExternal_sendSMSResponse"/>
</operation>
</portType>

<binding name="MessagingEndPointExternalBinding"
type="tns:MessagingEndPointExternal">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
− <operation name="sendSMS">
<soap:operation soapAction=""/>
− <input>
<soap:body use="literal"/>
</input>
− <output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
− <service name="MessagingWSExternal">
− <port binding="tns:MessagingEndPointExternalBinding"
name="MessagingEndPointExternalPort">
<soap:address
location="http://vmfep01:8080/yannitech-messaging/MessagingWSExternal"/>
</port>
</service>
</definitions>
View user's profileFind all posts by zlogicSend private message
how to consume this webservice?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic