בעיה עם WEBSERVICE על JBOSS

TerminalFrost

New member
בעיה עם WEBSERVICE על JBOSS

Hi all I'm trying to deploy a SOAP web service on a JBOSS 4.0.5, with no success. Actually I believe the deploy part went fine, but I can't make successful executions. This is how I try to invoke the web service method (taken from JBOSS docs): MessageFactory mf = MessageFactory.newInstance(); SOAPMessage reqMsg = mf.createMessage(); String TARGET_NAMESPACE = "http://org.jboss.ws/samples/docstyle/wrapped/types"; String TARGET_ENDPOINT = "http://localhost:8080/JobCreator/JobCreatorService"; String request = "<tns:executeCommand xmlns:tns='" + TARGET_NAMESPACE + "'>" + " <String_1>Kermit</String_1>" + " <arrayOfObject_2>Ferrari</arrayOfObject_2>" + "</tns:executeCommand>"; DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(new ByteArrayInputStream(request.getBytes())); reqMsg.getSOAPBody().addDocument(doc); SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance(); SOAPConnection con = conFactory.createConnection(); SOAPMessage resMsg = con.call(reqMsg, new URL(TARGET_ENDPOINT)); SOAPBody soapBody = resMsg.getSOAPBody(); SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next(); System.out.println(soapElement); This is the web service interface: public interface IJobCreatorService extends Remote { public Object executeCommand(String commandName, Object[] parameters) throws RemoteException; } This is the response I get: <env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Client</faultcode><faultstring>org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Not supported xsdType: anyType, hashCode=-842881210</faultstring></env:Fault> This is the bottom most cause of the exception from the JBOSS logs: Caused by: java.lang.IllegalStateException: Not supported xsdType: anyType, hashCode=-842881210 at org.jboss.xb.binding.SimpleTypeBindings.unmarshal(SimpleTypeBindings.java:940) The WSDLs were made by JBOSS' wstools script, nothing special. This is an excerpt from the WSDL describing the request and response: <schema targetNamespace='http://org.jboss.ws/samples/docstyle/wrapped/types' ...> ... <complexType name='executeCommand'> <sequence> <element name='String_1' nillable='true' type='string'/> <element maxOccurs='unbounded' minOccurs='0' name='arrayOfObject_2' nillable='true' type='ns2:Object'/> </sequence> </complexType> <complexType name='executeCommandResponse'> <sequence> <element name='result' nillable='true' type='ns2:Object'/> </sequence> </complexType> <element name='executeCommand' type='tns:executeCommand'/> <element name='executeCommandResponse' type='tns:executeCommandResponse'/> </schema> Any direction towards a solution will be very appreciated.​
 

TerminalFrost

New member
אולי זה יהיה פחות מפוקשש

I'm trying to deploy a SOAP web service on a JBOSS 4.0.5, with no success. Actually I believe the deploy part went fine, but I can't make successful executions. This is how I try to invoke the web service method (taken from JBOSS docs): MessageFactory mf = MessageFactory.newInstance(); SOAPMessage reqMsg = mf.createMessage(); String TARGET_NAMESPACE = "http://org.jboss.ws/samples/docstyle/wrapped/types"; String TARGET_ENDPOINT = "http://localhost:8080/JobCreator/JobCreatorService"; String request = "<tns:executeCommand xmlns:tns='" + TARGET_NAMESPACE + "'>" + " <String_1>Kermit</String_1>" + " <arrayOfObject_2>Ferrari</arrayOfObject_2>" + "</tns:executeCommand>"; DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(new ByteArrayInputStream(request.getBytes())); reqMsg.getSOAPBody().addDocument(doc); SOAPConnectionFactory conFactory = SOAPConnectionFactory.newInstance(); SOAPConnection con = conFactory.createConnection(); SOAPMessage resMsg = con.call(reqMsg, new URL(TARGET_ENDPOINT)); SOAPBody soapBody = resMsg.getSOAPBody(); SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next(); System.out.println(soapElement); This is the web service interface: public interface IJobCreatorService extends Remote { public Object executeCommand(String commandName, Object[] parameters) throws RemoteException; } This is the response I get: <env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <faultcode>env:Client</faultcode> <faultstring> org.jboss.ws.binding.BindingException: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: Not supported xsdType: anyType, hashCode=-842881210 </faultstring> </env:Fault> This is the bottom most cause of the exception from the JBOSS logs: Caused by: java.lang.IllegalStateException: Not supported xsdType: anyType, hashCode=-842881210 at org.jboss.xb.binding.SimpleTypeBindings.unmarshal(SimpleTypeBindings.java:940) The WSDLs were made by JBOSS' wstools script, nothing special. This is an excerpt from the WSDL describing the request and response: <schema targetNamespace='http://org.jboss.ws/samples/docstyle/wrapped/types' ...> ... <complexType name='executeCommand'> <sequence> <element name='String_1' nillable='true' type='string'/> <element maxOccurs='unbounded' minOccurs='0' name='arrayOfObject_2' nillable='true' type='ns2:Object'/> </sequence> </complexType> <complexType name='executeCommandResponse'> <sequence> <element name='result' nillable='true' type='ns2:Object'/> </sequence> </complexType> <element name='executeCommand' type='tns:executeCommand'/> <element name='executeCommandResponse' type='tns:executeCommandResponse'/> </schema>​
 
למעלה