3 Replies Latest reply on Feb 6, 2012 9:37 PM by Tom Cunningham

    is this still broken in 5.1? wise.SOAPClient and BASIC auth

    joe_boy12 Novice

      hi there,

       

      I have a simple secured web service with a single operation takes an XML input (payload) and returns either fault or response XML. I am using wise.SOAPClient and my action is able to download the wsdl with security credentials I pass, generate java classes and compile but at actual method call its throwing 401 exception.

       

      here is my jboss-esb.xml snippet.

       

      <action name="wise-soap-client-action" class="org.jboss.soa.esb.actions.soap.wise.SOAPClient">

      <property name="wsdl" value="http://myhost.abc.com:8080/sample/stp/us?wsdl" />

      <property name="SOAPAction" value="doStpCheck"/>

      <property name="paramsLocation" value="stpreq" />

      <property name="responseLocation" value="stpres" />

      <property name="responseAsOgnlMap" value="true" />

      <property name="SOAPService" value="{http://stp}STPCheckService" />

      <property name="EndPointName" value="STPCheckPort"/>

      <property name="serviceName" value="stp"/>

      <property name="username" value="my_user"></property>

      <property name="password" value="mypassw0rd"></property>

      <property name="LoggingMessages" value="true"></property>

      </action>

       

      error.

       

      {color:red}

      17:02:31,976 ERROR [SOAPFaultHelperJAXWS] SOAP request exception

      java.io.IOException: Could not transmit message

              at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:253)

              at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)

              at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:360)

       

      Caused by: org.jboss.ws.WSException: Invalid HTTP server response [401] - Unauthorized

              at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75)

              at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:584)

              at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:381)

              at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:232)

              ... 25 more

      {color}

       

      Inbound message:

      {color:green}

      17:02:31,992 INFO  [STDOUT] <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><env:Fault xmlns:env='http://

      schemas.xmlsoap.org/soap/envelope/'><faultcode>env:Server

      17:02:31,992 INFO  [STDOUT] </faultcode>

      17:02:31,992 INFO  [STDOUT] <faultstring>Could not transmit message

      17:02:31,992 INFO  [STDOUT] </faultstring>

      17:02:31,992 INFO  [STDOUT] </env:Fault>

      17:02:31,992 INFO  [STDOUT] </env:Body></env:Envelope>

      {color}

       

      Note - the call works from soapUI pro when I add security parameters while action call.