More details can be found on my question 
http://stackoverflow.com/questions/7001202/hand-crafted-wsdl-from-xsd-fails-in-cxf-the-namespace-on-the-queryresponse-ele/7007328#7007328
StackOverflow Question
(http://stackoverflow.com/questions/7001202/hand-crafted-wsdl-from-xsd-fails-in-cxf-the-namespace-on-the-queryresponse-ele/7007328#7007328).

I have to create a WSDL for a service that has none, as the vendor didn't
feel like providing it at the time, and now have no official WSDl for their
service.  It is SOAP-like, in that you still compose an XML message at a
couple endpoints and wrap it in a SOAP envelope, but they only provide the
XSD to mock up the content body of the SOAP message. 

So, simple enough, I thought I might be able to create a WSDL for it and use
CXF to handle the generation of the code to marshal the message and call the
service.  Things seem to be okay as far as generation goes (my WSDl does
generate code, and it references the XSD to create POJO's for the various
XML elements I wnat to send through...I think), but when I call the service
in a test, I get this error:

Running com.alliantenergy.emo.dart.cxf.MISORequestTest
Aug 10, 2011 9:00:36 AM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service {http://service.something.net/xml}MYService from
WSDL: file:/C:/mydocs/Work/project/my-service.wsdl
Aug 10, 2011 9:00:51 AM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNING: Interceptor for
{http://service.something.net/xml}QueryService#{http://service.something.net/xml}QueryRequest
has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: "http://service.something.net/xml";,
the namespace on the "QueryResponse" element, is not a valid SOAP version.
        at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:115)
        at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:141)
        at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1582)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)
        at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
        at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
        at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295)
        at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
        at $Proxy36.queryRequest(Unknown Source)
        at klauer.test.TestService(TestService.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 21.421 sec
<<< FAILURE!
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)

Results :
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)

        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)




I have a gist created(https://gist.github.com/1134842) that shows what my
WSDL looks like, but I don't know what is wrong with the WSDL.  I was hoping
this would be possible to do (and the vendor says that other users have done
this same thing), but currently I don't get what I'm supposed to change or
what is wrong with the WSDL that could be saying my namespacing is incorrect
for the Response object.



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Error-in-calling-WSDL-service-org-apache-cxf-binding-soap-SoapFault-http-service-something-net-xml-t-tp4685940p4685940.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to