access an MMSC (MMS Server) using MM7 protocol - based on SOAP - with php language

Hi,

Here is my problem, I'm trying to set up an interface to send MMS to an MMSC plateform using the MM7 protocol (based on SOAP)

So here is the deal, I have a lot of docs:
http://www.nowsms.com/documentation/ProductDocumentation/mms_notifications_and_content/Submitting_MMS_Messages_MM7.htm
and most importantly
http://www.3gpp.org/ftp/Specs/html-info/23140.htm
http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/23140-670.zip

I've tried to follow that, but I'm pretty much newbie in SOAP interface ... so here is what I've done so far:

Code:

<?
include("SOAP/Client.php");

$url = 'http://mmsc.dyndns.org:8080/mm7';
$namespace= 'http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3';

$soapclient = new SOAP_Client($url,$namespace);

$method = 'SubmitReq';

$params = array('MM7Version'=>'5.3.0',
                          'SenderIdentification'=>array(
                                           'VASPID'=>'vasp_account_ID',
                                           'VASID' =>'vasp_password',
                                           'SenderAddress'=>array(
                                                          'RFC2822Address'=>'vasp@mmsc.dyndns.org')),
                                                          'Recipients'=> array( 'To'=>array(
                                                                                         'Number'=>'16176665869')),
                                                          'MessageClass'=>'Personal',
                                                          'DeliveryReport'=>'false',
                                                          'ReadReply'=>'false',
                                                          'Priority'=>'Low',
                                                          'Subject'=>'Test SOAP mm7',
                                                          'ChargedParty'=>'Sender');

$soapheader = new SOAP_Header('{urn:http://schemas.xmlsoap.org/soap/envelope/}Header',NULL, array(
                                              'TransactionID'=>'ID_1234',
                                              'ContentType'=>'multipart/related'));

$response = $soapclient->call($method,$params,$namespace);

print_r($response);

?>


I get a big array as a response, and the main "error" is:

Quote:

soap_fault Object
(
[error_message_prefix] =>
[mode] => 1
[level] => 1024
[code] => WSDL
[message] => no operation SubmitReq in wsdl
[userinfo] => http://mmsc.dyndns.org:8080/mm7
[backtrace] => Array
(...)


That may be due to a totally wrong php code, or to a very small problem, but I don't see it.
Thank you for your help

I'd be really glad to have some help guys
thank you
riche127Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
hernst42Connect With a Mentor Commented:
I guess the parameters send are wrong, so you have to look if the soap-request is send, does look like the one from the docu.
But at this point I'm at the end of my knowledge about that and I only can guess :-(
0
 
hernst42Commented:
There is no hostname mmsc.dyndns.org. Where did you get those URL from. Maybe it was only an example or a pc with temporary hostname which is not up at the moment.
0
 
riche127Author Commented:
no actually it's not a real hostname, I changes the real values.
One of my test plateform is Openwave:

http://edev.openwave.com:8080/mm7

username and password doesn't  seem to be important a this point.

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
hernst42Commented:
So looked into the source and use the ZendDebugger I got as far till I get a 401 Error

just use
$soapclient = new SOAP_Client($url);

To acces that page you need to provide a valid user name and password
0
 
riche127Author Commented:
Yes I got that too until I put the NameSpace in it.
Then, I try with a valid username and password and have the same 401 error ...

I made some modification in my code

<?
header("Authorization: Basic ".base64_encode("vasp_user:vasp_passwd"));
header("Content-length: 9750");
//seems to be required
//http://www.nowsms.com/documentation/ProductDocumentation/mms_notifications_and_content/Submitting_MMS_Messages_MM7.htm

include("SOAP/Client.php");

$url = 'http://edev.openwave.com:8080/mm7';

$namespace= 'http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3';

$soapclient = new SOAP_Client($url);

$method = 'SubmitReq';

$params = array(        'MM7Version'=>'5.3.0',
                        'SenderIdentification'=>array(  'VASPID'=>'vasp_user',
                                                        'VASID' =>'vasp_passwd', 'SenderAddress'=>array('RFC2822Address'=>'vasp@mmsc.dyndns.org')),
                        'Recipients'=> array('To'=>array('Number'=>'16176665869')),
                        'MessageClass'=>'Personal',
                        'DeliveryReport'=>'false',
                        'ReadReply'=>'false',
                        'Priority'=>'Low',
                        'Subject'=>'Test SOAP mm7',
                        'ChargedParty'=>'Sender');


$soapheader = new SOAP_Header('{urn:http://schemas.xmlsoap.org/soap/envelope/}Header',NULL, array(      'TransactionID'=>'ID_1234',
                                                                                                        'ContentType'=>'multipart/related'));

$soapclient->addHeader($soapheader);

$response = $soapclient->call($method,$params,$namespace);

print_r($response);
?>


I've used the account username and password and phone number but still no luck.
I also  have configured my own nowsms/mms server so that my vasp account accepts all requests from my IP without authorization.
What is better ? that wsdl function missing or that 401 authentification error ?
I mean, what way do I have to look to go further ?
0
 
hernst42Commented:
have you tried something like the follwoing as url:
$url = 'http://vasp_user:vasp_passwd@edev.openwave.com:8080/mm7';
0
 
riche127Author Commented:
just tried that, the server answered some soap, meaning it was contacted I guess.


<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
   <mm7:TransactionID xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2" env:mustUnderstand="1">
           ID_1234
   </mm7:TransactionID>
</env:Header>
<env:Body>
   <RSErrorRsp xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2">
      <MM7Version>5.3.0</MM7Version>
      <Status>
            <StatusCode>4003</StatusCode>
            <StatusText>Unsupported Operation</StatusText>
            <Details>Unsupported MM7 transaction</Details>
      </Status>
   </RSErrorRsp>
</env:Body>
</env:Envelope>

the problem may then be in the $method or the $params may be wrong.
What do you think ?
0
 
riche127Author Commented:
A question, how to I change the properties of a certain parameter
For example, when I add the parameter TransactionID to the header, it has the (default I guess) properties:
   xsi:type="xsd:string"
I just want to get rid of that, and, instead, be able to add the property:
xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3"

Also, as the error message stands, the operation is unsupported, docs day that it means: "The server does not support the request indicated by the MessageType element in the header of the message."

Isn't  the wsdl file design to help to avoid such mistakes ? and, if I only have a xsd file
(http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3.xsd)
is it enough to understand the different methods and their parameters ?
0
 
riche127Author Commented:
Btw, I also need to set some value for the header, not the header of my .php script, not the header of the SOAP XML message, but the header of the HTTP connection between the script and the MMSC.

I know for example that:
$soapclient->setEncoding('us-ascii');
will set the charset and encoding type to us-ascii
but is there any method to do so with other variables, and if so, where can I find these functions names
0
 
riche127Author Commented:
The tip concerning the url to request on:
$url = 'http://vasp_user:vasp_passwd@edev.openwave.com:8080/mm7';

was really helpful though I now need more infos on the methods so that I won't have Unsupported Operation anymore

I'll past the answer when I'll found it.
0
All Courses

From novice to tech pro — start learning today.