[
https://issues.apache.org/jira/browse/RAMPART-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000755#comment-13000755
]
Thilina Buddhika commented on RAMPART-318:
------------------------------------------
Hi Edder,
As per your understanding, was it due to a bug in the Rampart, or due to an
issue in the service's end ?
This scenario is working fine in Rampart. If it is failing in your case, it
could be either an interop issue at the Rampart end or the service expects the
message in a different format. If this is an interop issue, then we should
investigate more on that and fix it in Rampart.
It would be really helpful, if you can attach a sample message which is
accepted by service without any issue. So that we can verify whether it is
compliant with the specifications.
Thanks,
Thilina
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]