Solved

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

Posted on 2004-10-08
10
1,914 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:riche127
  • 6
  • 4
10 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 12262270
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
 

Author Comment

by:riche127
ID: 12262376
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
 
LVL 48

Expert Comment

by:hernst42
ID: 12262773
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
 

Author Comment

by:riche127
ID: 12263022
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
 
LVL 48

Expert Comment

by:hernst42
ID: 12263380
have you tried something like the follwoing as url:
$url = 'http://vasp_user:vasp_passwd@edev.openwave.com:8080/mm7';
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:riche127
ID: 12263468
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
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 12263562
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
 

Author Comment

by:riche127
ID: 12264546
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
 

Author Comment

by:riche127
ID: 12266354
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
 

Author Comment

by:riche127
ID: 12300816
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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now