[ https://issues.apache.org/jira/browse/CXF-3036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp reassigned CXF-3036: -------------------------------- Assignee: Daniel Kulp > 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 > > 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.