[jboss-user] [JBossWS] - Bug? operations from doc-literal BARE to WRAPPED

bocio do-not-reply at jboss.com
Wed Feb 14 14:21:29 EST 2007


Hi all,
I'm completely stuck on this, please could you confirm thsi is a bug or where I'm wrong?
I'm using JBossWS1.0.4 as client of an Axis2 service. Until now everything was ok, then...
I removed two methods from a working POJO class exposed as WS and I started getting a ClassCastException at runtime on my JBoss JSR109 client side calling the remaining methods. Suddendly all my operations are seen as "doc-literal wrapped"

For example:

  |   public String getConfigurationFile ()
  |   {
  |     return "abracadabra";
  |   }
  | 

This is the Exception trace:


  | 2007-02-14 15:17:04,896 TRACE [jbossws.SOAPMessage] Incoming Response SOAPMessage
  | <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
  |  <soapenv:Header/>
  |  <soapenv:Body>
  |   <ns:getConfigurationFileResponse xmlns:ns='http://neo.spectre.com/xsd'>
  |    <ns:_return>abracadabra</ns:_return>
  |   </ns:getConfigurationFileResponse>
  |  </soapenv:Body>
  | </soapenv:Envelope>
  | 2007-02-14 15:17:04,896 DEBUG [org.jboss.ws.common.CommonSOAPBinding] unbindResponseMessage: {http://neo.spectre.com}getConfigurationFile
  | 2007-02-14 15:17:04,912 DEBUG [org.jboss.ws.binding.EndpointInvocation] setReturnValue: org.jboss.ws.soap.SOAPBodyElementDoc
  | 2007-02-14 15:17:04,912 DEBUG [org.jboss.ws.binding.EndpointInvocation] getReturnValue
  | 2007-02-14 15:17:04,912 DEBUG [org.jboss.ws.soap.SOAPContentElement] getObjectValue [xmlType={http://neo.spectre.com/xsd}>getConfigurationFileResponse,javaType=class com.spectre.neo.GetConfigurationFileResponse]
  | 2007-02-14 15:17:04,912 DEBUG [org.jboss.ws.jbossxb.JBossXBDeserializer] deserialize: [xmlName={http://neo.spectre.com/xsd}getConfigurationFileResponse,xmlType={http://neo.spectre.com/xsd}>getConfigurationFileResponse]
  | 2007-02-14 15:17:04,928 DEBUG [org.jboss.ws.jbossxb.JBossXBDeserializer] deserialized: com.spectre.neo.GetConfigurationFileResponse
  | 2007-02-14 15:17:04,928 DEBUG [org.jboss.ws.soap.SOAPContentElement] objectValue: com.spectre.neo.GetConfigurationFileResponse
  | 2007-02-14 15:17:04,928 DEBUG [org.jboss.ws.binding.EndpointInvocation] transformPayloadValue: org.jboss.ws.soap.SOAPBodyElementDoc -> com.spectre.neo.GetConfigurationFileResponse
  | 2007-02-14 15:17:04,928 DEBUG [org.jboss.ws.jaxrpc.ParameterWrapping] unwrapResponseParameter: com.spectre.neo.GetConfigurationFileResponse
  | 2007-02-14 15:17:04,928 DEBUG [org.jboss.ws.jaxrpc.ParameterWrapping]  get_return: java.lang.String
  | 2007-02-14 15:17:04,928 DEBUG [org.jboss.ws.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.jaxrpc.handler.SOAPMessageContextJAXRPC at 1f7be7b
  | 2007-02-14 15:17:04,928 ERROR [com.spectre.web.neo.FrontController] Command execute exception
  | java.lang.ClassCastException: java.lang.String
  | 	at $Proxy56.getConfigurationFile(Unknown Source)
  | 	at com.spectre.web.neo.adapter.ConfigurationFileAdapter.getData(ConfigurationFileAdapter.java:35)
  | 	at com.spectre.web.neo.commands.FileConfigCommand.execute(FileConfigCommand.java:46)
  | 	at com.spectre.web.neo.FrontController.processRequest(FrontController.java:107)
  | 	at com.spectre.web.neo.FrontController.doGet(FrontController.java:66)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | 	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  | 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  | 	at java.lang.Thread.run(Thread.java:595)
  | 

I enabled JBossWS logs and I started digging...

If I insert again the two methods in my POJO WS and I generate again WSDL and client artifacts, this is the happy day scenario:


  | 2007-02-14 15:56:45,897 TRACE [jbossws.SOAPMessage] Incoming Response SOAPMessage
  | <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
  |  <soapenv:Header/>
  |  <soapenv:Body>
  |   <ns:getConfigurationFileResponse xmlns:ns='http://neo.spectre.com/xsd'>
  |    <ns:_return>abracadabra</ns:_return>
  |   </ns:getConfigurationFileResponse>
  |  </soapenv:Body>
  | </soapenv:Envelope>
  | 2007-02-14 15:56:45,897 DEBUG [org.jboss.ws.common.CommonSOAPBinding] unbindResponseMessage: {http://neo.spectre.com}getConfigurationFile
  | 2007-02-14 15:56:45,897 DEBUG [org.jboss.ws.binding.EndpointInvocation] setReturnValue: org.jboss.ws.soap.SOAPBodyElementDoc
  | 2007-02-14 15:56:45,897 DEBUG [org.jboss.ws.binding.EndpointInvocation] getReturnValue
  | 2007-02-14 15:56:45,897 DEBUG [org.jboss.ws.soap.SOAPContentElement] getObjectValue [xmlType={http://neo.spectre.com/xsd}>getConfigurationFileResponse,javaType=class com.spectre.neo.GetConfigurationFileResponse]
  | 2007-02-14 15:56:45,897 DEBUG [org.jboss.ws.jbossxb.JBossXBDeserializer] deserialize: [xmlName={http://neo.spectre.com/xsd}getConfigurationFileResponse,xmlType={http://neo.spectre.com/xsd}>getConfigurationFileResponse]
  | 2007-02-14 15:56:45,912 DEBUG [org.jboss.ws.jbossxb.JBossXBDeserializer] deserialized: com.spectre.neo.GetConfigurationFileResponse
  | 2007-02-14 15:56:45,912 DEBUG [org.jboss.ws.soap.SOAPContentElement] objectValue: com.spectre.neo.GetConfigurationFileResponse
  | 2007-02-14 15:56:45,912 DEBUG [org.jboss.ws.binding.EndpointInvocation] transformPayloadValue: org.jboss.ws.soap.SOAPBodyElementDoc -> com.spectre.neo.GetConfigurationFileResponse
  | 2007-02-14 15:56:45,912 DEBUG [org.jboss.ws.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.jaxrpc.handler.SOAPMessageContextJAXRPC at 126b165
  | 2007-02-14 15:56:45,912 DEBUG [com.spectre.web.neo.adapter.ConfigurationFileAdapter] reply: abracadabra
  | 

I compared the two WSDL before and after the two method inserted and nothing is changed for the getConfigurationFile() method. (I can post them, if needed).
Looking into the JBoss logs I discovered that on the correct scenario all operations are seen as doc-literal BARE



  | OperationMetaData:
  |  qname={http://neo.spectre.com}getConfigurationFile
  |  javaName=getConfigurationFile
  |  style=document/literal/BARE
  |  oneWay=false
  |  soapAction=urn:getConfigurationFile
  | ReturnMetaData:
  |  xmlName={http://neo.spectre.com/xsd}getConfigurationFileResponse
  |  xmlType={http://neo.spectre.com/xsd}>getConfigurationFileResponse
  |  javaType=com.spectre.neo.GetConfigurationFileResponse
  |  mode=OUT
  |  inHeader=false
  |  wrappedVariables=[]
  |  wrappedTypes=[]
  |  wrappedElementNames=[]

When I'm getting thw ClassCastException the same operation is seen as doc-literal WRAPPED:


  | OperationMetaData:
  |  qname={http://neo.spectre.com}getConfigurationFile
  |  javaName=getConfigurationFile
  |  style=document/literal/WRAPPED
  |  oneWay=false
  |  soapAction=urn:getConfigurationFile
  | ReturnMetaData:
  |  xmlName={http://neo.spectre.com/xsd}getConfigurationFileResponse
  |  xmlType={http://neo.spectre.com/xsd}>getConfigurationFileResponse
  |  javaType=com.spectre.neo.GetConfigurationFileResponse
  |  mode=OUT
  |  inHeader=false
  |  wrappedVariables=[_return]
  |  wrappedTypes=[]
  |  wrappedElementNames=[]
  | 

thank you in advance



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016547#4016547

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016547



More information about the jboss-user mailing list