You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ryan Moquin <fr...@gmail.com> on 2007/09/11 01:58:31 UTC

Can't figure out why I'm getting this error or how to troubleshoot it

I've been trying to use the generated files from my WSDL to access an
external webservice that uses SSL and authentication.  I setup an
http-conduit (I was getting the protocol error when I didn't have it setup)
for SSL and now I get the following error, anyone have any ideas what I can
do from here?:

javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
JaxWsClientProxy.java:169)
        at $Proxy101.sendNotification(Unknown Source)
        at service.NotificationServiceClient.sendNotification(
NotificationServiceClient.java:88)
        at service.NotificationServiceClientTest.testSendNotification(
NotificationServiceClientTest.java:62)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
:552)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
:114)
        at org.testng.TestRunner.privateRun(TestRunner.java:693)
        at org.testng.TestRunner.run(TestRunner.java:574)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
        at org.testng.SuiteRunner.run(SuiteRunner.java:145)
        at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
        at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
TestNGExecutor.java:64)
        at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
TestNGXmlTestSuite.java:75)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
SurefireBooter.java:225)
        at org.apache.maven.surefire.booter.SurefireBooter.run(
SurefireBooter.java:139)
        at org.apache.maven.plugin.surefire.SurefirePlugin.execute(
SurefirePlugin.java:376)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:480
)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java
:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
        at java.util.ArrayList.get(ArrayList.java:321)
        at org.apache.cxf.message.MessageContentsList.get(
MessageContentsList.java:76)
        at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderPart(
SoapOutInterceptor.java:179)
        at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart
(SoapOutInterceptor.java:124)

        at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(
SoapOutInterceptor.java:76)
        at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(
SoapOutInterceptor.java:57)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
PhaseInterceptorChain.java:207)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
:73)
        at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
JaxWsClientProxy.java:135)
        ... 45 more

my cfx.xml looks like this:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:sec="http://cxf.apache.org/configuration/security"
       xmlns:http="http://cxf.apache.org/transports/http/configuration"
       xsi:schemaLocation="
       http://cxf.apache.org/configuration/security
       http://cxf.apache.org/schemas/configuration/security.xsd
       http://cxf.apache.org/transports/http/configuration
       http://cxf.apache.org/schemas/configuration/http-conf.xsd
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">

  <http:conduit
name="{urn://testnotification}NotificationPort.http-conduit">
    <http:authorization>
      <sec:UserName>testuser</sec:UserName>
      <sec:Password>testpass</sec:Password>
    </http:authorization>
    <http:tlsClientParameters secureSocketProtocol="SSL">
      <sec:cipherSuitesFilter>
        <!-- these filters ensure that a ciphersuite with
          export-suitable or null encryption is used,
          but exclude anonymous Diffie-Hellman key change as
          this is vulnerable to man-in-the-middle attacks -->
        <sec:include>.*_EXPORT_.*</sec:include>
        <sec:include>.*_EXPORT1024_.*</sec:include>
        <sec:include>.*_WITH_DES_.*</sec:include>
        <sec:include>.*_WITH_NULL_.*</sec:include>
        <sec:exclude>.*_DH_anon_.*</sec:exclude>
      </sec:cipherSuitesFilter>
    </http:tlsClientParameters>
  </http:conduit>
</beans>

Thanks!

Re: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Ryan Moquin <fr...@gmail.com>.
Ok good, then that should mean that the problem is something that I'm doing
wrong, which I'd rather than a bug. :)  I tried both versions 2.0.1 and a
snapshot of 2.1 .. both of them give me the index out of bounds.  It feels
like there is something programmatically that I'm not doing.  Can you send
me the code that creates and sends the message?  I'm assuming it's mostly
just the call to sendNotification, but I'm hoping there is something more
than that, since if it works for you and not for me.. there has to be
something.  That's the only thing left I can think of where my error might
be.

Thanks!

On 9/10/07, Willem Jiang <ni...@iona.com> wrote:
>
> Hi Ryan,
>
> I just tested your wsdl with the latest CXF using the wsdl2java to
> generate both client and server code.
> It is "wsdl2java -all -exsh true wsdlname".
> They work fine to me. Here is the client out going message:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Header>
> <AuthCredentials xmlns="urn://testnotification">
> <username>userName</username>
> <password>password</password>
> </AuthCredentials>
> </soap:Header>
> <soap:Body>
> <parameters xmlns:ns2="urn://testnotification">hell world
> </parameters></soap:Body></soap:Envelope>
> Can I know you CXF version? Maybe you need to update it :)
>
> Willem.
>
> Ryan Moquin wrote:
> > Here you go, I created a scaled down wsdl that is as simple as I can
> think
> > of, but still representative of the wsdl I'm working with that exploits
> this
> > problem.  I'll post the wsdl here that I created and then I'll also try
> the
> > -exsh option, which I haven't been using.  Here is a wsdl that will give
> you
> > the problem I'm having when you call the operation it has defined:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > xmlns:s="http://www.w3.org/2001/XMLSchema"
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:tns="urn://testnotification"
> > xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
> > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > targetNamespace="urn://testnotification"
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> >
> >   <wsdl:types>
> >     <s:schema elementFormDefault="qualified"
> > targetNamespace="urn://testnotification">
> >       <s:element name="AuthCredentials" type="tns:AuthCredentials"/>
> >       <s:complexType name="AuthCredentials">
> >         <s:sequence>
> >           <s:element minOccurs="0" maxOccurs="1" name="username"
> > type="s:string"/>
> >           <s:element minOccurs="0" maxOccurs="1" name="password"
> > type="s:string"/>
> >         </s:sequence>
> >       </s:complexType>
> >     </s:schema>
> >   </wsdl:types>
> >   <wsdl:message name="notificationInput">
> >     <wsdl:part name="parameters" type="s:string"/>
> >   </wsdl:message>
> >   <wsdl:message name="notificationOutput">
> >     <wsdl:part name="parameters" type="s:string"/>
> >   </wsdl:message>
> >   <wsdl:message name="sendNotificationAuthCredentials">
> >     <wsdl:part name="AuthCredentials" element="tns:AuthCredentials"/>
> >   </wsdl:message>
> >   <wsdl:portType name="NotificationServicePort">
> >     <wsdl:operation name="sendNotification">
> >       <wsdl:input message="tns:notificationInput"/>
> >       <wsdl:output message="tns:notificationOutput"/>
> >     </wsdl:operation>
> >   </wsdl:portType>
> >   <wsdl:binding name="NotificationServicePort"
> > type="tns:NotificationServicePort">
> >     <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> > style="document"/>
> >     <wsdl:operation name="sendNotification">
> >       <soap:operation
> soapAction="urn://testnotification/sendNotification"
> > style="document"/>
> >       <wsdl:input>
> >         <soap:body use="literal"/>
> >         <soap:header message="tns:sendNotificationAuthCredentials"
> > part="AuthCredentials" use="literal"/>
> >       </wsdl:input>
> >       <wsdl:output>
> >         <soap:body use="literal"/>
> >       </wsdl:output>
> >     </wsdl:operation>
> >   </wsdl:binding>
> >   <wsdl:service name="NotificationService">
> >     <documentation xmlns="http://schemas.xmlsoap.org/wsdl/"/>
> >     <wsdl:port name="NotificationServicePort"
> > binding="tns:NotificationServicePort">
> >       <soap:address location="
> https://localhost/webservice/notification.asmx
> > "/>
> >     </wsdl:port>
> >   </wsdl:service>
> > </wsdl:definitions>
> >
> > On 9/10/07, Willem Jiang <ni...@iona.com> wrote:
> >
> >> Hi Ryan,
> >>
> >> Can you tell me how you generate the soap header message with the
> >> wsdl2java?
> >> Did you specify the option -exsh true when you call wsdl2java?
> >> If not , please try it again.
> >>
> >> Willem.
> >>
> >> Ryan Moquin wrote:
> >>
> >>> I actually just got my breakpoint to be hit:
> >>>
> >>> It's choking on an element of my WSDL that looks like this:
> >>>
> >>> <s:element name="AuthCredentials" type="tns:AuthCredentials"/>
> >>>       <s:complexType name="AuthCredentials">
> >>>         <s:sequence>
> >>>           <s:element minOccurs="0" maxOccurs="1" name="username"
> >>> type="s:string"/>
> >>>           <s:element minOccurs="0" maxOccurs="1" name="password"
> >>> type="s:string"/>
> >>>         </s:sequence>
> >>>       </s:complexType>
> >>>
> >>> I would like to post the whole WSDL, but I'm not sure I'm allowed to.
> >>>
> >>> Something related to this element is causing an arraylist to not fill
> >>>
> >> itself
> >>
> >>> with something.  I notice that the "type" variable in the
> >>>
> >> MessagePartInfo
> >>
> >>> class is null when representing this element.  No idea why.  typeClass
> >>> variable is also null as well.... maybe it doesn't like something with
> >>>
> >> how
> >>
> >>> this is defined?
> >>>
> >>>
> >>>
> >>> On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
> >>>
> >>>
> >>>> If it really is never talking to the server (which would be really
> >>>> surprising) then you should be able to create a standalone test case
> >>>> that we could debug into?
> >>>>
> >>>>
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> >>>>> Sent: Monday, September 10, 2007 8:39 PM
> >>>>> To: cxf-user@incubator.apache.org
> >>>>> Subject: Re: Can't figure out why I'm getting this error or how to
> >>>>> troubleshoot it
> >>>>>
> >>>>> I tried and it appears that no request has been sent.  I used
> >>>>>
> >>>>>
> >>>> TCPMonitor
> >>>>
> >>>>
> >>>>> and
> >>>>> changed the URL that my client was pointing to.  When I run the
> >>>>>
> >>>>>
> >>>> client, no
> >>>>
> >>>>
> >>>>> message comes across TCPMonitor and I still get the same error.  It
> >>>>> appears
> >>>>> that it's trying to do something with the headers when constructing
> >>>>>
> >>>>>
> >>>> the
> >>>>
> >>>>
> >>>>> SOAP
> >>>>> message?  I was trying get a debug point to work in netbeans in
> order
> >>>>>
> >>>>>
> >>>> to
> >>>>
> >>>>
> >>>>> try
> >>>>> to get an idea what CXF is trying to do at the time the exception
> >>>>>
> >>>>>
> >>>> occurs,
> >>>>
> >>>>
> >>>>> but so far I haven't had luck getting netbeans to make the
> association
> >>>>>
> >>>>>
> >>>> to
> >>>>
> >>>>
> >>>>> the source code so that the breakpoint is hit.
> >>>>>
> >>>>> On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
> >>>>>
> >>>>>
> >>>>>> The service you are talking to is very unhappy with you. Can you
> get
> >>>>>>
> >>>>>>
> >>>> a
> >>>>
> >>>>
> >>>>>> trace of the message traffic?
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> -----Original Message-----
> >>>>>>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> >>>>>>> Sent: Monday, September 10, 2007 7:59 PM
> >>>>>>> To: cxf-user@incubator.apache.org
> >>>>>>> Subject: Can't figure out why I'm getting this error or how to
> >>>>>>> troubleshoot it
> >>>>>>>
> >>>>>>> I've been trying to use the generated files from my WSDL to access
> >>>>>>>
> >>>>>>>
> >>>> an
> >>>>
> >>>>
> >>>>>>> external webservice that uses SSL and authentication.  I setup an
> >>>>>>> http-conduit (I was getting the protocol error when I didn't have
> >>>>>>>
> >>>>>>>
> >>>> it
> >>>>
> >>>>
> >>>>>> setup)
> >>>>>>
> >>>>>>
> >>>>>>> for SSL and now I get the following error, anyone have any ideas
> >>>>>>>
> >>>>>>>
> >>>> what
> >>>>
> >>>>
> >>>>>> I
> >>>>>>
> >>>>>>
> >>>>>>> can
> >>>>>>> do from here?:
> >>>>>>>
> >>>>>>> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> >>>>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> >>>>>>> JaxWsClientProxy.java:169)
> >>>>>>>         at $Proxy101.sendNotification(Unknown Source)
> >>>>>>>         at service.NotificationServiceClient.sendNotification(
> >>>>>>> NotificationServiceClient.java:88)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>> service.NotificationServiceClientTest.testSendNotification(
> >>>>
> >>>>
> >>>>>>> NotificationServiceClientTest.java:62)
> >>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>>>>>
> >>>>>>>
> >>>> Method)
> >>>>
> >>>>
> >>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>>>>>> NativeMethodAccessorImpl.java:39)
> >>>>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>>>>>> DelegatingMethodAccessorImpl.java:25)
> >>>>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> >>>>>>
> >>>>>>
> >>>>>>> :552)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>> org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> >>>>
> >>>>
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
> >>>>>>
> >>>>>>
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> >>>>>>
> >>>>>>
> >>>>>>> :114)
> >>>>>>>         at org.testng.TestRunner.privateRun(TestRunner.java:693)
> >>>>>>>         at org.testng.TestRunner.run(TestRunner.java:574)
> >>>>>>>         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> >>>>>>>         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>> org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> >>>>
> >>>>
> >>>>>>>         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> >>>>>>
> >>>>>>
> >>>>>>> TestNGExecutor.java:64)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> >>>>>>
> >>>>>>
> >>>>>>> TestNGXmlTestSuite.java:75)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>> org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> >>>>
> >>>>
> >>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>>>>>
> >>>>>>>
> >>>> Method)
> >>>>
> >>>>
> >>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>>>>>> NativeMethodAccessorImpl.java:39)
> >>>>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>>>>>> DelegatingMethodAccessorImpl.java:25)
> >>>>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> >>>>
> >>>>
> >>>>>>> SurefireBooter.java:225)
> >>>>>>>         at org.apache.maven.surefire.booter.SurefireBooter.run(
> >>>>>>> SurefireBooter.java:139)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>> org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> >>>>
> >>>>
> >>>>>>> SurefirePlugin.java:376)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> >>>>
> >>>>
> >>>>>>> DefaultPluginManager.java:443)
> >>>>>>>         at
> >>>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> >>>>>>> DefaultLifecycleExecutor.java:539)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> >>
> >>>>>> yc
> >>>>>>
> >>>>>>
> >>>>>>> le
> >>>>>>> (DefaultLifecycleExecutor.java:480
> >>>>>>> )
> >>>>>>>         at
> >>>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> >>>>>>> DefaultLifecycleExecutor.java:459)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> >>
> >>>>>> Fa
> >>>>>>
> >>>>>>
> >>>>>>> ilures
> >>>>>>> (DefaultLifecycleExecutor.java
> >>>>>>> :311)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
> >>>>
> >> (
> >>
> >>>>>>> DefaultLifecycleExecutor.java:278)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> >>>>>>
> >>>>>>
> >>>>>>> DefaultLifecycleExecutor.java:143)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> >>>>>>
> >>>>>>
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >>>>>>
> >>>>>>
> >>>>>>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> >>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>>>>>
> >>>>>>>
> >>>> Method)
> >>>>
> >>>>
> >>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>>>>>> NativeMethodAccessorImpl.java:39)
> >>>>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>>>>>> DelegatingMethodAccessorImpl.java:25)
> >>>>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> >>>>>>
> >>>>>>
> >>>>>>> :315)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >>>>
> >>>>
> >>>>>>>         at
> >>>>>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> >>>>>>> :430)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>> org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >>>>
> >>>>
> >>>>>>> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> >>>>>>>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> >>>>>>>         at java.util.ArrayList.get(ArrayList.java:321)
> >>>>>>>         at org.apache.cxf.message.MessageContentsList.get(
> >>>>>>> MessageContentsList.java:76)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
> >>
> >>>>>> ar
> >>>>>>
> >>>>>>
> >>>>>>> t(
> >>>>>>> SoapOutInterceptor.java:179)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
> >>
> >>>>>> lo
> >>>>>>
> >>>>>>
> >>>>>>> peStart
> >>>>>>> (SoapOutInterceptor.java:124)
> >>>>>>>
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> >>
> >>>>>> (
> >>>>>>
> >>>>>>
> >>>>>>> SoapOutInterceptor.java:76)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> >>
> >>>>>> (
> >>>>>>
> >>>>>>
> >>>>>>> SoapOutInterceptor.java:57)
> >>>>>>>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> >>>>>>> PhaseInterceptorChain.java:207)
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> >>>>>>
> >>>>>>
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> >>>>>>
> >>>>>>
> >>>>>>>         at
> >>>>>>>
> >>>>>>>
> >>>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> >>>>>>
> >>>>>>
> >>>>>>> :73)
> >>>>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> >>>>>>> JaxWsClientProxy.java:135)
> >>>>>>>         ... 45 more
> >>>>>>>
> >>>>>>> my cfx.xml looks like this:
> >>>>>>>
> >>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
> >>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>>>>>        xmlns:sec="http://cxf.apache.org/configuration/security"
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>> xmlns:http="http://cxf.apache.org/transports/http/configuration"
> >>>>>>
> >>>>>>
> >>>>>>>        xsi:schemaLocation="
> >>>>>>>        http://cxf.apache.org/configuration/security
> >>>>>>>        http://cxf.apache.org/schemas/configuration/security.xsd
> >>>>>>>        http://cxf.apache.org/transports/http/configuration
> >>>>>>>        http://cxf.apache.org/schemas/configuration/http-conf.xsd
> >>>>>>>        http://www.springframework.org/schema/beans
> >>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
> >>>>>>>
> >>>>>>>   <http:conduit
> >>>>>>> name="{urn://testnotification}NotificationPort.http-conduit">
> >>>>>>>     <http:authorization>
> >>>>>>>       <sec:UserName>testuser</sec:UserName>
> >>>>>>>       <sec:Password>testpass</sec:Password>
> >>>>>>>     </http:authorization>
> >>>>>>>     <http:tlsClientParameters secureSocketProtocol="SSL">
> >>>>>>>       <sec:cipherSuitesFilter>
> >>>>>>>         <!-- these filters ensure that a ciphersuite with
> >>>>>>>           export-suitable or null encryption is used,
> >>>>>>>           but exclude anonymous Diffie-Hellman key change as
> >>>>>>>           this is vulnerable to man-in-the-middle attacks -->
> >>>>>>>         <sec:include>.*_EXPORT_.*</sec:include>
> >>>>>>>         <sec:include>.*_EXPORT1024_.*</sec:include>
> >>>>>>>         <sec:include>.*_WITH_DES_.*</sec:include>
> >>>>>>>         <sec:include>.*_WITH_NULL_.*</sec:include>
> >>>>>>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
> >>>>>>>       </sec:cipherSuitesFilter>
> >>>>>>>     </http:tlsClientParameters>
> >>>>>>>   </http:conduit>
> >>>>>>> </beans>
> >>>>>>>
> >>>>>>> Thanks!
> >>>>>>>
> >>>>>>>
> >>>
> >
> >
>

Re: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Willem Jiang <ni...@iona.com>.
Hi Ryan,

I just tested your wsdl with the latest CXF using the wsdl2java to 
generate both client and server code.
It is "wsdl2java -all -exsh true wsdlname".
They work fine to me. Here is the client out going message:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthCredentials xmlns="urn://testnotification">
<username>userName</username>
<password>password</password>
</AuthCredentials>
</soap:Header>
<soap:Body>
<parameters xmlns:ns2="urn://testnotification">hell world 
</parameters></soap:Body></soap:Envelope>
Can I know you CXF version? Maybe you need to update it :)

Willem.

Ryan Moquin wrote:
> Here you go, I created a scaled down wsdl that is as simple as I can think
> of, but still representative of the wsdl I'm working with that exploits this
> problem.  I'll post the wsdl here that I created and then I'll also try the
> -exsh option, which I haven't been using.  Here is a wsdl that will give you
> the problem I'm having when you call the operation it has defined:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:s="http://www.w3.org/2001/XMLSchema"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns="urn://testnotification"
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> targetNamespace="urn://testnotification"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
>
>   <wsdl:types>
>     <s:schema elementFormDefault="qualified"
> targetNamespace="urn://testnotification">
>       <s:element name="AuthCredentials" type="tns:AuthCredentials"/>
>       <s:complexType name="AuthCredentials">
>         <s:sequence>
>           <s:element minOccurs="0" maxOccurs="1" name="username"
> type="s:string"/>
>           <s:element minOccurs="0" maxOccurs="1" name="password"
> type="s:string"/>
>         </s:sequence>
>       </s:complexType>
>     </s:schema>
>   </wsdl:types>
>   <wsdl:message name="notificationInput">
>     <wsdl:part name="parameters" type="s:string"/>
>   </wsdl:message>
>   <wsdl:message name="notificationOutput">
>     <wsdl:part name="parameters" type="s:string"/>
>   </wsdl:message>
>   <wsdl:message name="sendNotificationAuthCredentials">
>     <wsdl:part name="AuthCredentials" element="tns:AuthCredentials"/>
>   </wsdl:message>
>   <wsdl:portType name="NotificationServicePort">
>     <wsdl:operation name="sendNotification">
>       <wsdl:input message="tns:notificationInput"/>
>       <wsdl:output message="tns:notificationOutput"/>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="NotificationServicePort"
> type="tns:NotificationServicePort">
>     <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
>     <wsdl:operation name="sendNotification">
>       <soap:operation soapAction="urn://testnotification/sendNotification"
> style="document"/>
>       <wsdl:input>
>         <soap:body use="literal"/>
>         <soap:header message="tns:sendNotificationAuthCredentials"
> part="AuthCredentials" use="literal"/>
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="NotificationService">
>     <documentation xmlns="http://schemas.xmlsoap.org/wsdl/"/>
>     <wsdl:port name="NotificationServicePort"
> binding="tns:NotificationServicePort">
>       <soap:address location="https://localhost/webservice/notification.asmx
> "/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
>
> On 9/10/07, Willem Jiang <ni...@iona.com> wrote:
>   
>> Hi Ryan,
>>
>> Can you tell me how you generate the soap header message with the
>> wsdl2java?
>> Did you specify the option -exsh true when you call wsdl2java?
>> If not , please try it again.
>>
>> Willem.
>>
>> Ryan Moquin wrote:
>>     
>>> I actually just got my breakpoint to be hit:
>>>
>>> It's choking on an element of my WSDL that looks like this:
>>>
>>> <s:element name="AuthCredentials" type="tns:AuthCredentials"/>
>>>       <s:complexType name="AuthCredentials">
>>>         <s:sequence>
>>>           <s:element minOccurs="0" maxOccurs="1" name="username"
>>> type="s:string"/>
>>>           <s:element minOccurs="0" maxOccurs="1" name="password"
>>> type="s:string"/>
>>>         </s:sequence>
>>>       </s:complexType>
>>>
>>> I would like to post the whole WSDL, but I'm not sure I'm allowed to.
>>>
>>> Something related to this element is causing an arraylist to not fill
>>>       
>> itself
>>     
>>> with something.  I notice that the "type" variable in the
>>>       
>> MessagePartInfo
>>     
>>> class is null when representing this element.  No idea why.  typeClass
>>> variable is also null as well.... maybe it doesn't like something with
>>>       
>> how
>>     
>>> this is defined?
>>>
>>>
>>>
>>> On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
>>>
>>>       
>>>> If it really is never talking to the server (which would be really
>>>> surprising) then you should be able to create a standalone test case
>>>> that we could debug into?
>>>>
>>>>
>>>>         
>>>>> -----Original Message-----
>>>>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
>>>>> Sent: Monday, September 10, 2007 8:39 PM
>>>>> To: cxf-user@incubator.apache.org
>>>>> Subject: Re: Can't figure out why I'm getting this error or how to
>>>>> troubleshoot it
>>>>>
>>>>> I tried and it appears that no request has been sent.  I used
>>>>>
>>>>>           
>>>> TCPMonitor
>>>>
>>>>         
>>>>> and
>>>>> changed the URL that my client was pointing to.  When I run the
>>>>>
>>>>>           
>>>> client, no
>>>>
>>>>         
>>>>> message comes across TCPMonitor and I still get the same error.  It
>>>>> appears
>>>>> that it's trying to do something with the headers when constructing
>>>>>
>>>>>           
>>>> the
>>>>
>>>>         
>>>>> SOAP
>>>>> message?  I was trying get a debug point to work in netbeans in order
>>>>>
>>>>>           
>>>> to
>>>>
>>>>         
>>>>> try
>>>>> to get an idea what CXF is trying to do at the time the exception
>>>>>
>>>>>           
>>>> occurs,
>>>>
>>>>         
>>>>> but so far I haven't had luck getting netbeans to make the association
>>>>>
>>>>>           
>>>> to
>>>>
>>>>         
>>>>> the source code so that the breakpoint is hit.
>>>>>
>>>>> On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
>>>>>
>>>>>           
>>>>>> The service you are talking to is very unhappy with you. Can you get
>>>>>>
>>>>>>             
>>>> a
>>>>
>>>>         
>>>>>> trace of the message traffic?
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> -----Original Message-----
>>>>>>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
>>>>>>> Sent: Monday, September 10, 2007 7:59 PM
>>>>>>> To: cxf-user@incubator.apache.org
>>>>>>> Subject: Can't figure out why I'm getting this error or how to
>>>>>>> troubleshoot it
>>>>>>>
>>>>>>> I've been trying to use the generated files from my WSDL to access
>>>>>>>
>>>>>>>               
>>>> an
>>>>
>>>>         
>>>>>>> external webservice that uses SSL and authentication.  I setup an
>>>>>>> http-conduit (I was getting the protocol error when I didn't have
>>>>>>>
>>>>>>>               
>>>> it
>>>>
>>>>         
>>>>>> setup)
>>>>>>
>>>>>>             
>>>>>>> for SSL and now I get the following error, anyone have any ideas
>>>>>>>
>>>>>>>               
>>>> what
>>>>
>>>>         
>>>>>> I
>>>>>>
>>>>>>             
>>>>>>> can
>>>>>>> do from here?:
>>>>>>>
>>>>>>> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
>>>>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
>>>>>>> JaxWsClientProxy.java:169)
>>>>>>>         at $Proxy101.sendNotification(Unknown Source)
>>>>>>>         at service.NotificationServiceClient.sendNotification(
>>>>>>> NotificationServiceClient.java:88)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>> service.NotificationServiceClientTest.testSendNotification(
>>>>
>>>>         
>>>>>>> NotificationServiceClientTest.java:62)
>>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>>>
>>>>>>>               
>>>> Method)
>>>>
>>>>         
>>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>>>>>>> NativeMethodAccessorImpl.java:39)
>>>>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>>>>> DelegatingMethodAccessorImpl.java:25)
>>>>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
>>>>>>
>>>>>>             
>>>>>>> :552)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>> org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
>>>>
>>>>         
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
>>>>>>
>>>>>>             
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
>>>>>>
>>>>>>             
>>>>>>> :114)
>>>>>>>         at org.testng.TestRunner.privateRun(TestRunner.java:693)
>>>>>>>         at org.testng.TestRunner.run(TestRunner.java:574)
>>>>>>>         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
>>>>>>>         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>> org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
>>>>
>>>>         
>>>>>>>         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
>>>>>>
>>>>>>             
>>>>>>> TestNGExecutor.java:64)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
>>>>>>
>>>>>>             
>>>>>>> TestNGXmlTestSuite.java:75)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>> org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>>>>
>>>>         
>>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>>>
>>>>>>>               
>>>> Method)
>>>>
>>>>         
>>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>>>>>>> NativeMethodAccessorImpl.java:39)
>>>>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>>>>> DelegatingMethodAccessorImpl.java:25)
>>>>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>>               
>>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>>>>
>>>>         
>>>>>>> SurefireBooter.java:225)
>>>>>>>         at org.apache.maven.surefire.booter.SurefireBooter.run(
>>>>>>> SurefireBooter.java:139)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>> org.apache.maven.plugin.surefire.SurefirePlugin.execute(
>>>>
>>>>         
>>>>>>> SurefirePlugin.java:376)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(
>>>>
>>>>         
>>>>>>> DefaultPluginManager.java:443)
>>>>>>>         at
>>>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>>>>>>> DefaultLifecycleExecutor.java:539)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>>               
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
>>     
>>>>>> yc
>>>>>>
>>>>>>             
>>>>>>> le
>>>>>>> (DefaultLifecycleExecutor.java:480
>>>>>>> )
>>>>>>>         at
>>>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
>>>>>>> DefaultLifecycleExecutor.java:459)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>>               
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
>>     
>>>>>> Fa
>>>>>>
>>>>>>             
>>>>>>> ilures
>>>>>>> (DefaultLifecycleExecutor.java
>>>>>>> :311)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>>               
>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
>>>>         
>> (
>>     
>>>>>>> DefaultLifecycleExecutor.java:278)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>>>>>>
>>>>>>             
>>>>>>> DefaultLifecycleExecutor.java:143)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>>>>>>
>>>>>>             
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>>>>>
>>>>>>             
>>>>>>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>>>
>>>>>>>               
>>>> Method)
>>>>
>>>>         
>>>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>>>>>>> NativeMethodAccessorImpl.java:39)
>>>>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>>>>> DelegatingMethodAccessorImpl.java:25)
>>>>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
>>>>>>
>>>>>>             
>>>>>>> :315)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>>>
>>>>         
>>>>>>>         at
>>>>>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
>>>>>>> :430)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>> org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>>>>
>>>>         
>>>>>>> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>>>>>>>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>>>>>>>         at java.util.ArrayList.get(ArrayList.java:321)
>>>>>>>         at org.apache.cxf.message.MessageContentsList.get(
>>>>>>> MessageContentsList.java:76)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>>               
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
>>     
>>>>>> ar
>>>>>>
>>>>>>             
>>>>>>> t(
>>>>>>> SoapOutInterceptor.java:179)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>>               
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
>>     
>>>>>> lo
>>>>>>
>>>>>>             
>>>>>>> peStart
>>>>>>> (SoapOutInterceptor.java:124)
>>>>>>>
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>>               
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
>>     
>>>>>> (
>>>>>>
>>>>>>             
>>>>>>> SoapOutInterceptor.java:76)
>>>>>>>         at
>>>>>>>
>>>>>>>
>>>>>>>               
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
>>     
>>>>>> (
>>>>>>
>>>>>>             
>>>>>>> SoapOutInterceptor.java:57)
>>>>>>>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
>>>>>>> PhaseInterceptorChain.java:207)
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
>>>>>>
>>>>>>             
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
>>>>>>
>>>>>>             
>>>>>>>         at
>>>>>>>
>>>>>>>               
>>>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
>>>>>>
>>>>>>             
>>>>>>> :73)
>>>>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
>>>>>>> JaxWsClientProxy.java:135)
>>>>>>>         ... 45 more
>>>>>>>
>>>>>>> my cfx.xml looks like this:
>>>>>>>
>>>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>>        xmlns:sec="http://cxf.apache.org/configuration/security"
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> xmlns:http="http://cxf.apache.org/transports/http/configuration"
>>>>>>
>>>>>>             
>>>>>>>        xsi:schemaLocation="
>>>>>>>        http://cxf.apache.org/configuration/security
>>>>>>>        http://cxf.apache.org/schemas/configuration/security.xsd
>>>>>>>        http://cxf.apache.org/transports/http/configuration
>>>>>>>        http://cxf.apache.org/schemas/configuration/http-conf.xsd
>>>>>>>        http://www.springframework.org/schema/beans
>>>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>>>
>>>>>>>   <http:conduit
>>>>>>> name="{urn://testnotification}NotificationPort.http-conduit">
>>>>>>>     <http:authorization>
>>>>>>>       <sec:UserName>testuser</sec:UserName>
>>>>>>>       <sec:Password>testpass</sec:Password>
>>>>>>>     </http:authorization>
>>>>>>>     <http:tlsClientParameters secureSocketProtocol="SSL">
>>>>>>>       <sec:cipherSuitesFilter>
>>>>>>>         <!-- these filters ensure that a ciphersuite with
>>>>>>>           export-suitable or null encryption is used,
>>>>>>>           but exclude anonymous Diffie-Hellman key change as
>>>>>>>           this is vulnerable to man-in-the-middle attacks -->
>>>>>>>         <sec:include>.*_EXPORT_.*</sec:include>
>>>>>>>         <sec:include>.*_EXPORT1024_.*</sec:include>
>>>>>>>         <sec:include>.*_WITH_DES_.*</sec:include>
>>>>>>>         <sec:include>.*_WITH_NULL_.*</sec:include>
>>>>>>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>>>>>>>       </sec:cipherSuitesFilter>
>>>>>>>     </http:tlsClientParameters>
>>>>>>>   </http:conduit>
>>>>>>> </beans>
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>>               
>>>       
>
>   

Re: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Ryan Moquin <fr...@gmail.com>.
Here you go, I created a scaled down wsdl that is as simple as I can think
of, but still representative of the wsdl I'm working with that exploits this
problem.  I'll post the wsdl here that I created and then I'll also try the
-exsh option, which I haven't been using.  Here is a wsdl that will give you
the problem I'm having when you call the operation it has defined:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn://testnotification"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="urn://testnotification"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

  <wsdl:types>
    <s:schema elementFormDefault="qualified"
targetNamespace="urn://testnotification">
      <s:element name="AuthCredentials" type="tns:AuthCredentials"/>
      <s:complexType name="AuthCredentials">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="username"
type="s:string"/>
          <s:element minOccurs="0" maxOccurs="1" name="password"
type="s:string"/>
        </s:sequence>
      </s:complexType>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="notificationInput">
    <wsdl:part name="parameters" type="s:string"/>
  </wsdl:message>
  <wsdl:message name="notificationOutput">
    <wsdl:part name="parameters" type="s:string"/>
  </wsdl:message>
  <wsdl:message name="sendNotificationAuthCredentials">
    <wsdl:part name="AuthCredentials" element="tns:AuthCredentials"/>
  </wsdl:message>
  <wsdl:portType name="NotificationServicePort">
    <wsdl:operation name="sendNotification">
      <wsdl:input message="tns:notificationInput"/>
      <wsdl:output message="tns:notificationOutput"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="NotificationServicePort"
type="tns:NotificationServicePort">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
    <wsdl:operation name="sendNotification">
      <soap:operation soapAction="urn://testnotification/sendNotification"
style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
        <soap:header message="tns:sendNotificationAuthCredentials"
part="AuthCredentials" use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="NotificationService">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/"/>
    <wsdl:port name="NotificationServicePort"
binding="tns:NotificationServicePort">
      <soap:address location="https://localhost/webservice/notification.asmx
"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

On 9/10/07, Willem Jiang <ni...@iona.com> wrote:
>
> Hi Ryan,
>
> Can you tell me how you generate the soap header message with the
> wsdl2java?
> Did you specify the option -exsh true when you call wsdl2java?
> If not , please try it again.
>
> Willem.
>
> Ryan Moquin wrote:
> > I actually just got my breakpoint to be hit:
> >
> > It's choking on an element of my WSDL that looks like this:
> >
> > <s:element name="AuthCredentials" type="tns:AuthCredentials"/>
> >       <s:complexType name="AuthCredentials">
> >         <s:sequence>
> >           <s:element minOccurs="0" maxOccurs="1" name="username"
> > type="s:string"/>
> >           <s:element minOccurs="0" maxOccurs="1" name="password"
> > type="s:string"/>
> >         </s:sequence>
> >       </s:complexType>
> >
> > I would like to post the whole WSDL, but I'm not sure I'm allowed to.
> >
> > Something related to this element is causing an arraylist to not fill
> itself
> > with something.  I notice that the "type" variable in the
> MessagePartInfo
> > class is null when representing this element.  No idea why.  typeClass
> > variable is also null as well.... maybe it doesn't like something with
> how
> > this is defined?
> >
> >
> >
> > On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
> >
> >> If it really is never talking to the server (which would be really
> >> surprising) then you should be able to create a standalone test case
> >> that we could debug into?
> >>
> >>
> >>> -----Original Message-----
> >>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> >>> Sent: Monday, September 10, 2007 8:39 PM
> >>> To: cxf-user@incubator.apache.org
> >>> Subject: Re: Can't figure out why I'm getting this error or how to
> >>> troubleshoot it
> >>>
> >>> I tried and it appears that no request has been sent.  I used
> >>>
> >> TCPMonitor
> >>
> >>> and
> >>> changed the URL that my client was pointing to.  When I run the
> >>>
> >> client, no
> >>
> >>> message comes across TCPMonitor and I still get the same error.  It
> >>> appears
> >>> that it's trying to do something with the headers when constructing
> >>>
> >> the
> >>
> >>> SOAP
> >>> message?  I was trying get a debug point to work in netbeans in order
> >>>
> >> to
> >>
> >>> try
> >>> to get an idea what CXF is trying to do at the time the exception
> >>>
> >> occurs,
> >>
> >>> but so far I haven't had luck getting netbeans to make the association
> >>>
> >> to
> >>
> >>> the source code so that the breakpoint is hit.
> >>>
> >>> On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
> >>>
> >>>> The service you are talking to is very unhappy with you. Can you get
> >>>>
> >> a
> >>
> >>>> trace of the message traffic?
> >>>>
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> >>>>> Sent: Monday, September 10, 2007 7:59 PM
> >>>>> To: cxf-user@incubator.apache.org
> >>>>> Subject: Can't figure out why I'm getting this error or how to
> >>>>> troubleshoot it
> >>>>>
> >>>>> I've been trying to use the generated files from my WSDL to access
> >>>>>
> >> an
> >>
> >>>>> external webservice that uses SSL and authentication.  I setup an
> >>>>> http-conduit (I was getting the protocol error when I didn't have
> >>>>>
> >> it
> >>
> >>>> setup)
> >>>>
> >>>>> for SSL and now I get the following error, anyone have any ideas
> >>>>>
> >> what
> >>
> >>>> I
> >>>>
> >>>>> can
> >>>>> do from here?:
> >>>>>
> >>>>> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> >>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> >>>>> JaxWsClientProxy.java:169)
> >>>>>         at $Proxy101.sendNotification(Unknown Source)
> >>>>>         at service.NotificationServiceClient.sendNotification(
> >>>>> NotificationServiceClient.java:88)
> >>>>>         at
> >>>>>
> >> service.NotificationServiceClientTest.testSendNotification(
> >>
> >>>>> NotificationServiceClientTest.java:62)
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>>>
> >> Method)
> >>
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>>>> NativeMethodAccessorImpl.java:39)
> >>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>>>> DelegatingMethodAccessorImpl.java:25)
> >>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
> >>>>>         at
> >>>>>
> >>>> org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> >>>>
> >>>>> :552)
> >>>>>         at
> >>>>>
> >> org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> >>
> >>>>>         at
> >>>>>
> >>>> org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
> >>>>
> >>>>>         at
> >>>>>
> >>>> org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> >>>>
> >>>>> :114)
> >>>>>         at org.testng.TestRunner.privateRun(TestRunner.java:693)
> >>>>>         at org.testng.TestRunner.run(TestRunner.java:574)
> >>>>>         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> >>>>>         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> >>>>>         at
> >>>>>
> >> org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> >>
> >>>>>         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> >>>>
> >>>>> TestNGExecutor.java:64)
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> >>>>
> >>>>> TestNGXmlTestSuite.java:75)
> >>>>>         at
> >>>>>
> >> org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> >>
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>>>
> >> Method)
> >>
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>>>> NativeMethodAccessorImpl.java:39)
> >>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>>>> DelegatingMethodAccessorImpl.java:25)
> >>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
> >>>>>         at
> >>>>>
> >>>>>
> >> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> >>
> >>>>> SurefireBooter.java:225)
> >>>>>         at org.apache.maven.surefire.booter.SurefireBooter.run(
> >>>>> SurefireBooter.java:139)
> >>>>>         at
> >>>>>
> >> org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> >>
> >>>>> SurefirePlugin.java:376)
> >>>>>         at
> >>>>>
> >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> >>
> >>>>> DefaultPluginManager.java:443)
> >>>>>         at
> >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> >>>>> DefaultLifecycleExecutor.java:539)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> >>
> >>>> yc
> >>>>
> >>>>> le
> >>>>> (DefaultLifecycleExecutor.java:480
> >>>>> )
> >>>>>         at
> >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> >>>>> DefaultLifecycleExecutor.java:459)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> >>
> >>>> Fa
> >>>>
> >>>>> ilures
> >>>>> (DefaultLifecycleExecutor.java
> >>>>> :311)
> >>>>>         at
> >>>>>
> >>>>>
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
> (
> >>
> >>>>> DefaultLifecycleExecutor.java:278)
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> >>>>
> >>>>> DefaultLifecycleExecutor.java:143)
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> >>>>
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >>>>
> >>>>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>>>
> >> Method)
> >>
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>>>> NativeMethodAccessorImpl.java:39)
> >>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>>>> DelegatingMethodAccessorImpl.java:25)
> >>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
> >>>>>         at
> >>>>>
> >>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> >>>>
> >>>>> :315)
> >>>>>         at
> >>>>>
> >> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >>
> >>>>>         at
> >>>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> >>>>> :430)
> >>>>>         at
> >>>>>
> >> org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >>
> >>>>> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> >>>>>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> >>>>>         at java.util.ArrayList.get(ArrayList.java:321)
> >>>>>         at org.apache.cxf.message.MessageContentsList.get(
> >>>>> MessageContentsList.java:76)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
> >>
> >>>> ar
> >>>>
> >>>>> t(
> >>>>> SoapOutInterceptor.java:179)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
> >>
> >>>> lo
> >>>>
> >>>>> peStart
> >>>>> (SoapOutInterceptor.java:124)
> >>>>>
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> >>
> >>>> (
> >>>>
> >>>>> SoapOutInterceptor.java:76)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> >>
> >>>> (
> >>>>
> >>>>> SoapOutInterceptor.java:57)
> >>>>>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> >>>>> PhaseInterceptorChain.java:207)
> >>>>>         at
> >>>>>
> >>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> >>>>
> >>>>>         at
> >>>>>
> >>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> >>>>
> >>>>>         at
> >>>>>
> >>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> >>>>
> >>>>> :73)
> >>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> >>>>> JaxWsClientProxy.java:135)
> >>>>>         ... 45 more
> >>>>>
> >>>>> my cfx.xml looks like this:
> >>>>>
> >>>>> <beans xmlns="http://www.springframework.org/schema/beans"
> >>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>>>        xmlns:sec="http://cxf.apache.org/configuration/security"
> >>>>>
> >>>>>
> >>>> xmlns:http="http://cxf.apache.org/transports/http/configuration"
> >>>>
> >>>>>        xsi:schemaLocation="
> >>>>>        http://cxf.apache.org/configuration/security
> >>>>>        http://cxf.apache.org/schemas/configuration/security.xsd
> >>>>>        http://cxf.apache.org/transports/http/configuration
> >>>>>        http://cxf.apache.org/schemas/configuration/http-conf.xsd
> >>>>>        http://www.springframework.org/schema/beans
> >>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
> >>>>>
> >>>>>   <http:conduit
> >>>>> name="{urn://testnotification}NotificationPort.http-conduit">
> >>>>>     <http:authorization>
> >>>>>       <sec:UserName>testuser</sec:UserName>
> >>>>>       <sec:Password>testpass</sec:Password>
> >>>>>     </http:authorization>
> >>>>>     <http:tlsClientParameters secureSocketProtocol="SSL">
> >>>>>       <sec:cipherSuitesFilter>
> >>>>>         <!-- these filters ensure that a ciphersuite with
> >>>>>           export-suitable or null encryption is used,
> >>>>>           but exclude anonymous Diffie-Hellman key change as
> >>>>>           this is vulnerable to man-in-the-middle attacks -->
> >>>>>         <sec:include>.*_EXPORT_.*</sec:include>
> >>>>>         <sec:include>.*_EXPORT1024_.*</sec:include>
> >>>>>         <sec:include>.*_WITH_DES_.*</sec:include>
> >>>>>         <sec:include>.*_WITH_NULL_.*</sec:include>
> >>>>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
> >>>>>       </sec:cipherSuitesFilter>
> >>>>>     </http:tlsClientParameters>
> >>>>>   </http:conduit>
> >>>>> </beans>
> >>>>>
> >>>>> Thanks!
> >>>>>
> >
> >
>

Re: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Ryan Moquin <fr...@gmail.com>.
The SOAP header message I displayed was an example given to me as a
reference of what a SOAP message sent to that service should look like.  I'm
assuming it's correct since I believe there are people using the service
successfully, but I believe they are using.net mostly.

I added -exsh but it didn't seem to help, here is how I'm currently
generating the code for the WSDL I just posted in case I'm missing something
or doing something wrong:

<plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-codegen-plugin</artifactId>
        <version>${cxf-version}</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <configuration>
              <sourceRoot>${project.build.directory
}/generated-sources/jaxws</sourceRoot>
              <wsdlOptions>
                <wsdlOption>
                  <wsdl>${basedir}/src/main/resources/messaging.wsdl</wsdl>
                  <extraargs>
                    <extraarg>-verbose</extraarg>
                    <extraarg>-exsh</extraarg>
                    <extraarg>true</extraarg>
                  </extraargs>
                </wsdlOption>
              </wsdlOptions>
            </configuration>
            <goals>
              <goal>wsdl2java</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

On 9/10/07, Willem Jiang <ni...@iona.com> wrote:
>
> Hi Ryan,
>
> Can you tell me how you generate the soap header message with the
> wsdl2java?
> Did you specify the option -exsh true when you call wsdl2java?
> If not , please try it again.
>
> Willem.
>
> Ryan Moquin wrote:
> > I actually just got my breakpoint to be hit:
> >
> > It's choking on an element of my WSDL that looks like this:
> >
> > <s:element name="AuthCredentials" type="tns:AuthCredentials"/>
> >       <s:complexType name="AuthCredentials">
> >         <s:sequence>
> >           <s:element minOccurs="0" maxOccurs="1" name="username"
> > type="s:string"/>
> >           <s:element minOccurs="0" maxOccurs="1" name="password"
> > type="s:string"/>
> >         </s:sequence>
> >       </s:complexType>
> >
> > I would like to post the whole WSDL, but I'm not sure I'm allowed to.
> >
> > Something related to this element is causing an arraylist to not fill
> itself
> > with something.  I notice that the "type" variable in the
> MessagePartInfo
> > class is null when representing this element.  No idea why.  typeClass
> > variable is also null as well.... maybe it doesn't like something with
> how
> > this is defined?
> >
> >
> >
> > On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
> >
> >> If it really is never talking to the server (which would be really
> >> surprising) then you should be able to create a standalone test case
> >> that we could debug into?
> >>
> >>
> >>> -----Original Message-----
> >>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> >>> Sent: Monday, September 10, 2007 8:39 PM
> >>> To: cxf-user@incubator.apache.org
> >>> Subject: Re: Can't figure out why I'm getting this error or how to
> >>> troubleshoot it
> >>>
> >>> I tried and it appears that no request has been sent.  I used
> >>>
> >> TCPMonitor
> >>
> >>> and
> >>> changed the URL that my client was pointing to.  When I run the
> >>>
> >> client, no
> >>
> >>> message comes across TCPMonitor and I still get the same error.  It
> >>> appears
> >>> that it's trying to do something with the headers when constructing
> >>>
> >> the
> >>
> >>> SOAP
> >>> message?  I was trying get a debug point to work in netbeans in order
> >>>
> >> to
> >>
> >>> try
> >>> to get an idea what CXF is trying to do at the time the exception
> >>>
> >> occurs,
> >>
> >>> but so far I haven't had luck getting netbeans to make the association
> >>>
> >> to
> >>
> >>> the source code so that the breakpoint is hit.
> >>>
> >>> On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
> >>>
> >>>> The service you are talking to is very unhappy with you. Can you get
> >>>>
> >> a
> >>
> >>>> trace of the message traffic?
> >>>>
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> >>>>> Sent: Monday, September 10, 2007 7:59 PM
> >>>>> To: cxf-user@incubator.apache.org
> >>>>> Subject: Can't figure out why I'm getting this error or how to
> >>>>> troubleshoot it
> >>>>>
> >>>>> I've been trying to use the generated files from my WSDL to access
> >>>>>
> >> an
> >>
> >>>>> external webservice that uses SSL and authentication.  I setup an
> >>>>> http-conduit (I was getting the protocol error when I didn't have
> >>>>>
> >> it
> >>
> >>>> setup)
> >>>>
> >>>>> for SSL and now I get the following error, anyone have any ideas
> >>>>>
> >> what
> >>
> >>>> I
> >>>>
> >>>>> can
> >>>>> do from here?:
> >>>>>
> >>>>> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> >>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> >>>>> JaxWsClientProxy.java:169)
> >>>>>         at $Proxy101.sendNotification(Unknown Source)
> >>>>>         at service.NotificationServiceClient.sendNotification(
> >>>>> NotificationServiceClient.java:88)
> >>>>>         at
> >>>>>
> >> service.NotificationServiceClientTest.testSendNotification(
> >>
> >>>>> NotificationServiceClientTest.java:62)
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>>>
> >> Method)
> >>
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>>>> NativeMethodAccessorImpl.java:39)
> >>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>>>> DelegatingMethodAccessorImpl.java:25)
> >>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
> >>>>>         at
> >>>>>
> >>>> org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> >>>>
> >>>>> :552)
> >>>>>         at
> >>>>>
> >> org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> >>
> >>>>>         at
> >>>>>
> >>>> org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
> >>>>
> >>>>>         at
> >>>>>
> >>>> org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> >>>>
> >>>>> :114)
> >>>>>         at org.testng.TestRunner.privateRun(TestRunner.java:693)
> >>>>>         at org.testng.TestRunner.run(TestRunner.java:574)
> >>>>>         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> >>>>>         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> >>>>>         at
> >>>>>
> >> org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> >>
> >>>>>         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> >>>>
> >>>>> TestNGExecutor.java:64)
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> >>>>
> >>>>> TestNGXmlTestSuite.java:75)
> >>>>>         at
> >>>>>
> >> org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> >>
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>>>
> >> Method)
> >>
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>>>> NativeMethodAccessorImpl.java:39)
> >>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>>>> DelegatingMethodAccessorImpl.java:25)
> >>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
> >>>>>         at
> >>>>>
> >>>>>
> >> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> >>
> >>>>> SurefireBooter.java:225)
> >>>>>         at org.apache.maven.surefire.booter.SurefireBooter.run(
> >>>>> SurefireBooter.java:139)
> >>>>>         at
> >>>>>
> >> org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> >>
> >>>>> SurefirePlugin.java:376)
> >>>>>         at
> >>>>>
> >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> >>
> >>>>> DefaultPluginManager.java:443)
> >>>>>         at
> >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> >>>>> DefaultLifecycleExecutor.java:539)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> >>
> >>>> yc
> >>>>
> >>>>> le
> >>>>> (DefaultLifecycleExecutor.java:480
> >>>>> )
> >>>>>         at
> >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> >>>>> DefaultLifecycleExecutor.java:459)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> >>
> >>>> Fa
> >>>>
> >>>>> ilures
> >>>>> (DefaultLifecycleExecutor.java
> >>>>> :311)
> >>>>>         at
> >>>>>
> >>>>>
> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
> (
> >>
> >>>>> DefaultLifecycleExecutor.java:278)
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> >>>>
> >>>>> DefaultLifecycleExecutor.java:143)
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> >>>>
> >>>>>         at
> >>>>>
> >>>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >>>>
> >>>>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>>>
> >> Method)
> >>
> >>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>>>> NativeMethodAccessorImpl.java:39)
> >>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>>>> DelegatingMethodAccessorImpl.java:25)
> >>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
> >>>>>         at
> >>>>>
> >>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> >>>>
> >>>>> :315)
> >>>>>         at
> >>>>>
> >> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >>
> >>>>>         at
> >>>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> >>>>> :430)
> >>>>>         at
> >>>>>
> >> org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >>
> >>>>> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> >>>>>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> >>>>>         at java.util.ArrayList.get(ArrayList.java:321)
> >>>>>         at org.apache.cxf.message.MessageContentsList.get(
> >>>>> MessageContentsList.java:76)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
> >>
> >>>> ar
> >>>>
> >>>>> t(
> >>>>> SoapOutInterceptor.java:179)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
> >>
> >>>> lo
> >>>>
> >>>>> peStart
> >>>>> (SoapOutInterceptor.java:124)
> >>>>>
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> >>
> >>>> (
> >>>>
> >>>>> SoapOutInterceptor.java:76)
> >>>>>         at
> >>>>>
> >>>>>
> >>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> >>
> >>>> (
> >>>>
> >>>>> SoapOutInterceptor.java:57)
> >>>>>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> >>>>> PhaseInterceptorChain.java:207)
> >>>>>         at
> >>>>>
> >>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> >>>>
> >>>>>         at
> >>>>>
> >>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> >>>>
> >>>>>         at
> >>>>>
> >>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> >>>>
> >>>>> :73)
> >>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> >>>>> JaxWsClientProxy.java:135)
> >>>>>         ... 45 more
> >>>>>
> >>>>> my cfx.xml looks like this:
> >>>>>
> >>>>> <beans xmlns="http://www.springframework.org/schema/beans"
> >>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>>>        xmlns:sec="http://cxf.apache.org/configuration/security"
> >>>>>
> >>>>>
> >>>> xmlns:http="http://cxf.apache.org/transports/http/configuration"
> >>>>
> >>>>>        xsi:schemaLocation="
> >>>>>        http://cxf.apache.org/configuration/security
> >>>>>        http://cxf.apache.org/schemas/configuration/security.xsd
> >>>>>        http://cxf.apache.org/transports/http/configuration
> >>>>>        http://cxf.apache.org/schemas/configuration/http-conf.xsd
> >>>>>        http://www.springframework.org/schema/beans
> >>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
> >>>>>
> >>>>>   <http:conduit
> >>>>> name="{urn://testnotification}NotificationPort.http-conduit">
> >>>>>     <http:authorization>
> >>>>>       <sec:UserName>testuser</sec:UserName>
> >>>>>       <sec:Password>testpass</sec:Password>
> >>>>>     </http:authorization>
> >>>>>     <http:tlsClientParameters secureSocketProtocol="SSL">
> >>>>>       <sec:cipherSuitesFilter>
> >>>>>         <!-- these filters ensure that a ciphersuite with
> >>>>>           export-suitable or null encryption is used,
> >>>>>           but exclude anonymous Diffie-Hellman key change as
> >>>>>           this is vulnerable to man-in-the-middle attacks -->
> >>>>>         <sec:include>.*_EXPORT_.*</sec:include>
> >>>>>         <sec:include>.*_EXPORT1024_.*</sec:include>
> >>>>>         <sec:include>.*_WITH_DES_.*</sec:include>
> >>>>>         <sec:include>.*_WITH_NULL_.*</sec:include>
> >>>>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
> >>>>>       </sec:cipherSuitesFilter>
> >>>>>     </http:tlsClientParameters>
> >>>>>   </http:conduit>
> >>>>> </beans>
> >>>>>
> >>>>> Thanks!
> >>>>>
> >
> >
>

Re: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Willem Jiang <ni...@iona.com>.
Hi Ryan,

Can you tell me how you generate the soap header message with the wsdl2java?
Did you specify the option -exsh true when you call wsdl2java?
If not , please try it again.

Willem.

Ryan Moquin wrote:
> I actually just got my breakpoint to be hit:
>
> It's choking on an element of my WSDL that looks like this:
>
> <s:element name="AuthCredentials" type="tns:AuthCredentials"/>
>       <s:complexType name="AuthCredentials">
>         <s:sequence>
>           <s:element minOccurs="0" maxOccurs="1" name="username"
> type="s:string"/>
>           <s:element minOccurs="0" maxOccurs="1" name="password"
> type="s:string"/>
>         </s:sequence>
>       </s:complexType>
>
> I would like to post the whole WSDL, but I'm not sure I'm allowed to.
>
> Something related to this element is causing an arraylist to not fill itself
> with something.  I notice that the "type" variable in the MessagePartInfo
> class is null when representing this element.  No idea why.  typeClass
> variable is also null as well.... maybe it doesn't like something with how
> this is defined?
>
>
>
> On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
>   
>> If it really is never talking to the server (which would be really
>> surprising) then you should be able to create a standalone test case
>> that we could debug into?
>>
>>     
>>> -----Original Message-----
>>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
>>> Sent: Monday, September 10, 2007 8:39 PM
>>> To: cxf-user@incubator.apache.org
>>> Subject: Re: Can't figure out why I'm getting this error or how to
>>> troubleshoot it
>>>
>>> I tried and it appears that no request has been sent.  I used
>>>       
>> TCPMonitor
>>     
>>> and
>>> changed the URL that my client was pointing to.  When I run the
>>>       
>> client, no
>>     
>>> message comes across TCPMonitor and I still get the same error.  It
>>> appears
>>> that it's trying to do something with the headers when constructing
>>>       
>> the
>>     
>>> SOAP
>>> message?  I was trying get a debug point to work in netbeans in order
>>>       
>> to
>>     
>>> try
>>> to get an idea what CXF is trying to do at the time the exception
>>>       
>> occurs,
>>     
>>> but so far I haven't had luck getting netbeans to make the association
>>>       
>> to
>>     
>>> the source code so that the breakpoint is hit.
>>>
>>> On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
>>>       
>>>> The service you are talking to is very unhappy with you. Can you get
>>>>         
>> a
>>     
>>>> trace of the message traffic?
>>>>
>>>>         
>>>>> -----Original Message-----
>>>>> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
>>>>> Sent: Monday, September 10, 2007 7:59 PM
>>>>> To: cxf-user@incubator.apache.org
>>>>> Subject: Can't figure out why I'm getting this error or how to
>>>>> troubleshoot it
>>>>>
>>>>> I've been trying to use the generated files from my WSDL to access
>>>>>           
>> an
>>     
>>>>> external webservice that uses SSL and authentication.  I setup an
>>>>> http-conduit (I was getting the protocol error when I didn't have
>>>>>           
>> it
>>     
>>>> setup)
>>>>         
>>>>> for SSL and now I get the following error, anyone have any ideas
>>>>>           
>> what
>>     
>>>> I
>>>>         
>>>>> can
>>>>> do from here?:
>>>>>
>>>>> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
>>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
>>>>> JaxWsClientProxy.java:169)
>>>>>         at $Proxy101.sendNotification(Unknown Source)
>>>>>         at service.NotificationServiceClient.sendNotification(
>>>>> NotificationServiceClient.java:88)
>>>>>         at
>>>>>           
>> service.NotificationServiceClientTest.testSendNotification(
>>     
>>>>> NotificationServiceClientTest.java:62)
>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>           
>> Method)
>>     
>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>>>>> NativeMethodAccessorImpl.java:39)
>>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>>> DelegatingMethodAccessorImpl.java:25)
>>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>>>>         at
>>>>>           
>>>> org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
>>>>         
>>>>> :552)
>>>>>         at
>>>>>           
>> org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
>>     
>>>>>         at
>>>>>           
>>>> org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
>>>>         
>>>>>         at
>>>>>           
>>>> org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
>>>>         
>>>>> :114)
>>>>>         at org.testng.TestRunner.privateRun(TestRunner.java:693)
>>>>>         at org.testng.TestRunner.run(TestRunner.java:574)
>>>>>         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
>>>>>         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
>>>>>         at
>>>>>           
>> org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
>>     
>>>>>         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
>>>>>         at
>>>>>           
>>>> org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
>>>>         
>>>>> TestNGExecutor.java:64)
>>>>>         at
>>>>>           
>>>> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
>>>>         
>>>>> TestNGXmlTestSuite.java:75)
>>>>>         at
>>>>>           
>> org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>>     
>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>           
>> Method)
>>     
>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>>>>> NativeMethodAccessorImpl.java:39)
>>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>>> DelegatingMethodAccessorImpl.java:25)
>>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>>>>         at
>>>>>
>>>>>           
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>>     
>>>>> SurefireBooter.java:225)
>>>>>         at org.apache.maven.surefire.booter.SurefireBooter.run(
>>>>> SurefireBooter.java:139)
>>>>>         at
>>>>>           
>> org.apache.maven.plugin.surefire.SurefirePlugin.execute(
>>     
>>>>> SurefirePlugin.java:376)
>>>>>         at
>>>>>           
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(
>>     
>>>>> DefaultPluginManager.java:443)
>>>>>         at
>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
>>>>> DefaultLifecycleExecutor.java:539)
>>>>>         at
>>>>>
>>>>>           
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
>>     
>>>> yc
>>>>         
>>>>> le
>>>>> (DefaultLifecycleExecutor.java:480
>>>>> )
>>>>>         at
>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
>>>>> DefaultLifecycleExecutor.java:459)
>>>>>         at
>>>>>
>>>>>           
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
>>     
>>>> Fa
>>>>         
>>>>> ilures
>>>>> (DefaultLifecycleExecutor.java
>>>>> :311)
>>>>>         at
>>>>>
>>>>>           
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
>>     
>>>>> DefaultLifecycleExecutor.java:278)
>>>>>         at
>>>>>           
>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
>>>>         
>>>>> DefaultLifecycleExecutor.java:143)
>>>>>         at
>>>>>           
>>>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>>>>         
>>>>>         at
>>>>>           
>>>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>>>>         
>>>>>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>           
>> Method)
>>     
>>>>>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>>>>> NativeMethodAccessorImpl.java:39)
>>>>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>>> DelegatingMethodAccessorImpl.java:25)
>>>>>         at java.lang.reflect.Method.invoke(Method.java:585)
>>>>>         at
>>>>>           
>>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
>>>>         
>>>>> :315)
>>>>>         at
>>>>>           
>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>     
>>>>>         at
>>>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
>>>>> :430)
>>>>>         at
>>>>>           
>> org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>>     
>>>>> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>>>>>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>>>>>         at java.util.ArrayList.get(ArrayList.java:321)
>>>>>         at org.apache.cxf.message.MessageContentsList.get(
>>>>> MessageContentsList.java:76)
>>>>>         at
>>>>>
>>>>>           
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
>>     
>>>> ar
>>>>         
>>>>> t(
>>>>> SoapOutInterceptor.java:179)
>>>>>         at
>>>>>
>>>>>           
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
>>     
>>>> lo
>>>>         
>>>>> peStart
>>>>> (SoapOutInterceptor.java:124)
>>>>>
>>>>>         at
>>>>>
>>>>>           
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
>>     
>>>> (
>>>>         
>>>>> SoapOutInterceptor.java:76)
>>>>>         at
>>>>>
>>>>>           
>> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
>>     
>>>> (
>>>>         
>>>>> SoapOutInterceptor.java:57)
>>>>>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
>>>>> PhaseInterceptorChain.java:207)
>>>>>         at
>>>>>           
>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
>>>>         
>>>>>         at
>>>>>           
>>>> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
>>>>         
>>>>>         at
>>>>>           
>>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
>>>>         
>>>>> :73)
>>>>>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
>>>>> JaxWsClientProxy.java:135)
>>>>>         ... 45 more
>>>>>
>>>>> my cfx.xml looks like this:
>>>>>
>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>        xmlns:sec="http://cxf.apache.org/configuration/security"
>>>>>
>>>>>           
>>>> xmlns:http="http://cxf.apache.org/transports/http/configuration"
>>>>         
>>>>>        xsi:schemaLocation="
>>>>>        http://cxf.apache.org/configuration/security
>>>>>        http://cxf.apache.org/schemas/configuration/security.xsd
>>>>>        http://cxf.apache.org/transports/http/configuration
>>>>>        http://cxf.apache.org/schemas/configuration/http-conf.xsd
>>>>>        http://www.springframework.org/schema/beans
>>>>> http://www.springframework.org/schema/beans/spring-beans.xsd">
>>>>>
>>>>>   <http:conduit
>>>>> name="{urn://testnotification}NotificationPort.http-conduit">
>>>>>     <http:authorization>
>>>>>       <sec:UserName>testuser</sec:UserName>
>>>>>       <sec:Password>testpass</sec:Password>
>>>>>     </http:authorization>
>>>>>     <http:tlsClientParameters secureSocketProtocol="SSL">
>>>>>       <sec:cipherSuitesFilter>
>>>>>         <!-- these filters ensure that a ciphersuite with
>>>>>           export-suitable or null encryption is used,
>>>>>           but exclude anonymous Diffie-Hellman key change as
>>>>>           this is vulnerable to man-in-the-middle attacks -->
>>>>>         <sec:include>.*_EXPORT_.*</sec:include>
>>>>>         <sec:include>.*_EXPORT1024_.*</sec:include>
>>>>>         <sec:include>.*_WITH_DES_.*</sec:include>
>>>>>         <sec:include>.*_WITH_NULL_.*</sec:include>
>>>>>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>>>>>       </sec:cipherSuitesFilter>
>>>>>     </http:tlsClientParameters>
>>>>>   </http:conduit>
>>>>> </beans>
>>>>>
>>>>> Thanks!
>>>>>           
>
>   

Re: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Ryan Moquin <fr...@gmail.com>.
I actually just got my breakpoint to be hit:

It's choking on an element of my WSDL that looks like this:

<s:element name="AuthCredentials" type="tns:AuthCredentials"/>
      <s:complexType name="AuthCredentials">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" name="username"
type="s:string"/>
          <s:element minOccurs="0" maxOccurs="1" name="password"
type="s:string"/>
        </s:sequence>
      </s:complexType>

I would like to post the whole WSDL, but I'm not sure I'm allowed to.

Something related to this element is causing an arraylist to not fill itself
with something.  I notice that the "type" variable in the MessagePartInfo
class is null when representing this element.  No idea why.  typeClass
variable is also null as well.... maybe it doesn't like something with how
this is defined?



On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
>
> If it really is never talking to the server (which would be really
> surprising) then you should be able to create a standalone test case
> that we could debug into?
>
> > -----Original Message-----
> > From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> > Sent: Monday, September 10, 2007 8:39 PM
> > To: cxf-user@incubator.apache.org
> > Subject: Re: Can't figure out why I'm getting this error or how to
> > troubleshoot it
> >
> > I tried and it appears that no request has been sent.  I used
> TCPMonitor
> > and
> > changed the URL that my client was pointing to.  When I run the
> client, no
> > message comes across TCPMonitor and I still get the same error.  It
> > appears
> > that it's trying to do something with the headers when constructing
> the
> > SOAP
> > message?  I was trying get a debug point to work in netbeans in order
> to
> > try
> > to get an idea what CXF is trying to do at the time the exception
> occurs,
> > but so far I haven't had luck getting netbeans to make the association
> to
> > the source code so that the breakpoint is hit.
> >
> > On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
> > >
> > > The service you are talking to is very unhappy with you. Can you get
> a
> > > trace of the message traffic?
> > >
> > > > -----Original Message-----
> > > > From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> > > > Sent: Monday, September 10, 2007 7:59 PM
> > > > To: cxf-user@incubator.apache.org
> > > > Subject: Can't figure out why I'm getting this error or how to
> > > > troubleshoot it
> > > >
> > > > I've been trying to use the generated files from my WSDL to access
> an
> > > > external webservice that uses SSL and authentication.  I setup an
> > > > http-conduit (I was getting the protocol error when I didn't have
> it
> > > setup)
> > > > for SSL and now I get the following error, anyone have any ideas
> what
> > > I
> > > > can
> > > > do from here?:
> > > >
> > > > javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> > > >         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> > > > JaxWsClientProxy.java:169)
> > > >         at $Proxy101.sendNotification(Unknown Source)
> > > >         at service.NotificationServiceClient.sendNotification(
> > > > NotificationServiceClient.java:88)
> > > >         at
> service.NotificationServiceClientTest.testSendNotification(
> > > > NotificationServiceClientTest.java:62)
> > > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> > > >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > > NativeMethodAccessorImpl.java:39)
> > > >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > > DelegatingMethodAccessorImpl.java:25)
> > > >         at java.lang.reflect.Method.invoke(Method.java:585)
> > > >         at
> > > org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> > > > :552)
> > > >         at
> org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> > > >         at
> > > org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
> > > >         at
> > > org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> > > > :114)
> > > >         at org.testng.TestRunner.privateRun(TestRunner.java:693)
> > > >         at org.testng.TestRunner.run(TestRunner.java:574)
> > > >         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> > > >         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> > > >         at
> org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> > > >         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> > > >         at
> > > org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> > > > TestNGExecutor.java:64)
> > > >         at
> > > org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> > > > TestNGXmlTestSuite.java:75)
> > > >         at
> org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> > > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> > > >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > > NativeMethodAccessorImpl.java:39)
> > > >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > > DelegatingMethodAccessorImpl.java:25)
> > > >         at java.lang.reflect.Method.invoke(Method.java:585)
> > > >         at
> > > >
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > > > SurefireBooter.java:225)
> > > >         at org.apache.maven.surefire.booter.SurefireBooter.run(
> > > > SurefireBooter.java:139)
> > > >         at
> org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> > > > SurefirePlugin.java:376)
> > > >         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > > > DefaultPluginManager.java:443)
> > > >         at
> > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > > > DefaultLifecycleExecutor.java:539)
> > > >         at
> > > >
> > >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> > > yc
> > > > le
> > > > (DefaultLifecycleExecutor.java:480
> > > > )
> > > >         at
> > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > > > DefaultLifecycleExecutor.java:459)
> > > >         at
> > > >
> > >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> > > Fa
> > > > ilures
> > > > (DefaultLifecycleExecutor.java
> > > > :311)
> > > >         at
> > > >
> > >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > > > DefaultLifecycleExecutor.java:278)
> > > >         at
> > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > > > DefaultLifecycleExecutor.java:143)
> > > >         at
> > > org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> > > >         at
> > > org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> > > >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> > > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> > > >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > > NativeMethodAccessorImpl.java:39)
> > > >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > > DelegatingMethodAccessorImpl.java:25)
> > > >         at java.lang.reflect.Method.invoke(Method.java:585)
> > > >         at
> > > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> > > > :315)
> > > >         at
> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> > > >         at
> > > > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> > > > :430)
> > > >         at
> org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > > > Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> > > >         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> > > >         at java.util.ArrayList.get(ArrayList.java:321)
> > > >         at org.apache.cxf.message.MessageContentsList.get(
> > > > MessageContentsList.java:76)
> > > >         at
> > > >
> > >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
> > > ar
> > > > t(
> > > > SoapOutInterceptor.java:179)
> > > >         at
> > > >
> > >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
> > > lo
> > > > peStart
> > > > (SoapOutInterceptor.java:124)
> > > >
> > > >         at
> > > >
> > >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> > > (
> > > > SoapOutInterceptor.java:76)
> > > >         at
> > > >
> > >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> > > (
> > > > SoapOutInterceptor.java:57)
> > > >         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> > > > PhaseInterceptorChain.java:207)
> > > >         at
> > > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> > > >         at
> > > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> > > >         at
> > > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> > > > :73)
> > > >         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> > > > JaxWsClientProxy.java:135)
> > > >         ... 45 more
> > > >
> > > > my cfx.xml looks like this:
> > > >
> > > > <beans xmlns="http://www.springframework.org/schema/beans"
> > > >        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > > >        xmlns:sec="http://cxf.apache.org/configuration/security"
> > > >
> > > xmlns:http="http://cxf.apache.org/transports/http/configuration"
> > > >        xsi:schemaLocation="
> > > >        http://cxf.apache.org/configuration/security
> > > >        http://cxf.apache.org/schemas/configuration/security.xsd
> > > >        http://cxf.apache.org/transports/http/configuration
> > > >        http://cxf.apache.org/schemas/configuration/http-conf.xsd
> > > >        http://www.springframework.org/schema/beans
> > > > http://www.springframework.org/schema/beans/spring-beans.xsd">
> > > >
> > > >   <http:conduit
> > > > name="{urn://testnotification}NotificationPort.http-conduit">
> > > >     <http:authorization>
> > > >       <sec:UserName>testuser</sec:UserName>
> > > >       <sec:Password>testpass</sec:Password>
> > > >     </http:authorization>
> > > >     <http:tlsClientParameters secureSocketProtocol="SSL">
> > > >       <sec:cipherSuitesFilter>
> > > >         <!-- these filters ensure that a ciphersuite with
> > > >           export-suitable or null encryption is used,
> > > >           but exclude anonymous Diffie-Hellman key change as
> > > >           this is vulnerable to man-in-the-middle attacks -->
> > > >         <sec:include>.*_EXPORT_.*</sec:include>
> > > >         <sec:include>.*_EXPORT1024_.*</sec:include>
> > > >         <sec:include>.*_WITH_DES_.*</sec:include>
> > > >         <sec:include>.*_WITH_NULL_.*</sec:include>
> > > >         <sec:exclude>.*_DH_anon_.*</sec:exclude>
> > > >       </sec:cipherSuitesFilter>
> > > >     </http:tlsClientParameters>
> > > >   </http:conduit>
> > > > </beans>
> > > >
> > > > Thanks!
> > >
>

RE: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Benson Margulies <bi...@basistech.com>.
If it really is never talking to the server (which would be really
surprising) then you should be able to create a standalone test case
that we could debug into?

> -----Original Message-----
> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> Sent: Monday, September 10, 2007 8:39 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Can't figure out why I'm getting this error or how to
> troubleshoot it
> 
> I tried and it appears that no request has been sent.  I used
TCPMonitor
> and
> changed the URL that my client was pointing to.  When I run the
client, no
> message comes across TCPMonitor and I still get the same error.  It
> appears
> that it's trying to do something with the headers when constructing
the
> SOAP
> message?  I was trying get a debug point to work in netbeans in order
to
> try
> to get an idea what CXF is trying to do at the time the exception
occurs,
> but so far I haven't had luck getting netbeans to make the association
to
> the source code so that the breakpoint is hit.
> 
> On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
> >
> > The service you are talking to is very unhappy with you. Can you get
a
> > trace of the message traffic?
> >
> > > -----Original Message-----
> > > From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> > > Sent: Monday, September 10, 2007 7:59 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Can't figure out why I'm getting this error or how to
> > > troubleshoot it
> > >
> > > I've been trying to use the generated files from my WSDL to access
an
> > > external webservice that uses SSL and authentication.  I setup an
> > > http-conduit (I was getting the protocol error when I didn't have
it
> > setup)
> > > for SSL and now I get the following error, anyone have any ideas
what
> > I
> > > can
> > > do from here?:
> > >
> > > javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> > >         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> > > JaxWsClientProxy.java:169)
> > >         at $Proxy101.sendNotification(Unknown Source)
> > >         at service.NotificationServiceClient.sendNotification(
> > > NotificationServiceClient.java:88)
> > >         at
service.NotificationServiceClientTest.testSendNotification(
> > > NotificationServiceClientTest.java:62)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > NativeMethodAccessorImpl.java:39)
> > >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > DelegatingMethodAccessorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:585)
> > >         at
> > org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> > > :552)
> > >         at
org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> > >         at
> > org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
> > >         at
> > org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> > > :114)
> > >         at org.testng.TestRunner.privateRun(TestRunner.java:693)
> > >         at org.testng.TestRunner.run(TestRunner.java:574)
> > >         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> > >         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> > >         at
org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> > >         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> > >         at
> > org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> > > TestNGExecutor.java:64)
> > >         at
> > org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> > > TestNGXmlTestSuite.java:75)
> > >         at
org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > NativeMethodAccessorImpl.java:39)
> > >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > DelegatingMethodAccessorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:585)
> > >         at
> > >
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > > SurefireBooter.java:225)
> > >         at org.apache.maven.surefire.booter.SurefireBooter.run(
> > > SurefireBooter.java:139)
> > >         at
org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> > > SurefirePlugin.java:376)
> > >         at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > > DefaultPluginManager.java:443)
> > >         at
> > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > > DefaultLifecycleExecutor.java:539)
> > >         at
> > >
> >
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> > yc
> > > le
> > > (DefaultLifecycleExecutor.java:480
> > > )
> > >         at
> > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > > DefaultLifecycleExecutor.java:459)
> > >         at
> > >
> >
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> > Fa
> > > ilures
> > > (DefaultLifecycleExecutor.java
> > > :311)
> > >         at
> > >
> >
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > > DefaultLifecycleExecutor.java:278)
> > >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > > DefaultLifecycleExecutor.java:143)
> > >         at
> > org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> > >         at
> > org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> > >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > NativeMethodAccessorImpl.java:39)
> > >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > DelegatingMethodAccessorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:585)
> > >         at
> > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> > > :315)
> > >         at
org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> > >         at
> > > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> > > :430)
> > >         at
org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > > Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> > >         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> > >         at java.util.ArrayList.get(ArrayList.java:321)
> > >         at org.apache.cxf.message.MessageContentsList.get(
> > > MessageContentsList.java:76)
> > >         at
> > >
> >
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
> > ar
> > > t(
> > > SoapOutInterceptor.java:179)
> > >         at
> > >
> >
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
> > lo
> > > peStart
> > > (SoapOutInterceptor.java:124)
> > >
> > >         at
> > >
> >
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> > (
> > > SoapOutInterceptor.java:76)
> > >         at
> > >
> >
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> > (
> > > SoapOutInterceptor.java:57)
> > >         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> > > PhaseInterceptorChain.java:207)
> > >         at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> > >         at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> > >         at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> > > :73)
> > >         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> > > JaxWsClientProxy.java:135)
> > >         ... 45 more
> > >
> > > my cfx.xml looks like this:
> > >
> > > <beans xmlns="http://www.springframework.org/schema/beans"
> > >        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >        xmlns:sec="http://cxf.apache.org/configuration/security"
> > >
> > xmlns:http="http://cxf.apache.org/transports/http/configuration"
> > >        xsi:schemaLocation="
> > >        http://cxf.apache.org/configuration/security
> > >        http://cxf.apache.org/schemas/configuration/security.xsd
> > >        http://cxf.apache.org/transports/http/configuration
> > >        http://cxf.apache.org/schemas/configuration/http-conf.xsd
> > >        http://www.springframework.org/schema/beans
> > > http://www.springframework.org/schema/beans/spring-beans.xsd">
> > >
> > >   <http:conduit
> > > name="{urn://testnotification}NotificationPort.http-conduit">
> > >     <http:authorization>
> > >       <sec:UserName>testuser</sec:UserName>
> > >       <sec:Password>testpass</sec:Password>
> > >     </http:authorization>
> > >     <http:tlsClientParameters secureSocketProtocol="SSL">
> > >       <sec:cipherSuitesFilter>
> > >         <!-- these filters ensure that a ciphersuite with
> > >           export-suitable or null encryption is used,
> > >           but exclude anonymous Diffie-Hellman key change as
> > >           this is vulnerable to man-in-the-middle attacks -->
> > >         <sec:include>.*_EXPORT_.*</sec:include>
> > >         <sec:include>.*_EXPORT1024_.*</sec:include>
> > >         <sec:include>.*_WITH_DES_.*</sec:include>
> > >         <sec:include>.*_WITH_NULL_.*</sec:include>
> > >         <sec:exclude>.*_DH_anon_.*</sec:exclude>
> > >       </sec:cipherSuitesFilter>
> > >     </http:tlsClientParameters>
> > >   </http:conduit>
> > > </beans>
> > >
> > > Thanks!
> >

Re: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Ryan Moquin <fr...@gmail.com>.
I tried and it appears that no request has been sent.  I used TCPMonitor and
changed the URL that my client was pointing to.  When I run the client, no
message comes across TCPMonitor and I still get the same error.  It appears
that it's trying to do something with the headers when constructing the SOAP
message?  I was trying get a debug point to work in netbeans in order to try
to get an idea what CXF is trying to do at the time the exception occurs,
but so far I haven't had luck getting netbeans to make the association to
the source code so that the breakpoint is hit.

On 9/10/07, Benson Margulies <bi...@basistech.com> wrote:
>
> The service you are talking to is very unhappy with you. Can you get a
> trace of the message traffic?
>
> > -----Original Message-----
> > From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> > Sent: Monday, September 10, 2007 7:59 PM
> > To: cxf-user@incubator.apache.org
> > Subject: Can't figure out why I'm getting this error or how to
> > troubleshoot it
> >
> > I've been trying to use the generated files from my WSDL to access an
> > external webservice that uses SSL and authentication.  I setup an
> > http-conduit (I was getting the protocol error when I didn't have it
> setup)
> > for SSL and now I get the following error, anyone have any ideas what
> I
> > can
> > do from here?:
> >
> > javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> >         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> > JaxWsClientProxy.java:169)
> >         at $Proxy101.sendNotification(Unknown Source)
> >         at service.NotificationServiceClient.sendNotification(
> > NotificationServiceClient.java:88)
> >         at service.NotificationServiceClientTest.testSendNotification(
> > NotificationServiceClientTest.java:62)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at
> org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> > :552)
> >         at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> >         at
> org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
> >         at
> org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> > :114)
> >         at org.testng.TestRunner.privateRun(TestRunner.java:693)
> >         at org.testng.TestRunner.run(TestRunner.java:574)
> >         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> >         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> >         at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> >         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> >         at
> org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> > TestNGExecutor.java:64)
> >         at
> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> > TestNGXmlTestSuite.java:75)
> >         at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at
> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > SurefireBooter.java:225)
> >         at org.apache.maven.surefire.booter.SurefireBooter.run(
> > SurefireBooter.java:139)
> >         at org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> > SurefirePlugin.java:376)
> >         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > DefaultPluginManager.java:443)
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:539)
> >         at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> yc
> > le
> > (DefaultLifecycleExecutor.java:480
> > )
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > DefaultLifecycleExecutor.java:459)
> >         at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> Fa
> > ilures
> > (DefaultLifecycleExecutor.java
> > :311)
> >         at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > DefaultLifecycleExecutor.java:278)
> >         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > DefaultLifecycleExecutor.java:143)
> >         at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> >         at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> > :315)
> >         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >         at
> > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> > :430)
> >         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> >         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> >         at java.util.ArrayList.get(ArrayList.java:321)
> >         at org.apache.cxf.message.MessageContentsList.get(
> > MessageContentsList.java:76)
> >         at
> >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
> ar
> > t(
> > SoapOutInterceptor.java:179)
> >         at
> >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
> lo
> > peStart
> > (SoapOutInterceptor.java:124)
> >
> >         at
> >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> (
> > SoapOutInterceptor.java:76)
> >         at
> >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> (
> > SoapOutInterceptor.java:57)
> >         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> > PhaseInterceptorChain.java:207)
> >         at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> >         at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> >         at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> > :73)
> >         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> > JaxWsClientProxy.java:135)
> >         ... 45 more
> >
> > my cfx.xml looks like this:
> >
> > <beans xmlns="http://www.springframework.org/schema/beans"
> >        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >        xmlns:sec="http://cxf.apache.org/configuration/security"
> >
> xmlns:http="http://cxf.apache.org/transports/http/configuration"
> >        xsi:schemaLocation="
> >        http://cxf.apache.org/configuration/security
> >        http://cxf.apache.org/schemas/configuration/security.xsd
> >        http://cxf.apache.org/transports/http/configuration
> >        http://cxf.apache.org/schemas/configuration/http-conf.xsd
> >        http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans.xsd">
> >
> >   <http:conduit
> > name="{urn://testnotification}NotificationPort.http-conduit">
> >     <http:authorization>
> >       <sec:UserName>testuser</sec:UserName>
> >       <sec:Password>testpass</sec:Password>
> >     </http:authorization>
> >     <http:tlsClientParameters secureSocketProtocol="SSL">
> >       <sec:cipherSuitesFilter>
> >         <!-- these filters ensure that a ciphersuite with
> >           export-suitable or null encryption is used,
> >           but exclude anonymous Diffie-Hellman key change as
> >           this is vulnerable to man-in-the-middle attacks -->
> >         <sec:include>.*_EXPORT_.*</sec:include>
> >         <sec:include>.*_EXPORT1024_.*</sec:include>
> >         <sec:include>.*_WITH_DES_.*</sec:include>
> >         <sec:include>.*_WITH_NULL_.*</sec:include>
> >         <sec:exclude>.*_DH_anon_.*</sec:exclude>
> >       </sec:cipherSuitesFilter>
> >     </http:tlsClientParameters>
> >   </http:conduit>
> > </beans>
> >
> > Thanks!
>

RE: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Benson Margulies <bi...@basistech.com>.
The service you are talking to is very unhappy with you. Can you get a
trace of the message traffic?

> -----Original Message-----
> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> Sent: Monday, September 10, 2007 7:59 PM
> To: cxf-user@incubator.apache.org
> Subject: Can't figure out why I'm getting this error or how to
> troubleshoot it
> 
> I've been trying to use the generated files from my WSDL to access an
> external webservice that uses SSL and authentication.  I setup an
> http-conduit (I was getting the protocol error when I didn't have it
setup)
> for SSL and now I get the following error, anyone have any ideas what
I
> can
> do from here?:
> 
> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> JaxWsClientProxy.java:169)
>         at $Proxy101.sendNotification(Unknown Source)
>         at service.NotificationServiceClient.sendNotification(
> NotificationServiceClient.java:88)
>         at service.NotificationServiceClientTest.testSendNotification(
> NotificationServiceClientTest.java:62)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> :552)
>         at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
>         at
org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
>         at
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> :114)
>         at org.testng.TestRunner.privateRun(TestRunner.java:693)
>         at org.testng.TestRunner.run(TestRunner.java:574)
>         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
>         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
>         at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
>         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
>         at
org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> TestNGExecutor.java:64)
>         at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> TestNGXmlTestSuite.java:75)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java:225)
>         at org.apache.maven.surefire.booter.SurefireBooter.run(
> SurefireBooter.java:139)
>         at org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> SurefirePlugin.java:376)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
>         at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
yc
> le
> (DefaultLifecycleExecutor.java:480
> )
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
>         at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Fa
> ilures
> (DefaultLifecycleExecutor.java
> :311)
>         at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
>         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
>         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> :430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>         at java.util.ArrayList.get(ArrayList.java:321)
>         at org.apache.cxf.message.MessageContentsList.get(
> MessageContentsList.java:76)
>         at
>
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
ar
> t(
> SoapOutInterceptor.java:179)
>         at
>
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
lo
> peStart
> (SoapOutInterceptor.java:124)
> 
>         at
>
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
(
> SoapOutInterceptor.java:76)
>         at
>
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
(
> SoapOutInterceptor.java:57)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:207)
>         at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
>         at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
>         at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> :73)
>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> JaxWsClientProxy.java:135)
>         ... 45 more
> 
> my cfx.xml looks like this:
> 
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:sec="http://cxf.apache.org/configuration/security"
>
xmlns:http="http://cxf.apache.org/transports/http/configuration"
>        xsi:schemaLocation="
>        http://cxf.apache.org/configuration/security
>        http://cxf.apache.org/schemas/configuration/security.xsd
>        http://cxf.apache.org/transports/http/configuration
>        http://cxf.apache.org/schemas/configuration/http-conf.xsd
>        http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd">
> 
>   <http:conduit
> name="{urn://testnotification}NotificationPort.http-conduit">
>     <http:authorization>
>       <sec:UserName>testuser</sec:UserName>
>       <sec:Password>testpass</sec:Password>
>     </http:authorization>
>     <http:tlsClientParameters secureSocketProtocol="SSL">
>       <sec:cipherSuitesFilter>
>         <!-- these filters ensure that a ciphersuite with
>           export-suitable or null encryption is used,
>           but exclude anonymous Diffie-Hellman key change as
>           this is vulnerable to man-in-the-middle attacks -->
>         <sec:include>.*_EXPORT_.*</sec:include>
>         <sec:include>.*_EXPORT1024_.*</sec:include>
>         <sec:include>.*_WITH_DES_.*</sec:include>
>         <sec:include>.*_WITH_NULL_.*</sec:include>
>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>       </sec:cipherSuitesFilter>
>     </http:tlsClientParameters>
>   </http:conduit>
> </beans>
> 
> Thanks!

Re: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Ryan Moquin <fr...@gmail.com>.
Nope, got distracted for a bit, but am looking at the issue again.  It is a
problem in the headers.  The element I just posted about that's causing the
problem is meant to be in the header and hold a username and password.

The soap header used with that element is supposed to look like this:

<soap-env:Header>
        <AuthCredentials xmlns="urn://testnotification">
            <username>sampleuser</username>
            <password>1234567</password>
        </AuthCredentials>
    </soap-env:Header>


On 9/10/07, Willem Jiang <ni...@iona.com> wrote:
>
> Hi Ryan,
>
> I don't know if you had resolved theh SSL configuration issue. You
> configuration file looks good to me.
> I just went through the stack trace, I found it caused by a soap header
> build up problem.
>
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>         at java.util.ArrayList.get(ArrayList.java:321)
>         at org.apache.cxf.message.MessageContentsList.get(
> MessageContentsList.java:76)
>         at
>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderPart
> (
> SoapOutInterceptor.java:179)
>         at
>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart
> (SoapOutInterceptor.java:124)
>
> And I also dig the code of JaxWsClientProxy, and found you will never get
> the wired message because the exception is thrown before the message go out
> to the transport layer.
>
> So please give us the wsdl (or just some part of soap header messages) and
> the steps which you created the Java artifacts from wsdl.
>
>
> Willem.
>
>
>
>
> Ryan Moquin wrote:
> > I've been trying to use the generated files from my WSDL to access an
> > external webservice that uses SSL and authentication.  I setup an
> > http-conduit (I was getting the protocol error when I didn't have it
> setup)
> > for SSL and now I get the following error, anyone have any ideas what I
> can
> > do from here?:
> >
> > javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> >         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> > JaxWsClientProxy.java:169)
> >         at $Proxy101.sendNotification(Unknown Source)
> >         at service.NotificationServiceClient.sendNotification(
> > NotificationServiceClient.java:88)
> >         at service.NotificationServiceClientTest.testSendNotification(
> > NotificationServiceClientTest.java:62)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at org.testng.internal.MethodHelper.invokeMethod(
> MethodHelper.java
> > :552)
> >         at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> >         at org.testng.internal.Invoker.invokeTestMethods(Invoker.java
> :785)
> >         at org.testng.internal.TestMethodWorker.run(
> TestMethodWorker.java
> > :114)
> >         at org.testng.TestRunner.privateRun(TestRunner.java:693)
> >         at org.testng.TestRunner.run(TestRunner.java:574)
> >         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> >         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> >         at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> >         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> >         at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG
> (
> > TestNGExecutor.java:64)
> >         at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> > TestNGXmlTestSuite.java:75)
> >         at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at
> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > SurefireBooter.java:225)
> >         at org.apache.maven.surefire.booter.SurefireBooter.run(
> > SurefireBooter.java:139)
> >         at org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> > SurefirePlugin.java:376)
> >         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> > DefaultPluginManager.java:443)
> >         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:539)
> >         at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > (DefaultLifecycleExecutor.java:480
> > )
> >         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > DefaultLifecycleExecutor.java:459)
> >         at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > (DefaultLifecycleExecutor.java
> > :311)
> >         at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > DefaultLifecycleExecutor.java:278)
> >         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> > DefaultLifecycleExecutor.java:143)
> >         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java
> :334)
> >         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> >         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at org.codehaus.classworlds.Launcher.launchEnhanced(
> Launcher.java
> > :315)
> >         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >         at org.codehaus.classworlds.Launcher.mainWithExitCode(
> Launcher.java
> > :430)
> >         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> > Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> >         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> >         at java.util.ArrayList.get(ArrayList.java:321)
> >         at org.apache.cxf.message.MessageContentsList.get(
> > MessageContentsList.java:76)
> >         at
> >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderPart
> (
> > SoapOutInterceptor.java:179)
> >         at
> >
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart
> > (SoapOutInterceptor.java:124)
> >
> >         at
> > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> (
> > SoapOutInterceptor.java:76)
> >         at
> > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
> (
> > SoapOutInterceptor.java:57)
> >         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> > PhaseInterceptorChain.java:207)
> >         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java
> :254)
> >         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java
> :205)
> >         at org.apache.cxf.frontend.ClientProxy.invokeSync(
> ClientProxy.java
> > :73)
> >         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> > JaxWsClientProxy.java:135)
> >         ... 45 more
> >
> > my cfx.xml looks like this:
> >
> > <beans xmlns="http://www.springframework.org/schema/beans"
> >        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >        xmlns:sec="http://cxf.apache.org/configuration/security"
> >        xmlns:http="http://cxf.apache.org/transports/http/configuration"
> >        xsi:schemaLocation="
> >        http://cxf.apache.org/configuration/security
> >        http://cxf.apache.org/schemas/configuration/security.xsd
> >        http://cxf.apache.org/transports/http/configuration
> >        http://cxf.apache.org/schemas/configuration/http-conf.xsd
> >        http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans.xsd">
> >
> >   <http:conduit
> > name="{urn://testnotification}NotificationPort.http-conduit">
> >     <http:authorization>
> >       <sec:UserName>testuser</sec:UserName>
> >       <sec:Password>testpass</sec:Password>
> >     </http:authorization>
> >     <http:tlsClientParameters secureSocketProtocol="SSL">
> >       <sec:cipherSuitesFilter>
> >         <!-- these filters ensure that a ciphersuite with
> >           export-suitable or null encryption is used,
> >           but exclude anonymous Diffie-Hellman key change as
> >           this is vulnerable to man-in-the-middle attacks -->
> >         <sec:include>.*_EXPORT_.*</sec:include>
> >         <sec:include>.*_EXPORT1024_.*</sec:include>
> >         <sec:include>.*_WITH_DES_.*</sec:include>
> >         <sec:include>.*_WITH_NULL_.*</sec:include>
> >         <sec:exclude>.*_DH_anon_.*</sec:exclude>
> >       </sec:cipherSuitesFilter>
> >     </http:tlsClientParameters>
> >   </http:conduit>
> > </beans>
> >
> > Thanks!
> >
> >
>

Re: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Willem Jiang <ni...@iona.com>.
Hi Ryan,

I don't know if you had resolved theh SSL configuration issue. You 
configuration file looks good to me.
I just went through the stack trace, I found it caused by a soap header 
build up problem.

Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
        at java.util.ArrayList.get(ArrayList.java:321)
        at org.apache.cxf.message.MessageContentsList.get(
MessageContentsList.java:76)
        at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderPart(
SoapOutInterceptor.java:179)
        at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart
(SoapOutInterceptor.java:124)

And I also dig the code of JaxWsClientProxy, and found you will never get the wired message because the exception is thrown before the message go out to the transport layer.

So please give us the wsdl (or just some part of soap header messages) and the steps which you created the Java artifacts from wsdl.


Willem.




Ryan Moquin wrote:
> I've been trying to use the generated files from my WSDL to access an
> external webservice that uses SSL and authentication.  I setup an
> http-conduit (I was getting the protocol error when I didn't have it setup)
> for SSL and now I get the following error, anyone have any ideas what I can
> do from here?:
>
> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> JaxWsClientProxy.java:169)
>         at $Proxy101.sendNotification(Unknown Source)
>         at service.NotificationServiceClient.sendNotification(
> NotificationServiceClient.java:88)
>         at service.NotificationServiceClientTest.testSendNotification(
> NotificationServiceClientTest.java:62)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> :552)
>         at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
>         at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
>         at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> :114)
>         at org.testng.TestRunner.privateRun(TestRunner.java:693)
>         at org.testng.TestRunner.run(TestRunner.java:574)
>         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
>         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
>         at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
>         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
>         at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> TestNGExecutor.java:64)
>         at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> TestNGXmlTestSuite.java:75)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java:225)
>         at org.apache.maven.surefire.booter.SurefireBooter.run(
> SurefireBooter.java:139)
>         at org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> SurefirePlugin.java:376)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java:480
> )
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java
> :311)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> :430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>         at java.util.ArrayList.get(ArrayList.java:321)
>         at org.apache.cxf.message.MessageContentsList.get(
> MessageContentsList.java:76)
>         at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderPart(
> SoapOutInterceptor.java:179)
>         at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart
> (SoapOutInterceptor.java:124)
>
>         at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(
> SoapOutInterceptor.java:76)
>         at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(
> SoapOutInterceptor.java:57)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:207)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
>         at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> :73)
>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> JaxWsClientProxy.java:135)
>         ... 45 more
>
> my cfx.xml looks like this:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:sec="http://cxf.apache.org/configuration/security"
>        xmlns:http="http://cxf.apache.org/transports/http/configuration"
>        xsi:schemaLocation="
>        http://cxf.apache.org/configuration/security
>        http://cxf.apache.org/schemas/configuration/security.xsd
>        http://cxf.apache.org/transports/http/configuration
>        http://cxf.apache.org/schemas/configuration/http-conf.xsd
>        http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd">
>
>   <http:conduit
> name="{urn://testnotification}NotificationPort.http-conduit">
>     <http:authorization>
>       <sec:UserName>testuser</sec:UserName>
>       <sec:Password>testpass</sec:Password>
>     </http:authorization>
>     <http:tlsClientParameters secureSocketProtocol="SSL">
>       <sec:cipherSuitesFilter>
>         <!-- these filters ensure that a ciphersuite with
>           export-suitable or null encryption is used,
>           but exclude anonymous Diffie-Hellman key change as
>           this is vulnerable to man-in-the-middle attacks -->
>         <sec:include>.*_EXPORT_.*</sec:include>
>         <sec:include>.*_EXPORT1024_.*</sec:include>
>         <sec:include>.*_WITH_DES_.*</sec:include>
>         <sec:include>.*_WITH_NULL_.*</sec:include>
>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>       </sec:cipherSuitesFilter>
>     </http:tlsClientParameters>
>   </http:conduit>
> </beans>
>
> Thanks!
>
>   

RE: Can't figure out why I'm getting this error or how to troubleshoot it

Posted by Benson Margulies <bi...@basistech.com>.
http://cwiki.apache.org/CXF20DOC/debugging.html

> -----Original Message-----
> From: Ryan Moquin [mailto:fragility2.0@gmail.com]
> Sent: Monday, September 10, 2007 7:59 PM
> To: cxf-user@incubator.apache.org
> Subject: Can't figure out why I'm getting this error or how to
> troubleshoot it
> 
> I've been trying to use the generated files from my WSDL to access an
> external webservice that uses SSL and authentication.  I setup an
> http-conduit (I was getting the protocol error when I didn't have it
setup)
> for SSL and now I get the following error, anyone have any ideas what
I
> can
> do from here?:
> 
> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> JaxWsClientProxy.java:169)
>         at $Proxy101.sendNotification(Unknown Source)
>         at service.NotificationServiceClient.sendNotification(
> NotificationServiceClient.java:88)
>         at service.NotificationServiceClientTest.testSendNotification(
> NotificationServiceClientTest.java:62)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> :552)
>         at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
>         at
org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
>         at
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> :114)
>         at org.testng.TestRunner.privateRun(TestRunner.java:693)
>         at org.testng.TestRunner.run(TestRunner.java:574)
>         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
>         at org.testng.SuiteRunner.run(SuiteRunner.java:145)
>         at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
>         at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
>         at
org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> TestNGExecutor.java:64)
>         at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> TestNGXmlTestSuite.java:75)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java:225)
>         at org.apache.maven.surefire.booter.SurefireBooter.run(
> SurefireBooter.java:139)
>         at org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> SurefirePlugin.java:376)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
>         at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
yc
> le
> (DefaultLifecycleExecutor.java:480
> )
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
>         at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Fa
> ilures
> (DefaultLifecycleExecutor.java
> :311)
>         at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
>         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
>         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> :430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>         at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>         at java.util.ArrayList.get(ArrayList.java:321)
>         at org.apache.cxf.message.MessageContentsList.get(
> MessageContentsList.java:76)
>         at
>
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
ar
> t(
> SoapOutInterceptor.java:179)
>         at
>
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
lo
> peStart
> (SoapOutInterceptor.java:124)
> 
>         at
>
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
(
> SoapOutInterceptor.java:76)
>         at
>
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage
(
> SoapOutInterceptor.java:57)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:207)
>         at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
>         at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
>         at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> :73)
>         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> JaxWsClientProxy.java:135)
>         ... 45 more
> 
> my cfx.xml looks like this:
> 
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:sec="http://cxf.apache.org/configuration/security"
>
xmlns:http="http://cxf.apache.org/transports/http/configuration"
>        xsi:schemaLocation="
>        http://cxf.apache.org/configuration/security
>        http://cxf.apache.org/schemas/configuration/security.xsd
>        http://cxf.apache.org/transports/http/configuration
>        http://cxf.apache.org/schemas/configuration/http-conf.xsd
>        http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd">
> 
>   <http:conduit
> name="{urn://testnotification}NotificationPort.http-conduit">
>     <http:authorization>
>       <sec:UserName>testuser</sec:UserName>
>       <sec:Password>testpass</sec:Password>
>     </http:authorization>
>     <http:tlsClientParameters secureSocketProtocol="SSL">
>       <sec:cipherSuitesFilter>
>         <!-- these filters ensure that a ciphersuite with
>           export-suitable or null encryption is used,
>           but exclude anonymous Diffie-Hellman key change as
>           this is vulnerable to man-in-the-middle attacks -->
>         <sec:include>.*_EXPORT_.*</sec:include>
>         <sec:include>.*_EXPORT1024_.*</sec:include>
>         <sec:include>.*_WITH_DES_.*</sec:include>
>         <sec:include>.*_WITH_NULL_.*</sec:include>
>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>       </sec:cipherSuitesFilter>
>     </http:tlsClientParameters>
>   </http:conduit>
> </beans>
> 
> Thanks!