i have webservice for external database,this web service has method "SendSMS" that take "SMSMessage" object and add record to this DB
the generated SL for this WSDL appear like this:
functionsendSMS( )
{
this.$$nsPrefix ="tns";
this.$$attributes =newArray();
this.$$xmlNames =newArray();
this.$$objNames =newArray();
this.getName = getName;
this.getXmlName = getXmlName;
this.setContent = setContent;
this.addContent = addContent;
this.getContent = getContent;
this.isFault = isFault;
this.$$elementChildren =newArray();
this.$$name ="sendSMS";
this.$$xmlNames["sendSMS"]="tns:sendSMS";
this.xmlns =newString("http://www.etisalat.com.eg/integration");
this.$$attributes.push( "xmlns" );
this.message =newsmsMessage();
this.$$elementChildren.push( "message" );
}
functionsendSMSResponse( )
{
this.$$nsPrefix ="tns";
this.$$attributes =newArray();
this.$$xmlNames =newArray();
this.$$objNames =newArray();
this.getName = getName;
this.getXmlName = getXmlName;
this.setContent = setContent;
this.addContent = addContent;
this.getContent = getContent;
this.isFault = isFault;
this.$$elementChildren =newArray();
this.$$name ="sendSMSResponse";
this.$$xmlNames["sendSMSResponse"]="tns:sendSMSResponse";
}
functionsmsMessage( )
{
this.$$nsPrefix ="tns";
this.$$attributes =newArray();
this.$$xmlNames =newArray();
this.$$objNames =newArray();
this.getName = getName;
this.getXmlName = getXmlName;
this.setContent = setContent;
this.addContent = addContent;
this.getContent = getContent;
this.isFault = isFault;
this.$$elementChildren =newArray();
this.$$name ="smsMessage";
this.$$xmlNames["smsMessage"]="tns:smsMessage";
this.application =newxs_string();
this.$$elementChildren.push( "application" );
this.contents =newxs_string();
this.$$elementChildren.push( "contents" );
this.externalApplicationIndicator =newxs_string();
this.$$elementChildren.push( "externalApplicationIndicator" );
this.lang =newxs_int();
this.$$elementChildren.push( "lang" );
this.password =newxs_string();
this.$$elementChildren.push( "password" );
this.priority =newxs_int();
this.$$elementChildren.push( "priority" );
this.reciever =newxs_string();
this.$$elementChildren.push( "reciever" );
this.scheduleDate =newxs_dateTime();
this.$$elementChildren.push( "scheduleDate" );
this.sender =newxs_string();
this.$$elementChildren.push( "sender" );
this.status =newxs_unsignedShort();
this.$$elementChildren.push( "status" );
}
then i create my client to consume this WS
the client code like this:
functionsendSMS(application,contents,externalApplicationIndicator,lang,password,priority,reciever,sender)
{
//defining web-service client instance
var webService =newlib.UnifiedSMSGateWayWSServiceProxy.UnifiedSMSGate WayWSService( );
var request ;
//creating request object for the web-service instance defined
request =newlib.UnifiedSMSGateWayWSServiceProxy.sendSMS();
//request=myrequest;
newMessage =newlib.UnifiedSMSGateWayWSServiceProxy.smsMessage();
newMessage.application.setValue(application);;
newMessage.contents.setValue(contents);
newMessage.externalApplicationIndicator.setValue(externalApplicationIndicator);
newMessage.lang.setValue(lang);
newMessage.password.setValue(password);
newMessage.priority.setValue(priority);
newMessage.reciever.setValue(reciever);
// newMessage.scheduleDate.setValue(new Date());
newMessage.sender.setValue(sender);
newMessage.status.setValue("P");
request.message=newMessage;
try
{
//web-service invocation
var response =webService.invoke(request);
//declaring a variable containing plain soap response
var soapResponse = webService.resultXML;
print(soapResponse);
}
catch( e )
{
//Catching any exception occured. Block is skipped to avoid displaying unwanted warnings
print("External failure. Description: \n"+e.toString());
return RC_ERROR;
}
}
but my client code may be incorrect becouse print(soapResponse) give me this result
The passed argument to method sendSMS is null
many thanks;


Reply With Quote
Bookmarks