Glen,
Upon further investigation, I think that you are right and my message is
not being sent. If you look at the error trace below, it kind of looks
like this error is being thrown from within one of the _outbound_
interceptors before the message even goes across the wire. Apparently,
the SOAPOutInterceptor is failing on this call at this line
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
art(SoapOutInterceptor.java:179)
which will end up causing an index out of bounds error.
I did make some mods. to a class of APICredentials which are required in
the SOAP header. But all I did was initialize the String variables to
be the userid and password required by the services. Here's a snippet
of that:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "APICredentials", propOrder = {"developerKey",
"password"})
public class APICredentials {
@XmlElement(name = "DeveloperKey", namespace =
"http://api.channeladvisor.com/webservices/")
protected String developerKey = "<key>";
@XmlElement(name = "Password", namespace =
"http://api.channeladvisor.com/webservices/")
protected String password = "<pwd>";
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName,
String>();
(I'd just like to point out that if this is correct, the CXF is throwing
a HandlerFault which a later part of the code rejects as being
non-standard - huh?).
I may take a look at Axis2 if I can't make any progress on this.
Thanks,
Wes
=========================snippet of FINE log
output===============================
FINE: registering incoming observer:
[EMAIL PROTECTED]
Invoking ping...
Sep 11, 2007 9:32:29 AM
org.apache.cxf.configuration.spring.ConfigurerImpl configureBean
FINE: Could not find a definition for bean with id
{http://api.channeladvisor.com/webservices/}InventoryService - no
injection will be performed.
Sep 11, 2007 9:32:29 AM
org.apache.cxf.configuration.spring.ConfigurerImpl configureBean
FINE: Could not find a definition for bean with id
{http://api.channeladvisor.com/webservices/}InventoryServiceSoap12.endpo
int - no injection will be performed.
Sep 11, 2007 9:32:29 AM
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder
buildHandlerChainFromClass
FINE: building handler chain
Sep 11, 2007 9:32:29 AM
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder
findHandlerChainAnnotation
FINE: Checking for HandlerChain annotation on
com.channeladvisor.api.webservices.InventoryService
Sep 11, 2007 9:32:29 AM
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder
buildHandlerChainFromClass
FINE: no HandlerChain annotation on class
com.channeladvisor.api.webservices.InventoryService
Sep 11, 2007 9:32:29 AM org.apache.cxf.jaxws.ServiceImpl createPort
FINE: created proxy
Sep 11, 2007 9:32:29 AM org.apache.cxf.endpoint.ClientImpl invoke
FINE: Invoke, operation info: [BindingOperationInfo:
{http://api.channeladvisor.com/webservices/}Ping], params:
[Ljava.lang.Object;@80ed90
Sep 11, 2007 9:32:29 AM org.apache.cxf.endpoint.ClientImpl setContext
FINE: set requestContext to message be{RequestMethod=public abstract
com.channeladvisor.api.webservices.APIResultOfString
com.channeladvisor.api.webservices.InventoryServiceSoap.ping(),
javax.xml.ws.service.endpoint.address=http://localhost:4040/ChannelAdvis
orAPI/v1/InventoryService.asmx, java.lang.reflect.Method=public abstract
com.channeladvisor.api.webservices.APIResultOfString
com.channeladvisor.api.webservices.InventoryServiceSoap.ping(),
org.apache.cxf.jaxws.context.WrappedMessageContext.SCOPES={javax.xml.ws.
service.endpoint.address=APPLICATION},
org.apache.cxf.message.Message.ENDPOINT_ADDRESS=http://localhost:4040/Ch
annelAdvisorAPI/v1/InventoryService.asmx}
Sep 11, 2007 9:32:29 AM org.apache.cxf.endpoint.ClientImpl
setupInterceptorChain
FINE: Interceptors contributed by bus: []
Sep 11, 2007 9:32:29 AM org.apache.cxf.endpoint.ClientImpl
setupInterceptorChain
FINE: Interceptors contributed by endpoint:
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]
a, [EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.endpoint.ClientImpl
setupInterceptorChain
FINE: Interceptors contributed by client: []
Sep 11, 2007 9:32:29 AM org.apache.cxf.endpoint.ClientImpl
setupInterceptorChain
FINE: Interceptors contributed by binding:
[EMAIL PROTECTED]
a, [EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]
c4d3b, [EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]
1a54, [EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to phase
prepare-send
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to phase
pre-logical
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED]
a to phase pre-marshal
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to
phase pre-logical
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to phase
pre-logical
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to phase
pre-protocol
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED]
to phase post-logical
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to phase
pre-stream
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to phase
pre-stream
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED]
c4d3b to phase pre-logical
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to phase marshal
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to phase marshal
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED]
1a54 to phase pre-stream
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED] to
phase write
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
outputChainToLog
FINE: Chain [EMAIL PROTECTED] was
created. Current flow:
pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor]
post-logical [SoapActionOutInterceptor]
prepare-send [MessageSenderInterceptor]
pre-stream [SoapPreProtocolOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
pre-protocol [SOAPHandlerInterceptor]
write [SoapOutInterceptor]
pre-marshal [LogicalHandlerOutInterceptor]
marshal [WrappedOutInterceptor, BareOutInterceptor]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM
org.apache.cxf.jaxws.interceptors.HolderOutInterceptor handleMessage
FINE: op: [OperationInfo:
{http://api.channeladvisor.com/webservices/}Ping]
Sep 11, 2007 9:32:29 AM
org.apache.cxf.jaxws.interceptors.HolderOutInterceptor handleMessage
FINE: op.hasOutput(): true
Sep 11, 2007 9:32:29 AM
org.apache.cxf.jaxws.interceptors.HolderOutInterceptor handleMessage
FINE: op.getOutput().size(): 1
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
c4d3b
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
[EMAIL PROTECTED] to phase prepare-send-ending
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
outputChainToLog
FINE: Chain [EMAIL PROTECTED] was
modified. Current flow:
pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor]
post-logical [SoapActionOutInterceptor]
prepare-send [MessageSenderInterceptor]
pre-stream [SoapPreProtocolOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
pre-protocol [SOAPHandlerInterceptor]
write [SoapOutInterceptor]
pre-marshal [LogicalHandlerOutInterceptor]
marshal [WrappedOutInterceptor, BareOutInterceptor]
prepare-send-ending [MessageSenderEndingInterceptor]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
1a54
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain add
FINE: Adding interceptor
[EMAIL PROTECTED]
6721bd to phase pre-stream-ending
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
outputChainToLog
FINE: Chain [EMAIL PROTECTED] was
modified. Current flow:
pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor]
post-logical [SoapActionOutInterceptor]
prepare-send [MessageSenderInterceptor]
pre-stream [SoapPreProtocolOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
pre-protocol [SOAPHandlerInterceptor]
write [SoapOutInterceptor]
pre-marshal [LogicalHandlerOutInterceptor]
marshal [WrappedOutInterceptor, BareOutInterceptor]
pre-stream-ending [StaxOutEndingInterceptor]
prepare-send-ending [MessageSenderEndingInterceptor]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.jaxws.handler.HandlerChainInvoker
<init>
FINE: invoker for chain size: 0
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
FINE: Invoking handleMessage on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at
org.apache.cxf.message.MessageContentsList.get(MessageContentsList.java:
76)
at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleHeaderP
art(SoapOutInterceptor.java:179)
at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnve
lopeStart(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(PhaseInterceptorC
hain.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)
at $Proxy32.ping(Unknown Source)
at
com.channeladvisor.api.webservices.InventoryServiceSoap12_Client.main(In
ventoryServiceSoap12_Client.java:88)
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
1a54
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
c4d3b
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM org.apache.cxf.phase.PhaseInterceptorChain
unwind
FINE: Invoking handleFault on interceptor
[EMAIL PROTECTED]
Sep 11, 2007 9:32:29 AM
com.sun.xml.internal.messaging.saaj.soap.ver1_2.Fault1_2Impl
checkIfStandardFaultCode
SEVERE: SAAJ0435: {http://cxf.apache.org/faultcode}HandlerFault is not a
standard Code value
Exception in thread "main"
java.lang.reflect.UndeclaredThrowableException
at $Proxy32.ping(Unknown Source)
at
com.channeladvisor.api.webservices.InventoryServiceSoap12_Client.main(In
ventoryServiceSoap12_Client.java:88)
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl:
{http://cxf.apache.org/faultcode}HandlerFault is not a standard Code
value
at
com.sun.xml.internal.messaging.saaj.soap.ver1_2.Fault1_2Impl.checkIfStan
dardFaultCode(Fault1_2Impl.java:134)
at
com.sun.xml.internal.messaging.saaj.soap.impl.FaultImpl.setFaultCode(Fau
ltImpl.java:124)
at
com.sun.xml.internal.messaging.saaj.soap.impl.FaultImpl.setFaultCode(Fau
ltImpl.java:138)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:162)
... 2 more
-----Original Message-----
From: Glen Mazza [mailto:[EMAIL PROTECTED]
Sent: Monday, September 10, 2007 8:56 PM
To: [email protected]
Subject: RE: Can't get at SOAP error from Web Service (SOAP
1.2)-"HandlerFault is not a standard Code value"
> However, it appears that my Java client (which is using this local
WSDL)
> is not proxying the request through the WSMonitor. In my log file, I
> see (notice the refs. to localhost:4040):
>
I'm not sure why you think your client is *not* proxying the
request--the very fact that it's going to localhost:4040 would indicate
that it is doing that, no?
Glen
> FINE: set requestContext to message be{RequestMethod=public abstract
> com.channeladvisor.api.webservices.APIResultOfString
> com.channeladvisor.api.webservices.InventoryServiceSoap.ping(),
>
javax.xml.ws.service.endpoint.address=http://localhost:4040/ChannelAdvis
> orAPI/v1/InventoryService.asmx, java.lang.reflect.Method=public
abstract
> com.channeladvisor.api.webservices.APIResultOfString
> com.channeladvisor.api.webservices.InventoryServiceSoap.ping(),
>
org.apache.cxf.jaxws.context.WrappedMessageContext.SCOPES={javax.xml.ws.
> service.endpoint.address=APPLICATION},
>
org.apache.cxf.message.Message.ENDPOINT_ADDRESS=http://localhost:4040/Ch
> annelAdvisorAPI/v1/InventoryService.asmx}
>
> Any idea what am I doing wrong?
>
> Thanks,
> Wes
>