wcf - .NET Client consuming AXIS 1.4 SSL Webservice all exceptions "INTERNAL SERVER ERROR" -


i need consume axis 1.4 web service on ssl .net client. implement system.net.webclient, hand create xml request , upload web service. works great getting valid results, if exception occurs (java.rmi.remoteexception) webexception of "interal server error". inspecting response yields no more detail.

if add service in visual studio 2010 .net 2.0 web reference (soaphttpclientprotocol) receive desired java.rmi.remoteexception necessary details rectify problem. however, resulting responses valid request null.

note: service being consumed other (competitors') .net clients (to not have source code).

to reiterate: valid request via webclient receives valid response objects every exception "internal server error", valid request via web reference receives null responses accurately display desired java.rmi.remoteexception.

the goal: valid responses along complete java.rmi.remoteexceptions (not vague internal server errors), if can soapexception thrown that'd huge improvment.

ide: visual studio 2010 sp1

os: windows 7

.net: 2.0/3.5/4.0 (i have attempted 3 versions same results)

language: c#

example webclient code:

var lvresult = "";          try         {             var lvstr = "sample request";             var client = new webclient();             client.headers.add("soapaction", "samplerequest");              lvresult = client.uploadstring(cvurl, lvstr);         }         catch (exception ex)         {          } 

update: more specific, wouldn't problem if soap exception being thrown, exception thrown "webexception" doesn't seem give me access faultstring. below raw soap fault i'm receiving axis service:

<?xml version="1.0" encoding="utf-8"?> <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">   <soapenv:body> <soapenv:fault>   <faultcode>soapenv:server.userexception</faultcode>   <faultstring>java.rmi.remoteexception: error in posting request: code 02 - no userid user name/password.</faultstring>   <detail>     <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">xxxx</ns1:hostname>   </detail> </soapenv:fault> 

solution: found workaround catching webexception, , grabbing response stream exception response -

    catch(webexception pvex)     {         var lvresponsestring = "";          if (pvex.response != null)         {             using (var lvstreamreader = new streamreader(pvex.response.getresponsestream()))             {                 //this string contains xml soap response                 lvresponsestring = lvstreamreader.readtoend();              }         }      } 

this post on problem have: http://bytes.com/topic/net/answers/427757-soap-faults.

i think axis service returning soapfault. need know how deal in .net client. , described in post.

best regards, marco kroonwijk


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -