开发者

ArrayOf_apachesoap_Element datatype for php web service client using wsdl2php

I am writing a web service client in PHP. web service is developed ij java using axis. Client proxy is generated using wsdl2php tool. Proxy code include the following code

class ValidateDetails {
  public $elements; // ArrayOf_apachesoap_Element
  public $pipeName; // string
}

and the parameters are set and service is called using the following code

$xml = '<elements> <some xml here />    </开发者_如何学Pythonelements>';
$xmlElement = new DOMElement('elements', $xml, '');

$details = new ValidateDetails();
$details->elements[0] =  $xmlElement;
$details->pipeName = 'mypipe';


$response = new ValidationResult();
$response = $client->validate($details);

However the SoapRequest object does not contain the nested xml inside the element node. It looks like this

<?xml version="1.0" encoding="UTF-8"?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://build.nomos.com" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="urn:CompilationService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:validate>
<details xsi:type="ns3:ValidateDetails">

<elements SOAP-ENC:arrayType="ns2:Element[1]" xsi:type="ns3:ArrayOf_apachesoap_Element">
<item xsi:type="SOAP-ENC:Struct"/>
</elements>


<pipeName xsi:type="xsd:string">mypipe</pipeName>
</details></ns1:validate></SOAP-ENV:Body></SOAP-ENV:Envelope> 

I am unable to understand how to populate the elements field with the correct xml. Please suggest what is this ArrayOf_apachesoap_Element datatype and how can i populate this parameter.


Apparently there is no solution for such kind of data type conversions, or at least i am not aware of this datatype. try to use standard data types such as string, if you have access to the host web service

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜