Hi there,

 

I've developed a web service using axis. I've enclosed my entire WSDL in the
above attachement.

 

The problem I have is developing a client using php to use the
apachesoap:Element[] type. 

 

(From attached WSDL)

<complexType name="ArrayOf_apachesoap_Element">

      <complexContent>

<restriction base="soapenc:Array">

                  <attribute ref="soapenc:arrayType"
wsdl:arrayType="apachesoap:Element[]" /> 

            </restriction>

      </complexContent>

</complexType>

 

 

I generate a client proxy using wsdl2php tool.. Proxy code includes 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 />    </elements>'; 

$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.

 

Best regards

 

David

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:ValidationService" xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="urn:ValidationService" xmlns:intf="urn:ValidationService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema targetNamespace="urn:ValidationService" xmlns="http://www.w3.org/2001/XMLSchema";>
   <import namespace="http://xml.apache.org/xml-soap"/>
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="ArrayOf_xsd_int">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
     </restriction>
    </complexContent>
   </complexType>
   <complexType name="OCLRuleResult">
    <sequence>
     <element name="linesRulesFailedOn" nillable="true" type="impl:ArrayOf_xsd_int"/>
     <element name="result" nillable="true" type="xsd:boolean"/>
     <element name="ruleDescription" nillable="true" type="xsd:string"/>
     <element name="ruleName" nillable="true" type="xsd:string"/>
     <element name="wasRuleExecuted" nillable="true" type="xsd:boolean"/>
    </sequence>
   </complexType>
   <complexType name="OCLRuleResultArray">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:OCLRuleResult[]"/>
     </restriction>
    </complexContent>
   </complexType>
   <complexType name="OCLResults">
    <sequence>
     <element name="associatedSchema" nillable="true" type="xsd:string"/>
     <element name="oclrules" nillable="true" type="impl:OCLRuleResultArray"/>
     <element name="result" nillable="true" type="xsd:boolean"/>
    </sequence>
   </complexType>
   <complexType name="ArrayOfOCLResults">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:OCLResults[]"/>
     </restriction>
    </complexContent>
   </complexType>
   <complexType name="ArrayOf_xsd_string">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
     </restriction>
    </complexContent>
   </complexType>
   <complexType name="SchemaRule">
    <sequence>
     <element name="description" nillable="true" type="xsd:string"/>
     <element name="lineNumber" nillable="true" type="impl:ArrayOf_xsd_int"/>
    </sequence>
   </complexType>
   <complexType name="SchemaRuleArray">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SchemaRule[]"/>
     </restriction>
    </complexContent>
   </complexType>
   <complexType name="SchemaResult">
    <sequence>
     <element name="problems" nillable="true" type="impl:ArrayOf_xsd_string"/>
     <element name="result" nillable="true" type="xsd:boolean"/>
     <element name="schemaName" nillable="true" type="xsd:string"/>
     <element name="schemaRules" nillable="true" type="impl:SchemaRuleArray"/>
    </sequence>
   </complexType>
   <complexType name="SchemaResultArray">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:SchemaResult[]"/>
     </restriction>
    </complexContent>
   </complexType>
   <complexType name="ValidationResult">
    <sequence>
     <element name="oclResults" nillable="true" type="impl:ArrayOfOCLResults"/>
     <element name="result" nillable="true" type="xsd:boolean"/>
     <element name="schemaRules" nillable="true" type="impl:SchemaResultArray"/>
     <element name="unexpectedExceptions" nillable="true" type="impl:ArrayOf_xsd_string"/>
    </sequence>
   </complexType>
   <complexType name="ArrayOf_apachesoap_Element">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="apachesoap:Element[]"/>
     </restriction>
    </complexContent>
   </complexType>
   <complexType name="ValidateDetails">
    <sequence>
     <element name="elements" nillable="true" type="impl:ArrayOf_apachesoap_Element"/>
     <element name="pipeName" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
  </schema>
 </wsdl:types>

   <wsdl:message name="getEncodingRequest">

   </wsdl:message>

   <wsdl:message name="validateXMLAgainstPipeResponse">

      <wsdl:part name="validateXMLAgainstPipeReturn" type="impl:ValidationResult"/>

   </wsdl:message>

   <wsdl:message name="setPipeLocationRequest">

      <wsdl:part name="pipeLocation" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="validateXMLAgainstPipeRequest1">

      <wsdl:part name="details" type="impl:ValidateDetails"/>

   </wsdl:message>

   <wsdl:message name="validateXMLAgainstPipeResponse1">

      <wsdl:part name="validateXMLAgainstPipeReturn" type="impl:ValidationResult"/>

   </wsdl:message>

   <wsdl:message name="validateXMLAgainstPipeRequest">

      <wsdl:part name="fileURL" type="xsd:string"/>

      <wsdl:part name="pipeName" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="setPipeLocationResponse">

      <wsdl:part name="setPipeLocationReturn" type="xsd:boolean"/>

   </wsdl:message>

   <wsdl:message name="getEncodingResponse">

      <wsdl:part name="getEncodingReturn" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="getPipeLocationRequest">

   </wsdl:message>

   <wsdl:message name="getPipeLocationResponse">

      <wsdl:part name="getPipeLocationReturn" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="setEncodingResponse">

      <wsdl:part name="setEncodingReturn" type="xsd:boolean"/>

   </wsdl:message>

   <wsdl:message name="setEncodingRequest">

      <wsdl:part name="encoding" type="xsd:string"/>

   </wsdl:message>

   <wsdl:portType name="PipeService">

      <wsdl:operation name="getEncoding">

         <wsdl:input message="impl:getEncodingRequest" name="getEncodingRequest"/>

         <wsdl:output message="impl:getEncodingResponse" name="getEncodingResponse"/>

      </wsdl:operation>

      <wsdl:operation name="setEncoding" parameterOrder="encoding">

         <wsdl:input message="impl:setEncodingRequest" name="setEncodingRequest"/>

         <wsdl:output message="impl:setEncodingResponse" name="setEncodingResponse"/>

      </wsdl:operation>

      <wsdl:operation name="setPipeLocation" parameterOrder="pipeLocation">

         <wsdl:input message="impl:setPipeLocationRequest" name="setPipeLocationRequest"/>

         <wsdl:output message="impl:setPipeLocationResponse" name="setPipeLocationResponse"/>

      </wsdl:operation>

      <wsdl:operation name="getPipeLocation">

         <wsdl:input message="impl:getPipeLocationRequest" name="getPipeLocationRequest"/>

         <wsdl:output message="impl:getPipeLocationResponse" name="getPipeLocationResponse"/>

      </wsdl:operation>

      <wsdl:operation name="validateXMLAgainstPipe" parameterOrder="fileURL pipeName">

         <wsdl:input message="impl:validateXMLAgainstPipeRequest" name="validateXMLAgainstPipeRequest"/>

         <wsdl:output message="impl:validateXMLAgainstPipeResponse" name="validateXMLAgainstPipeResponse"/>

      </wsdl:operation>

      <wsdl:operation name="validateXMLAgainstPipe" parameterOrder="details">

         <wsdl:input message="impl:validateXMLAgainstPipeRequest1" name="validateXMLAgainstPipeRequest1"/>

         <wsdl:output message="impl:validateXMLAgainstPipeResponse1" name="validateXMLAgainstPipeResponse1"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="ValidationRepositorySoapBinding" type="impl:PipeService">

      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="getEncoding">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getEncodingRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://validate.nomos.com"; use="encoded"/>

         </wsdl:input>

         <wsdl:output name="getEncodingResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:ValidationService" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="setEncoding">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="setEncodingRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://validate.nomos.com"; use="encoded"/>

         </wsdl:input>

         <wsdl:output name="setEncodingResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:ValidationService" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="setPipeLocation">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="setPipeLocationRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://validate.nomos.com"; use="encoded"/>

         </wsdl:input>

         <wsdl:output name="setPipeLocationResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:ValidationService" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="getPipeLocation">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getPipeLocationRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://validate.nomos.com"; use="encoded"/>

         </wsdl:input>

         <wsdl:output name="getPipeLocationResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:ValidationService" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="validateXMLAgainstPipe">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="validateXMLAgainstPipeRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://validate.nomos.com"; use="encoded"/>

         </wsdl:input>

         <wsdl:output name="validateXMLAgainstPipeResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:ValidationService" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="validateXMLAgainstPipe">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="validateXMLAgainstPipeRequest1">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="http://validate.nomos.com"; use="encoded"/>

         </wsdl:input>

         <wsdl:output name="validateXMLAgainstPipeResponse1">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:ValidationService" use="encoded"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="PipeServiceService">

      <wsdl:port binding="impl:ValidationRepositorySoapBinding" name="ValidationRepository">

         <wsdlsoap:address location="http://localhost:8080/nomosValidationService/services/ValidationRepository"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to