Win a copy of Rust Web Development this week in the Other Languages forum!

somia razzaq

Ranch Hand
+ Follow
since Jan 26, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by somia razzaq


Hi
There is not. Thats why i need help how and which kind of configurations are required at .net client to communicate with java web service which is secured using Metro ws-security.
Actually i have no idea how ws-security is implemented in .net and how java web service using metro is interoperable with .net in the context of ws-security specificatins.

Regards and Thanks
11 years ago
Repost. Please help if someone know about the problem.

Thanks in advance
11 years ago
Hi
I have developed a secure web service in java using metro 2.0.1 and Netbeans 6.5 with Glassfish v2. It's working fine. I have developed a client (Console Application) using Visual Studio .Net 2010 to consume the secure java service. But i am getting the exception of "No Security Header Found" . The following is the stack trace of this error:

System.ServiceModel.FaultException was unhandled
Message=ERROR: No security header found in the message
Source=mscorlib
StackTrace:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at test_java_client.ServiceReference1.test_VSnet_WS.Add(AddRequest request)
at test_java_client.ServiceReference1.test_VSnet_WSClient.test_java_client.ServiceReference1.test_VSnet_WS.Add(AddRequest request) in E:\.NET Programs\test_java_client\test_java_client\Service References\ServiceReference1\Reference.cs:line 91
at test_java_client.ServiceReference1.test_VSnet_WSClient.Add(Int32 a, Int32 b) in E:\.NET Programs\test_java_client\test_java_client\Service References\ServiceReference1\Reference.cs:line 98
at test_java_client.Program.Main(String[] args) in E:\.NET Programs\test_java_client\test_java_client\Program.cs:line 13
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:


I think i have to set configuration of metro in VS .net . But i don't know how? I googled for a tutorial for dealing such kind of situation but did not find the exact one.

Please tell me what should i do and if there is any useful link of a tutorial, kindly tell me.
Thanks in advance.

Regards
11 years ago
Hi
I read, XPath helps to encrypt elements of soap body. I have googled to find information about this but found no useful link. Can anybody help me in this regard if anyone have used this method before.

Thanks
11 years ago
Hi
I am using Metro for implementation of WS-Security at server and client side.

Thanks
11 years ago
Hi Ivan
I am trying to use soapUI to test my service. I am using netbeans 6.8. I have installed soapUI plugin. But i am getting the error of Test case failed. The snapshot of netbeans IDE with failed Test case is given in attached file. Is it mean i have some error at service side or some other fault ( e.g. related to configuration of soapUI in my IDE)? Please help me. As i am using soapUI plugin first time.

Thanks
11 years ago
Hi
I am trying to implement ws-security in web service using metro. I am succeeded to implement it in a simple web service but facing problems in contract-first web service. In a contract-first web service, my SOAP request message is ok, having information about authentication and encrypted soap body. But i am getting the following error in the soap response message. The client is a servlet based web service. Please help me how i resolve it.

INFO: Element not understood={http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security
INFO: ---[HTTP response 500]---
INFO: <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:MustUnderstand</faultcode><faultstring>MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood</faultstring></S:Fault></S:Body></S:Envelope>

Thanks in advance
Regards
11 years ago
Hi
I am trying to encrypt the soap body using Metro but still unable to do it. I am using Glassfish v2 server, when i start the server, i find the following message/error related to the expiry of certificates. Can anybody help me either due to this problem, i am not getting the desired result. If yes then help me how can i resolve this error.
And if i want to create my own keystore and truststore for use of implementing WS-Security instead of using keystore and truststore available in Glassfish V2 server, then how can i do this
Please help me.



C:/Program Files/glassfish-v2ur2/domains/domain1/config/.__com_sun_appserv_pid
ADM0001:SunoneInterceptor is now enabled
[
Version: V1
Subject: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
Signature Algorithm: MD2withRSA, OID = 1.2.840.113549.1.1.2
Key: Sun RSA public key, 1000 bits
modulus: 6144706769222379850430183405655235862870193813433361902309516534729547168229223442088128897090426025874990958624426272027915771330043379079076269082776443120496525109458437435793974957144923190172655546279112796066635455545786300647745888353781002359412766112775410851780140804282673804950495744761467
public exponent: 65537
Validity: [From: Wed Nov 09 03:00:00 AST 1994,
To: Fri Jan 08 02:59:59 AST 2010]
Issuer: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
SerialNumber: [ 02ad667e 4e45fe5e 576f3c98 195eddc0]
]
Algorithm: [MD2withRSA]
Signature:
0000: 65 DD 7E E1 B2 EC B0 E2 3A E0 EC 71 46 9A 19 11 e.......:..qF...
0010: B8 D3 C7 A0 B4 03 40 26 02 3E 09 9C E1 12 B3 D1 ......@&.>......
0020: 5A F6 37 A5 B7 61 03 B6 5B 16 69 3B C6 44 08 0C Z.7..a..[.i;.D..
0030: 88 53 0C 6B 97 49 C7 3E 35 DC 6C B9 BB AA DF 5C .S.k.I.>5.l....\
0040: BB 3A 2F 93 60 B6 A9 4B 4D F2 20 F7 CD 5F 7F 64 .:/.`..KM. .._.d
0050: 7B 8E DC 00 5C D7 FA 77 CA 39 16 59 6F 0E EA D3 ....\..w.9.Yo...
0060: B5 83 7F 4D 4D 42 56 76 B4 C9 5F 04 F8 38 F8 EB ...MMBVv.._..8..
0070: D2 5F 75 5F CD 7B FC E5 8E 80 7C FC 50 ._u_........P
];_RequestID=93e9264e-3793-4175-bb98-058a648ba3b4;|SEC5054: Certificate has expired: [
[
Version: V1
Subject: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
Signature Algorithm: MD2withRSA, OID = 1.2.840.113549.1.1.2
Key: Sun RSA public key, 1000 bits
modulus: 6144706769222379850430183405655235862870193813433361902309516534729547168229223442088128897090426025874990958624426272027915771330043379079076269082776443120496525109458437435793974957144923190172655546279112796066635455545786300647745888353781002359412766112775410851780140804282673804950495744761467
public exponent: 65537
Validity: [From: Wed Nov 09 03:00:00 AST 1994,
To: Fri Jan 08 02:59:59 AST 2010]
Issuer: OU=Secure Server Certification Authority, O="RSA Data Security, Inc.", C=US
SerialNumber: [ 02ad667e 4e45fe5e 576f3c98 195eddc0]
]
Algorithm: [MD2withRSA]
Signature:
0000: 65 DD 7E E1 B2 EC B0 E2 3A E0 EC 71 46 9A 19 11 e.......:..qF...
0010: B8 D3 C7 A0 B4 03 40 26 02 3E 09 9C E1 12 B3 D1 ......@&.>......
0020: 5A F6 37 A5 B7 61 03 B6 5B 16 69 3B C6 44 08 0C Z.7..a..[.i;.D..
0030: 88 53 0C 6B 97 49 C7 3E 35 DC 6C B9 BB AA DF 5C .S.k.I.>5.l....\
0040: BB 3A 2F 93 60 B6 A9 4B 4D F2 20 F7 CD 5F 7F 64 .:/.`..KM. .._.d
0050: 7B 8E DC 00 5C D7 FA 77 CA 39 16 59 6F 0E EA D3 ....\..w.9.Yo...
0060: B5 83 7F 4D 4D 42 56 76 B4 C9 5F 04 F8 38 F8 EB ...MMBVv.._..8..
0070: D2 5F 75 5F CD 7B FC E5 8E 80 7C FC 50 ._u_........P
]
SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.


Thanks in advance.
11 years ago
Hi
I have done all the steps that you wrote. The result is very surprising. I deploy/run both Calculator and SecureCalculator application, both are giving the same error as before. But when i tried to make my own contract-first service and client from scratch, it works fine. My service takes two inputs, age and name and returns both as an object. The code of my web service is given below:

@WebService(serviceName = "simple_WSDLService", portName = "simple_WSDLPort", endpointInterface = "org.netbeans.j2ee.wsdl.simple_wsdl.SimpleWSDLPortType", targetNamespace = "http://j2ee.netbeans.org/wsdl/simple_WSDL", wsdlLocation = "WEB-INF/wsdl/simple_ws/simple_WSDL.wsdl")
public class simple_ws implements SimpleWSDLPortType{

public org.netbeans.xml.schema.simple_schema.StdentInfo simpleWSDLOperation(int age, java.lang.String name) {
//TODO implement this method
//throw new UnsupportedOperationException("Not implemented yet.");
StdentInfo s=new StdentInfo();
//s.setAge(28);
//s.setName("hello");
return s;

}}

Now i have some questions with you. Please answer these.

1. When you have run the SecureCalculator application, either body of the SOAP request and response message was in encrypted form or not? Because when i run my own service and client, body is not encrypted. I am sending you both SOAP request and Response messages given below for help.

INFO: ==== Received Message Start ====
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" S:mustUnderstand="1">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1274368650148-293348825">
<wsu:Created>2010-05-20T15:17:31Z</wsu:Created>
<wsu:Expires>2010-05-20T15:22:31Z</wsu:Expires>
</wsu:Timestamp>
<wsse:BinarySecurityToken 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="XWSSGID-1274368650173-667410281">MIICkDCCAfmgAwIBAgIESxdtcDANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExGTAXBgNVBAoTEFN1biBNaWNyb3N5c3RlbXMxEjAQBgNVBAsTCUdsYXNzRmlzaDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTA5MTIwMzA3NDkwNFoXDTE5MTIwMTA3NDkwNFowezELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRkwFwYDVQQKExBTdW4gTWljcm9zeXN0ZW1zMRIwEAYDVQQLEwlHbGFzc0Zpc2gxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsQjbCMsiQXAAAdVU8o2mjATUAM89LBdS6YFQ89RHfM0ZeFwLhsLFN/yDdQv6M80V/2jiev4TTGMrBdRkw2K/wlPQDe5STFupaNVXu+1Ibm8ciuXsBziTh/LMj/EKZqPWT/9CRcYseqL1RxXhYOLgwAPzRlV/OsmasKm3KQGrbIMCAwEAAaMhMB8wHQYDVR0OBBYEFBuO9qJISbB4NeIdFGc/cXrZ2rh5MA0GCSqGSIb3DQEBBQUAA4GBAFs4T2Kqcg3ky7BipsoSrwQimG5XxXl6BoUuyzeWci4p30D4XJ97LN3pDqyKCHsBzi+9eJ102NmBhJnULNZ8oA6hLKg4lJSve3hCQ6NU1udtxGQbr6mHjcpJHEJvC60akSPrE/paTfU6sOBwuoAferkNkG2IN9c4R7y1elIQ5n6Z</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="XWSSGID-1274368650173407781375">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsse S"/>
</ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#XWSSGID-12743686517771373251115">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>WgUdoUInZPY0UVfCCS1cTTEC3fg=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#XWSSGID-1274368650148-293348825">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>IR6suhdQDaA12PpbLmM3A3RBEXM=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>BShxZgiLHWpnHhjl6DjAivh/ovu+95y8C0foTo2yk9YvnnEe6+nY4fdcskDtSEwAWNDv24dpT781
g0qNM3N/L+qhMbAac02EHjDoR7vEc8z9loxDGfRe8NYt4pxhWl1fi5lacUgKL5MCXln6rKTHCwQA
z6AnUYbSV9mvPAHT4FM=</ds:SignatureValue>
<ds:KeyInfo>
<wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1274368651681577569689">
<wsse:Reference URI="#XWSSGID-1274368650173-667410281" 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>
<To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8080/simple/simple_WSDLService</To>;
<Action xmlns="http://www.w3.org/2005/08/addressing">http://j2ee.netbeans.org/wsdl/simple_WSDL/simple_WSDLPortType/simple_WSDLOperationRequest</Action>;
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://www.w3.org/2005/08/addressing/anonymous</Address>;
</ReplyTo>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:e7a3bcaf-5df5-47be-8b8c-a0a5ec306dce</MessageID>
</S:Header>
<S:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-12743686517771373251115">
<ns2:simple_WSDLOperation xmlns:ns2="http://j2ee.netbeans.org/wsdl/simple_WSDL" xmlns:ns3="http://xml.netbeans.org/schema/simple_schema">
<Age>23</Age>
<Name>jj</Name>
</ns2:simple_WSDLOperation>
</S:Body>
</S:Envelope>
==== Received Message End ====



INFO: ==== Sending Message Start ====
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" S:mustUnderstand="1">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1274368653061501120783">
<wsu:Created>2010-05-20T15:17:34Z</wsu:Created>
<wsu:Expires>2010-05-20T15:22:34Z</wsu:Expires>
</wsu:Timestamp>
<wsse:BinarySecurityToken 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="XWSSGID-1274368653061-121652692">MIICkDCCAfmgAwIBAgIESxdtcDANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLU2FudGEgQ2xhcmExGTAXBgNVBAoTEFN1biBNaWNyb3N5c3RlbXMxEjAQBgNVBAsTCUdsYXNzRmlzaDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTA5MTIwMzA3NDkwNFoXDTE5MTIwMTA3NDkwNFowezELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFDASBgNVBAcTC1NhbnRhIENsYXJhMRkwFwYDVQQKExBTdW4gTWljcm9zeXN0ZW1zMRIwEAYDVQQLEwlHbGFzc0Zpc2gxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAsQjbCMsiQXAAAdVU8o2mjATUAM89LBdS6YFQ89RHfM0ZeFwLhsLFN/yDdQv6M80V/2jiev4TTGMrBdRkw2K/wlPQDe5STFupaNVXu+1Ibm8ciuXsBziTh/LMj/EKZqPWT/9CRcYseqL1RxXhYOLgwAPzRlV/OsmasKm3KQGrbIMCAwEAAaMhMB8wHQYDVR0OBBYEFBuO9qJISbB4NeIdFGc/cXrZ2rh5MA0GCSqGSIb3DQEBBQUAA4GBAFs4T2Kqcg3ky7BipsoSrwQimG5XxXl6BoUuyzeWci4p30D4XJ97LN3pDqyKCHsBzi+9eJ102NmBhJnULNZ8oA6hLKg4lJSve3hCQ6NU1udtxGQbr6mHjcpJHEJvC60akSPrE/paTfU6sOBwuoAferkNkG2IN9c4R7y1elIQ5n6Z</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="XWSSGID-1274368653061-850795818">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsse S"/>
</ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#XWSSGID-12743686542051750876130">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>hMYQvuqEkE1WYgAZMc6WZE0QFWU=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#XWSSGID-1274368653061501120783">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>a0BF9dtQSvnYAFga4xe/Xrzfxdw=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>YGHaMkYXAluR67qxi/7r8TSf6dB+Ab9JFBUtPnljiCcGBxk2omffzIY013OXrArAWNeCHTp9ynwQ
R3TVH8cBhG1X/ADZj6HnjAfeKs0O2o9+gNMKNOeqfREaIoRy2870WNbH/UBrCex6BhysbeGF0Saq
bBravYxntHils3BYjOY=</ds:SignatureValue>
<ds:KeyInfo>
<wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1274368654204-451426427">
<wsse:Reference URI="#XWSSGID-1274368653061-121652692" 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>
</S:Header>
<S:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-12743686542051750876130">
<ns2:simple_WSDLOperationResponse xmlns:ns2="http://j2ee.netbeans.org/wsdl/simple_WSDL" xmlns:ns3="http://xml.netbeans.org/schema/simple_schema">
<student_object>
<ns3:Age>0</ns3:Age>
</student_object>
</ns2:simple_WSDLOperationResponse>
</S:Body>
</S:Envelope>
==== Sending Message End ====

2. In first question, the client is also a web application. I have developed a java SE client for SecureCalculatorApp. In this the SOAP request message body is encrypted (as given in my earlier posts) but error in SOAP response message (as given in my earlier post i.e.
SEVERE: WSS0265: Primary Policy Violation occured
SEVERE: com.sun.xml.wss.XWSSecurityException: com.sun.xml.wss.impl.PolicyViolationException: Expected Signature Element as per receiver requirements, found )

Please guide me if you have any suggestion. Actually i have to encrypt the body of SOAP messages. Also different parts of SOAP body not all the body.
Waiting for your answer eagerly!!

Thanks a lot
11 years ago
Hi
Sorry i am not able to do this. Still facing the same problem. I have developed my own service, in that i am facing the same error. I am trying to solve it. I think i have problem in configuration of server. If you have any idea, please help me.

Thanks a lot for your cooperation
11 years ago
Hi
Thanks for your detailed reply. I have followed all the steps, everything is going fine. But i am facing the same error when i deploy the SecureCalculatorClientApp project i.e.

Compiling 6 source files to C:\Users\user\Documents\NetBeansProjects\SecureCalculator\SecureCalculatorClientApp\build\web\WEB-INF\classes
C:\Users\user\Documents\NetBeansProjects\SecureCalculator\SecureCalculatorClientApp\build\generated-sources\jax-ws\org\me\calculator\client\CalculatorWSService.java:68: cannot find symbol
symbol : method getPort(javax.xml.namespace.QName,java.lang.Class<org.me.calculator.client.CalculatorWS>,javax.xml.ws.WebServiceFeature[])
location: class javax.xml.ws.Service
return super.getPort(new QName("http://calculator.me.org/", "CalculatorWSPort"), CalculatorWS.class, features);
1 error

Secondly I am not prompted for the GlassFish user/password as you described in your step 6.
Please see again why this error come.
Waiting for your reply.

Thanks a lot
11 years ago
Hi
i have followed all the instructions given by you and in this tutorial before. Also clean and build project option. But the error is there. If you know any other solution. kindly guide me.
Thanks
11 years ago
Hi
Really! you have run this tutorial. But i am facing problem still.
I have installed netbeans 6.8, server "Personal Glassfish V3 Domain" and JDK 1.6 to run this tutorial as you told. My first question is that in step 7 as you described "(enter the userid/password) for Glassfish server when prompted" , i am not prompted to enter userid/password for Glassfish server. But i have successfully deployed and run the SecureCalculatorApp service.
Secondly I am getting error during deploying SecureCalculatorClientApp that is as follows.
There is a node named "Generated sources(jax-ws)" when i expand the SecureCalculatorClientApp node. In this node there are six java classes, Add.java, AddResponse.java, CalculatorWS.java, CalculatorWSService.java, ObjectFactory.java and package-info.java. I am getting following error in CalculatorWSService.java class
"Compiling 2 source files to C:\Users\user\Documents\NetBeansProjects\SecureCalculator1\SecureCalculatorClientApp\build\web\WEB-INF\classes
C:\Users\user\Documents\NetBeansProjects\SecureCalculator1\SecureCalculatorClientApp\build\generated-sources\jax-ws\org\me\calculator\client\CalculatorWSService.java:68: cannot find symbol
symbol : method getPort(javax.xml.namespace.QName,java.lang.Class<org.me.calculator.client.CalculatorWS>,javax.xml.ws.WebServiceFeature[])
location: class javax.xml.ws.Service
return super.getPort(new QName("http://calculator.me.org/", "CalculatorWSPort"), CalculatorWS.class, features);
1 error"

Have you faced this error when you tried this tutorial. Please help me how can i remove this error.
waiting for your reply as usual.

Thanks
11 years ago
Hi
First of all thanks for your reply. The request message is given below. I have used the metro tutorial to implement the ws-security using link "http://netbeans.org/kb/docs/websvc/wsit.html" . This tutorial do authenticatin, signature and encryption. Please help me, if you know any solution. If there is need to read WSDL file, i can send it.
Waiting for your reply.



Thanks
11 years ago
Hi
I have developed a contract-first web service and its client. I have used Metro to implement ws-security at both ends. I am using Netbeans 6.0.1 and server Glassfish V2. My client is authenticated properly but i am facing problem in encryption of body of SOAP messages. The request SOAP message body is encrypted but i have found the following error for SOAP response message. Please help me. I am trying to solve the error from many days but invain.


Thanks
11 years ago