I can not consume the ESB webservice java client (MustUnderstand headers)
pedrodonte May 15, 2013 1:47 PMI can not consume the ESB webservice with java client using a UsernameToken, but with soapUI it works.
Throws the following exception:
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand
faultSubcode:
faultString: MustUnderstand headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:MustUnderstand headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood.
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129).......
Client Code
public static void main(String[] args) throws Exception {
EngineConfiguration config = new FileProvider("clientews/client_deploy_sec.wsdd");
HacerPingServiceLocator service = new HacerPingServiceLocator(config);
HacerPingPortType portType = service.gethacerPingPortType();
Stub stub = (Stub) portType;
stub._setProperty(Stub.USERNAME_PROPERTY, "gruero11");
stub._setProperty(Stub.PASSWORD_PROPERTY, "gdyb21LQTcIANtvYMT7QVQ==");
stub._setProperty(Call.CHECK_MUST_UNDERSTAND, Boolean.FALSE);
stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,"http://localhost:8380/PruebaService/ebws/ejemplo/hacerPing");
int numero = (int) new Date().getTime();
portType.hacerPingOp(new TipoDato("pedrodonte", numero));
}
jboss-esb.xml
<?xml version="1.0"?>
<jbossesb parameterReloadSecs="5"
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="JBossWS"/>
</globals>
<providers>
<jms-provider connection-factory="ConnectionFactory" name="jms-provider-ping">
<jms-bus busid="jms-provider-ping"/>
</jms-provider>
</providers>
<services>
<service category="ejemplo" description="servicio de ejemplo" name="hacerPing">
<security moduleName="cmvrc" rolesAllowed="gruero"/>
<listeners>
<jms-listener busidref="jms-provider-ping" name="hacer-ping-jms-listener">
<jms-message-filter dest-name="queue/hacerPing-queue" dest-type="QUEUE"/>
</jms-listener>
</listeners>
<actions inXsd="/HacePingSchema.xsd" mep="RequestResponse"
outXsd="/HacePingSchema.xsd" webservice="true">
<action class="org.jboss.soa.esb.actions.SystemPrintln" name="printlnAction">
<property name="message" value="Holaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"/>
<property name="printfull" value="true"/>
</action>
</actions>
</service>
</services>
</jbossesb>
I hope someone will be kind enough to show solidarity with me.
-
hacerPing.wsdl.zip 709 bytes
-
hacerPing.response.soapUI.xml 499 bytes
-
hacerPing.request.soapUI.xml 682 bytes
-
hacerPing.exc.cliente.txt.zip 876 bytes