Import XSD schema into WSDL

Discussion in 'ASP .Net Web Services' started by Wm. Scott Miller, Aug 10, 2005.

  1. I have an XSD file supplied by a company. I have to interact with a
    webservice on their site but they didn't supply a WSDL. I generated my own
    WSDL to communicate and copied and pasted the XSD into the file manually.
    This worked, but makes the file huge. Additionally, I had to make some
    modifications to the XSD to make it all work. What I'd like to do is
    reference the XSD from my WSDL and define a schema in the WSDL to make the
    "modifications" that I had to do to the original file to make it work. How
    is this done? I've tried wsdl:import, xsd:import and XMLSpy is telling me
    it cannot find the schema object I'm trying to use out of the XSD file.
    Another time, I got a object already defined error (I have to create an
    object with the same name as one in the XSD file and it is not detecting
    that the file and the local XSD are different). Additionally, the WSDL.exe
    gives me "A schema with the namespace '' has already been added"

    What is going on and how to I do this?

    Thanks,
    Scott
     
    Wm. Scott Miller, Aug 10, 2005
    #1
    1. Advertising

  2. Wm. Scott Miller

    Raghu Guest

    All you have to do is remove the targetnamespace attribute from schema
    element in wsdl file. The WSDL needs wsdl as well as xsd file on the command
    line.

    "Wm. Scott Miller" <> wrote in message
    news:...
    >I have an XSD file supplied by a company. I have to interact with a
    >webservice on their site but they didn't supply a WSDL. I generated my own
    >WSDL to communicate and copied and pasted the XSD into the file manually.
    >This worked, but makes the file huge. Additionally, I had to make some
    >modifications to the XSD to make it all work. What I'd like to do is
    >reference the XSD from my WSDL and define a schema in the WSDL to make the
    >"modifications" that I had to do to the original file to make it work. How
    >is this done? I've tried wsdl:import, xsd:import and XMLSpy is telling me
    >it cannot find the schema object I'm trying to use out of the XSD file.
    >Another time, I got a object already defined error (I have to create an
    >object with the same name as one in the XSD file and it is not detecting
    >that the file and the local XSD are different). Additionally, the WSDL.exe
    >gives me "A schema with the namespace '' has already been added"
    >
    > What is going on and how to I do this?
    >
    > Thanks,
    > Scott
    >
     
    Raghu, Sep 14, 2005
    #2
    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. Dark
    Replies:
    1
    Views:
    4,640
    milfar
    Nov 14, 2008
  2. Chris Bedford
    Replies:
    0
    Views:
    589
    Chris Bedford
    Aug 21, 2003
  3. stiank81
    Replies:
    4
    Views:
    15,411
    stiank81
    Jun 26, 2005
  4. Rushi
    Replies:
    1
    Views:
    557
  5. Stephen Edgecombe

    WSDL.EXE: WSDL Import Directive

    Stephen Edgecombe, Aug 13, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    242
    Stephen Edgecombe
    Aug 13, 2003
Loading...

Share This Page