locked
what do I need to do RRS feed

  • Question

  • Hello all, this is my first venture into building web services.  The company that we are working with is requiring us to use web services to transfer files.  They have sent us three files: the xsd schema, the wsdl file and the soap protocol.  What do I need to do with these files in order to transfer the file to them? Also, the certificate that I will be using is x509 correct? Thanks for all the help.

    here's the xsd:

    <?xml version="1.0" encoding="utf-8"?>

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.NAMEOFCOMPANYIWILLSENDFILE.com/GPFileTransmission/FileTransmissionService/V1/execFileTransmissionService" targetNamespace="http://www.NAMEOFCOMPANYIWILLSENDFILE.com/GPFileTransmission/FileTransmissionService/V1/execFileTransmissionService" elementFormDefault="qualified">

    <xs:element name="execFileTransmissionService" type="tns:FileTransmissionServiceRequestType"/>

    <xs:element name="execFileTransmissionServiceResponse" type="tns:FileTransmissionServiceResponseType"/>

    <xs:complexType name="FileTransmissionServiceRequestType">

    <xs:sequence>

    <xs:element ref="tns:Request"/>

    </xs:sequence>

    </xs:complexType>

    <xs:complexType name="FileTransmissionServiceResponseType">

    <xs:sequence>

    <xs:element name="Response" type="tns:FileTransmissionServiceResponsePart"/>

    </xs:sequence>

    </xs:complexType>

    <xs:complexType name="RequestType">

    <xs:sequence>

    <xs:element name="uniqueReqID" type="xs:string" minOccurs="0"/>

    <xs:element name="vendNm" type="xs:string" minOccurs="0"/>

    <xs:element name="fileNm" type="xs:string" minOccurs="0"/>

    <xs:element name="dtTime" type="xs:string" minOccurs="0"/>

    <xs:element name="numOfRec" type="xs:string" minOccurs="0"/>

    <xs:element ref="tns:busField1" minOccurs="0"/>

    <xs:element ref="tns:busField2" minOccurs="0"/>

    <xs:element ref="tns:busField3" minOccurs="0"/>

    <xs:element ref="tns:busField4" minOccurs="0"/>

    </xs:sequence>

    </xs:complexType>

    <xs:complexType name="FileTransmissionServiceResponsePart">

    <xs:sequence>

    <xs:element name="Status" type="tns:StatusType"/>

    <xs:element name="resultInd" type="xs:string"/>

    <xs:element ref="tns:busField1" minOccurs="0"/>

    <xs:element ref="tns:busField2" minOccurs="0"/>

    <xs:element ref="tns:busField3" minOccurs="0"/>

    <xs:element ref="tns:busField4" minOccurs="0"/>

    </xs:sequence>

    </xs:complexType>

    <xs:element name="Status" type="tns:StatusType"/>

    <xs:complexType name="StatusType">

    <xs:sequence>

    <xs:element name="RespCd" type="xs:string"/>

    <xs:element name="RespDesc" type="xs:string" minOccurs="0"/>

    <xs:element name="ExplCd" type="xs:string" minOccurs="0"/>

    <xs:element name="ExplDesc" type="xs:string" minOccurs="0"/>

    </xs:sequence>

    </xs:complexType>

    <xs:element name="busField1" type="xs:string"/>

    <xs:element name="busField2" type="xs:string"/>

    <xs:element name="busField3" type="xs:string"/>

    <xs:element name="busField4" type="xs:string"/>

    <xs:element name="Request" type="tns:RequestType"/>

    </xs:schema>

    Here's the wsdl:
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:fts="http://www.NAMEOFCOMPANYIWILLSENDFILE.com/GPFileTransmission/FileTransmissionService/V1/execFileTransmissionService" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.NAMEOFCOMPANYIWILLSENDFILE.com/GPFileTransmission/FileTransmissionService/V1" xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.NAMEOFCOMPANYIWILLSENDFILE.com/GPFileTransmission/FileTransmissionService/V1">
    <wsdl:types>
    <xs:schema>
    <xs:import namespace="http://www.NAMEOFCOMPANYIWILLSENDFILE.com/GPFileTransmission/FileTransmissionService/V1/execFileTransmissionService" schemaLocation="execFileTransmissionServiceV1.xsd"/>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="FileTransmissionServiceReqMsg">
    <wsdl:part name="FileTransmissionServiceReq" element="fts:execFileTransmissionService"/>
    </wsdl:message>
    <wsdl:message name="FileTransmissionServiceRespMsg">
    <wsdl:part name="FileTransmissionServiceResp" element="fts:execFileTransmissionServiceResponse"/>
    </wsdl:message>
    <wsdl:portType name="IFileTransmissionService">
    <wsdl:operation name="execFileTransmissionService">
    <wsdl:input message="tns:FileTransmissionServiceReqMsg" name="FileTransmissionServiceRequest"/>
    <wsdl:output message="tns:FileTransmissionServiceRespMsg" name="FileTransmissionServiceResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="FileTransmissionServiceBinding" type="tns:IFileTransmissionService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="execFileTransmissionService">
    <soap:operation soapAction="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:input name="FileTransmissionServiceRequest">
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output name="FileTransmissionServiceResponse">
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="FileTransmissionService">
    <wsdl:port name="FileTransmissionServicePort" binding="tns:FileTransmissionServiceBinding">
    <soap:address location="http://www.NAMEOFCOMPANYIWILLSENDFILE.com/GPFileTransmission/FileTransmissionService/V1"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    and here's the soap:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="CertId-3414104" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">==</wsse:BinarySecurityToken> 
    <ds:Signature Id="Signature-1022115052" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <ds:SignedInfo>
    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> 
    <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> 
    <ds:Reference URI="#id-1036664266">
    <ds:Transforms>
    <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> 
    </ds:Transforms>
    <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 
    <ds:DigestValue>=</ds:DigestValue> 
    </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>==</ds:SignatureValue> 
    <ds:KeyInfo Id="KeyId-1065500546">
    <wsse:SecurityTokenReference wsu:Id="STRId-1076772910" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Reference URI="#CertId-3414104" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" /> 
    </wsse:SecurityTokenReference>
    </ds:KeyInfo>
    </ds:Signature>
    </wsse:Security>
    </soapenv:Header>
    <soapenv:Body wsu:Id="id-1036664266" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.NAMEOFCOMPANYTHATWILLRECEIVEFILE/GPFileTransmission/FileTransmissionService/V1/execFileTransmissionService" targetNamespace="http://www.NAMEOFCOMPANYTHATWILLRECEIVEFILE.com/GPFileTransmission/FileTransmissionService/V1/execFileTransmissionService" elementFormDefault="qualified">
    <uniqueReqID>IPSFIS02</uniqueReqID>
    <vendNm>MYCOMPANYNAME</vendNm>
    <fileNm>TEST.txt</fileNm>
    <dtTime>20110426025001</dtTime>
    <numOfRec>1000</numOfRec>
    </xs:schema>
    </soapenv:Body>
    </soapenv:Envelope>

    Thursday, October 20, 2011 3:56 AM

All replies

  • You should not use ASMX web services for this unless you have no choice. All new development of web service clients and servers should use WCF.
    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Thursday, October 20, 2011 2:36 PM
    Moderator