Sorry, I wasn't notified that you answered the mail list, and I was so busy I forgot to have a look to it. So, like I said, the modifications you made (http://issues.apache.org/jira/browse/CXF-1600 actually !) work great ! I had to regenerated the classes and edited my client code (not a big deal, and it's prettier now ;-)).
Today, I tried to regenerate the classes without jaxb binding configuration file, but I didn't manage : "WSDLToJava Error: Thrown by JAXB : A class/interface with the same name "com.sfo rce.soap.partner.DescribeLayout" is already in use. Use a class customization to resolve this conflict." I still had to use my binding file to suffix all type names by "Type", but it's not very convenient in generated classes.. Am I missing something while generating client with : "wsdl2java -exsh true partner.wsdl" ? Thanks a lot Dan and sorry for the "hudge jet lag !" Gaël dkulp wrote: > > > OK. This is actually a code generations problem: > http://issues.apache.org/jira/browse/CXF-1600 > > I created a salesforce.com developer account for myself today and > played with the wsdl a bit. I downloaded their "jaxws 2.1" sample > pack thing and modified their QuickStart client to work with CXF. > > The first thing I did was: > http://issues.apache.org/jira/browse/CXF-1601 > to allow me to not have to create a JAXB customization file. :-) > > Then I noticed the method signatures aren't correct. Most of those > parameters on the methods are not supposed to be there. That's > CXF-1600. I just fixed that and committed the changes. With that > fixed, I can use the modified QuickStart to login, get the server > timestamp, list the accounts, and update and account. Thus, I think > it's now working OK. > > In anycase, I'm deploying a new snapshot now. In another hour or so, > it should be up. If you can give that a try, that would be great. > The fix for 1600 WILL change all the method signatures to remove the > "headers" that aren't applicable to that method. Thus, you will need > to modify your client code a bit. However, it's probably a good thing. > > Dan > > > > On May 21, 2008, at 4:20 AM, Gaël LAZZARI wrote: > >> Hi Daniel, thanks for your help ! >> Yes, the error was very different. I actually use SOAP header in my >> outbound >> Messages. The NullPointerException was my fault, but when I fixed >> it, the >> HolderInInterceptor throw a IndexOutOfBoundsException when calling the >> MessageContentsList.getContentsList(message).get(MessagePartInfo >> part), >> where the parts are got from the SOAP output message. >> >> So I tried this morning with the "apache-cxf-2.1.1-20080520.211236-4" >> snapshot, the same error has been thrown. >> >> A Jira issue has already been posted ( >> https://issues.apache.org/jira/browse/CXF-1568), and I just saw that >> it was >> assigned to you today ! >> >> I send you here my client code and the generated SOAP message which >> is ok, >> maybe it can help you ! >> (I'm trying to consume Salesforce.com services through the >> partner.wsdl) >> >> cxf generated code of one service's methods : >> >> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) >> @WebResult(name = "createResponse", targetNamespace = "urn: >> partner.soap.sforce.com", partName = "parameters") >> @WebMethod >> public CreateResponse create( >> @WebParam(partName = "parameters", name = "create", >> targetNamespace >> = "urn:partner.soap.sforce.com") >> Create parameters, >> @WebParam(partName = "DebuggingInfo", mode = >> WebParam.Mode.INOUT, >> name = "DebuggingInfo", targetNamespace = >> "urn:partner.soap.sforce.com", >> header = true) >> javax.xml.ws.Holder<DebuggingInfo> debuggingInfo, >> @WebParam(partName = "DebuggingHeader", mode = >> WebParam.Mode.INOUT, >> name = "DebuggingHeader", targetNamespace = "urn:partner.soap.sforce.com >> ", >> header = true) >> javax.xml.ws.Holder<DebuggingHeader> debuggingHeader, >> @WebParam(partName = "MruHeader", mode = WebParam.Mode.INOUT, >> name = >> "MruHeader", targetNamespace = "urn:partner.soap.sforce.com", header >> = true) >> javax.xml.ws.Holder<MruHeader> mruHeader, >> @WebParam(partName = "QueryOptions", mode = >> WebParam.Mode.INOUT, >> name = "QueryOptions", targetNamespace = >> "urn:partner.soap.sforce.com") >> javax.xml.ws.Holder<QueryOptions> queryOptions, >> @WebParam(partName = "LocaleOptions", mode = >> WebParam.Mode.INOUT, >> name = "LocaleOptions", targetNamespace = >> "urn:partner.soap.sforce.com") >> javax.xml.ws.Holder<LocaleOptions> localeOptions, >> @WebParam(partName = "EmailHeader", mode = >> WebParam.Mode.INOUT, name >> = "EmailHeader", targetNamespace = "urn:partner.soap.sforce.com", >> header = >> true) >> javax.xml.ws.Holder<EmailHeader> emailHeader, >> @WebParam(partName = "UserTerritoryDeleteHeader", mode = >> WebParam.Mode.INOUT, name = "UserTerritoryDeleteHeader", >> targetNamespace = >> "urn:partner.soap.sforce.com") >> javax.xml.ws.Holder<UserTerritoryDeleteHeader> >> userTerritoryDeleteHeader, >> @WebParam(partName = "LoginScopeHeader", mode = >> WebParam.Mode.INOUT, >> name = "LoginScopeHeader", targetNamespace = "urn:partner.soap.sforce.com >> ") >> javax.xml.ws.Holder<LoginScopeHeader> loginScopeHeader, >> @WebParam(partName = "AssignmentRuleHeader", mode = >> WebParam.Mode.INOUT, name = "AssignmentRuleHeader", targetNamespace >> = "urn: >> partner.soap.sforce.com", header = true) >> javax.xml.ws.Holder<AssignmentRuleHeader> assignmentRuleHeader, >> @WebParam(partName = "SessionHeader", mode = >> WebParam.Mode.INOUT, >> name = "SessionHeader", targetNamespace = >> "urn:partner.soap.sforce.com", >> header = true) >> javax.xml.ws.Holder<SessionHeader> sessionHeader, >> @WebParam(partName = "CallOptions", mode = >> WebParam.Mode.INOUT, name >> = "CallOptions", targetNamespace = "urn:partner.soap.sforce.com", >> header = >> true) >> javax.xml.ws.Holder<CallOptions> callOptions >> ) throws UnexpectedErrorFault, InvalidIdFault, InvalidFieldFault, >> InvalidSObjectFault; >> >> >> The outbound message when calling this : >> >> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> >> <soap:Header> >> <SessionHeader xmlns:ns3="urn:fault.partner.soap.sforce.com" >> xmlns:ns2="urn:sobject.partner.soap.sforce.com" >> xmlns="urn:partner.soap.sforce.com"> >> <sessionId> >> >> 460200D70000000IQeW! >> AQ0AQG9d9iqlIIAaw_R3H15rJHfrf_GMj12ETIp8f >> .BsCplX0KwaHrJLGoEFaAMeoy4y_PPppcX2uXItleMLbVJF24uof0MI >> </sessionId> >> </SessionHeader> >> </soap:Header> >> <soap:Body> >> <create xmlns="urn:partner.soap.sforce.com" >> xmlns:ns2="urn:sobject.partner.soap.sforce.com" >> xmlns:ns3="urn:fault.partner.soap.sforce.com"> >> <sObjects> >> <ns2:Id >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance >> " >> xsi:nil="true" /> >> <ns2:type xmlns="urn:sobject.partner.soap.sforce.com"> >> Contact >> </ns2:type> >> <ns2:birthdate >> xmlns="urn:sobject.partner.soap.sforce.com"> >> 2008-05-142 >> </ns2:birthdate> >> <ns2:firstName >> xmlns="urn:sobject.partner.soap.sforce.com"> >> testConvert >> </ns2:firstName> >> <ns2:lastName >> xmlns="urn:sobject.partner.soap.sforce.com"> >> testLastConvert >> </ns2:lastName> >> </sObjects> >> </create> >> </soap:Body> >> </soap:Envelope> >> >> The Salesforce.com server response : >> >> <?xml version="1.0" encoding="UTF-8"?> >> <soapenv:Envelope >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >> xmlns="urn:partner.soap.sforce.com"> >> <soapenv:Body> >> <createResponse> >> <result> >> <id>0037000000YgDckAAF</id> >> <success>true</success> >> </result> >> </createResponse> >> </soapenv:Body> >> </soapenv:Envelope> >> >> => no problem, my Contact is create in Salesforce.com >> >> But an IndexOutOfBoundsException is thrown (same stack as in je jira >> issue) >> : >> >> Interceptor has thrown exception, unwinding now >> java.lang.IndexOutOfBoundsException: Index: 3, Size: 3 >> 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: >> 79) >> at >> org >> .apache >> .cxf >> .jaxws >> .interceptors >> .HolderInInterceptor.handleMessage(HolderInInterceptor.java:64) >> at >> org >> .apache >> .cxf >> .phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: >> 221) >> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java: >> 429) >> at >> org.apache.cxf.transport.http.HTTPConduit >> $WrappedOutputStream.handleResponse(HTTPConduit.java:1988) >> at >> org.apache.cxf.transport.http.HTTPConduit >> $WrappedOutputStream.close(HTTPConduit.java:1824) >> at >> org >> .apache >> .cxf >> .io >> .CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java: >> 47) >> at >> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java: >> 159) >> at >> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java: >> 66) >> at >> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:583) >> at >> org.apache.cxf.interceptor.MessageSenderInterceptor >> $ >> MessageSenderEndingInterceptor >> .handleMessage(MessageSenderInterceptor.java:62) >> at >> org >> .apache >> .cxf >> .phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: >> 221) >> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276) >> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222) >> at >> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) >> at >> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java: >> 178) >> >> >> TYIA for your great work Daniel ! >> >> Gaël >> >> >> >> 2008/5/20, Daniel Kulp <[EMAIL PROTECTED]>: >>> >>> >>> This error is pretty different..... Does the message have headers >>> in it? >>> >>> I THINK I may have this fixed now. I'm going to deploy a new >>> snapshot >>> tonight. If you could retry with that snapshot tomorrow morning, >>> that >>> would be great. >>> >>> >>> Dan >>> >>> >>> >>> >>> On May 18, 2008, at 1:51 PM, XeN0s wrote: >>> >>> >>>> Hi, >>>> I'm using cxf 2.1 and I have the same error although I consume my >>>> webservice well (I receive I soap message from the server that >>>> notify me >>>> the >>>> operation's success on the server side). >>>> >>>> And the error I don't understand is : >>>> >>>> 18 mai 2008 19:49:45 org.apache.cxf.phase.PhaseInterceptorChain >>>> doIntercept >>>> INFO: Interceptor has thrown exception, unwinding now >>>> java.lang.NullPointerException >>>> at >>>> >>>> org >>>> .apache >>>> .cxf >>>> .jaxws >>>> .interceptors >>>> .HolderInInterceptor.handleMessage(HolderInInterceptor.java:64) >>>> at >>>> >>>> org >>>> .apache >>>> .cxf >>>> .phase >>>> .PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) >>>> at >>>> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429) >>>> at >>>> >>>> org.apache.cxf.transport.http.HTTPConduit >>>> $WrappedOutputStream.handleResponse(HTTPConduit.java:1988) >>>> at >>>> >>>> org.apache.cxf.transport.http.HTTPConduit >>>> $WrappedOutputStream.close(HTTPConduit.java:1824) >>>> at >>>> >>>> org >>>> .apache >>>> .cxf >>>> .io >>>> .CacheAndWriteOutputStream >>>> .postClose(CacheAndWriteOutputStream.java:47) >>>> at >>>> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java: >>>> 159) >>>> at >>>> org >>>> .apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) >>>> at >>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java: >>>> 583) >>>> at >>>> >>>> org.apache.cxf.interceptor.MessageSenderInterceptor >>>> $ >>>> MessageSenderEndingInterceptor >>>> .handleMessage(MessageSenderInterceptor.java:62) >>>> at >>>> >>>> org >>>> .apache >>>> .cxf >>>> .phase >>>> .PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) >>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java: >>>> 276) >>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java: >>>> 222) >>>> at >>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) >>>> at >>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java: >>>> 177) >>>> at $Proxy42.create(Unknown Source) >>>> at com.avs.sforce.connection.SFClient.create(SFClient.java: >>>> 165) >>>> at >>>> >>>> com.avs.sforce.connection.SFClient$$FastClassByCGLIB$ >>>> $4e83e795.invoke(<generated>) >>>> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) >>>> at >>>> >>>> org.springframework.aop.framework.Cglib2AopProxy >>>> $CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:694) >>>> at >>>> >>>> org >>>> .springframework >>>> .aop >>>> .framework >>>> .ReflectiveMethodInvocation >>>> .proceed(ReflectiveMethodInvocation.java:149) >>>> at >>>> >>>> org >>>> .springframework >>>> .aop >>>> .aspectj >>>> .MethodInvocationProceedingJoinPoint >>>> .proceed(MethodInvocationProceedingJoinPoint.java:77) >>>> at >>>> com.avs.sforce.connection.AspectRetry.retry(AspectRetry.java:40) >>>> 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 >>>> .springframework >>>> .aop >>>> .aspectj >>>> .AbstractAspectJAdvice >>>> .invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:597) >>>> at >>>> >>>> org >>>> .springframework >>>> .aop >>>> .aspectj >>>> .AbstractAspectJAdvice >>>> .invokeAdviceMethod(AbstractAspectJAdvice.java:583) >>>> at >>>> >>>> org >>>> .springframework >>>> .aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60) >>>> at >>>> >>>> org >>>> .springframework >>>> .aop >>>> .framework >>>> .ReflectiveMethodInvocation >>>> .proceed(ReflectiveMethodInvocation.java:171) >>>> at >>>> >>>> org >>>> .springframework >>>> .aop >>>> .interceptor >>>> .ExposeInvocationInterceptor >>>> .invoke(ExposeInvocationInterceptor.java:89) >>>> at >>>> >>>> org >>>> .springframework >>>> .aop >>>> .framework >>>> .ReflectiveMethodInvocation >>>> .proceed(ReflectiveMethodInvocation.java:171) >>>> at >>>> >>>> org.springframework.aop.framework.Cglib2AopProxy >>>> $DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:629) >>>> at >>>> >>>> com.avs.sforce.connection.SFClient$$EnhancerByCGLIB$ >>>> $d81710b6.create(<generated>) >>>> at com.avs.test.TestConversion.main(TestConversion.java:32) >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Is-cxf-no-tcompatible-with-XML-beans-tp17271898p17305733.html >>>> Sent from the cxf-user mailing list archive at Nabble.com. >>>> >>>> >>> --- >>> Daniel Kulp >>> [EMAIL PROTECTED] >>> http://www.dankulp.com/blog >>> >>> >>> >>> >>> > > --- > Daniel Kulp > [EMAIL PROTECTED] > http://www.dankulp.com/blog > > > > > > -- View this message in context: http://www.nabble.com/Is-cxf-no-tcompatible-with-XML-beans-tp17271898p17516630.html Sent from the cxf-user mailing list archive at Nabble.com.
