You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Hainer Neil <ha...@bah.com> on 2003/05/01 22:30:06 UTC

Visual Studio .NET WSDL Question

Hi,

Can I do the following:

I have a web service deployed under AXIS.  I have save it's WSDL to a
.wsdl file.  I want to use the Visual Studio .NET's wsdl command to
generate a Proxy, so I create a client (to access the web service) in
C#.

When I run the following command:

wsdl MyWebService.wsdl

I get the following error:

Error: Error when reading file 'MyWebservice.wsdl'.
  - There is an error in XML document (0, 0).
  - The XML declaration is unexpected. Line 1, position 5.

The first couple of lines of the .wsdl file are:

  <?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions
targetNamespace="http://localhost:8080/axis/services/MyWebService"

Any help would be appreciate.

Regards,

Neil

Re: Visual Studio .NET WSDL Question

Posted by Hainer Neil <ha...@bah.com>.
James,

Thanks.  That did the trick.

Neil

James Black wrote:

> Hainer Neil wrote:
>
> >I have a web service deployed under AXIS.  I have save it's WSDL to a
> >.wsdl file.  I want to use the Visual Studio .NET's wsdl command to
> >generate a Proxy, so I create a client (to access the web service) in
> >C#.
> >
>   If you look at Project->Web Reference you can just have it fetch the
> wsdl file and have it build the client stubs.
>
> --
> "We do not lose our identity in our relations with others; in part, at least, we achieve our identity by those relations." Tony Blair, 1993

Re: Visual Studio .NET WSDL Question

Posted by James Black <jb...@ieee.org>.
Hainer Neil wrote:

>I have a web service deployed under AXIS.  I have save it's WSDL to a
>.wsdl file.  I want to use the Visual Studio .NET's wsdl command to
>generate a Proxy, so I create a client (to access the web service) in
>C#.
>
  If you look at Project->Web Reference you can just have it fetch the 
wsdl file and have it build the client stubs.

-- 
"We do not lose our identity in our relations with others; in part, at least, we achieve our identity by those relations." Tony Blair, 1993




Re: Visual Studio .NET WSDL Question

Posted by Hainer Neil <ha...@bah.com>.
Andrew,

Quite an accurate wild stab.

Thanks,

Neil

Andrew Vardeman wrote:

> I'll take a wild stab:
>
> you pulled up the WSDL in IE and copied and pasted to a text file.  This
> would explain the space before the XML declaration and the renegade dash
> before the <wsdl:definitions> tag.
>
> Andrew
>
> At 04:30 PM 5/1/2003 -0400, you wrote:
> >Hi,
> >
> >Can I do the following:
> >
> >I have a web service deployed under AXIS.  I have save it's WSDL to a
> >.wsdl file.  I want to use the Visual Studio .NET's wsdl command to
> >generate a Proxy, so I create a client (to access the web service) in
> >C#.
> >
> >When I run the following command:
> >
> >wsdl MyWebService.wsdl
> >
> >I get the following error:
> >
> >Error: Error when reading file 'MyWebservice.wsdl'.
> >   - There is an error in XML document (0, 0).
> >   - The XML declaration is unexpected. Line 1, position 5.
> >
> >The first couple of lines of the .wsdl file are:
> >
> >   <?xml version="1.0" encoding="UTF-8" ?>
> >- <wsdl:definitions
> >targetNamespace="http://localhost:8080/axis/services/MyWebService"
> >
> >Any help would be appreciate.
> >
> >Regards,
> >
> >Neil

Re: Visual Studio .NET WSDL Question

Posted by Andrew Vardeman <an...@iastate.edu>.
I'll take a wild stab:

you pulled up the WSDL in IE and copied and pasted to a text file.  This 
would explain the space before the XML declaration and the renegade dash 
before the <wsdl:definitions> tag.

Andrew

At 04:30 PM 5/1/2003 -0400, you wrote:
>Hi,
>
>Can I do the following:
>
>I have a web service deployed under AXIS.  I have save it's WSDL to a
>.wsdl file.  I want to use the Visual Studio .NET's wsdl command to
>generate a Proxy, so I create a client (to access the web service) in
>C#.
>
>When I run the following command:
>
>wsdl MyWebService.wsdl
>
>I get the following error:
>
>Error: Error when reading file 'MyWebservice.wsdl'.
>   - There is an error in XML document (0, 0).
>   - The XML declaration is unexpected. Line 1, position 5.
>
>The first couple of lines of the .wsdl file are:
>
>   <?xml version="1.0" encoding="UTF-8" ?>
>- <wsdl:definitions
>targetNamespace="http://localhost:8080/axis/services/MyWebService"
>
>Any help would be appreciate.
>
>Regards,
>
>Neil




Re: Visual Studio .NET WSDL Question

Posted by Sreek Samudrala <sa...@yahoo.com>.
Check the exception in try catch block of the code
which is executing.. (C# .. Go to .cs file and put the
try catch block for the method which you are calling).
Its problem in the code which it has generated.I had
the same kind of problem and got it resolved by
removing the abstract class to a concrete class.


--- Hainer Neil <ha...@bah.com> wrote:
> Hi,
> 
> Can I do the following:
> 
> I have a web service deployed under AXIS.  I have
> save it's WSDL to a
> .wsdl file.  I want to use the Visual Studio .NET's
> wsdl command to
> generate a Proxy, so I create a client (to access
> the web service) in
> C#.
> 
> When I run the following command:
> 
> wsdl MyWebService.wsdl
> 
> I get the following error:
> 
> Error: Error when reading file 'MyWebservice.wsdl'.
>   - There is an error in XML document (0, 0).
>   - The XML declaration is unexpected. Line 1,
> position 5.
> 
> The first couple of lines of the .wsdl file are:
> 
>   <?xml version="1.0" encoding="UTF-8" ?>
> - <wsdl:definitions
>
targetNamespace="http://localhost:8080/axis/services/MyWebService"
> 
> Any help would be appreciate.
> 
> Regards,
> 
> Neil
> > begin:vcard 
> n:Hainer;Neil
> tel;fax:703-902-7717
> tel;work:703-902-6828
> x-mozilla-html:TRUE
> url:www.bah.com
> org:Booz Allen & Hamilton;National Security Business
> Segment (NSBS)
> version:2.1
> email;internet:hainer_neil@bah.com
> title:Associate, Software Development and Database
> Team
> adr;quoted-printable:;;=0D=0A8283 Greensboro
> Drive;McLean, Virginia;;22102  USA;
> fn:Neil Hainer
> end:vcard
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com