[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsf-mashup-user
Subject:    Re: [User] PHP sig model problems
From:       Douglass Davis <ddavis () northcarolina ! edu>
Date:       2012-07-21 16:14:48
Message-ID: F8C28296074C78498314D558E8A1406909918C79 () thesilence1 ! ad ! northcarolina ! edu
[Download RAW message or body]

Thanks. How do I configure it to use xml-inout mode?

________________________________
From: Nandika Jayawardana [nandika@wso2.com]
Sent: Saturday, July 21, 2012 12:47 AM
To: Douglass Davis
Cc: user@wso2.org
Subject: Re: [User] PHP sig model problems

Hi Douglass,

Can you try the xml-inout mode. wsdl mode got broken with the changes in php api.

Regards
Nandika

On Mon, Jul 16, 2012 at 7:27 PM, Douglass Davis \
<ddavis@northcarolina.edu<mailto:ddavis@northcarolina.edu>> wrote: If this helps, in \
the log it says “wsf version - 2.1.0.”  Please let me know if any other info would be \
helpful.

From: Douglass Davis
Sent: Monday, July 16, 2012 12:52 AM
To: 'user@wso2.org<mailto:user@wso2.org>'
Subject: PHP sig model problems

Hello,

I am using WSO2 for PHP.  I’m not sure where to find what version I am using.  \
Apparently there is a problem occurring that has something to do with the signature \
model.

My code is like this:

   $access_client = new WSClient(array(
      "wsdl" => "http://<HOST \
HERE>/imagenow/services/1.0/access_service/imagenow_access.wsdl<UrlBlockedError.aspx>",
  ));

  $access_proxy = $access_client->getProxy();

  $req = array(
         'LOCALE'            => "US_en",  // locale of client
           …
         );

  $return = $access_proxy->ACCESS_SESSION_BEGIN_USING_PASSWORD($req);





The problem seems to be with the sig model.  In \
./wso2-wsf-php-src-2.1.0/scripts/wsf_wsdl.php, function wsf_process_wsdl($wsdata)



The value of $sig_model_string  = $wsdata->WSDL_SigModelString is



<?xml version="1.0"?>

<services xmlns:xs="http://www.w3.org/2001/XMLSchema" \
xmlns:wsp12="http://schemas.xmlsoap.org/ws/2004/09/policy" \
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" \
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>





This value from $sig_model_dom->loadXML($sig_model_string) is passed to \
wsf_get_endpoint_address in \
wso2-wsf-php-src-2.1.0/scripts/dynamic_invocation/wsf_wsdl_util.php


function wsf_get_endpoint_address(DomDocument $sig_model_dom) {
    require_once('wsf_wsdl_consts.php');
    $services_node = $sig_model_dom->firstChild;
    $service_node = $services_node->firstChild;
    $service_attr = $service_node->attributes;

    return $service_attr->getNamedItem(WSF_ADDRESS)->value;
}



Where these errors occur:


PHP Notice:  Trying to get property of non-object in \
/usr/local/wso2/wso2-wsf-php-src-2.1.0/scripts/dynamic_invocation/wsf_wsdl_util.php \
on line 240 PHP Fatal error:  Call to a member function getNamedItem() on a \
non-object in /usr/local/wso2/wso2-wsf-php-src-2.1.0/scripts/dynamic_invocation/wsf_wsdl_util.php \
on line 246

(line numbers are slightly different from distribution due to debug code I added)


I don’t think I am giving it a sig model, maybe the wso2 library is generating it.  \
How can I fix this error?

Let me know if you want me to post any more info.

Thanks,
Doug


_______________________________________________
User mailing list
User@wso2.org<mailto:User@wso2.org>
http://wso2.org/cgi-bin/mailman/listinfo/user




--
Nandika Jayawardana
Technical Lead
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware


[Attachment #3 (text/html)]

<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: \
10pt;">Thanks. How do I configure it to use xml-inout mode?<br> <br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF735212"><font color="#000000" face="Tahoma" \
size="2"><b>From:</b> Nandika Jayawardana [nandika@wso2.com]<br> <b>Sent:</b> \
Saturday, July 21, 2012 12:47 AM<br> <b>To:</b> Douglass Davis<br>
<b>Cc:</b> user@wso2.org<br>
<b>Subject:</b> Re: [User] PHP sig model problems<br>
</font><br>
</div>
<div></div>
<div>Hi Douglass,
<div><br>
<div>Can you try the xml-inout mode. wsdl mode got broken with the changes in php \
api.</div> <div><br>
Regards</div>
<div>Nandika<br>
<br>
<div class="gmail_quote">On Mon, Jul 16, 2012 at 7:27 PM, Douglass Davis <span \
dir="ltr"> &lt;<a href="mailto:ddavis@northcarolina.edu" \
target="_blank">ddavis@northcarolina.edu</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; \
padding-left:1ex"> <div lang="EN-US">
<div>
<p class="MsoNormal"><span style="color:#1f497d">If this helps, in the log it says \
“wsf version - 2.1.0.”&nbsp; Please let me know if any other info would be \
helpful.<u></u><u></u></span></p> <p class="MsoNormal"><span \
style="color:#1f497d"><u></u>&nbsp;<u></u></span></p> <div>
<div style="border:none; border-top:solid #b5c4df 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt; \
font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span \
style="font-size:10.0pt; font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> \
Douglass Davis <br>
<b>Sent:</b> Monday, July 16, 2012 12:52 AM<br>
<b>To:</b> '<a href="mailto:user@wso2.org" target="_blank">user@wso2.org</a>'<br>
<b>Subject:</b> PHP sig model problems<u></u><u></u></span></p>
</div>
</div>
<div>
<div class="h5">
<p class="MsoNormal"><u></u>&nbsp;<u></u></p>
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<u></u></p>
<p class="MsoNormal">I am using WSO2 for PHP.&nbsp; I’m not sure where to find what \
version I am using.&nbsp; Apparently there is a problem occurring that has something \
to do with the signature model.<u></u><u></u></p> <p \
class="MsoNormal"><u></u>&nbsp;<u></u></p> <p class="MsoNormal">My code is like \
this:<u></u><u></u></p> <p class="MsoNormal"><u></u>&nbsp;<u></u></p>
<p class="MsoNormal">&nbsp;&nbsp; $access_client = new \
WSClient(array(<u></u><u></u></p> <p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&quot;wsdl&quot; =&gt; &quot;<a href="UrlBlockedError.aspx" \
target="_blank">http://&lt;HOST \
HERE&gt;/imagenow/services/1.0/access_service/imagenow_access.wsdl</a>&quot;,<u></u><u></u></p>
 <p class="MsoNormal">&nbsp;&nbsp; ));<u></u><u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<u></u></p>
<p class="MsoNormal">&nbsp; $access_proxy = \
$access_client-&gt;getProxy();<u></u><u></u></p> <p \
class="MsoNormal"><u></u>&nbsp;<u></u></p> <p class="MsoNormal">&nbsp; $req = \
array(<u></u><u></u></p> <p \
class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
'LOCALE'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; \
&quot;US_en&quot;,&nbsp; // locale of client<u></u><u></u></p> <p \
class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;…<u></u><u></u></p> <p \
class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<u></u><u></u></p>
 <p class="MsoNormal"><u></u>&nbsp;<u></u></p>
<p class="MsoNormal">&nbsp;&nbsp;$return = \
$access_proxy-&gt;ACCESS_SESSION_BEGIN_USING_PASSWORD($req);<u></u><u></u></p> \
<p><u></u>&nbsp;<u></u></p> <p><u></u>&nbsp;<u></u></p>
<p>The problem seems to be with the sig model.&nbsp; In \
./wso2-wsf-php-src-2.1.0/scripts/wsf_wsdl.php, function \
wsf_process_wsdl($wsdata)<u></u><u></u></p> <p><u></u>&nbsp;<u></u></p>
<p>The value of $sig_model_string &nbsp;= $wsdata-&gt;WSDL_SigModelString is \
<u></u><u></u></p> <p><u></u>&nbsp;<u></u></p>
<p>&lt;?xml version=&quot;1.0&quot;?&gt;<u></u><u></u></p>
<p>&lt;services xmlns:xs=&quot;<a href="http://www.w3.org/2001/XMLSchema" \
target="_blank">http://www.w3.org/2001/XMLSchema</a>&quot; xmlns:wsp12=&quot;<a \
href="http://schemas.xmlsoap.org/ws/2004/09/policy" \
target="_blank">http://schemas.xmlsoap.org/ws/2004/09/policy</a>&quot; \
xmlns:wsu=&quot;<a href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" \
target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a>&quot;
  xmlns:sp=&quot;<a href="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy" \
target="_blank">http://schemas.xmlsoap.org/ws/2005/07/securitypolicy</a>&quot;/&gt;<u></u><u></u></p>
 <p><u></u>&nbsp;<u></u></p>
<p><u></u>&nbsp;<u></u></p>
<p>This value from $sig_model_dom-&gt;loadXML($sig_model_string) is passed to \
wsf_get_endpoint_address in \
wso2-wsf-php-src-2.1.0/scripts/dynamic_invocation/wsf_wsdl_util.php<u></u><u></u></p> \
<p><u></u>&nbsp;<u></u></p> <p class="MsoNormal">function \
wsf_get_endpoint_address(DomDocument $sig_model_dom) {<u></u><u></u></p> <p \
class="MsoNormal">&nbsp;&nbsp;&nbsp; \
require_once('wsf_wsdl_consts.php');<u></u><u></u></p> <p \
class="MsoNormal">&nbsp;&nbsp;&nbsp; $services_node = \
$sig_model_dom-&gt;firstChild;<u></u><u></u></p> <p \
class="MsoNormal">&nbsp;&nbsp;&nbsp; $service_node = \
$services_node-&gt;firstChild;<u></u><u></u></p> <p \
class="MsoNormal">&nbsp;&nbsp;&nbsp; $service_attr = \
$service_node-&gt;attributes;<u></u><u></u></p> <p \
class="MsoNormal"><u></u>&nbsp;<u></u></p> <p class="MsoNormal">&nbsp;&nbsp;&nbsp; \
return $service_attr-&gt;getNamedItem(WSF_ADDRESS)-&gt;value;<u></u><u></u></p> <p \
class="MsoNormal">}<u></u><u></u></p> <p><u></u>&nbsp;<u></u></p>
<p>Where these errors occur:<u></u><u></u></p>
<p><u></u>&nbsp;<u></u></p>
<p class="MsoNormal">PHP Notice:&nbsp; Trying to get property of non-object in \
/usr/local/wso2/wso2-wsf-php-src-2.1.0/scripts/dynamic_invocation/wsf_wsdl_util.php \
on line 240<u></u><u></u></p> <p class="MsoNormal">PHP Fatal error:&nbsp; Call to a \
member function getNamedItem() on a non-object in \
/usr/local/wso2/wso2-wsf-php-src-2.1.0/scripts/dynamic_invocation/wsf_wsdl_util.php \
on line 246<u></u><u></u></p> <p class="MsoNormal"><u></u>&nbsp;<u></u></p>
<p class="MsoNormal">(line numbers are slightly different from distribution due to \
debug code I added)<u></u><u></u></p> <p><u></u>&nbsp;<u></u></p>
<p class="MsoNormal">I don’t think I am giving it a sig model, maybe the wso2 library \
is generating it.&nbsp; How can I fix this error?<u></u><u></u></p> <p \
class="MsoNormal"><u></u>&nbsp;<u></u></p> <p class="MsoNormal">Let me know if you \
want me to post any more info. <u></u><u></u></p> <p \
class="MsoNormal"><u></u>&nbsp;<u></u></p> <p \
class="MsoNormal">Thanks,<u></u><u></u></p> <p \
class="MsoNormal">Doug<u></u><u></u></p> <p \
class="MsoNormal"><u></u>&nbsp;<u></u></p> </div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
User mailing list<br>
<a href="mailto:User@wso2.org" target="_blank">User@wso2.org</a><br>
<a href="http://wso2.org/cgi-bin/mailman/listinfo/user" \
target="_blank">http://wso2.org/cgi-bin/mailman/listinfo/user</a><br> <br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Nandika Jayawardana<br>
Technical Lead <br>
WSO2 Inc ; <a href="http://wso2.com" target="_blank">http://wso2.com</a><br>
lean.enterprise.middleware<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>



_______________________________________________
User mailing list
User@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/user

--===============6849877677801633517==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic