decoding html part of SOAP response

Hi All,
We have Siebel webservices which are consumed on webmethods side.
The authentication to the webservice happens via provision of username and password in the URL.
We get the same error when we pass invalid credentials or siebel server is down.
When we tried testing these two scenarios using SOAP -UI, the response page had two different responses from Siebel (in html format), but in the pipeline we see the same error message for both the cases.
Please let me know if there is any way to solve this.
Please let me know if by any chance we can see the html message from Siebel on webmethods side. Thanks in Advance.

Regards,
Vamshi

Below is the error we are recieving for tha above mentioned invalid user credentials:

[ISS.0088.9135] A WMDocument Exception was thrown in the server, usually because an XML block was not well-formed
at com.wm.app.b2b.server.SOAPMessage.init(SOAPMessage.java:246)
at com.wm.app.b2b.server.SOAPMessage.(SOAPMessage.java:155)
at com.wm.app.b2b.server.saaj.SOAPMessage.(SOAPMessage.java:73)
at com.wm.app.b2b.server.saaj.MessageFactory.createMessage(MessageFactory.java:73)
at wm.server.ws.getJAXRPCHandler(ws.java:5776)
at wm.server.ws.wsHTTP(ws.java:4256)
at pub.clientimpl.soapClient(clientimpl.java:1942)
at sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:443)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:643)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:41)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:276)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:194)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:584)
at com.wm.lang.flow.FlowState.step(FlowState.java:444)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:409)
at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1057)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:643)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:41)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:276)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:194)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:584)
at com.wm.lang.flow.FlowState.stepIncremental(FlowState.java:494)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:382)
at wm.server.flowimpl.stepFlow(flowimpl.java:210)
at sun.reflect.GeneratedMethodAccessor223.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:453)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:643)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:41)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:276)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:160)
at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:186)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:365)
at com.wm.util.pool.PooledThread.run(PooledThread.java:131)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.wm.lang.xml.WMDocumentException: Invalid Value: html expected, ‘Envelope’
at com.wm.lang.xml.DocumentTreeBuilder.processNextToken(DocumentTreeBuilder.java:84)
at com.wm.lang.xml.Document.completeLoad(Document.java:1366)
at com.wm.app.b2b.server.SOAPMessage.init(SOAPMessage.java:200)
… 68 more

The error speaks about Invalid html…what needs to be done to decode the valid html part of it?

You can increase the logging level, so you can see the SOAPEnv.
I guess that the other side didn’t do proper encoding before putting a html return message into the SOAPEnv.
only when you see it, you can prove it.

Hi Tony,
Thanks for your response.
We have observed the below data in the pipeline for two scenarios i.e. 1) Siebel server is down 2)User credentials are incorrect

close
Wed, 06 Mar 2013 10:32:50 GMT
Microsoft-IIS/6.0
ASP.NET
IDS_SWEPI_ERROR_EXTSERV_INIT
The service request could not be processed. Please check that the user name and password are correct and that the request format is correct. If the problem persists, please contact the system administrator to get more detailed information and to check the system configuration.
no-cache, must-revalidate
no-cache
text/html;charset=UTF-8
550

Do you think the content length that i have mentioned above can be used to differentiate between the scenarios?

Seems in both cases, IIS is returning the same error message.
I don’t think you can use content-length or any other field to distinguish them.
Not sure the point of distinguish them.
Both cases failed before any SOAP level interaction. You may just treated as HTTP level failure.