Wednesday, September 12, 2007

Internal SOAP Processing Failure at Microsoft.BizTalk.WebServices.ServerProxy.Invoke

Searching for that Beautiful code, I have decided to do some refactoring of an existing ODX that gets published as a web service and gets consumed by another .NET application. This ODX was like the diamond on the rock. Except I did not name the schemas correctly to begin with. So I went ahead and change the schema and their types, etc...

Long story short, it executed almost all of the ODX, but it will always fail at the end with the Internal Soap Error. :@

SOAP exception error:
    1 The Web service returned an exception.
    2 System.Reflection.TargetInvocationException: 
    3 Exception has been thrown by the target of an invocation. 
    4 System.Web.Services.Protocols.SoapException: 
    5  Internal SOAP Processing Failure 
    6 at Microsoft.BizTalk.WebServices.ServerProxy.ServerProxy.Invoke(String functionName, Object[] parameters, ParamInfo[] inParamInfos, ParamInfo[] outParamInfos, Int32 bodyPartIndex, String bodyType, ArrayList inHeaders, ArrayList inoutHeaders, ArrayList& inoutHeaderResponses, ArrayList& outHeaderResponses, Type[] outHeaderTypes, String[] outHeaderNamespaces, SoapUnknownHeader[] unknownHeaders, SoapUnknownHeader[]& unknownHeaderResponses, Boolean oneway, Boolean spsSsoEnabled, Object cookie)
    7 at Microsoft.BizTalk.WebServices.ServerProxy.ServerProxy.Invoke(String functionName, Object[] parameters, ParamInfo[] inParamInfos, ParamInfo[] outParamInfos, Int32 bodyPartIndex, String bodyType, ArrayList inHeaders, ArrayList inoutHeaders, ArrayList& inoutHeaderResponses, ArrayList& outHeaderResponses, Type[] outHeaderTypes, String[] outHeaderNamespaces, SoapUnknownHeader[] unknownHeaders, SoapUnknownHeader[]& unknownHeaderResponses, Boolean oneway, Boolean spsSsoEnabled)
    8 at BRE.Application.BRE_Application_EligibilityResolver_SoapEligibilityPort.GetEligibility(CustomerCaseRoot part)
    9 at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   10 at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   11 at BRE_Application_EligibilityResolver_SoapEligibilityPort.GetEligibility(CustomerCaseRoot CustomerCaseRoot)
   12 
   13 
   14 --- End of inner exception stack trace ---
   15 at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   16 at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   17 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   18 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   19 at WebServiceStudio.MainForm.InvokeWebMethod()

this error is not the most useful error found. After re-starting all of my process from scratch (delete the application, the bindings, restart the host, restart VStudio), then I still could not find the offending bug.

Usually when I find myself trashing for more than an hour, I try to get some help in the form of "pair-debugging", so I asked my friend Monish to pair with me. After finding out that I had the wrong receive pipelines (PassThru Transmit instead of XML [default behavior when publishing through the wizard]). we got this other error:


    1 A response message sent to adapter "SOAP" 
    2 on receive port "WebPort_EligibilityService/AppEligibilityResolverSoapPort" 
    3 with URI "/EligibilityService/AppEligibilityResolverSoapPort.asmx" 
    4 is suspended. 
    5 Error details: There is an error in XML document (33, 25). 
    6 MessageId:  {3460C12E-A95A-4108-8112-63244EA9D10D}
    7 InstanceID: {C9B8E15C-FF4E-4B36-AFD3-1550B83AE01D}


which seems to point to an XML validation. :D

Now we are getting somewhere.!! On my refactoring of the schemas for BizTalk, I have changed all of the ID's from INT to string, *ALL* of them except one... ;)

Lesson learned: Either get a smart friend named Monish, or be prepare to spend lots of time if you refactor Biztalk schemas.

3 comments:

Anonymous said...

Like you said it helps to have a second pair of eyes. That's all...

Giacomo said...

Hi, Have you solved in some way?
I have the "Internal SOAP Processing Failure" but I don't know how solve.. thanks in advace.

Arnulfo Wing said...

yes, the error was in my original schema. I have changed the type of one of the elements, and therefore the validation was failing. SOAP Processing Failure is such a generic error message. Check the type of your receive pipelines. Change them to XML and see if you get a better error message.

let me know if you need more help.