axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Domingo Sebastian (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-4981) Axis2 + Rampart X.509 + JAXB = Namespace URIs and local names to the unmarshaller needs to be interned.
Date Thu, 18 Dec 2014 08:05:13 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14251357#comment-14251357
] 

Domingo Sebastian commented on AXIS2-4981:
------------------------------------------

An easier workaround that worked for me was:

return unmarshaller.unmarshal(new StringReader(param.toString()));

> Axis2 + Rampart X.509 + JAXB = Namespace URIs and local names to the unmarshaller needs
to be interned.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4981
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4981
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Rustam Abdullaev
>         Attachments: InterningXMLStreamReader.java
>
>
> When Axis2 is used with JAXB bindings and unencrypted SOAP body, all goes well, but as
soon as SOAP Body is encrypted (using X.509 token), both client-side and server-side JAXB
bindings stop working, on the client silently retuning empty response objects (all fields
= null).
> The null response object is caused by the fact that JAXB by default swallows errors.
> Add this code to the generated stub (fromOM()) to reveal the underlying exception:
>                 unmarshaller.setEventHandler(
>                         new ValidationEventHandler() {
>                             public boolean handleEvent(ValidationEvent event ) {
>                                 throw new RuntimeException(event.getMessage(),
>                                                            event.getLinkedException());
>                             }
>                     });
> The underlying error is:
> Namespace URIs and local names to the unmarshaller needs to be interned.
> 	at test.TestServiceStub$1.handleEvent(TestServiceStub.java:408)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:635)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:254)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:249)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:114)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:101)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:243)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:478)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:459)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:242)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:176)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
> 	at test.TestServiceStub.fromOM(TestServiceStub.java:414)
> 	at test.TestServiceStub.test(TestServiceStub.java:201)
> ...
> It looks like the error originates in Axiom (org.apache.axiom.om.impl.SwitchingWrapper
returns non-interned strings).
> Tried different component versions / combinations, all resulted in the same error:
> Axis2 1.4 - 1.5.4
> Rampart 1.4 - 1.5.1
> JAXB 2.1.0 - 2.2.2
> Axiom 1.2.0 - 1.2.11



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message