Hello Dan, first.. thanks for you help.
1)
<soap:Header>
<wsse:Security
xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
<wsu:Timestamp
xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
"
wsu:Id="Timestamp-3">
<wsu:Created>2010-12-17T11:47:47.261Z</wsu:Created>
<wsu:Expires>2010-12-17T11:49:47.261Z</wsu:Expires>
</wsu:Timestamp>
<wsse:BinarySecurityToken
xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"
xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
"
EncodingType="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary
"
ValueType="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3
"
wsu:Id="CertId-...">...</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
Id="Signature-1">
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"
/>
<ds:SignatureMethod Algorithm="
http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<ds:Reference URI="#id-2">
<ds:Transforms>
<ds:Transform Algorithm="
http://www.w3.org/2001/10/xml-exc-c14n#" />
</ds:Transforms>
<ds:DigestMethod Algorithm="
http://www.w3.org/2000/09/xmldsig#sha1" />
<ds:DigestValue>vn7k3hJ0oRYqmJL+17kVxj5fOQo=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>... </ds:SignatureValue>
<ds:KeyInfo Id="KeyId-BB236E846DE943153712925864671742">
<wsse:SecurityTokenReference
xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"
xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
"
wsu:Id="STRId-BB236E846DE943153712925864671773">
<wsse:Reference
xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"
URI="#CertId-BB236E846DE943153712925864671571"
ValueType="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
<Action xmlns="http://www.w3.org/2005/08/addressing">
http://tempuri.org/IStock/MensajeStock</Action>
<MessageID xmlns="http://www.w3.org/2005/08/addressing
">urn:uuid:ea0ad92d-d27a-4cab-b2d7-b9fb596df07a
</MessageID>
<To xmlns="http://www.w3.org/2005/08/addressing">
http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc</To>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://www.w3.org/2005/08/addressing/anonymous
</Address>
</ReplyTo>
</soap:Header>
That is the eclipse console log.. from i'm trying to get it from wireshark.
2) There no annotation.
3) Yes, I'll try now.
4) The error now (I change the client) is Bad Request. I've only the client.
This is my client-bean.xml:
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-policy.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-ws-security.xml"
/>
<cxf:bus>
<cxf:features>
<p:policies />
<cxf:logging />
<wsa:addressing />
<!--
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd--
>
</cxf:features>
</cxf:bus>
<bean id="wsFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="org.tempuri.IStock" />
<property name="address"
value="http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc" />
<property name="outInterceptors">
<list>
<bean
class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
<ref bean="wss4jOutInterceptor" />
</list>
</property>
<!-- <property name="bindingId" value="
http://schemas.xmlsoap.org/soap/"
/> -->
</bean>
<bean id="wss4jOutInterceptor"
class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
<constructor-arg>
<map>
<entry key="timeToLive" value="120" />
<entry key="action" value="Signature Timestamp" />
<entry key="signaturePropFile"
value="Client_Sign.properties" />
<entry key="user" value="...." />
<entry key="passwordType" value="PasswordDigest" />
<entry key="mustUnderstand" value="false" />
<entry key="signatureKeyIdentifier" value="DirectReference"
/>
<entry key="passwordCallbackRef">
<ref bean="signaturePwdCallback" />
</entry>
<!-- <entry key="signatureParts" value="{}{
http://www.w3.org/2005/08/addressing}Action;{}{http://www.w3.org/2005/08/addressing}ReplyTo;{}{http://www.w3.org/2005/08/addressing}MessageID;{}{http://www.w3.org/2005/08/addressing}To"
/> WHEN I UNCOMMENT THIS.. FAIL-->
</map>
</constructor-arg>
</bean>
<bean id="signaturePwdCallback" class="org.jpp.ws.client.ClientCallback"
/>
JP
2010/12/16 Daniel Kulp <[email protected]>
>
> Few things;
>
> 1) can you use wireshark or similar to grab the raw transfer? I'd like to
> see the SOAPAction header in the HTTP request an the Action in the
> soap:header.
>
> 2) Are there any Action annotations or similar on the interface?
>
> 3) Is there a way to add a "wsdlLocation" attribute that may point to the
> WSDL
> that would have the actions defined?
>
> 4) Is there a stack trace on that error? Is the error coming from the
> server
> or from the client?
>
> Dan
>
>
> On Thursday 16 December 2010 2:18:26 pm Juan Pablo Pizarro wrote:
> > Hello all, I'm trying to put a soapAction through Spring+cxf (2.3.0).
> >
> > I've this:
> >
> > <beans xmlns="http://www.springframework.org/schema/beans"
> > ...
> >
> > <import resource="classpath:META-INF/cxf/cxf.xml" />
> > <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> > <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
> > <import resource="classpath:META-INF/cxf/cxf-extension-policy.xml" />
> > <import
> resource="classpath:META-INF/cxf/cxf-extension-ws-security.xml"
> > />
> >
> > <cxf:bus>
> > <cxf:features>
> > <p:policies />
> > <cxf:logging />
> > <wsa:addressing/>
> > </cxf:features>
> > </cxf:bus>
> >
> > <bean id="wsFactory"
> > class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> <property
> > name="serviceClass" value="org.tempuri.IStock" /> <property
> name="address"
> > value="http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc"
> />
> > <property name="outInterceptors">
> > <list>
> > <bean
> > class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
> > <ref bean="wss4jOutInterceptor" />
> > </list>
> > </property>
> > <!-- <property name="bindingId" value="
> > http://schemas.xmlsoap.org/soap/"
> > /> -->
> > </bean>
> >
> > <bean id="wss4jOutInterceptor"
> > class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
> > <constructor-arg>
> > <map>
> > <entry key="timeToLive" value="120" />
> > <entry key="action" value="Signature Timestamp" />
> > <entry key="signaturePropFile"
> > value="Client_Sign.properties" />
> > <entry key="user"
> > value="le-60dca1be-5393-48b3-bbc3-0dfb1ab40d25" />
> > <entry key="passwordType" value="PasswordDigest" />
> > <entry key="signatureKeyIdentifier"
> value="DirectReference"
> > />
> >
> > <entry key="passwordCallbackRef">
> > <ref bean="signaturePwdCallback" />
> > </entry>
> >
> > <!-- <entry key="signatureParts" value="{}{
> >
> http://www.w3.org/2005/08/addressing}Action;{}{http://www.w3.org/2005/08/ad<http://www.w3.org/2005/08/addressing%7DAction;%7B%7D%7Bhttp://www.w3.org/2005/08/ad>
> > dressing}ReplyTo;{}{
> http://www.w3.org/2005/08/addressing}MessageID;{}{http<http://www.w3.org/2005/08/addressing%7DMessageID;%7B%7D%7Bhttp>
> :
> > //www.w3.org/2005/08/addressing}To<http://www.w3.org/2005/08/addressing%7DTo>
> "
> >
> > /> -->
> >
> > </map>
> > </constructor-arg>
> > </bean>
> >
> > <bean id="signaturePwdCallback"
> > class="org.jpp.ws.client.ClientCallback" />
> >
> > </beans>
> >
> >
> > And the error is:
> >
> > The SOAP action specified on the message, '', does not match the HTTP
> SOAP
> > Action,
> > 'http://tempuri.org/IStock/MensajeStock'<
> http://tempuri.org/IStock/Mensaje
> > Stock%27>.
> >
> >
> > Any help please?
>
> --
> Daniel Kulp
> [email protected]
> http://dankulp.com/blog
>