none
WCF attempting to consume JAVA based WSDL failing with two separate errors RRS feed

  • Question

  • I have an issue consuming a Java based WSDL using WCF.  The service uses SOAP and we can't get it to authenticate properly.  We've gotten two separate errors with the two methods we have attempted.

    I'm going to post the output below and I ask that you please bare with me as this is a little bit new to us and I imagine there are some newbie mistakes being made here.

    We have a WCF client (C#) attempting to connect two different ways to a Java based WSDL Service using SOAP11.  I need to consume the WSDL via WCF so I can generate a proxy.  When we send our requests they look like this to the server:

    This one spits out a "Must Understand Headers error 500".

    2013-02-27 17:23:03.489 UTC | INFO | http-19005-1_134_414 | stdout |  | ---[HTTP response 200]---

    2013-02-27 17:23:03.489 UTC | INFO | http-19005-1_134_414 | stdout |  | <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><getGma20Response xmlns="http://good.com/emf"><gma20><activated>false</activated></gma20></getGma20Response></S:Body></S:Envelope>

    2013-02-27 17:23:03.489 UTC | INFO | http-19005-1_134_414 | stdout |  | --------------------

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | ---[HTTP request]---

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | Host: HOSTNAME

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | Content-type: text/xml; charset=utf-8

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | Accept-encoding: gzip, deflate

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | Content-length: 1216

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | Connection: Keep-Alive

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | Soapaction: "http://good.com/emf/validateLoginCredentials"

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPoyCzNF8Cj4xFkoBsIh8RcFcAAAAA2QMCKfTifk6+TMFERB5s+AgLTUNi6plAkN+usD8IsAUACQAA</VsDebuggerCausalityData><o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><o:UsernameToken u:Id="uuid-fd6eedbd-a426-4fca-b1c6-d6428d792eab-1"><o:Username>USERNAME</o:Username><o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">BLAH</o:Password></o:UsernameToken><u:Timestamp u:Id="_0"><u:Created>2013-02-27T17:24:24.698Z</u:Created><u:Expires>2013-02-27T17:29:24.698Z</u:Expires></u:Timestamp></o:Security></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><validateLoginCredentials xmlns="http://good.com/emf"><username>goodadminexchange</username><password>$LetMeIn!</password><domain>corp</domain></validateLoginCredentials></s:Body></s:Envelope>

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | --------------------

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | ---[HTTP response 500]---

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><faultstring xmlns="">MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood</faultstring><faultcode xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns="">SOAP-ENV:MustUnderstand</faultcode></SOAP-ENV:Fault></S:Body></S:Envelope>

    2013-02-27 17:24:57.393 UTC | INFO | http-19005-1_134_414 | stdout |  | --------------------

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | ---[HTTP request]---

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | Host: HOSTNAME

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | Content-type: text/xml; charset=utf-8

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | Vsdebuggercausalitydata: uIDPozx0ScuR4XNOkBSP26H1WbAAAAAAgL/fYKWhwUe30qFK44myAEegfNx3cA1EtgOhaTxYZm8ACQAA

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | Content-length: 416

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | Connection: Keep-Alive

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | User-agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.18034)

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | Soapaction: "http://good.com/emf/validateLoginCredentials"

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><validateLoginCredentials xmlns="http://good.com/emf"><username>USERNAME</username><password>BLAH</password><domain>corp</domain></validateLoginCredentials></soap:Body></soap:Envelope>

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_414 | stdout |  | --------------------

    2013-02-27 17:25:15.300 UTC | SEVERE | http-19005-1_134_415 | com.good.ws.auth.AbstractHttpBasicAuthnHandler | handleInboundMessage | Unable to find any Authorization information in the HTTP headers.  Is someone trying to authenticate with a different protocol?

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  | java.lang.RuntimeException: Unable to find any Authorization information in the HTTP headers.  Is someone trying to authenticate with a different protocol?

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.good.ws.auth.AbstractHttpBasicAuthnHandler.handleInboundMessage(AbstractHttpBasicAuthnHandler.java:64)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.good.ws.AbstractBaseLogicalMessageHandler.handleMessage(AbstractBaseLogicalMessageHandler.java:36)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.good.ws.AbstractBaseLogicalMessageHandler.handleMessage(AbstractBaseLogicalMessageHandler.java:7)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.handler.HandlerProcessor.callHandleMessage(HandlerProcessor.java:284)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.handler.HandlerProcessor.callHandlersRequest(HandlerProcessor.java:135)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.handler.ServerLogicalHandlerTube.callHandlersOnRequest(ServerLogicalHandlerTube.java:142)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.handler.HandlerTube.processRequest(HandlerTube.java:116)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

    2013-02-27 17:25:15.300 UTC | WARNING | http-19005-1_134_416 | stderr |  |     at java.lang.Thread.run(Thread.java:662)

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_416 | stdout |  | ---[HTTP response 500]---

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_416 | stdout |  | <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Server</faultcode><faultstring>Unable to find any Authorization information in the HTTP headers.  Is someone trying to authenticate with a different protocol?</faultstring></S:Fault></S:Body></S:Envelope>

    2013-02-27 17:25:15.300 UTC | INFO | http-19005-1_134_416 | stdout |  | --------------------

    This is our Second Request and it spits out this: "Unable to find any Authorization information in the HTTP headers.  Is someone trying to authenticate with a different protocol?"

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_416 | stdout |  | ---[HTTP request]---

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_416 | stdout |  | Host: HOSTNAME

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_416 | stdout |  | Content-type: text/xml; charset=utf-8

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_416 | stdout |  | Vsdebuggercausalitydata: uIDPoz10ScuR4XNOkBSP26H1WbAAAAAAgL/fYKWhwUe30qFK44myAEegfNx3cA1EtgOhaTxYZm8ACQAA

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_416 | stdout |  | Content-length: 416

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_416 | stdout |  | User-agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.18034)

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_416 | stdout |  | Soapaction: "http://good.com/emf/validateLoginCredentials"

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_416 | stdout |  | <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><validateLoginCredentials xmlns="http://good.com/emf"><username>USERNAME</username><password>BLAH</password><domain>corp</domain></validateLoginCredentials></soap:Body></soap:Envelope>

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_416 | stdout |  | --------------------

    2013-02-27 17:25:20.534 UTC | SEVERE | http-19005-1_134_417 | com.good.ws.auth.AbstractHttpBasicAuthnHandler | handleInboundMessage | Unable to find any Authorization information in the HTTP headers.  Is someone trying to authenticate with a different protocol?

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  | java.lang.RuntimeException: Unable to find any Authorization information in the HTTP headers.  Is someone trying to authenticate with a different protocol?

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.good.ws.auth.AbstractHttpBasicAuthnHandler.handleInboundMessage(AbstractHttpBasicAuthnHandler.java:64)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.good.ws.AbstractBaseLogicalMessageHandler.handleMessage(AbstractBaseLogicalMessageHandler.java:36)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.good.ws.AbstractBaseLogicalMessageHandler.handleMessage(AbstractBaseLogicalMessageHandler.java:7)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.handler.HandlerProcessor.callHandleMessage(HandlerProcessor.java:284)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.handler.HandlerProcessor.callHandlersRequest(HandlerProcessor.java:135)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.handler.ServerLogicalHandlerTube.callHandlersOnRequest(ServerLogicalHandlerTube.java:142)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.handler.HandlerTube.processRequest(HandlerTube.java:116)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

    2013-02-27 17:25:20.534 UTC | WARNING | http-19005-1_134_418 | stderr |  |     at java.lang.Thread.run(Thread.java:662)

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_418 | stdout |  | ---[HTTP response 500]---

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_418 | stdout |  | <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Server</faultcode><faultstring>Unable to find any Authorization information in the HTTP headers.  Is someone trying to authenticate with a different protocol?</faultstring></S:Fault></S:Body></S:Envelope>

    2013-02-27 17:25:20.534 UTC | INFO | http-19005-1_134_418 | stdout |  | --------------------

    Now if I look at the requests from Java vs WCF they are fundamentally different.  Below is the SOAPUI version using Java and it works.

    If I run SOAPUI and send a request via Java I get this: (This works) - Note I'm using Preauthentication and I'm using Basic Authentication over SSL.  This is an Apache Tomcat server.

    2013-02-27 17:03:03.224 UTC | INFO | http-19005-1_134_405 | stdout |  | ---[HTTP response 200]---

    2013-02-27 17:03:03.224 UTC | INFO | http-19005-1_134_405 | stdout |  | <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><getGma20Response xmlns="http://good.com/emf"><gma20><activated>false</activated></gma20></getGma20Response></S:Body></S:Envelope>

    2013-02-27 17:03:03.224 UTC | INFO | http-19005-1_134_405 | stdout |  | --------------------

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | ---[HTTP request]---

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | Content-type: text/xml; charset=utf-8

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | Host: HOSTNAME

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | Content-length: 389

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | Connection: close

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | Authorization: Basic QTRBMzEyN0EtQkQyQi00MjNBLThCMUYtQTk0MEExNUJEOTNBOmQwMDgydmY1bWY4OXhoMg==

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | User-agent: gSOAP/2.8

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | Soapaction: "http://good.com/emf/getGma20"

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | <?xml version="1.0" encoding="UTF-8"?>

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:emf="http://good.com/emf"><SOAP-ENV:Body><emf:getGma20></emf:getGma20></SOAP-ENV:Body></SOAP-ENV:Envelope>

    2013-02-27 17:13:03.357 UTC | INFO | http-19005-1_134_405 | stdout |  | --------------------

    2013-02-27 17:13:03.373 UTC | INFO | 134_406 | com.good.ws.SOAPLoggingHandler | log | GMMServerService Received:<?xml version="1.0" encoding="UTF-8"?>

    <emf:getGma20 xmlns:emf="http://good.com/emf"/>

    2013-02-27 17:13:03.373 UTC | INFO | 134_406 | AuditLoggingInterceptor | logEnter | A4A3127A-BD2B-423A-8B1F-A940A15BD93A - Starting com.good.emf.service.CoreServiceImpl.getGma20ServerSettings

    2013-02-27 17:13:03.373 UTC | INFO | 134_406 | AuditLoggingInterceptor | logExit | A4A3127A-BD2B-423A-8B1F-A940A15BD93A - Finished com.good.emf.service.CoreServiceImpl.getGma20ServerSettings: returned Gma20ServerSettings [gma20Enabled=false httpProxy=null httpsProxy=null bypassException=null]

    2013-02-27 17:13:03.373 UTC | INFO | 134_406 | com.good.ws.SOAPLoggingHandler | log | GMMServerService Sending:<?xml version="1.0" encoding="UTF-8"?>

    <getGma20Response xmlns="http://good.com/emf">

      <gma20>

        <activated>false</activated>

      </gma20>

    </getGma20Response>

    2013-02-27 17:13:03.373 UTC | INFO | http-19005-1_134_407 | stdout |  | ---[HTTP response 200]---

    2013-02-27 17:13:03.373 UTC | INFO | http-19005-1_134_407 | stdout |  | <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><getGma20Response xmlns="http://good.com/emf"><gma20><activated>false</activated></gma20></getGma20Response></S:Body></S:Envelope>

    2013-02-27 17:13:03.373 UTC | INFO | http-19005-1_134_407 | stdout |  | --------------------

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | ---[HTTP request]---

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | Host: HOSTNAME

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | Content-type: text/xml;charset=UTF-8

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | Accept-encoding: gzip,deflate

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | Content-length: 404

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | Connection: Keep-Alive

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | Authorization: Basic Y29ycFxnb29kYWRtaW5leGNoYW5nZTokTGV0TWVJbiE=

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | User-agent: Apache-HttpClient/4.1.1 (java 1.5)

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | Soapaction: "http://good.com/emf/validateLoginCredentials"

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:emf="http://good.com/emf">

       <soapenv:Header/>

       <soapenv:Body>

          <emf:validateLoginCredentials>

             <emf:username>USERNAME</emf:username>

             <emf:password>BLAH</emf:password>

             <emf:domain>corp</emf:domain>

          </emf:validateLoginCredentials>

       </soapenv:Body>

    </soapenv:Envelope>

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_407 | stdout |  | --------------------

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_408 | com.good.emf.security.SecurityServiceImpl | getDomainTrusts | Primary authentication domain: corp.good.local

    2013-02-27 17:14:40.809 UTC | INFO | http-19005-1_134_408 | com.good.emf.security.SecurityServiceImpl | getDomainTrusts | Created lookup context for domain: corp.good.local

    2013-02-27 17:14:40.809 UTC | PERF | http-19005-1_134_408 | com.good.ad.impl.AdDomainServicesImpl | getDomainTrusts | Starting Server=corp.good.local, flags=0x22

    2013-02-27 17:14:40.856 UTC | PERF | http-19005-1_134_408 | com.good.ad.impl.AdDomainServicesImpl | getDomainTrusts | Finished Server=corp.good.local, flags=0x22

    2013-02-27 17:14:40.856 UTC | INFO | http-19005-1_134_408 | com.good.emf.security.SecurityServiceImpl | getDomainTrusts | Domain corp.good.local trusts no other domains

    2013-02-27 17:14:40.871 UTC | INFO | http-19005-1_134_408 | com.good.emf.security.SecurityServiceImpl | getDomainTrusts | Authentication domains are: [CORP]

    2013-02-27 17:14:40.871 UTC | PERF | http-19005-1_134_408 | com.good.ad.impl.AdDomainServicesImpl | getDomainName | Starting Domain=corp, flags=0x40000000

    2013-02-27 17:14:40.981 UTC | PERF | http-19005-1_134_408 | com.good.ad.impl.AdDomainServicesImpl | getDomainName | Finished Domain=corp, flags=0x40000000

    2013-02-27 17:14:40.981 UTC | PERF | http-19005-1_134_408 | com.good.ad.impl.AdDomainServicesImpl | getDomainName | Starting Domain=corp.good.local, flags=0x40000000

    2013-02-27 17:14:40.981 UTC | PERF | http-19005-1_134_408 | com.good.ad.impl.AdDomainServicesImpl | getDomainName | Finished Domain=corp.good.local, flags=0x40000000

    2013-02-27 17:14:41.137 UTC | INFO | 134_410 | com.good.ws.SOAPLoggingHandler | log | PublicService Received:<?xml version="1.0" encoding="UTF-8"?>

    <emf:validateLoginCredentials xmlns:emf="http://good.com/emf">

             <emf:username>USERNAME</emf:username>

             <emf:password>BLAH</emf:password>

             <emf:domain>corp</emf:domain>

          </emf:validateLoginCredentials>

    2013-02-27 17:14:41.137 UTC | INFO | 134_410 | com.good.emf.security.SecurityServiceImpl | getDomainTrusts | Primary authentication domain: corp.good.local

    2013-02-27 17:14:41.137 UTC | INFO | 134_410 | com.good.emf.security.SecurityServiceImpl | getDomainTrusts | Created lookup context for domain: corp.good.local

    2013-02-27 17:14:41.137 UTC | INFO | 134_410 | com.good.emf.security.SecurityServiceImpl | getDomainTrusts | Domain corp.good.local trusts no other domains

    2013-02-27 17:14:41.153 UTC | INFO | 134_410 | com.good.emf.security.SecurityServiceImpl | getDomainTrusts | Authentication domains are: [CORP]

    2013-02-27 17:14:41.200 UTC | INFO | 134_411 | com.good.ws.SOAPLoggingHandler | log | PublicService Sending:<?xml version="1.0" encoding="UTF-8"?>

    <validateLoginCredentialsResponse xmlns="http://good.com/emf">

      <result>true</result>

    </validateLoginCredentialsResponse>

    2013-02-27 17:14:41.200 UTC | INFO | http-19005-1_134_412 | stdout |  | ---[HTTP response 200]---

    2013-02-27 17:14:41.200 UTC | INFO | http-19005-1_134_412 | stdout |  | <?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><validateLoginCredentialsResponse xmlns="http://good.com/emf"><result>true</result></validateLoginCredentialsResponse></S:Body></S:Envelope>

    2013-02-27 17:14:41.200 UTC | INFO | http-19005-1_134_412 | stdout |  | --------------------

    My question is this. What am I doing wrong in my WCF to make this fail.  I don’t think its sending the request across properly as you can see from the differences.

    Wednesday, February 27, 2013 6:46 PM

All replies

  • Hi, Please give more information on the two methods you want to call.

    Suggest you use Fiddler to help to troubleshoot the issue.

    Thursday, February 28, 2013 8:24 AM
  • The SOAP server only supports basic authentication, not the authentication type you've specified in your first example. Thus the "I don't understand your soap headers" reply. The second example is failing because the basic authentication credentials were not contained in the HTTP headers of the initial POST to the server. Wininet only adds the username/password into the HTTP headers in response to an HTTP 401 result code (authentication required) response from the server. This server is not returning that particular result code but instead is failing with an HTTP 500 result code and the message you've quoted. You will need to add the "Authorization: Basic " HTTP header manually to your POST, including the Base64 encoded username:password.
    Wednesday, April 24, 2013 9:53 PM