tags:

views:

238

answers:

0

I'm trying to consume a SOAP web service and some of the complexType's in the WSDL aren't getting back to PHP will all the expected data. Here's one example:

DataSheetAttribute definition from WSDL (http://ws.spexlive.net/service/soap/inquire?appId=1&wsdl):

<s:complexType mixed="true" name="DataSheetAttribute">
 <s:annotation>
  <s:documentation>
   One attribute of information belonging to a datasheet. The information is in the element body.
  </s:documentation>
 </s:annotation>
 <s:attribute name="n" type="s:string">
  <s:annotation>
   <s:documentation>
    The name of the information. Examples: Manufacturer Website Address, Print Speed.
   </s:documentation>
  </s:annotation>
 </s:attribute>
</s:complexType>

The DataSheetAttribute in the returned XML:

<attribute n="Product Name">Heavy Duty Packaging Cutter</attribute>

How it's represented in the PHP result:

object(stdClass)[12]
  public 'n' => string 'Product Name' (length=12)

Is there something wrong with the WSDL file or PHP? Is there some way to access the information?