[JBossWS] - ClassNotFoundException and a generated __JBossWS_... class
by jimmycallaghan
We're deploying a JBoss WS application and getting a nasty error:
| 13:24:34,303 ERROR [AbstractServlet] Error processing web service request
| javax.xml.rpc.JAXRPCException: org.jboss.ws.binding.BindingException: javax.xml.bind.MarshalException: java.lang.ClassNotFoundException: com.telrock.mint.business.ejb3.webservice.__JBossWS_MintService_MintPort_getSummary
| at org.jboss.ws.soap.SOAPContentElement.getXMLFragment(SOAPContentElement.java:187)
| at org.jboss.ws.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:844)
| at org.jboss.ws.soap.SOAPContentElement.getChildNodes(SOAPContentElement.java:761)
| at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:211)
| ...
| ...
|
| Caused by: org.jboss.ws.binding.BindingException: javax.xml.bind.MarshalException: java.lang.ClassNotFoundException: com.telrock.mint.business.ejb3.webservice.__JBossWS_MintService_MintPort_getSummary
| at org.jboss.ws.jaxrpc.encoding.JAXBSerializer.serialize(JAXBSerializer.java:112)
| at org.jboss.ws.soap.SOAPContentElement.getXMLFragment(SOAPContentElement.java:172)
| ... 30 more
| Caused by: javax.xml.bind.MarshalException: java.lang.ClassNotFoundException: com.telrock.mint.business.ejb3.webservice.__JBossWS_MintService_MintPort_getSummary
| at org.jboss.ws.jaxb.JAXBMarshallerImpl.marshal(JAXBMarshallerImpl.java:181)
| at org.jboss.ws.jaxrpc.encoding.JAXBSerializer.serialize(JAXBSerializer.java:100)
| ... 31 more
| Caused by: java.lang.ClassNotFoundException: com.telrock.mint.business.ejb3.webservice.__JBossWS_MintService_MintPort_getSummary
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
| at org.jboss.ws.utils.JavaUtils.loadJavaType(JavaUtils.java:81)
| at org.jboss.ws.jaxb.JAXBMarshallerImpl.marshal(JAXBMarshallerImpl.java:126)
|
There is nothing special about the code and we're not trying to use an isolated classloader or anything. When the relevant classes are included as a stand alone application everything works OK. When we deploy the exact same classes with the main project we get this error.
The client code was generated in Eclipse from the WSDL URL that was provided by JBoss on deploying the application. I've added a classloader log and I can't find any mention of the __JBoss...getSummary class however I do find a __JBoss...getSummaryBeanInfo class.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025380#4025380
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025380
17 years, 9 months
[JBossWS] - How do I use enumerations?
by teknokrat
I am on jboss 4.0.5. In my wsdl I have
| <s:simpleType name="States">
| <s:restriction base="s:string">
| <s:enumeration value="Initial"/>
| <s:enumeration value="Failed"/>
| <s:enumeration value="Placed"/>
| <s:enumeration value="Rejected"/>
| </s:restriction>
| </s:simpleType>
|
wscompile does not create a States.java class. When I make a call that uses this type I get
| Caused by: javax.xml.soap.SOAPException: Could not transmit message
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:204)
| at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:687)
| ... 66 more
| Caused by: javax.xml.rpc.JAXRPCException: org.jboss.xb.binding.JBossXBRuntimeException: Failed to find neither value() nor getValue() in class java.lang.String which is bound to enumeration type {com.abc}States
| at org.jboss.ws.soap.SOAPContentElement.write(SOAPContentElement.java:986)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:171)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:184)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:184)
| at org.jboss.ws.soap.SAAJElementWriter.printInternal(SAAJElementWriter.java:163)
| at org.jboss.ws.soap.SAAJElementWriter.print(SAAJElementWriter.java:142)
| at org.jboss.ws.soap.SAAJElementWriter.printSOAPElement(SAAJElementWriter.java:91)
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:177)
| ... 67 more
|
|
What am I doing wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025196#4025196
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025196
17 years, 9 months
[JBossWS] - Re: web service and asynchronous processing
by vitor_b
Hello
Thank you for your reply, but unfortunately there are some things i don't understand. Could you clarify these for me please?
We have Message Addressing Properties:
<wsa:To>xs:anyURI</wsa:To> ?
| <wsa:From>wsa:EndpointReferenceType</wsa:From> ?
| <wsa:ReplyTo>wsa:EndpointReferenceType</wsa:ReplyTo> ?
| <wsa:FaultTo>wsa:EndpointReferenceType</wsa:FaultTo> ?
| <wsa:Action>xs:anyURI</wsa:Action>
| <wsa:MessageID>xs:anyURI</wsa:MessageID> ?
| <wsa:RelatesTo RelationshipType="xs:anyURI"?>xs:anyURI</wsa:RelatesTo> *
| <wsa:ReferenceParameters>xs:any*</wsa:ReferenceParameters> ?
where EndpointReferenceType means:
<wsa:EndpointReference>
| <wsa:Address>xs:anyURI</wsa:Address>
| <wsa:ReferenceParameters>xs:any*</wsa:ReferenceParameters> ?
| <wsa:Metadata>xs:any*</wsa:Metadata>?
| </wsa:EndpointReference>
That is ok, but there is on the page
http://jbws.dyndns.org/mediawiki/index.php/JAX-WS_User_Guide#WS-Addressing
something like this:
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
|
| <handler-chain>
| <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
| <handler>
| <handler-name>Application Server Handler</handler-name>
| <handler-class>org.jboss.test.ws.jaxws.samples.wsaddressing.ServerHandler</handler-class>
| </handler>
| </handler-chain>
|
| </handler-chains>
At this point i have some questions:
1. in which file should i put handler-chains element?
2. What does element handler-class contain? What is this class? Does this class is able to read SOAPMessage? I think i should i think write this class myself, but what is the contract for writing this class? What interface should it implement? SOAPHandler? Do i have to implement logic which will take info from soap message header?
3. I think these properties are handled automatically, this means webservice will send reply to adderss taken from element: wsa:ReplyTo, and i don't need to do anything in order to get this done. Am i right?
4. If 3 is true, that means that message addressing properties don't support property i need. Client should have entry point which will accept soap message sent by server after message from queue is processed. But this entry point will not be any identified by message addressing properties received in request
.................request......................................RequestObject
Client -------------------------> WebService ---------------
Client <------------------------- WebService ..................|
............ConfirmationObject........................................v
............................................................................Queue
...................................................................................|
...................SOAPMessage.........................................|
Client (EP) <------------------- SessionBean <-----------
Client (EP) --------------------> SessionBean
. (dot) - only used as a spaces, to format this message
EP - this should be a client entry point, where all results after processing objects from queue will be sent. There won't be address of this EP in the request.
Any help will be appreciated.
cheers
vitor_b
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025145#4025145
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025145
17 years, 9 months