7
I am working with a system that offers integration through web service, more precisely SOAP.
He provides me with some Urls, which, from what I understand, provide access, describe and document the entire system.
Are they:
- http://localhost/services/Assets? wsdl
- http://localhost/services/Assets? xsd=Assets.xsd
- http://localhost/services/Assets? xsd=common.xsd
The documentation shows that the WSDL file can be imported directly into the Visual Studio solution, which, once again, from what I understand, generates several classes that interface with the service.
I would like to know if it is possible to use these three Urls (and only them) to understand the service and use it in the programme, without resorting to other external documents.
And, if it is, how to translate the elements contained in these XML’s into C methods#.
Excerpts from the WSDL:
<wsdl:message name="GetReservationsRequest">
<wsdl:part name="body" element="types:GetReservations">
</wsdl:part>
<wsdl:part name="credentialsHeader" element="types:UserCredentials">
</wsdl:part>
</wsdl:message>
<wsdl:message name="CreateSubclipRequest">
<wsdl:part name="body" element="types:CreateSubclip">
</wsdl:part>
<wsdl:part name="credentialsHeader" element="types:UserCredentials">
</wsdl:part>
</wsdl:message>
<wsdl:message name="GetCustomUserAttributesResponse">
<wsdl:part name="body" element="types:GetCustomUserAttributesResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="AssetsPortType">
<wsdl:operation name="AddReservation">
<wsdl:documentation> Adds a reservation </wsdl:documentation>
<wsdl:input message="tns:AddReservationRequest"> </wsdl:input>
<wsdl:output message="tns:AddReservationResponse"> </wsdl:output>
<wsdl:fault name="AssetsFault" message="tns:AssetsFault"> </wsdl:fault>
</wsdl:operation>
<wsdl:operation name="AddFileMobs">
<wsdl:documentation> Adds one or more file </wsdl:documentation>
<wsdl:input message="tns:AddFileMobsRequest"> </wsdl:input>
<wsdl:output message="tns:AddFileMobsResponse"> </wsdl:output>
<wsdl:fault name="AssetsFault" message="tns:AssetsFault"> </wsdl:fault>
</wsdl:operation>
<wsdl:operation name="CreateFolder">
<wsdl:documentation> Creates a new folder </wsdl:documentation>
<wsdl:input message="tns:CreateFolderRequest"> </wsdl:input>
<wsdl:output message="tns:CreateFolderResponse"> </wsdl:output>
<wsdl:fault name="AssetsFault" message="tns:AssetsFault"> </wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Search">
<wsdl:documentation> Search for assets </wsdl:documentation>
<wsdl:input message="tns:SearchRequest"> </wsdl:input>
<wsdl:output message="tns:SearchResponse"> </wsdl:output>
<wsdl:fault name="AssetsFault" message="tns:AssetsFault"> </wsdl:fault>
</wsdl:operation>
<wsdl:operation name="AddReservation">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:header message="tns:AddReservationRequest" use="literal"
part="credentialsHeader"> </soap:header>
<soap:body use="literal" parts="body"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="AssetsFault">
<soap:fault name="AssetsFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="AddFileMobs">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:header message="tns:AddFileMobsRequest" use="literal"
part="credentialsHeader"> </soap:header>
<soap:body use="literal" parts="body"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="AssetsFault">
<soap:fault name="AssetsFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
Excerpts from assets.xsd
:
<xsd:element type="tns:AddReservationType" name="AddReservation"/>
<xsd:complexType name="AddReservationType">
<xsd:annotation>
<xsd:documentation> Parameters for the AddReservation operation.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element type="tns:URIListType" name="FolderURIs"/>
<xsd:element type="xsd:int" name="TimeToExpireInSeconds"/>
<xsd:element type="tns:ExtensionType" name="Extension" minOccurs="0"/>
<xsd:any minOccurs="0" processContents="lax" namespace="##other"
maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax"/>
</xsd:complexType>
<xsd:element type="tns:AddReservationResponseType" name="AddReservationResponse"/>
<xsd:complexType name="AddReservationResponseType">
<xsd:annotation>
<xsd:documentation> The response from the AddReservation operation.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element type="tns:ErrorListType" name="Errors" minOccurs="0"/>
<xsd:element type="tns:ExtensionType" name="Extension" minOccurs="0"/>
<xsd:any minOccurs="0" processContents="lax" namespace="##other"
maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax"/>
</xsd:complexType>
Excerpt from common.xsd
:
<xsd:complexType name="AssetDescriptionType">
<xsd:annotation>
<xsd:documentation> A pairing of an URI representing an
asset along with a set of attributes describing it.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="URI" type="xsd:string"/>
<xsd:element name="Attributes" type="tns:AttributeListType"/>
<xsd:element name="Extension" type="tns:ExtensionType" minOccurs="0"/>
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax"
namespace="##other"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax"/>
</xsd:complexType>
What was generated when importing WSDL to Visual Studio: