[
https://issues.apache.org/jira/browse/CXF-3036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp resolved CXF-3036.
------------------------------
Resolution: Fixed
Fix Version/s: 2.2.11
I ported some fixes from trunk that most likely fix this. Can you verify?
It should have already been working on trunk/2.3.
> External policy references not supported
> ----------------------------------------
>
> Key: CXF-3036
> URL: https://issues.apache.org/jira/browse/CXF-3036
> Project: CXF
> Issue Type: Bug
> Components: WS-* Components
> Affects Versions: 2.2.10
> Reporter: Dennis Sosnoski
> Assignee: Daniel Kulp
> Fix For: 2.2.11
>
>
> References to external policies in WSDL are not processed properly, at least
> for relative paths. Here's an example:
> <wsdl:binding name="LibrarySoapBinding" type="wns:Library">
>
> <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy"
> URI="./username-policy.xml"/>
> <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="getBook">
>
> <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy"
> URI="./symmencr-policy.xml"/>
>
> <wsdlsoap:operation soapAction="urn:getBook"/>
>
> <wsdl:input name="getBookRequest">
> <wsdlsoap:body use="literal"/>
> </wsdl:input>
>
> <wsdl:output name="getBookResponse">
> <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy"
> URI="./encrbody-policy.xml"/>
> <wsdlsoap:body use="literal"/>
> </wsdl:output>
>
> </wsdl:operation>
> When running the client, this causes:
> [java] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException:
> String index out of range: -1
> [java] at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
> [java] at $Proxy40.getBook(Unknown Source)
> [java] at
> com.sosnoski.ws.library.cxf.WebServiceClient.main(WebServiceClient.java:64)
> [java] Caused by: java.lang.StringIndexOutOfBoundsException: String
> index out of range: -1
> [java] at java.lang.String.substring(String.java:1768)
> [java] at
> org.apache.cxf.ws.policy.attachment.reference.RemoteReferenceResolver.resolveReference(RemoteReferenceResolver.java:49)
> [java] at
> org.apache.cxf.ws.policy.attachment.AbstractPolicyProvider.resolveExternal(AbstractPolicyProvider.java:88)
> ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.