.net - VB.net and Webservices Exception -


i calling webservice through vb.net. have done addwebreference create bindings.

when ws call throws exception, able catch generic exception object catch ex exception. however, not able figure out how catch exception type thrown.

from wsdl

<wsdl:message name="fexception">     <wsdl:part name="fault" type="tns2:fexception"/> </wsdl:message> <wsdl:message name="myexception">     <wsdl:part name="fault" type="impl:myexception"/> </wsdl:message>  <complextype name="fexception">     <sequence>         <element name="errcode" type="xsd:int"/>         <element name="errmessage" nillable="true" type="soapenc:string"/>     </sequence> </complextype>   <complextype name="myexception">     <complexcontent>         <extension base="tns2:fexception"><sequence/>         </extension>     </complexcontent> </complextype> 

the actual exception thrown myexception. however, addwebreference doesn't seem create class named myexception, using

 catch ex myexception 

gives me

type 'myexception' not defined. 

i able catch right exception in java axis.

what missing here in vb.net? add webreference doesn't seem generate exception objects cannot use them.

figured out answer this.

the webservice rather old implementation used "rpc/encoded" instead of more current encodings "document/literal" or "rpc/literal". dotnet stub generators don't support rpc/encoded. hence issue.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -