Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #43004 : Regarding bug #41004
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 12th August 06:22
php-bugs
External User
 
Posts: 1
Default #43004 : Regarding bug #41004



From: jreese at multiplexhq dot com
Operating system: All
PHP version: 5.2.4
PHP Bug Type: SOAP related
Bug description: Regarding bug #41004

Description:
------------
The fix provided in bug report #41004 has caused issues with a 3rd party
web service I am working with. As detailed in the referenced report, the
complextype has elements where minOccurs=0 and maxOccurs=1.

To quote from the bug report:

"When the corresponding class member is null, an empty element is send.
How i can tell the soap client to not send elements when minOccurs=0 and
the value is NULL?"

In our case, we need our soap client to still send the empty xml elements
if the class member is null.

The remote service is running on .NET and we do not have access to modify
the source. I could make a modified wsdl file but do not think it is the
best solution to override the wsdl provided by the service.

Below I'm going to use the same example in the previous bug report.

Reproduce code:
---------------
Complex type definition:
<complexType name="SimulateRequest">
<all>
<element name="product1Type" type="impl:Product1Type"/>
<element name="product1BankCardTypeCd"
type="impl:Product1BankCardTypeCd" minOccurs="0"/>
</all>
</complexType>

Php Code to call:
$simulationRequest[0]->setProduct1Type("CLA");
$simulationRequest[0]->setProduct1BankCardTypeCd(NULL);

Php class SimulateRequest extract:
class SimulateRequest{
private $product1Type ;
public function getProduct1Type(){
return $this->product1Type;
}
public function setProduct1Type($param){
$this->product1Type=$param;
}
private $product1BankCardTypeCd ;
public function getProduct1BankCardTypeCd(){
return $this->product1BankCardTypeCd;
}
public function setProduct1BankCardTypeCd($param){
$this->product1BankCardTypeCd=$param;
}

Expected result:
----------------
<ns1:simulationRequest>
<ns1roduct1Type>REV</ns1roduct1Type>
<ns1roduct1BankCardTypeCd/>
</ns1:simulationRequest>

Actual result:
--------------
<ns1:simulationRequest>
<ns1roduct1Type>REV</ns1roduct1Type>
</ns1:simulationRequest>

--
Edit bug report at http://bugs.php.net/?id=43004&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43004&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43004&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43004&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43004&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43004&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=43004&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43004&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43004&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43004&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43004&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43004&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=43004&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=43004&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43004&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43004&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43004&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43004&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43004&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43004&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43004&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43004&r=mysqlcfg
  Reply With Quote


  sponsored links


2 12th August 06:22
External User
 
Posts: 1
Default #43004 : Regarding bug #41004



ID: 43004
Updated by: dmitry@php.net
Reported By: jreese at multiplexhq dot com
-Status: Open
+Status: Assigned
Bug Type: SOAP related
Operating System: All
PHP Version: 5.2.4
-Assigned To:
+Assigned To: dmitry


Previous Comments:
------------------------------------------------------------------------

[2007-10-17 13:13:39] jreese at multiplexhq dot com

Description:
------------
The fix provided in bug report #41004 has caused issues with a 3rd
party web service I am working with. As detailed in the referenced
report, the complextype has elements where minOccurs=0 and maxOccurs=1.

To quote from the bug report:

"When the corresponding class member is null, an empty element is send.
How i can tell the soap client to not send elements when minOccurs=0 and
the value is NULL?"

In our case, we need our soap client to still send the empty xml
elements if the class member is null.

The remote service is running on .NET and we do not have access to
modify the source. I could make a modified wsdl file but do not think
it is the best solution to override the wsdl provided by the service.

Below I'm going to use the same example in the previous bug report.

Reproduce code:
---------------
Complex type definition:
<complexType name="SimulateRequest">
<all>
<element name="product1Type" type="impl:Product1Type"/>
<element name="product1BankCardTypeCd"
type="impl:Product1BankCardTypeCd" minOccurs="0"/>
</all>
</complexType>

Php Code to call:
$simulationRequest[0]->setProduct1Type("CLA");
$simulationRequest[0]->setProduct1BankCardTypeCd(NULL);

Php class SimulateRequest extract:
class SimulateRequest{
private $product1Type ;
public function getProduct1Type(){
return $this->product1Type;
}
public function setProduct1Type($param){
$this->product1Type=$param;
}
private $product1BankCardTypeCd ;
public function getProduct1BankCardTypeCd(){
return $this->product1BankCardTypeCd;
}
public function setProduct1BankCardTypeCd($param){
$this->product1BankCardTypeCd=$param;
}

Expected result:
----------------
<ns1:simulationRequest>
<ns1roduct1Type>REV</ns1roduct1Type>
<ns1roduct1BankCardTypeCd/>
</ns1:simulationRequest>

Actual result:
--------------
<ns1:simulationRequest>
<ns1roduct1Type>REV</ns1roduct1Type>
</ns1:simulationRequest>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=43004&edit=1
  Reply With Quote
3 12th August 06:23
External User
 
Posts: 1
Default #43004 : Regarding bug #41004


ID: 43004
Updated by: dmitry@php.net
Reported By: jreese at multiplexhq dot com
-Status: Assigned
+Status: Bogus
Bug Type: SOAP related
Operating System: All
PHP Version: 5.2.4
Assigned To: dmitry
New Comment:

The request asks to generate XML that doesn't conform to schema.
Hints were sent by email.


Previous Comments:
------------------------------------------------------------------------

[2007-10-17 13:13:39] jreese at multiplexhq dot com

Description:
------------
The fix provided in bug report #41004 has caused issues with a 3rd
party web service I am working with. As detailed in the referenced
report, the complextype has elements where minOccurs=0 and maxOccurs=1.

To quote from the bug report:

"When the corresponding class member is null, an empty element is send.
How i can tell the soap client to not send elements when minOccurs=0 and
the value is NULL?"

In our case, we need our soap client to still send the empty xml
elements if the class member is null.

The remote service is running on .NET and we do not have access to
modify the source. I could make a modified wsdl file but do not think
it is the best solution to override the wsdl provided by the service.

Below I'm going to use the same example in the previous bug report.

Reproduce code:
---------------
Complex type definition:
<complexType name="SimulateRequest">
<all>
<element name="product1Type" type="impl:Product1Type"/>
<element name="product1BankCardTypeCd"
type="impl:Product1BankCardTypeCd" minOccurs="0"/>
</all>
</complexType>

Php Code to call:
$simulationRequest[0]->setProduct1Type("CLA");
$simulationRequest[0]->setProduct1BankCardTypeCd(NULL);

Php class SimulateRequest extract:
class SimulateRequest{
private $product1Type ;
public function getProduct1Type(){
return $this->product1Type;
}
public function setProduct1Type($param){
$this->product1Type=$param;
}
private $product1BankCardTypeCd ;
public function getProduct1BankCardTypeCd(){
return $this->product1BankCardTypeCd;
}
public function setProduct1BankCardTypeCd($param){
$this->product1BankCardTypeCd=$param;
}

Expected result:
----------------
<ns1:simulationRequest>
<ns1roduct1Type>REV</ns1roduct1Type>
<ns1roduct1BankCardTypeCd/>
</ns1:simulationRequest>

Actual result:
--------------
<ns1:simulationRequest>
<ns1roduct1Type>REV</ns1roduct1Type>
</ns1:simulationRequest>


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=43004&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666