Re: Bypassing WSE to add web reference

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: SA (informatica_at_freemail.nl)
Date: 02/10/05


Date: Wed, 9 Feb 2005 18:47:34 -0600

For your situation, it's probably best to write your own proxy and base it
on SoapClient (or SoapSender if you don't need request/response).

-- 
Sven.
"Mike" <Mike@discussions.microsoft.com> wrote in message
news:D87920C5-6CA4-4445-911E-6B64770CB6CA@microsoft.com...
> I am now finding that I need to generate the proxy class using
WseWsdl2.exe.
> But, when I run it I get the following error:
>
> An error occurred processing this WSDL. More information:
> System.InvalidCastException: Specified cast is not valid.
>    at ClientGen.ClientGen.WriteCSOperationBinding(StreamWriter writer,
> ServiceDe
> scription desc, OperationBinding op)
>    at ClientGen.ClientGen.WriteOperationBinding(StreamWriter writer,
> ServiceDesc
> ription desc, OperationBinding op)
>    at ClientGen.ClientGen.WriteClass(StreamWriter writer,
ServiceDescription
> des
> c, String className, String url, Binding binding)
>    at ClientGen.ClientGen.GenerateCode(ServiceDescription desc, String
> outputFil
> e, XmlSchemas schemas)
>    at ClientGen.ClientGen.GenerateCode(String descriptionFile, String
> outputFile
> , XmlSchemas schemas)
>    at ClientGen.Class1.Main(String[] arguments)
>
> Any thoughts? I've updated my policy.config to include:
>
>     <operation
>
requestAction="http://schemas.microsoft.com/wse/2003/06/RequestDescription">
>       <request policy="" />
>     </operation>
>
> which I got from
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wse/html/fe81454b-678f-4912-89a6-b77ad423cc10.asp,
thinking that would help, but not.
>
>
>
> "Mike" wrote:
>
> > We have our own HttpModule and have implemented a Username token
manager.
> > Within the token manager we create our own user and assign it to the
current
> > context. In the HttpModule_PreRequestHandler we verify that the user can
> > access the web method that they have requested.
> >
> > This works fine, but poses a problem when you try to add a web reference
> > within the IDE. As the IDE does not create a username token, the web
service
> > cannot verify the user and an error occurs. This means that we cannot
add a
> > web reference within the IDE. Nor can we do so using WSDL.
> >
> > Can you pass in a username token when adding a web reference? Is there a
way
> > to at least pass one in via wsdl?
> >
> > Thanks
> > Mike


Relevant Pages

  • Re: IP range to CIDR list VB6 utility?
    ... >> Mike, is UnpackDWord something new with VB.Net? ... string address and convert it to a binary equivalent enclosed within a long, ... But I still have to use CIDR notation, which requires looking at an address ... using netmask to generate that exact same network range list: ...
    (microsoft.public.vb.general.discussion)
  • Re: Countif for a string
    ... Thanks for both Bob and Harald for the quick response. ... > Hi Mike ... > Function ShouldImport(ByRef S As String) As Boolean ... >> I am importing a text file into excel line by line. ...
    (microsoft.public.excel.programming)
  • Re: Multiselect Listbox as qualifier for query
    ... That's correct, Mike. ... You can pass that kind of string in the ... Or you can re-write the SQL ... > other qualifiers within the individual query definitions. ...
    (microsoft.public.access.queries)
  • Re: Problem with AND &
    ... Mike wrote: ... I did not catch that since I changed the user records. ... But you're still passing a string as the first ... varbinary is a character type - basically the difference between that and varchar in MySQL is the binary types are case sensitive. ...
    (comp.lang.php)
  • Re: Problem with AND &
    ... Mike wrote: ... I did not catch that since I changed the user records. ... But you're still passing a string as the first ... before the signature lines or delete them all together. ...
    (comp.lang.php)