C
cyoull
I am working with COTS software that is Web service enabled. The
software allows for jobs to be created as real-time or batch and
updated to a server which then can be consumed as a Web service. The
vendor supplies a WSDL to define the different ways programs can be
accessed with a SOAP request.
Here is a snippet of the WSDL for a real-time request.
<!-- Run service given its name and data -->
<complexType name="SendArchitectServiceRequestType">
<sequence>
<!-- Name of the service for architect to load -->
<element name="serviceName" type="xsd:string" minOccurs="1"
maxOccurs="1"/>
<!-- Field definitions describing individual fields in a data row
-->
<element name="fieldDefinitions" type="tns:FieldDefinition"
minOccurs="0" maxOccurs="unbounded"/>
<!-- Data rows for architect service to process -->
<element name="dataRows" type="tns
ataRow" minOccurs="0"
maxOccurs="unbounded"/>
<!-- Reserved field 1 -->
<element name="reserved1" type="xsd:string" minOccurs="0"
maxOccurs="1"/>
</sequence>
</complexType>
<element name="SendArchitectServiceRequest"
type="tns:SendArchitectServiceRequestType"/>
Each real-time request requires the field definitions to be included
in the SOAP request along with the data values. This is a copy of a
request to a real-time address validation job.
<soap:Body>
<SendArchitectServiceRequest xmlns="archserver.xsd.dataread.com">
<serviceName>ADDRESS_VALIDATION2</serviceName>
<fieldDefinitions>
<fieldName>addr1</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>50</fieldLength>
</fieldDefinitions>
<fieldDefinitions>
<fieldName>addr2</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>50</fieldLength>
</fieldDefinitions>
<fieldDefinitions>
<fieldName>city</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>35</fieldLength>
</fieldDefinitions>
<fieldDefinitions>
<fieldName>state</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>28</fieldLength>
</fieldDefinitions>
<fieldDefinitions>
<fieldName>zip</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>10</fieldLength>
</fieldDefinitions>
<dataRows>
<value>240 union blvd</value>
<value/>
<value>denver</value>
<value>co</value>
<value>80228</value>
</dataRows>
</SendArchitectServiceRequest>
</soap:Body>
</soap:Envelope>
I would like to simplify the request so any developer that consumes
the Web service only has to point to the WSDL and supply the data
values. Adding more logic to the WSDL would then add the field
definitions to the request.
I am trying to find out if it is possible to define the field
definitions within a WSDL with values for the field name, field type
and field length.
Any assistance would be appreciated.
Chris
software allows for jobs to be created as real-time or batch and
updated to a server which then can be consumed as a Web service. The
vendor supplies a WSDL to define the different ways programs can be
accessed with a SOAP request.
Here is a snippet of the WSDL for a real-time request.
<!-- Run service given its name and data -->
<complexType name="SendArchitectServiceRequestType">
<sequence>
<!-- Name of the service for architect to load -->
<element name="serviceName" type="xsd:string" minOccurs="1"
maxOccurs="1"/>
<!-- Field definitions describing individual fields in a data row
-->
<element name="fieldDefinitions" type="tns:FieldDefinition"
minOccurs="0" maxOccurs="unbounded"/>
<!-- Data rows for architect service to process -->
<element name="dataRows" type="tns
maxOccurs="unbounded"/>
<!-- Reserved field 1 -->
<element name="reserved1" type="xsd:string" minOccurs="0"
maxOccurs="1"/>
</sequence>
</complexType>
<element name="SendArchitectServiceRequest"
type="tns:SendArchitectServiceRequestType"/>
Each real-time request requires the field definitions to be included
in the SOAP request along with the data values. This is a copy of a
request to a real-time address validation job.
<soap:Body>
<SendArchitectServiceRequest xmlns="archserver.xsd.dataread.com">
<serviceName>ADDRESS_VALIDATION2</serviceName>
<fieldDefinitions>
<fieldName>addr1</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>50</fieldLength>
</fieldDefinitions>
<fieldDefinitions>
<fieldName>addr2</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>50</fieldLength>
</fieldDefinitions>
<fieldDefinitions>
<fieldName>city</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>35</fieldLength>
</fieldDefinitions>
<fieldDefinitions>
<fieldName>state</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>28</fieldLength>
</fieldDefinitions>
<fieldDefinitions>
<fieldName>zip</fieldName>
<fieldType>STRING</fieldType>
<fieldLength>10</fieldLength>
</fieldDefinitions>
<dataRows>
<value>240 union blvd</value>
<value/>
<value>denver</value>
<value>co</value>
<value>80228</value>
</dataRows>
</SendArchitectServiceRequest>
</soap:Body>
</soap:Envelope>
I would like to simplify the request so any developer that consumes
the Web service only has to point to the WSDL and supply the data
values. Adding more logic to the WSDL would then add the field
definitions to the request.
I am trying to find out if it is possible to define the field
definitions within a WSDL with values for the field name, field type
and field length.
Any assistance would be appreciated.
Chris