undeclared namespace for webservice ...

1
Hi, I am calling a webservice. where I have to build a string in XML format using a XSD. The xsd for generating the payload has a target namespace. When I call the webservice I get the following error: Caused by: Undeclared namespace prefix "xsi" (for attribute "type") at [row,col {unknown-source}]: [1,158] at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:605) at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:473) at com.ctc.wstx.sr.NsAttributeCollector.resolveNamespaces(NsAttributeCollector.java:179) at com.ctc.wstx.sr.NsInputElementStack.resolveAndValidateElement(NsInputElementStack.java:374) at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2945) at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2846) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019) at com.sun.xml.ws.util.xml.XMLStreamReaderToXMLStreamWriter.bridge(XMLStreamReaderToXMLStreamWriter.java:140) at com.sun.xml.ws.message.stream.StreamMessage.writePayloadTo(StreamMessage.java:313) at com.sun.xml.ws.message.stream.PayloadStreamReaderMessage.writePayloadTo(PayloadStreamReaderMessage.java:113) at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:147) at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:113) at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:282) at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:258) at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:184) at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:137) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482) at com.sun.xml.ws.client.Stub.process(Stub.java:323) at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:192) at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:218) at nB$2.a(SourceFile:322) at nB$2.run(SourceFile:300) at java.security.AccessController.doPrivileged(Native Method) at nB.a(SourceFile:289) at nB.a(SourceFile:140) at com.mendix.modules.webservices.WebserviceModule.callWebservice(SourceFile:231) at lv.a(SourceFile:87) at mx.a(SourceFile:72) at mw.a(SourceFile:151) at mw.executeAction(SourceFile:98) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:457) at hE.b(SourceFile:207) at com.mendix.core.Core.executeSync(SourceFile:203) at lo.a(SourceFile:60) at mx.a(SourceFile:72) at mw.a(SourceFile:151) at mw.executeAction(SourceFile:98) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:457) at hE.b(SourceFile:207) at com.mendix.core.Core.execute(SourceFile:226) at gp.execute(SourceFile:186) at jd.a(SourceFile:319) at com.mendix.externalinterface.connector.RequestDispatching$Worker.a(SourceFile:170) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.a(SourceFile:161) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.apply(SourceFile:160) at akka.actor.Actor$class.apply(Actor.scala:545) at com.mendix.externalinterface.connector.RequestDispatching$Worker.apply(SourceFile:156) at akka.actor.LocalActorRef.invoke(ActorRef.scala:910) at akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25) at akka.dispatch.ExecutableMailbox$class.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:223) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:123) at akka.dispatch.ExecutableMailbox$class.run(ExecutorBasedEventDrivenDispatcher.scala:195) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.run(ExecutorBasedEventDrivenDispatcher.scala:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) at akka.dispatch.MonitorableThread.run(ThreadPoolBuilder.scala:192) I tried calling with a custom body but here I got the error: XML tag is not allowed by the Specs. Anybody a clue?
asked
1 answers
0

It sounds as if the xsd you have is not correct but this should give you an error when you import it rather then when you call it. Could you show us the xsd?

answered