<?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: My experiences with SOAP Web-service PHP vs .NET</title>
	<atom:link href="http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/</link>
	<description>DiGiTSS Team&#039;s Programming experience with PHP, MySQL, Ajax, Javascript, jQuery, C# and Microsoft technologies</description>
	<lastBuildDate>Thu, 04 Mar 2010 12:54:12 +0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dharmavirsinh Jhala</title>
		<link>http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/comment-page-1/#comment-11784</link>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
		<pubDate>Mon, 15 Feb 2010 18:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/#comment-11784</guid>
		<description>Dear Michael,
I looked at the code and executed that. I am getting same error message as you are getting.
Though I have consumed webservice from PHP by both .NET or PHP or Apache Axis but never faced problem similar to this.
I will try again on this. But a question I am assuming that you don&#039;t have access to .NET code at all of &quot;https://webservice.artdata.slu.se/WebService/ArtDatabankenService.svc&quot; am I correct? To me it seems like there could be some config error from .NET side..as it seems like from what I looked at some forums.

Will get back to you in couple of days.. when I will get some more time to look at this.
Let me know if you get some solution on this.</description>
		<content:encoded><![CDATA[<p>Dear Michael,<br />
I looked at the code and executed that. I am getting same error message as you are getting.<br />
Though I have consumed webservice from PHP by both .NET or PHP or Apache Axis but never faced problem similar to this.<br />
I will try again on this. But a question I am assuming that you don&#8217;t have access to .NET code at all of &#8220;https://webservice.artdata.slu.se/WebService/ArtDatabankenService.svc&#8221; am I correct? To me it seems like there could be some config error from .NET side..as it seems like from what I looked at some forums.</p>
<p>Will get back to you in couple of days.. when I will get some more time to look at this.<br />
Let me know if you get some solution on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Krikorev</title>
		<link>http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/comment-page-1/#comment-11771</link>
		<dc:creator>Michael Krikorev</dc:creator>
		<pubDate>Sat, 13 Feb 2010 22:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/#comment-11771</guid>
		<description>Dear Dharmavirsinh Jhala!

I&#039;ve been tearing my hair of for weeks trying to build a simple PHP-client for a .NET Web Service. I&#039;ve tried PHP:s Soap Extension witout any luck. Keep getting a SoapFault object error saying &quot;Internal Server Error&quot; (see  http://exportalen.se/soapclient.php )
 
I know that the webservice is working with existing .NET clients, but I can&#039;t get it to work with a PHP-client (and I dont have access to the Web Service configuraton).

The Web Service use WS-Addressing 1.0 and SOAP 1.2 over a https URL: https://webservice.artdata.slu.se/WebService/ArtDatabankenService.svc?wsdl

I would be very grateful for any help to solve my problem! Someone said that I have to use xml-rpc (but I dont know how to use it together with the information in the WSDL-file).

MyPHP configuration is this:
http://exportalen.se/php.php

Many thanks in advance!
/Michael

Source code of my PHP-client (exportalen.se/soapclient.php) that generates an error:

$url = &quot;https://webservice.artdata.slu.se/WebService/ArtDatabankenService.svc?wsdl&quot;;
$params = array(&#039;userName&#039;=&gt;&#039;my_username&#039;, &#039;password&#039;=&gt;&#039;my_password&#039;);
$client = new SoapClient($url, array(&quot;trace&quot;=&gt;1,&quot;exceptions&quot;=&gt;0, &quot;soap_version&quot;=&gt;SOAP_1_2));
//$client = new SoapClient(null, array(&#039;location&#039; =&gt; $url, &#039;uri&#039;=&gt;&#039;urn:WebServices.ArDataBanken.slu.se&#039;, &#039;trace&#039;=&gt;1, &#039;exceptions&#039;=&gt;0, &#039;soap_version&#039;=&gt;SOAP_1_2 ));

echo &quot;&quot;;
$result = $client-&gt;Login($params);
print_r($result);

echo(&quot;\nRequest:\n&quot;. htmlspecialchars($client-&gt;__getLastRequest())); 
echo(&quot;\nRequest Headers:\n&quot;. htmlspecialchars($client-&gt;__getLastRequestHeaders()));
echo(&quot;\nResponse Headers:\n&quot;. htmlspecialchars($client-&gt;__getLastResponseHeaders()));
echo(&quot;\nResponse:\n&quot;. htmlspecialchars($client-&gt;__getLastResponse()));
echo &quot;\n\nFunctions and Types:\n&quot;;
print_r($client-&gt;__getFunctions());
print_r($client-&gt;__getTypes());

echo &quot;\n&quot;;</description>
		<content:encoded><![CDATA[<p>Dear Dharmavirsinh Jhala!</p>
<p>I&#8217;ve been tearing my hair of for weeks trying to build a simple PHP-client for a .NET Web Service. I&#8217;ve tried PHP:s Soap Extension witout any luck. Keep getting a SoapFault object error saying &#8220;Internal Server Error&#8221; (see  <a href="http://exportalen.se/soapclient.php">http://exportalen.se/soapclient.php</a> )</p>
<p>I know that the webservice is working with existing .NET clients, but I can&#8217;t get it to work with a PHP-client (and I dont have access to the Web Service configuraton).</p>
<p>The Web Service use WS-Addressing 1.0 and SOAP 1.2 over a https URL: <a href="https://webservice.artdata.slu.se/WebService/ArtDatabankenService.svc?wsdl">https://webservice.artdata.slu.se/WebService/ArtDatabankenService.svc?wsdl</a></p>
<p>I would be very grateful for any help to solve my problem! Someone said that I have to use xml-rpc (but I dont know how to use it together with the information in the WSDL-file).</p>
<p>MyPHP configuration is this:<br />
<a href="http://exportalen.se/php.php">http://exportalen.se/php.php</a></p>
<p>Many thanks in advance!<br />
/Michael</p>
<p>Source code of my PHP-client (exportalen.se/soapclient.php) that generates an error:</p>
<p>$url = &#8220;https://webservice.artdata.slu.se/WebService/ArtDatabankenService.svc?wsdl&#8221;;<br />
$params = array(&#8216;userName&#8217;=&gt;&#8217;my_username&#8217;, &#8216;password&#8217;=&gt;&#8217;my_password&#8217;);<br />
$client = new SoapClient($url, array(&#8220;trace&#8221;=&gt;1,&#8221;exceptions&#8221;=&gt;0, &#8220;soap_version&#8221;=&gt;SOAP_1_2));<br />
//$client = new SoapClient(null, array(&#8216;location&#8217; =&gt; $url, &#8216;uri&#8217;=&gt;&#8217;urn:WebServices.ArDataBanken.slu.se&#8217;, &#8216;trace&#8217;=&gt;1, &#8216;exceptions&#8217;=&gt;0, &#8217;soap_version&#8217;=&gt;SOAP_1_2 ));</p>
<p>echo &#8220;&#8221;;<br />
$result = $client-&gt;Login($params);<br />
print_r($result);</p>
<p>echo(&#8220;\nRequest:\n&#8221;. htmlspecialchars($client-&gt;__getLastRequest()));<br />
echo(&#8220;\nRequest Headers:\n&#8221;. htmlspecialchars($client-&gt;__getLastRequestHeaders()));<br />
echo(&#8220;\nResponse Headers:\n&#8221;. htmlspecialchars($client-&gt;__getLastResponseHeaders()));<br />
echo(&#8220;\nResponse:\n&#8221;. htmlspecialchars($client-&gt;__getLastResponse()));<br />
echo &#8220;\n\nFunctions and Types:\n&#8221;;<br />
print_r($client-&gt;__getFunctions());<br />
print_r($client-&gt;__getTypes());</p>
<p>echo &#8220;\n&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dharmavirsinh Jhala</title>
		<link>http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/comment-page-1/#comment-10972</link>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
		<pubDate>Mon, 29 Jun 2009 17:27:25 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/#comment-10972</guid>
		<description>Dear Friend,
I am sure I would be able to help you out.
Just provide me your current wsdl and I can send you the modified version of wsdl.
But yes then you have to use that version of wsdl instead of relying on auto-generation feature of Zend-framework.</description>
		<content:encoded><![CDATA[<p>Dear Friend,<br />
I am sure I would be able to help you out.<br />
Just provide me your current wsdl and I can send you the modified version of wsdl.<br />
But yes then you have to use that version of wsdl instead of relying on auto-generation feature of Zend-framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toolsche</title>
		<link>http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/comment-page-1/#comment-10969</link>
		<dc:creator>toolsche</dc:creator>
		<pubDate>Mon, 29 Jun 2009 11:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/#comment-10969</guid>
		<description>Hi,

We are having issues consuming a PHP web-service with C#. The Problem is, that .NET can&#039;t correctly interprete the complex Array type Zend generated in the WSDL.

XSD:
----
						list of articles in basket																								



WSDL:
-----






















C# reference.cs:
----------------
public PWDA_CouponCode checkCouponCode(string couponCode, string mandantID, string mandantCountry, string shippingCountry, PWDA_Articles articles)...

[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(&quot;code&quot;)]
[System.Xml.Serialization.XmlTypeAttribute(Namespace=&quot;urn:PWDAService&quot;)]
    public partial class PWDA_ArticleArray : Array {
    }

[System.Xml.Serialization.XmlIncludeAttribute(typeof(PWDA_ArticleArray))]
[System.SerializableAttribute()][System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(&quot;code&quot;)] [System.Xml.Serialization.XmlTypeAttribute(Namespace=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;)]
    public partial class Array {
        private System.Xml.XmlElement[] anyField;
        private string arrayTypeField;
        private string offsetField;
        private bool offsetFieldSpecified;
        private string idField;
        private string hrefField;
        private System.Xml.XmlAttribute[] anyAttrField;
...

[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(&quot;code&quot;)]
[System.Xml.Serialization.XmlTypeAttribute(Namespace=&quot;urn:PWDAService&quot;)]
    public partial class PWDA_Article {
        private string amountField;
        private string articleIDField;
...


Did anyone did solve this issue and can tell if the Zend WSDL generator can produce sth that .NET can interprete in order to generate sth like this:


public PWDA_CouponCode checkCouponCode(string couponCode, string mandantID, string mandantCountry, string shippingCountry, PWDA_Article[] articles)</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>We are having issues consuming a PHP web-service with C#. The Problem is, that .NET can&#8217;t correctly interprete the complex Array type Zend generated in the WSDL.</p>
<p>XSD:<br />
&#8212;-<br />
						list of articles in basket																								</p>
<p>WSDL:<br />
&#8212;&#8211;</p>
<p>C# reference.cs:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
public PWDA_CouponCode checkCouponCode(string couponCode, string mandantID, string mandantCountry, string shippingCountry, PWDA_Articles articles)&#8230;</p>
<p>[System.SerializableAttribute()]<br />
[System.Diagnostics.DebuggerStepThroughAttribute()]<br />
[System.ComponentModel.DesignerCategoryAttribute("code")]<br />
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:PWDAService")]<br />
    public partial class PWDA_ArticleArray : Array {<br />
    }</p>
<p>[System.Xml.Serialization.XmlIncludeAttribute(typeof(PWDA_ArticleArray))]<br />
[System.SerializableAttribute()][System.Diagnostics.DebuggerStepThroughAttribute()]<br />
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.xmlsoap.org/soap/encoding/")]<br />
    public partial class Array {<br />
        private System.Xml.XmlElement[] anyField;<br />
        private string arrayTypeField;<br />
        private string offsetField;<br />
        private bool offsetFieldSpecified;<br />
        private string idField;<br />
        private string hrefField;<br />
        private System.Xml.XmlAttribute[] anyAttrField;<br />
&#8230;</p>
<p>[System.SerializableAttribute()]<br />
[System.Diagnostics.DebuggerStepThroughAttribute()]<br />
[System.ComponentModel.DesignerCategoryAttribute("code")]<br />
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:PWDAService")]<br />
    public partial class PWDA_Article {<br />
        private string amountField;<br />
        private string articleIDField;<br />
&#8230;</p>
<p>Did anyone did solve this issue and can tell if the Zend WSDL generator can produce sth that .NET can interprete in order to generate sth like this:</p>
<p>public PWDA_CouponCode checkCouponCode(string couponCode, string mandantID, string mandantCountry, string shippingCountry, PWDA_Article[] articles)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dharmavirsinh Jhala</title>
		<link>http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/comment-page-1/#comment-211</link>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
		<pubDate>Wed, 07 May 2008 18:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/#comment-211</guid>
		<description>Hi Vivek,

Do you have php code for that service or could you just publish WSDL for that?
As the reason being it is possible that SOAP version conflict or xml specification issue with that.

If that third party extension is using PHP SOAP extension then lot of things depends on WSDL specification, as PHP&#039;s SOAP extension (SoapServer) will read the WSDL and parse response XML envelope in that manner.

For that you can do at least one thing, try creating PHP SoapClient and test it with PHP Client and see do you get proper result or not?

Here is the possible sample code for creating Test Client in PHP for your web service.


$LoginClient = new SoapClient(&quot;http://localhost/services/login.wsdl&quot;, array(&quot;trace&quot;=&gt;1));

// See the functions webservice is exposing
echo &#039;&lt;pre&gt;&#039;;
print_r($LoginClient-&gt;__getFunctions());

// Call the function
try
{
   $arrResponse = $LoginClient-&gt;Logon(&quot;abc&quot;, &quot;pqr&quot;, &quot;xyz&quot;);
}
catch(SoapFault $exception)
{
   echo $exception;
}

// Print response on screen
print_r($arrResponse);

// See what kind of xml request SoapClient is sending
$LoginClient-&gt;__getLastRequest();

// Check with what kind of xml response SoapServer is responding back
$LoginClient-&gt;getLastResponse();

Let&#039;s see whether it helped or not? If you can provide wsdl then it would be easier to help.</description>
		<content:encoded><![CDATA[<p>Hi Vivek,</p>
<p>Do you have php code for that service or could you just publish WSDL for that?<br />
As the reason being it is possible that SOAP version conflict or xml specification issue with that.</p>
<p>If that third party extension is using PHP SOAP extension then lot of things depends on WSDL specification, as PHP&#8217;s SOAP extension (SoapServer) will read the WSDL and parse response XML envelope in that manner.</p>
<p>For that you can do at least one thing, try creating PHP SoapClient and test it with PHP Client and see do you get proper result or not?</p>
<p>Here is the possible sample code for creating Test Client in PHP for your web service.</p>
<p>$LoginClient = new SoapClient(&#8220;http://localhost/services/login.wsdl&#8221;, array(&#8220;trace&#8221;=>1));</p>
<p>// See the functions webservice is exposing<br />
echo &#8216;&lt;pre&gt;&#8217;;<br />
print_r($LoginClient->__getFunctions());</p>
<p>// Call the function<br />
try<br />
{<br />
   $arrResponse = $LoginClient->Logon(&#8220;abc&#8221;, &#8220;pqr&#8221;, &#8220;xyz&#8221;);<br />
}<br />
catch(SoapFault $exception)<br />
{<br />
   echo $exception;<br />
}</p>
<p>// Print response on screen<br />
print_r($arrResponse);</p>
<p>// See what kind of xml request SoapClient is sending<br />
$LoginClient->__getLastRequest();</p>
<p>// Check with what kind of xml response SoapServer is responding back<br />
$LoginClient->getLastResponse();</p>
<p>Let&#8217;s see whether it helped or not? If you can provide wsdl then it would be easier to help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vivek Despande</title>
		<link>http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/comment-page-1/#comment-204</link>
		<dc:creator>Vivek Despande</dc:creator>
		<pubDate>Wed, 07 May 2008 10:13:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/#comment-204</guid>
		<description>Hello All,

 

I am calling third party php webservice in my asp.net application.

 

LocalhostXYZ srvLogin = new Localhost.XYZ();

 

Localhost.LogonResponseArray arryObj = new LogonResponseArray();

 

arryObj = srvLogin.logon(&quot;abc&quot;, &quot;pqr&quot;, &quot;xyz&quot;);

 

Where logon() is API from Php Web service.

 

Return type of logon() method is LogonResponseArray class which is of array type.

 

I am facing one problem that  arryObj returns null value.

 

So can any one tell me how can i get proper value.

 

Thanks 

 

Vivek Deshpande</description>
		<content:encoded><![CDATA[<p>Hello All,</p>
<p>I am calling third party php webservice in my asp.net application.</p>
<p>LocalhostXYZ srvLogin = new Localhost.XYZ();</p>
<p>Localhost.LogonResponseArray arryObj = new LogonResponseArray();</p>
<p>arryObj = srvLogin.logon(&#8220;abc&#8221;, &#8220;pqr&#8221;, &#8220;xyz&#8221;);</p>
<p>Where logon() is API from Php Web service.</p>
<p>Return type of logon() method is LogonResponseArray class which is of array type.</p>
<p>I am facing one problem that  arryObj returns null value.</p>
<p>So can any one tell me how can i get proper value.</p>
<p>Thanks </p>
<p>Vivek Deshpande</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vivek Despande</title>
		<link>http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/comment-page-1/#comment-203</link>
		<dc:creator>Vivek Despande</dc:creator>
		<pubDate>Wed, 07 May 2008 10:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/php/my-experiences-with-soap-web-service-php-vs-net/#comment-203</guid>
		<description>Currently i m facing the problem of php web service . Actually i m calling php web service in my asp.net application . i am calling one API which returns array of class but when i am calling from it dotnet application it returns null value. 

Can you please help me for that. 

Thanks 

Vivek</description>
		<content:encoded><![CDATA[<p>Currently i m facing the problem of php web service . Actually i m calling php web service in my asp.net application . i am calling one API which returns array of class but when i am calling from it dotnet application it returns null value. </p>
<p>Can you please help me for that. </p>
<p>Thanks </p>
<p>Vivek</p>
]]></content:encoded>
	</item>
</channel>
</rss>
