need solution for creating soap request
Posted: Mon Jun 15, 2009 5:02 am
I am trying to create a soap request using soapval method, the method I am trying to call is login_authenticate_request which takes two complex types as arguements below is a sample request:
Sample Request 1
<login_authenticate_request dsn="think" >
<user_login_data>
<login>think</login>
<password>jukebox</password>
</user_login_data>
<customer_identifier>
<login>candyman</login>
<password>juniper</password>
</customer_identifier>
</login_authenticate_request>
the wsdl values for user_login_data are:
<xsd:element name="user_login_data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="login" type="xsd:string"/>
<xsd:element name="password" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
and customer_Identifier wsdl values are:
<xsd:element name="customer_identifier">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="customer_id" type="xsd:int" minOccurs="0" default="0"/>
<xsd:element name="login" type="xsd:string" minOccurs="0"/>
<xsd:element name="password" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="authentication_code" type="xsd:string"/>
<xsd:attribute name="target_element" type="xsd:string"/>
<xsd:attribute name="role" type="s0:ZZCustomerRole" use="optional" default="unspecified"/>
</xsd:complexType>
</xsd:element>
Now the operation I am trying to call is shown below
<xsd:element name="login_authenticate_request">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="s0:user_login_data"/>
<xsd:element ref="s0:customer_identifier"/>
</xsd:sequence>
<xsd:attribute name="dsn" type="xsd:string"/>
<xsd:attribute name="record_login_datetime" default="no" type="s0:ZZBoolean"/>
</xsd:complexType>
</xsd:element>
I want to create the client request using soapval method of nusoap library can someone please give me an example of this.
Many thanks
Sean
Sample Request 1
<login_authenticate_request dsn="think" >
<user_login_data>
<login>think</login>
<password>jukebox</password>
</user_login_data>
<customer_identifier>
<login>candyman</login>
<password>juniper</password>
</customer_identifier>
</login_authenticate_request>
the wsdl values for user_login_data are:
<xsd:element name="user_login_data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="login" type="xsd:string"/>
<xsd:element name="password" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
and customer_Identifier wsdl values are:
<xsd:element name="customer_identifier">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="customer_id" type="xsd:int" minOccurs="0" default="0"/>
<xsd:element name="login" type="xsd:string" minOccurs="0"/>
<xsd:element name="password" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="authentication_code" type="xsd:string"/>
<xsd:attribute name="target_element" type="xsd:string"/>
<xsd:attribute name="role" type="s0:ZZCustomerRole" use="optional" default="unspecified"/>
</xsd:complexType>
</xsd:element>
Now the operation I am trying to call is shown below
<xsd:element name="login_authenticate_request">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="s0:user_login_data"/>
<xsd:element ref="s0:customer_identifier"/>
</xsd:sequence>
<xsd:attribute name="dsn" type="xsd:string"/>
<xsd:attribute name="record_login_datetime" default="no" type="s0:ZZBoolean"/>
</xsd:complexType>
</xsd:element>
I want to create the client request using soapval method of nusoap library can someone please give me an example of this.
Many thanks
Sean