Solved

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

Posted on 2004-10-08
10
1,920 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How can i modify my File download link ? 6 47
mysqli 3 19
mysql update statement effect only some rows 4 26
how to use a function in heredoc 5 21
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

911 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

22 Experts available now in Live!

Get 1:1 Help Now