2013-07-23 28 views
-1

所以我有一个WSDL,有些变量sended给我, 但我不知道以何种方式进入电影他们....如何存取权限的ComplexType变量

,我需要看起来WSDL部分像这样:

<s:element name="SaveRelation"> 
    <s:complexType> 
     <s:sequence> 
     <s:element minOccurs="0" maxOccurs="1" name="persistance" type="tns:Relation"/> 
     </s:sequence> 
    </s:complexType> 
</s:element> 

<s:complexType name="Relation"> 
    <s:sequence> 
     <s:element minOccurs="1" maxOccurs="1" name="GUID" type="s1:guid"/> 
     <s:element minOccurs="1" maxOccurs="1" name="ParentRelation" nillable="true" type="s1:guid"/> 
     <s:element minOccurs="0" maxOccurs="1" name="RelationName" type="s:string"/> 
     <s:element minOccurs="1" maxOccurs="1" name="VisitAddress" nillable="true" type="s1:guid"/> 
     <s:element minOccurs="1" maxOccurs="1" name="DeliveryAddress" nillable="true" type="s1:guid"/> 
     <s:element minOccurs="1" maxOccurs="1" name="Person_1" nillable="true" type="s1:guid"/> 
     <s:element minOccurs="1" maxOccurs="1" name="Person_2" nillable="true" type="s1:guid"/> 
     <s:element minOccurs="1" maxOccurs="1" name="Person_3" nillable="true" type="s1:guid"/> 
     <s:element minOccurs="1" maxOccurs="1" name="Person_4" nillable="true" type="s1:guid"/> 
     <s:element minOccurs="0" maxOccurs="1" name="Country" type="s:string"/> 
     <s:element minOccurs="0" maxOccurs="1" name="ChamberOfCommerceNumber" type="s:string"/> 
     <s:element minOccurs="0" maxOccurs="1" name="VatNumber" type="s:string"/> 
     <s:element minOccurs="0" maxOccurs="1" name="Fax" type="s:string"/> 
     <s:element minOccurs="0" maxOccurs="1" name="Telephone" type="s:string"/> 
     <s:element minOccurs="0" maxOccurs="1" name="InternetAddress" type="s:string"/> 
     <s:element minOccurs="0" maxOccurs="1" name="E_mail" type="s:string"/> 
     <s:element minOccurs="1" maxOccurs="1" name="Obsolete" type="s:boolean"/> 
    </s:sequence> 
</s:complexType> 

<wsdl:message name="SaveRelationSoapIn"> 
    <wsdl:part name="parameters" element="tns:SaveRelation"/> 
</wsdl:message> 

这些变量sended到我的服务器,我需要处理他们,并把他们在数据库中,然后返回OK /失败基于更迭或失败。 我已经有了一切工作,接受访问变量。

我试过类似$parameters.GUID , $parameters[0][0], $parameters[0].GUID的东西,第一个返回ArrayGUID,第二个返回nothing/empty,第三个也返回nothing/empty。

所以总结一下,我不知道如何访问Relation ComplexType中的变量。

回答

2

您是否尝试过var_dump()来自服务的响应?如果您能看到响应数据的结构,您应该能够确定如何达到这些值。

+0

当我尝试这个时,我在soapUI输出中得到各种奇怪的迹象,这是一个类可以发送到我的服务器而不是变量.... – notknown7777

+0

您是否使用PHP的本地SOAP客户端与此服务进行交互? http://php.net/manual/en/class.soapclient.php你可以使用它来调用服务方法,它也使得它更容易处理响应 – Tocacar

+0

这不是一个客户端,就像问题所述,这个是一个服务器,一个delphi应用程序发送一个请求以及class/complextype参数,然后服务器将处理该参数以将变量放入数据库中。不,我使用NuSoap创建这个服务器:) – notknown7777