<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Sending Custom SOAP Headers in PHP Web Services</title>
	<atom:link href="http://www.dimuthu.org/blog/2008/11/03/sending-custom-soap-headers-in-php-web-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dimuthu.org/blog/2008/11/03/sending-custom-soap-headers-in-php-web-services/</link>
	<description>Waiting for your comments</description>
	<lastBuildDate>Thu, 01 Dec 2011 06:50:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: dimuthu</title>
		<link>http://www.dimuthu.org/blog/2008/11/03/sending-custom-soap-headers-in-php-web-services/comment-page-1/#comment-13267</link>
		<dc:creator>dimuthu</dc:creator>
		<pubDate>Tue, 06 Oct 2009 15:53:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=572#comment-13267</guid>
		<description>Yea, the service can ignore soap headers unless mustUnderstand=true is set according to the soap spec. Infact it is the requesters way of enforcing the receiver what should be processed in the request message header.

The most common case is the server enforce some rules by associating a policy (according to the ws-policy spec) to a service. In that case the server is expected to validate the request with the policy, probably what you too want to happen.

Thanks
Dimuthu</description>
		<content:encoded><![CDATA[<p>Yea, the service can ignore soap headers unless mustUnderstand=true is set according to the soap spec. Infact it is the requesters way of enforcing the receiver what should be processed in the request message header.</p>
<p>The most common case is the server enforce some rules by associating a policy (according to the ws-policy spec) to a service. In that case the server is expected to validate the request with the policy, probably what you too want to happen.</p>
<p>Thanks<br />
Dimuthu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Massimo</title>
		<link>http://www.dimuthu.org/blog/2008/11/03/sending-custom-soap-headers-in-php-web-services/comment-page-1/#comment-13262</link>
		<dc:creator>Massimo</dc:creator>
		<pubDate>Tue, 06 Oct 2009 08:56:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=572#comment-13262</guid>
		<description>Hi Dimuthu,

Thank you for the quick and clear reply.

What I need to handle is a custom header indeed, so the &quot;custom mustUnderstand&quot; solution you advice is the way to go.

Truth to tell, the whole concept seems of little use when applied to custom headers ... if you put them there, it&#039;s because you need to handle them anyway,  while you are entitled to silently ignore any &quot;unknown&quot; custom header you may receive, isn&#039;t it?

Have a nice day,
Massimo</description>
		<content:encoded><![CDATA[<p>Hi Dimuthu,</p>
<p>Thank you for the quick and clear reply.</p>
<p>What I need to handle is a custom header indeed, so the &#8220;custom mustUnderstand&#8221; solution you advice is the way to go.</p>
<p>Truth to tell, the whole concept seems of little use when applied to custom headers &#8230; if you put them there, it&#8217;s because you need to handle them anyway,  while you are entitled to silently ignore any &#8220;unknown&#8221; custom header you may receive, isn&#8217;t it?</p>
<p>Have a nice day,<br />
Massimo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dimuthu</title>
		<link>http://www.dimuthu.org/blog/2008/11/03/sending-custom-soap-headers-in-php-web-services/comment-page-1/#comment-13251</link>
		<dc:creator>dimuthu</dc:creator>
		<pubDate>Tue, 06 Oct 2009 01:52:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=572#comment-13251</guid>
		<description>Hi Massimo,
As you may know WSF/PHP is based on axis2/c. You get the WS-Security, WS-Reliable Messaging(RM) or WS-Addressing features in WSF/PHP because Axis2/C has these specifications implemented as Axis2/C handlers. What these handlers do is process the relevant headers for that handlers (for an example Security handlers processes Security headers and mark it as processed), This happens before invoking the users business logic. If the handlers failed to identify some &#039;mustUnderstand&#039; header the invocation will fail before hitting the users business logic.

In WSF/PHP, we are only allowing you to write business logic in PHP. But doesn&#039;t allow write Handlers in PHP. So whenever you set some custom handler to be &#039;mustUnderstand&#039; true, then the default handlers in WSF/PHP will not understand it and fails before hitting your php logic.

This can be solved by allowing PHP users to write handlers in PHP. But this will surely complicate the current PHP API. 

And the other solution (which I recommend) you can do is use a custom mustUnderstand attribute like &#039;MyMustUnderstand&#039;. I&#039;m saying this because you are more likely writing a non-standard custom header. The whole point of using &#039;mustUnderstand&#039; attribute is the interoperability with systems like .NET and other Java Frameworks. WSF/PHP already interop with these systems in terms of Security, RM. Your custom header will anyway not be there in other WS frameworks unless you implement it specifically. 

In a case you actually writing a standard header that is not supported in WSF/PHP, then it is always better you write it in C as an Axis2/C handler. 

This is just my thought. It is up to you to choose a good approach.

Thanks
Dimuthu</description>
		<content:encoded><![CDATA[<p>Hi Massimo,<br />
As you may know WSF/PHP is based on axis2/c. You get the WS-Security, WS-Reliable Messaging(RM) or WS-Addressing features in WSF/PHP because Axis2/C has these specifications implemented as Axis2/C handlers. What these handlers do is process the relevant headers for that handlers (for an example Security handlers processes Security headers and mark it as processed), This happens before invoking the users business logic. If the handlers failed to identify some &#8216;mustUnderstand&#8217; header the invocation will fail before hitting the users business logic.</p>
<p>In WSF/PHP, we are only allowing you to write business logic in PHP. But doesn&#8217;t allow write Handlers in PHP. So whenever you set some custom handler to be &#8216;mustUnderstand&#8217; true, then the default handlers in WSF/PHP will not understand it and fails before hitting your php logic.</p>
<p>This can be solved by allowing PHP users to write handlers in PHP. But this will surely complicate the current PHP API. </p>
<p>And the other solution (which I recommend) you can do is use a custom mustUnderstand attribute like &#8216;MyMustUnderstand&#8217;. I&#8217;m saying this because you are more likely writing a non-standard custom header. The whole point of using &#8216;mustUnderstand&#8217; attribute is the interoperability with systems like .NET and other Java Frameworks. WSF/PHP already interop with these systems in terms of Security, RM. Your custom header will anyway not be there in other WS frameworks unless you implement it specifically. </p>
<p>In a case you actually writing a standard header that is not supported in WSF/PHP, then it is always better you write it in C as an Axis2/C handler. </p>
<p>This is just my thought. It is up to you to choose a good approach.</p>
<p>Thanks<br />
Dimuthu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Massimo</title>
		<link>http://www.dimuthu.org/blog/2008/11/03/sending-custom-soap-headers-in-php-web-services/comment-page-1/#comment-13231</link>
		<dc:creator>Massimo</dc:creator>
		<pubDate>Mon, 05 Oct 2009 15:53:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=572#comment-13231</guid>
		<description>Hi Dimuthu,

I&#039;m currently using WSF/PHP 2.0 and have a problem related to the mustUnderstand option of WSHeader ... hope you can lend me a hand.

I modified the provided add_soap_header_client.php so that it sets mustUnderstand to 1 (true), but now the called echo_service.php returns &quot;Soap Fault: Header not understood&quot;.

According to http://wso2.org/library/tutorials/understand-famous-did-not-understand-mustunderstand-header-s-error
one should provide a custom handler for  the header and set a &quot;processed&quot; flag, but the article is geared to Axis2 and the samples do not directly apply to PHP.

So my question is: how do you write a server-side PHP script to handle request headers with the mustUnderstand option set to &quot;true&quot;?</description>
		<content:encoded><![CDATA[<p>Hi Dimuthu,</p>
<p>I&#8217;m currently using WSF/PHP 2.0 and have a problem related to the mustUnderstand option of WSHeader &#8230; hope you can lend me a hand.</p>
<p>I modified the provided add_soap_header_client.php so that it sets mustUnderstand to 1 (true), but now the called echo_service.php returns &#8220;Soap Fault: Header not understood&#8221;.</p>
<p>According to <a href="http://wso2.org/library/tutorials/understand-famous-did-not-understand-mustunderstand-header-s-error" rel="nofollow">http://wso2.org/library/tutorials/understand-famous-did-not-understand-mustunderstand-header-s-error</a><br />
one should provide a custom handler for  the header and set a &#8220;processed&#8221; flag, but the article is geared to Axis2 and the samples do not directly apply to PHP.</p>
<p>So my question is: how do you write a server-side PHP script to handle request headers with the mustUnderstand option set to &#8220;true&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dimuthu</title>
		<link>http://www.dimuthu.org/blog/2008/11/03/sending-custom-soap-headers-in-php-web-services/comment-page-1/#comment-5091</link>
		<dc:creator>dimuthu</dc:creator>
		<pubDate>Wed, 01 Apr 2009 12:25:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=572#comment-5091</guid>
		<description>I can&#039;t understand what has you typed. May be you need to escape html special characters with wildcards</description>
		<content:encoded><![CDATA[<p>I can&#8217;t understand what has you typed. May be you need to escape html special characters with wildcards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavulon</title>
		<link>http://www.dimuthu.org/blog/2008/11/03/sending-custom-soap-headers-in-php-web-services/comment-page-1/#comment-5090</link>
		<dc:creator>Pavulon</dc:creator>
		<pubDate>Wed, 01 Apr 2009 10:51:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.dimuthu.org/?p=572#comment-5090</guid>
		<description>Hi. I&#039;m having problem width SOAPy thing. Can You help me with this one? I have in requests something like this:





SOME VALUE HERE
SOME VALUE HERE



(...)



but i have to do it like this:



  
    
      SOME VALUE
      SOME VALUE
    
  
  
   (...)
  


I tred to search some solution for having such requests, somone had  the same problem but noone could help him. Albo there&#039;s no answer for this in tutorials etc. Could You help me?</description>
		<content:encoded><![CDATA[<p>Hi. I&#8217;m having problem width SOAPy thing. Can You help me with this one? I have in requests something like this:</p>
<p>SOME VALUE HERE<br />
SOME VALUE HERE</p>
<p>(&#8230;)</p>
<p>but i have to do it like this:</p>
<p>      SOME VALUE<br />
      SOME VALUE</p>
<p>   (&#8230;)</p>
<p>I tred to search some solution for having such requests, somone had  the same problem but noone could help him. Albo there&#8217;s no answer for this in tutorials etc. Could You help me?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

