Can anyone provide me with an example or tutorial link on how to do MTOM interop between WSO2(PHP) and WSE 3.0(ASP.net 2.0)?
Thanks
Hi,
We have a sample which interops with Microsoft Indigo services in http://131.107.72.15/MTOM_Service_Indigo/Soap12MtomUtf8.svc?wsdl.
<code> $reqPayloadString = <<<XML <EchoBinaryAsString xmlns="http://xmlsoap.org/Ping"><array><xop:Include href="cid:myid1" xmlns:xop="http://www.w3.org/2004/08/xop/include"/></array> </EchoBinaryAsString> XML; try { $file_name = file_get_contents("string.txt"); /* $file_name = file_get_contents("axis2.jpg"); */ $reqMessage = new WSMessage($reqPayloadString, array("to" => "http://131.107.72.15/MTOM_Service_Indigo/Soap12MtomUtf8.svc/MtomTest", "action" => "http://xmlsoap.org/echoBinaryAsString", "attachments" => array("myid1" => $file_name))); $client = new WSClient(array("useMTOM" => TRUE, "useSOAP" => "1.2", "useWSA" => TRUE)); $resMessage = $client->request($reqMessage); echo $resMessage->str; } catch (Exception $e) { if ($e instanceof WSFault) { printf("Soap Fault: %s\n", $e->code); } else { printf("Message = %s\n",$e->getMessage()); } } ?>
</code>
Could you try this sample and let us know.
Buddhika
Re:WSO2 & WSE 3.0 MTOM Interop
Hi,
We have a sample which interops with Microsoft Indigo services in http://131.107.72.15/MTOM_Service_Indigo/Soap12MtomUtf8.svc?wsdl.
<code>
$reqPayloadString = <<<XML
<EchoBinaryAsString xmlns="http://xmlsoap.org/Ping"><array><xop:Include href="cid:myid1" xmlns:xop="http://www.w3.org/2004/08/xop/include"/></array>
</EchoBinaryAsString>
XML;
try {
$file_name = file_get_contents("string.txt");
/* $file_name = file_get_contents("axis2.jpg"); */
$reqMessage = new WSMessage($reqPayloadString,
array("to" => "http://131.107.72.15/MTOM_Service_Indigo/Soap12MtomUtf8.svc/MtomTest",
"action" => "http://xmlsoap.org/echoBinaryAsString",
"attachments" => array("myid1" => $file_name)));
$client = new WSClient(array("useMTOM" => TRUE,
"useSOAP" => "1.2",
"useWSA" => TRUE));
$resMessage = $client->request($reqMessage);
echo $resMessage->str;
} catch (Exception $e) {
if ($e instanceof WSFault) {
printf("Soap Fault: %s\n", $e->code);
} else {
printf("Message = %s\n",$e->getMessage());
}
}
?>
</code>
Could you try this sample and let us know.
Thanks
Buddhika