Re: Error when WebMethod returns a jagged array
From: Bruce Johnson [C# MVP] (bruce_at_spammenot.objectsharp.com)
Date: 02/09/05
- Next message: Bruce Johnson [C# MVP]: "RE: dynamically invoking web service methods, how?"
- Previous message: MikeL: "Re: Error when WebMethod returns a jagged array"
- In reply to: MikeL: "Re: Error when WebMethod returns a jagged array"
- Next in thread: MikeL: "Re: Error when WebMethod returns a jagged array"
- Reply: MikeL: "Re: Error when WebMethod returns a jagged array"
- Reply: Bruce Johnson [C# MVP]: "Re: Error when WebMethod returns a jagged array"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 9 Feb 2005 06:15:07 -0800
1. Don't know for sure if the code that xsd generated for jagged arrays is
causing the problem. It could be something as simple as a property name that
happens to be a keyword in C#. I don't see that in your code, but then
again, I can't see all of the code.
2. It's the web.config file on the server that gets changed. You might
have to search around for the persisted file. I found it a challenge to find
the first time.
3. It's difficult to come up with a solution until I see why the file isn't
compiling. And I suspect when you do see it, the reason will be obvious.
Bruce Johnson [C# MVP]
http://www.objectsharp.com/blogs/bruce
"MikeL" wrote:
> Hi, Bruce. Thanks for responding.
>
> That certainly addresses my problem. If you don't mind I have three
> additional questions:
>
> 1) Why would XSD.exe generate jagged arrays if the generated code can't be
> compiled?
> 2) The article states to change the app's .config file. Is this the
> web.config file of my webservice project? The reason I ask is because that's
> exactly what I changed and nothing peristed.
> 3) The article offered no solution. Do you have any suggestions for a
> solution?
>
> Thanks again,
>
> Mike
>
> "Bruce Johnson [C# MVP]" <bruce@spammenot.objectsharp.com> wrote in message
> news:3E23F7BC-DDC7-445F-BD04-48D3F886BEAD@microsoft.com...
> > This type of error is usually indicative of something bad going on when
> > the
> > web service tries to generate the class that is used to serialize the
> > incoming and outgoing messages. Check out
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp
> > to a description of how to identify these sorts of problems, paying
> > particular attention to the section towards the bottom that describes how
> > to
> > keep the compiled code around.
> >
> > Hope this helps.
> >
> > Bruce Johnson [C# MVP]
> > http://www.objectsharp.com/blogs/bruce
> >
> > "MikeL" wrote:
> >
> >> Hello.
> >>
> >> I've been getting an error message like the following when testing a
> >> webservice that I'm creating:
> >>
> >> "File or assembly name 8rsiphqb.dll, or one of its
> >> dependencies,
> >> was not found."
> >>
> >> Each time I refresh the page the .dll name changes, which tells me that
> >> the
> >> CLR is generating this .dll (right?)
> >>
> >> I think I narrowed down the problem: It seems only to happen when the
> >> return
> >> type of the WebMethod contains a jagged array. Here's what the XSD.exe
> >> utility generated from my schema:
> >>
> >> [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.myService.com/RatingHub")]
> >> [System.Xml.Serialization.XmlRootAttribute(Namespace="http://www.myService.com/RatingHub",
> >> IsNullable=false)]
> >>
> >> public class scPlan
> >>
> >> {
> >>
> >>
> >> /// <remarks/>
> >>
> >> [System.Xml.Serialization.XmlArrayItemAttribute(typeof(scTermRate),
> >> IsNullable=false)]
> >>
> >> public scTermRate[][] scTermRates;
> >>
> >>
> >> /// <remarks/>
> >>
> >> [System.Xml.Serialization.XmlArrayItemAttribute(typeof(scSurcharge),
> >> IsNullable=false)]
> >>
> >> public scSurcharge[][] scSurcharges;
> >>
> >>
> >> /// <remarks/>
> >>
> >> [System.Xml.Serialization.XmlAttributeAttribute()]
> >>
> >> public string code;
> >>
> >>
> >> /// <remarks/>
> >>
> >> [System.Xml.Serialization.XmlAttributeAttribute()]
> >>
> >> public string description;
> >>
> >> }
> >>
> >> When I set a breakpoint on the first line of the WebMethod in the .asmx
> >> file
> >> it is never reached, the error is generated in the browser.
> >>
> >> Does anyone know what's going on?
> >>
> >> Thanks in advance,
> >>
> >> Mike
> >>
> >>
> >>
>
>
>
- Next message: Bruce Johnson [C# MVP]: "RE: dynamically invoking web service methods, how?"
- Previous message: MikeL: "Re: Error when WebMethod returns a jagged array"
- In reply to: MikeL: "Re: Error when WebMethod returns a jagged array"
- Next in thread: MikeL: "Re: Error when WebMethod returns a jagged array"
- Reply: MikeL: "Re: Error when WebMethod returns a jagged array"
- Reply: Bruce Johnson [C# MVP]: "Re: Error when WebMethod returns a jagged array"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|