Using SOAP XML files

Discussion in 'ASP .Net Web Services' started by shaselsc@gmail.com, Jun 12, 2007.

  1. Guest

    I'm new to SOAP and Web Services in general. I've been given the task
    of implementing someone else's web services in an ASP.NET 2.0 project.
    What I've been given are two .xml files and several .xsd files. They
    are used to query information from their database. The queries are
    sent in SOAP format and returned in the same as far as I know. I'm
    quite confused on where to start to learn how to call these queries.
    Should I be learning more about XML, SOAP, or web services to find out
    how to send these queries?

    Thanks in advance.
    , Jun 12, 2007
    #1
    1. Advertising

  2. Guest

    Here is an example of what is in one of the xml files. I edited some
    of the file in case it left their web services open to anyone

    <?xml version="1.0" encoding="UTF-8" ?>
    - <!-- Generated by the Oracle JDeveloper 10g Web Services WSDL
    Generator
    -->
    - <!-- Date Created: Tue Jun 21 15:14:37 EDT 2005
    -->
    - <definitions name="OPSQueryWebService" targetNamespace="url/
    filename.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://
    schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="url/filename.wsdl"
    xmlns:ns1="url/filename.xsd">
    - <types>
    <schema targetNamespace="url/filename.xsd" xmlns="http://www.w3.org/
    2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/
    encoding/" />
    </types>
    - <message name="processquery0Request">
    <part name="xquery" element="xsd:any" />
    </message>
    - <message name="processquery0Response">
    <part name="return" element="xsd:any" />
    </message>
    - <portType name="OPSQueryWebServicePortType">
    - <operation name="processquery">
    <input name="processquery0Request"
    message="tns:processquery0Request" />
    <output name="processquery0Response"
    message="tns:processquery0Response" />
    </operation>
    </portType>
    - <binding name="OPSQueryWebServiceBinding"
    type="tns:OPSQueryWebServicePortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/
    http" />
    - <operation name="processquery">
    <soap:eek:peration soapAction="" style="rpc" />
    - <input name="processquery0Request">
    <soap:body use="literal" namespace="OPSQueryWebService" />
    </input>
    - <output name="processquery0Response">
    <soap:body use="literal" namespace="OPSQueryWebService" />
    </output>
    </operation>
    </binding>
    - <service name="OPSQueryWebService">
    - <port name="OPSQueryWebServicePort"
    binding="tns:OPSQueryWebServiceBinding">
    <soap:address location="Edited for security purposes" />
    </port>
    </service>
    </definitions>
    , Jun 12, 2007
    #2
    1. Advertising

  3. <> wrote in message
    news:...
    > I'm new to SOAP and Web Services in general. I've been given the task
    > of implementing someone else's web services in an ASP.NET 2.0 project.
    > What I've been given are two .xml files and several .xsd files. They
    > are used to query information from their database. The queries are
    > sent in SOAP format and returned in the same as far as I know. I'm
    > quite confused on where to start to learn how to call these queries.
    > Should I be learning more about XML, SOAP, or web services to find out
    > how to send these queries?


    All of the above.

    Web Services uses SOAP, which is an XML-based language.

    Are you being asked to create the service, or simply to consume it? Did you
    receive a .wsdl file as well? It's what describes the web service.
    --
    John Saunders [MVP]
    John Saunders [MVP], Jun 12, 2007
    #3
  4. Guest

    I did not receive any .wsdl files. I'm assuming I'm only here to
    consume it since they created all the web services on their end. I'm
    just not sure how I consume something like this.
    , Jun 12, 2007
    #4
  5. <> wrote in message
    news:...
    > Here is an example of what is in one of the xml files. I edited some
    > of the file in case it left their web services open to anyone
    >
    > <?xml version="1.0" encoding="UTF-8" ?>
    > - <!-- Generated by the Oracle JDeveloper 10g Web Services WSDL
    > Generator
    > -->
    > - <!-- Date Created: Tue Jun 21 15:14:37 EDT 2005
    > -->
    > - <definitions name="OPSQueryWebService" targetNamespace="url/
    > filename.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/"
    > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://
    > schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="url/filename.wsdl"
    > xmlns:ns1="url/filename.xsd">
    > - <types>
    > <schema targetNamespace="url/filename.xsd" xmlns="http://www.w3.org/
    > 2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/
    > encoding/" />
    > </types>
    > - <message name="processquery0Request">
    > <part name="xquery" element="xsd:any" />
    > </message>
    > - <message name="processquery0Response">
    > <part name="return" element="xsd:any" />
    > </message>
    > - <portType name="OPSQueryWebServicePortType">
    > - <operation name="processquery">
    > <input name="processquery0Request"
    > message="tns:processquery0Request" />
    > <output name="processquery0Response"
    > message="tns:processquery0Response" />
    > </operation>
    > </portType>
    > - <binding name="OPSQueryWebServiceBinding"
    > type="tns:OPSQueryWebServicePortType">
    > <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/
    > http" />
    > - <operation name="processquery">
    > <soap:eek:peration soapAction="" style="rpc" />
    > - <input name="processquery0Request">
    > <soap:body use="literal" namespace="OPSQueryWebService" />
    > </input>
    > - <output name="processquery0Response">
    > <soap:body use="literal" namespace="OPSQueryWebService" />
    > </output>
    > </operation>
    > </binding>
    > - <service name="OPSQueryWebService">
    > - <port name="OPSQueryWebServicePort"
    > binding="tns:OPSQueryWebServiceBinding">
    > <soap:address location="Edited for security purposes" />
    > </port>
    > </service>
    > </definitions>


    Good. That's a WSDL file - it's the standard format file for defining how to
    use a web service.

    You use a WSDL file by creating the project that will consume the service,
    then using Add Web Reference. Specify the path to the WSDL file (I know they
    talk about URLs, but you can specify the path or browse to it). This will
    create a set of proxy classes that you can use in your application to
    reference the service.
    --
    John Saunders [MVP]
    John Saunders [MVP], Jun 12, 2007
    #5
  6. Guest

    Should I do the same for the .xsd files? They contain various xsd
    schemas.
    , Jun 12, 2007
    #6
  7. <> wrote in message
    news:...
    > Should I do the same for the .xsd files? They contain various xsd
    > schemas.


    No the WSDL file is what is consumed.

    I have to say that when I tried consuming this file, it didn't work. It was
    only a quick try, so maybe if I had more time, I could get it to work
    (probably won't be today).

    I'm concerned about how this WSDL is written. I think the <part
    element="xsd:any"/> is incorrect. "element' is meant to be the name of an
    element, and xsd:any is a type name.
    --
    John Saunders [MVP]
    John Saunders [MVP], Jun 12, 2007
    #7
  8. Guest

    I actually tried adding this as a reference and it didn't work. I
    tried Add Web Reference and then typed in the path and clicked once on
    the file, but the "Add Reference" button was still greyed out, not
    allowing me to get access to the file. Is there something I'm not
    doing?

    Thanks for all the help so far John.
    , Jun 12, 2007
    #8
  9. <> wrote in message
    news:...
    >I actually tried adding this as a reference and it didn't work. I
    > tried Add Web Reference and then typed in the path and clicked once on
    > the file, but the "Add Reference" button was still greyed out, not
    > allowing me to get access to the file. Is there something I'm not
    > doing?


    Yes, but I don't know what that would be! ;-)

    Make sure you've entered the full path to the file. Also, if that doesn't
    work, try opening the file with Notepad's File->Open command, pasting in the
    same file path. Finally, look for any other user interface elements you need
    to fill in. For instance, are there other text boxes that need you to input
    something valid?

    Finally, which version of Visual Studio are you using, which language, etc.
    --
    John Saunders [MVP]
    John Saunders [MVP], Jun 13, 2007
    #9
  10. Guest

    I found out how I was supposed to handle these services. It turns out
    that the services are going to be handled elsewhere and I'm just
    supposed to manually create an xml file and send it in a specific
    format to their server. At least that's how the previous programmers
    were handling it. I'm not sure if this is the best way to handle it or
    not, but it seems the web services are all on their end and they were
    just giving us the way to format the xml file.

    To answer your questions, I am using Visual Studio 2005, C#, and
    ASP.NET 2.0.
    , Jun 13, 2007
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sham Ramakrishnan
    Replies:
    2
    Views:
    8,330
    Sham Ramakrishnan
    Jul 1, 2003
  2. mooseshoes

    To SOAP or Not To SOAP?

    mooseshoes, Sep 4, 2003, in forum: XML
    Replies:
    3
    Views:
    384
    Heinz Häberle
    Sep 21, 2003
  3. Mullin Yu
    Replies:
    0
    Views:
    202
    Mullin Yu
    Oct 8, 2003
  4. B. Deepak

    soap using remoting vs soap using web services

    B. Deepak, Jun 20, 2006, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    184
  5. Dan Fitzpatrick
    Replies:
    1
    Views:
    327
    NAKAMURA, Hiroshi
    Jul 16, 2005
Loading...

Share This Page