Hello I am new to JBoss ESB, I've been trying to consume a web service with three Apis, first with HttpRouter, then with SoapClient and finally SOAPProxy and in all these cases the response was the same.
Error 401--Unauthorized
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1: 10.4.2 401 Unauthorized The request requires user authentication. The response MUST include a WWW-Authentic ate header field (section 14.46) containing a challenge applicable to the requested resource. The client MAY repeat th e request with a suitable Authorization header field (section 14.8). If the request already included Authorization cre dentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 respon se contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity MAY include rele vant diagnostic information. HTTP access authentication is explained in section 11. |
I consulted on almost every forum and many solutions presented when applying but not any.
This is a picture of the work environment.
https://community.jboss.org/servlet/JiveServlet/downloadImage/2-779999-19963/450-193/Sin+t%C3%ADtulo.jpg
This is my xml
<?
xml version="1.0"?><
jbossesb
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd"
>
<globals>
<war-security domain="other" method="BASIC"
/>
</globals>
<providers>
<fs-provider name="InputFile"
>
<fs-bus busid="inputFile">
<fs-message-filter directory="/tmp" input-suffix="esbfile"/>
</fs-bus>
</fs-provider>
</providers>
<services>
<service category="consume"
description="Consume un servicio web"
invmScope="GLOBAL" name="ConsumeServicio"
>
<listeners>
<fs-listener busidref="inputFile" is-gateway="true" name="ListennerInputFile"
/>
</listeners>
<actions mep="RequestResponse"
>
<action class="action.GetFile" name="getFile" process="process"/>
<action class="org.jboss.soa.esb.actions.SystemPrintln" name="showMessageBefore">
<property name="message" value="ConsumeServicio->Actions->showMessageBefore"/>
<property name="printfull" value="true"/>
</action>
<action class="org.jboss.soa.esb.actions.routing.http.HttpRouter" name="consumeServicioSII"
>
<property name="method" value="POST"/>
<property name="endpointUrl" value="https://test.pisee.cl/SIIDireccionContribuyenteProxy">
<http-client-property name="username" value="HACIENDA"/>
<http-client-property name="password" value="fWQ5DK8z"/>
<http-client-property name="file" value="/HttpRouter-localhost-https-9433.properties"/>
</property>
</action>
<action class="org.jboss.soa.esb.actions.SystemPrintln" name="showMessageAfter"
>
<property name="message" value="ConsumeServicio->Actions->showMessageAfter"/>
</action>
<action class="org.jboss.soa.esb.actions.SyncServiceInvoker" name="enviaAConsumeWSClient"
>
<property name="service-category" value="consume"/>
<property name="service-name" value="ConsumeSOAPProxy"/>
</action>
</actions>
</service>
<!-- <service category="consume" description="Utiliza SOAPClient" invmScope="GLOBAL" name="ConsumeWSClient"> <actions mep="RequestResponse"> <action class="action.GetFile"
name="getFile" process="process"/> <action class="org.jboss.soa.esb.actions.SystemPrintln"
name="showMessageBefore"> <property name="message" value="Services->Actions->ConsumeWSClient->showMessageBefore"/>
<property name="printfull" value="true"/> </action> <action class="org.jboss.soa.esb.actions.soap.SOAPClient"
name="consumeWS"> <property name="wsdl" value="https://test.pisee.cl/SIIDireccionContribuyenteProxy?wsdl"/>
<property name="SOAPAction" value="getDireccionesCont"/> <property name="endpointUrl"
value="https://test.pisee.cl/SIIDireccionContribuyenteProxy"/> <property
name="http-client-properties"> <http-client-property name="http.proxyHost"
value="localhost"/> <http-client-property name="http.proxyPort" value="8080"/>
</property> <property name="password" value="fWQ5DK8z"/> <property name="username"
value="HACIENDA"/> </action> <action class="org.jboss.soa.esb.actions.SystemPrintln"
name="showMessageAfter"> <property name="message" value="Services->Actions->ConsumeWSClient->showMessageAfter"/>
</action> </actions> </service> -->
<service category="consume"
description="Consume mediante la clae SOAPProxy" invmScope="GLOBAL" name="ConsumeSOAPProxy"
>
<security
callbackHandler="org.jboss.soa.esb.services.security.auth.login.JBossSTSIssueCallbackHandler" moduleName=""
>
<property name="password" value="fWQ5DK8z"/>
<property name="username" value="HACIENDA"/>
</security>
<property name="username" value="HACIENDA"
/>
<property name="password" value="fWQ5DK8z"/>
<actions mep="RequestResponse">
<action class="action.GetFile" name="getFile" process="process"/>
<action class="org.jboss.soa.esb.actions.SystemPrintln" name="showMessageBefore">
<property name="message" value="Services->Actions-ConsumeSOAPProxy>showMessageBefore"/>
<property name="printfull" value="true"/>
</action>
<action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" name="ConsumeWSSIISOAPProxy"
>
<property name="wsdl" value="https://test.pisee.cl/SIIDireccionContribuyenteProxy?wsdl"/>
<property name="file" value="/META-INF//httpclient-8443.properties"/>
<!-- <property name="clientCredentialsRequired" value="true"/>-->
<property name="method" value="POST"/>
<property name="endpointUrl" value="https://test.pisee.cl/SIIDireccionContribuyenteProxy"/>
<property name="headers">
<header name="username" value="HACIENDA"/>
<header name="password" value="fWQ5DK8z"/>
</property>
</action>
<action class="org.jboss.soa.esb.actions.SystemPrintln" name="showMessageAfter"
>
<property name="message" value="Services->Actions-ConsumeSOAPProxy>showMessageAfter"/>
</action>
</actions>
</service>
</services
></
jbossesb>
And this is my property file
configurators=AuthBASIC,HttpProtocol
auth-username=HACIENDA
auth-password=fWQ5DK8z
authscope-host=127.0.0.1
authscope-port=8080
protocol-socket-factory=org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory
keystore=/keystore.jks
keystore-passw=hola1982
truststore=/truststore.jks
truststore-passw=hola1982
max-connections-per-host=5
I hope you can help me thanks!