I'm trying to create a MTOM based client, I used the wsdl generation
technique with jaxb as the binding technique (xmlbean as a binding threw
"java.lang.NullPointerException

        at
org.apache.xmlbeans.impl.common.QNameHelper.hexsafedir(QNameHelper.java:
176))"

 

The sample code I have builds a Axiom tree and passes an OMElement to
MtomRequest.setElement().  I have the following in my imports 

 

import org.apache.axiom.om.*;

import org.apache.axiom.soap.SOAP11Constants;

 

(Yes I know it sounds crazy but for some reason this service sends xml
back and forth via Mtom ...)

 

Any Help would be great

 

- Jim

 

org.codehaus.xfire.XFireRuntimeException: Could not invoke service..
Nested exception is org.codehaus.xfire.fault.XFireFault: Could not
marshall type.

org.codehaus.xfire.fault.XFireFault: Could not marshall type.

            at
org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:258)

            at
org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindin
gProvider.java:222)

            at
org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(Abstra
ctBinding.java:273)

            at
org.codehaus.xfire.service.binding.DocumentBinding.writeMessage(Document
Binding.java:65)

            at
org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:
80)

            at
org.codehaus.xfire.util.OutMessageDataSource.createInputStream(OutMessag
eDataSource.java:92)

            at
org.codehaus.xfire.util.OutMessageDataSource.<init>(OutMessageDataSource
.java:37)

            at
org.codehaus.xfire.transport.http.CommonsHttpMessageSender.open(CommonsH
ttpMessageSender.java:155)

            at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.
java:121)

            at
org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)

            at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java
:26)

            at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1
31)

            at
org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)

            at org.codehaus.xfire.client.Client.invoke(Client.java:335)

            at
org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)

            at
org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)

            at $Proxy13.doStructuredSearch(Unknown Source)

            at qa.LEXSServiceClient.main(LEXSServiceClient.java:224)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

            at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

            at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

            at java.lang.reflect.Method.invoke(Method.java:585)

            at
com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Caused by: javax.xml.bind.MarshalException

 - with linked exception:

[javax.xml.bind.JAXBException:
org.apache.axiom.om.impl.llom.OMElementImpl nor any of its super class
is known to this context]

            at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:295
)

            at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
21)

            at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
Impl.java:70)

            at
org.codehaus.xfire.jaxb2.JaxbType.writeObject(JaxbType.java:249)

            ... 22 more

Caused by: javax.xml.bind.JAXBException:
org.apache.axiom.om.impl.llom.OMElementImpl nor any of its super class
is known to this context

            at
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java
:223)

            at
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java
:238)

            at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.j
ava:587)

            at
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serialize
Body(SingleElementNodeProperty.java:114)

            at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInf
oImpl.java:293)

            at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializ
er.java:532)

            at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInf
oImpl.java:283)

            at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java
:461)

            at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:292
)

            ... 25 more

Caused by: javax.xml.bind.JAXBException:
org.apache.axiom.om.impl.llom.OMElementImpl nor any of its super class
is known to this context

            at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.
java:480)

            at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.j
ava:582)

            ... 31 more

Reply via email to