You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by pradeep1310 <pr...@hotmail.com> on 2016/06/08 05:58:41 UTC
Modify SoapBody
Hello,
I am new to CXF, I am trying to sign my out going XML.
For this I Need to find out the digest value of body tag, My body tag
inside SoapOutInterceptor is coming as <soap-env:Body> but i need to this to
be <soap-env:Body
xmlns:soap-sec="http://schemas.xmlsoap.org/soap/security/2000-12"
soap-sec:id = "SGN01">
How can i modify this inside interceptor which will also go out to server.
Thanks
Pradeep
--
View this message in context: http://cxf.547215.n5.nabble.com/Modify-SoapBody-tp5769428.html
Sent from the cxf-user mailing list archive at Nabble.com.
RE: Modify SoapBody
Posted by pradeep1310 <pr...@hotmail.com>.
Found the solution, changed the namespace in package-info.java class
generated by wsdl2java.
Thank you.
--
View this message in context: http://cxf.547215.n5.nabble.com/Modify-SoapBody-tp5769428p5769513.html
Sent from the cxf-user mailing list archive at Nabble.com.
RE: Modify SoapBody
Posted by pradeep1310 <pr...@hotmail.com>.
Can anybody please help me on this, I got stuck at this point and not able to
move forward.
--
View this message in context: http://cxf.547215.n5.nabble.com/Modify-SoapBody-tp5769428p5769509.html
Sent from the cxf-user mailing list archive at Nabble.com.
RE: Modify SoapBody
Posted by pradeep1310 <pr...@hotmail.com>.
Hello Andrei,
Thank you for your response, actually I have 5 keys (modulus, public
exponent etc). The one which you sent is for user name and password
authentication i believe and sorry if i am wrong.
Now I successfully signed and the handshake works, but once I get response
from Server In logininterceptor I am able to get the XML but at the end I am
running into below issues
Am I doing something wrong, Didn't I generate the jar properly from WSDL.
unexpected element (uri:"urn:myservice.client.messages",
local:"inquireAccountOutput"). Expected elements are
<{}inquireAccountOutput>
This is what I am getting in LogInInterceptor
*Response:*
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap-env:Body>
<s0:inquireAccountResponse xmlns:s0="urn:myservice.client.messages">
<inquireAccountOutput xmlns="urn:myservice.client.messages">
* This is what my WSDL*
<wsdl:output name="inquireAccountResponse">
<soap:body use="literal"
namespace="urn:myservice.client:document-binding"/>
</wsdl:output>
*And This is my XSD*
<xs:element name="inquireAccountResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="inquireAccountOutput"
type="ns0:InquireAccountOutput"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="InquireAccountOutput">
<xs:sequence>
<xs:element name="status" minOccurs="1" type="tns:ResponseDataOutput"/>
</xs:sequence>
</xs:complexType>
<xs:element name="inquireAccountOutput" type="tns:InquireAccountOutput"/>
--
View this message in context: http://cxf.547215.n5.nabble.com/Modify-SoapBody-tp5769428p5769491.html
Sent from the cxf-user mailing list archive at Nabble.com.
RE: Modify SoapBody
Posted by Andrei Shakirin <as...@talend.com>.
Hi,
Seems the message soap:body wasn't signed.
CXF Supports XML Signature and Encryption out the box, please look into the documentation:
- http://cxf.apache.org/docs/ws-security.html;
- http://cxf.apache.org/docs/ws-securitypolicy.html
And examples: https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/ws_security
Regards,
Andrei.
> -----Original Message-----
> From: pradeep1310 [mailto:pradeepkumar.gnanavel@hotmail.com]
> Sent: Mittwoch, 8. Juni 2016 07:59
> To: users@cxf.apache.org
> Subject: Modify SoapBody
>
> Hello,
> I am new to CXF, I am trying to sign my out going XML.
> For this I Need to find out the digest value of body tag, My body tag inside
> SoapOutInterceptor is coming as <soap-env:Body> but i need to this to be
> <soap-env:Body xmlns:soap-
> sec="http://schemas.xmlsoap.org/soap/security/2000-12"
> soap-sec:id = "SGN01">
>
> How can i modify this inside interceptor which will also go out to server.
>
> Thanks
> Pradeep
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Modify-
> SoapBody-tp5769428.html
> Sent from the cxf-user mailing list archive at Nabble.com.