jboss webservice 使用wsimport工具出錯
javax.xml.ws.WebServiceException: No Content-type in the header!
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:163)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.client.Stub.process(Stub.java:248)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
at $Proxy31.getOrder(Unknown Source)
at junit.test.WSTest.getOderTest(WSTest.java:31)
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:597)
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)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
解決如下:
Well, we had this interesting problem yesterday, very simple to fix as soon as we figured out where it came from. So this post is more a reminder for myself than to enlighten the world.
The scenario was as follows, we had developed a web service endpoint that was running on a JBoss 5. It was developed by using Jax-ws, and we also generated a client with wsimport.
It worked nicelly for two of us, but when a third developer was running the same web service with the same client on his machine (his own JBoss), we ran into the following exception:
javax.xml.ws.WebServiceException: No Content-type in the header!
Because we had the same version of the JBoss, we thought at first that this had to do with our client. But after some testing and googling, we found that it was on the JBoss side and that the following libraries (found in JBOSS_HOME/common/lib) had to be moved to the endorsed folder (JBOSS_HOME/lib/endorsed).
jbossws-native-jaxrpc.jar
jbossws-native-jaxws.jar
jbossws-native-jaxws-ext.jar
jbossws-native-saaj.jar
Well, well it’s not easy being a developer.
===================================
Thank you so much!
I never would have figured this one out on my own and it was driving me nuts.
I’m still stuck on JBoss 4.2.3, but the problem and solution are the same except that I had to copy from JBOSS_HOME/server/default/lib/ to JBOSS_HOME/lib/endorsed.
相關文章
- JBoss和WebService的問題Web
- jboss3.0.3釋出錯誤???S3
- Servlet訪問WebService出現錯誤ServletWeb
- 菜鳥調錯(三)——Jboss與jdk版本不相容導致WebService呼叫出錯JDKWeb
- 除錯WebService除錯Web
- jboss+mysql+hibernate 出現錯誤!!!!!!!MySql
- interest.ear 在jboss部署時出錯REST
- 使用services.xml檔案釋出WebServiceXMLWeb
- 在eclipse下使用jboss時的除錯Eclipse除錯
- 使用maven向jboss釋出war方法總結Maven
- C#釋出WebServiceC#Web
- jbuilder + jboss 應用EJB時出錯(調好很長時間了老出錯,鬱悶!_!)UI
- JBOSS遇到‘jboss.mq:service=DestinationManager’報錯MQ
- 關於jboss-3.0.8_tomcat-4.1.24開發webservice得問題TomcatWeb
- 使用JBoss部署實體Bean,資料庫是oracle9i,出現錯誤,求助!!!Bean資料庫Oracle
- 介紹觀察Jboss的工具
- 【原創】WebService大講堂之Axis2(3):使用services.xml檔案釋出WebServiceWebXML
- 關於jboss下部署webservice而出現資料庫down掉的問題Web資料庫
- 第一次接觸jboss,執行例子出錯,鬱悶,求教
- 求助:SimpleJdonFrameworkTest+JBOSS配置,執行出錯。banq老師幫忙看看Framework
- 使用Navicat for Oracle工具連線oracle出錯:ORA-12737Oracle
- WebService的概念和基本使用Web
- WebService共享資料的使用Web
- JBoss Data Grid 6釋出
- jboss釋出目錄問題?
- 使用 gdb 工具除錯 Go除錯Go
- 在JBoss中部署了一個EJB,除錯出現如下錯誤,大概會是什麼原因?除錯
- 同一個EAR程式在不同平臺JBoss3.22上部署出錯。S3
- 十九、.net core使用SoapCore開發webservice介面,以及使用HttpClientFactory動態訪問webservice介面WebHTTPclient
- webservice返回DataTable報錯無法序列化Web
- 使用HttpClient時出錯NoClassDefFoundErrorHTTPclientError
- RPC使用 IE出錯RPC
- 菜鳥調錯(一)——Maven專案部署到Jboss出現:Failed to create a new SAX parserMavenAI
- axis2 WebService的釋出與呼叫Web
- 如何將多個SessionBean釋出為WebServiceSessionBeanWeb
- jdon框架在jboss中執行有時時出現出現錯誤,是什麼原因,如何處理框架
- jivejdon3在jboss下執行錯誤
- C# WebService返回引數為DataTable報錯“XML文件有錯誤”C#WebXML