[ https://issues.apache.org/jira/browse/RAMPART-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984748#action_12984748
]
Edder Peña commented on RAMPART-318:
------------------------------------
Hello Amila, you're right because I'm not the only one having this problem and another provider
is having the same issue (at least I was told that). I can't attach the server log because
I don't have acces and I'm connecting to the server through a VPN.
Now I'm trying to consume the service generating the message by myself and setting the parameter
for password type to PasswordText manually.
Anyway, Thanks a Lot Amila.
> Error org.apache.axis2.AxisFault: <ErrorCode>3000</ErrorCode><ErrorDescription>Undefined
Error</ErrorDescription>
> -----------------------------------------------------------------------------------------------------------------
>
> Key: RAMPART-318
> URL: https://issues.apache.org/jira/browse/RAMPART-318
> Project: Rampart
> Issue Type: Question
> Affects Versions: 1.5.1
> Environment: Windows 7 Enterprise Edition, Eclipse Helios, Axis2-1.5.4, Java
6, EJB3.
> Reporter: Edder Peña
> Priority: Critical
> Attachments: client-318.tar.gz
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Hello everybody.
> I'm trying to connect to a web service that uses usernametoken authentication and I'm
implementing the security through a policy.xml, but when I set the username and the password
through options.setUsername(getUSername) and the password in the same way I'm getting the
following error:
> org.apache.axis2.AxisFault: <ErrorCode>3000</ErrorCode><ErrorDescription>Undefined
Error</ErrorDescription>
> at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:435)
> at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
> at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
> at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> at com.comverse_in.prepaid.ccws.ServiceStub.changeCallingCircle(ServiceStub.java:23974)
> at sv.com.millicom.callingcircles.negocio.ejb.CallingCirclesEJB.crearCallingCircle(CallingCirclesEJB.java:420)
> at test.TestService.main(TestService.java:25)
> I'm invoking the service just like this:
> public boolean crearCallingCircle(String nombreCallingCircle)
> throws RemoteException, FileNotFoundException, XMLStreamException {
>
> ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("axis-repo",
null);//getAxisConf());
>
> stub = new ServiceStub(ctx, getTargetEndpoint());
>
> ServiceClient client = stub._getServiceClient();
> client.engageModule("rampart");
>
> ClassLoader loader = CallingCirclesEJB.class.getClassLoader();
> InputStream resource = loader.getResourceAsStream("policy.xml");
> StAXOMBuilder builder = new StAXOMBuilder(resource);
> Policy policy = PolicyEngine.getPolicy(builder.getDocumentElement());
>
> Options options = client.getOptions();
> options.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> options.setUserName(getUsuario());
> options.setPassword(getPassword());
> client.setOptions(options);
> .
> .
> .
> ChangeCallingCircleResponseDocument respuesta = stub.changeCallingCircle(change, header);
> ChangeCallingCircleResponse response = respuesta.getChangeCallingCircleResponse();
> com.comverse_in.prepaid.ccws.ChangeCallingCircleResponse result = response.getChangeCallingCircleResult();
> // Retorna true si se creó el CallingCircle
> return result.getSuccess();
> }
> And the policy.xml file is like the next:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsp:Policy wsu:Id="UTOverTransport"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
> <wsp:ExactlyOne>
> <wsp:All>
> <sp:SignedSupportingTokens
> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
> <wsp:Policy>
> <sp:UsernameToken
> sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"/>
> </wsp:Policy>
> </sp:SignedSupportingTokens>
> </wsp:All>
> </wsp:ExactlyOne>
> </wsp:Policy>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
|