Hi all,
I have a big issue since around 10 days, I'm stuck.
I need to send SOAP to an MMSC (multimedia message service connectivity) server using mm7 protocol.
Protocol is defined by 3gpp
docs here:
http://www.nowsms.com/documentation/ProductDocumentation/mms_notifications_and_content/Submitting_MMS_Messages_MM7.htmand
http://www.3gpp.org/ftp/Specs/html-info/23140.htmhttp://www.3gpp.org/ftp/Specs/archive/23_series/23.140/23140-670.zipI always got the same error, as I'm a little bit new in the SOAP stuff, I'd like some help:
here is my php code:
<?
require_once('nusoap.php')
;
$wsdl = '
http://16179433222:reicherV@edev.openwave.com:8080/mm7';
$namespace= '
http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3';
$client = new soapclient($wsdl);
$header = '<mm7:TransactionID xmlns:mm7='".$namespace.'"
>ID_1234</
mm7:Transa
ctionID>';
$soapmsg= $client->serializeEnvelope
('
<SubmitReq>
<MM7Version>5.3.0</MM7Vers
ion>
<SenderIdentification>
<VASPID>my id</VASPID>
</SenderIdentification>
<Recipients>
<To>
<Number>16507433992</Numbe
r>
</To>
</Recipients>
<MessageClass>Personal</Me
ssageClass
>
<ExpiryDate>2004-10-15T11:
28:37-07:0
0</ExpiryD
ate>
<DeliveryReport>true</Deli
veryReport
>
<Priority>Low</Priority>
<Subject>Attachments you wanted...</Subject>
<DistributionIndicator>tru
e</Distrib
utionIndic
ator>
<Content href="cid:generic_content_
id"/>
</SubmitReq>',$header,$nam
espace);
$response = $client->send($soapmsg);
$err = $client->getError();
if ($err) {
echo '<p><b>Constructor error: ' . $err . '</b></p>';
}
$client->debug_flag=true;
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->
request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->
response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2>';
echo '<pre>' . htmlspecialchars($client->
debug_str,
ENT_QUOTES) . '</pre>';
?>
the answer is very 'bad' as the openwave server answers "error parsing soap envelope"
Here is the communication log between the client and the server:
Request
POST /mm7 HTTP/1.0
Host: edev.openwave.com:8080
Authorization: Basic MTYxNzk0MzMyMjI6cmVpY2hlcl
Y=
User-Agent: NuSOAP/1.69 (1.80)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: ""
Content-Length: 797
<?xml version="1.0"><env:Envelop
e xmlns:env="
http://schemas.xmlsoap.org/soap/envelope/"><e
nv:Header>
<mm7:Trans
actionID xmlns:mm7="
http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-3">ID_1234<
/mm7:Trans
actionID><
/env:Heade
r><env:Bod
y>
<SubmitReq>
<MM7Version>5.3.0</MM7Vers
ion>
<SenderIdentification>
<VASPID>my id</VASPID>
</SenderIdentification>
<Recipients>
<To>
<Number>16507433992</Numbe
r>
</To>
</Recipients>
<MessageClass>Personal</Me
ssageClass
>
<ExpiryDate>2004-10-15T11:
28:37-07:0
0</ExpiryD
ate>
<DeliveryReport>true</Deli
veryReport
>
<ReadReply>true</ReadReply
>
<Priority>Low</Priority>
<Subject>Attachments you wanted...</Subject>
<DistributionIndicator>tru
e</Distrib
utionIndic
ator>
<Content href="cid:generic_content_
id"/>
</SubmitReq></env:Body></e
nv:Envelop
e>
Response
HTTP/1.1 200 OK
Content-length: 681
Content-type: text/xml
Connection: close
<?xml version='1.0' ?>
<E:Envelope xmlns:E="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:s="
http://www.w3.org/2001/XMLSchema-instance" xmlns:y="
http://www.w3.org/2001/XMLSchema">
<E:Header>
<ns1:TransactionID xmlns:ns1="
http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-0">
bd928a:ff2adf2e89:-8000ope
nwave-pq71
lw/10.20.5
.131
</ns1:TransactionID>
</E:Header>
<E:Body><E:Fault>
<faultcode>Client</faultco
de>
<faultstring>error parsing soap envelope</faultstring>
<detail><RSErrorRsp>
<MM7Version>5.3.0</MM7Vers
ion>
<Status>
<StatusCode>4004</StatusCo
de>
<StatusText>error parsing soap envelope</StatusText>
</Status>
</RSErrorRsp></detail>
</E:Fault>
</E:Body>
</E:Envelope>
Debug
2004-10-15 21:36:00.820522 soapclient: transporting via HTTP
2004-10-15 21:36:00.822512 soapclient: sending message, length: 797
2004-10-15 21:36:00.820967 soap_transport_
http: scheme = http
2004-10-15 21:36:00.821138 soap_transport_
http: host = edev.openwave.com
2004-10-15 21:36:00.821277 soap_transport_
http: port = 8080
2004-10-15 21:36:00.821405 soap_transport_
http: user = 16179433222
2004-10-15 21:36:00.821530 soap_transport_
http: pass = reicherV
2004-10-15 21:36:00.821667 soap_transport_
http: path = /mm7
2004-10-15 21:36:00.821951 soap_transport_
http: Set credentials for authtype basic
2004-10-15 21:36:00.822175 soap_transport_
http: Authorization header set: Basic MTYxNz...
2004-10-15 21:36:00.822721 soap_transport_
http: entered send() with data of length: 797
2004-10-15 21:36:00.822931 soap_transport_
http: connect connection_timeout 0, response_timeout 30, scheme http, host edev.openwave.com, port 8080
2004-10-15 21:36:00.823086 soap_transport_
http: calling fsockopen with host edev.openwave.com
2004-10-15 21:36:00.927452 soap_transport_
http: socket connected
2004-10-15 21:36:00.927597 soap_transport_
http: HTTP request: POST /mm7 HTTP/1.0
2004-10-15 21:36:00.927665 soap_transport_
http: HTTP header: Host: edev.openwave.com:8080
2004-10-15 21:36:00.927727 soap_transport_
http: HTTP header: Authorization: Basic MTYxNzk0MzMyMjI6cmVpY2hlcl
Y=
2004-10-15 21:36:00.927790 soap_transport_
http: HTTP header: User-Agent: NuSOAP/1.69 (1.80)
2004-10-15 21:36:00.927850 soap_transport_
http: HTTP header: Content-Type: text/xml; charset=ISO-8859-1
2004-10-15 21:36:00.927910 soap_transport_
http: HTTP header: SOAPAction: ""
2004-10-15 21:36:00.927972 soap_transport_
http: HTTP header: Content-Length: 797
2004-10-15 21:36:00.928068 soap_transport_
http: wrote data to socket, length = 1013
2004-10-15 21:36:01.273677 soap_transport_
http: read line of 17 bytes: HTTP/1.1 200 OK
2004-10-15 21:36:01.273803 soap_transport_
http: read line of 21 bytes: Content-length: 681
2004-10-15 21:36:01.273878 soap_transport_
http: read line of 24 bytes: Content-type: text/xml
2004-10-15 21:36:01.273952 soap_transport_
http: read line of 19 bytes: Connection: close
2004-10-15 21:36:01.274024 soap_transport_
http: read line of 2 bytes:
2004-10-15 21:36:01.274124 soap_transport_
http: found end of headers after length 83
2004-10-15 21:36:01.274277 soap_transport_
http: want to read content of length 681
2004-10-15 21:36:01.274355 soap_transport_
http: read buffer of 681 bytes
2004-10-15 21:36:01.274425 soap_transport_
http: read to EOF
2004-10-15 21:36:01.274481 soap_transport_
http: read body of length 681
2004-10-15 21:36:01.274540 soap_transport_
http: received a total of 764 bytes of data from server
2004-10-15 21:36:01.274636 soap_transport_
http: closed socket
2004-10-15 21:36:01.274719 soap_transport_
http: No Content-Encoding header
2004-10-15 21:36:01.274786 soap_transport_
http: end of send()
2004-10-15 21:36:01.274891 soapclient: got response, length: 681 type: text/xml
2004-10-15 21:36:01.274958 soapclient: Entering parseResponse() for data of length 681 and type text/xml
2004-10-15 21:36:01.275023 soapclient: Use encoding: ISO-8859-1 when creating soap_parser
2004-10-15 21:36:01.275199 soap_parser: No encoding specified in XML declaration
2004-10-15 21:36:01.275261 soap_parser: Entering soap_parser(), length=681, encoding=ISO-8859-1
2004-10-15 21:36:01.276021 soap_parser: inside buildVal() for Header(pos 1) of type
2004-10-15 21:36:01.276271 soap_parser: found root struct Fault, pos 4
2004-10-15 21:36:01.277110 soap_parser: inside buildVal() for Status(pos 10) of type
2004-10-15 21:36:01.277270 soap_parser: inside buildVal() for RSErrorRsp(pos 8) of type
2004-10-15 21:36:01.277421 soap_parser: inside buildVal() for detail(pos 7) of type
2004-10-15 21:36:01.277569 soap_parser: inside buildVal() for Fault(pos 4) of type struct
2004-10-15 21:36:01.277760 soap_parser: parsed successfully, found root struct: 4 of name Fault
I also tried with another mmsc server (nowsms/mms) and get another answer for the exact same message:
Response
HTTP/1.0 200 OK
Content-Length: 691
Content-Type: text/xml
Connection: close
<?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</MM7Vers
ion>
<Status>
<StatusCode>4003</StatusCo
de>
<StatusText>Unsupported Operation</StatusText>
<Details>Unsupported MM7 transaction</Details>
</Status>
</RSErrorRsp>
</env:Body>
</env:Envelope>
So, here I am, totally ... if you have any idea, that'd be great,
thank you
Start Free Trial