cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Sosnoski (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-3036) External policy references not supported
Date Tue, 05 Oct 2010 10:08:38 GMT
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


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.


Mime
View raw message