Hi , I'm new to Web services. I'm trying to call a web service which is running in Jboss-4.0.2. I'm returning Data Object from Web service method. When I call that method, I'm getting the following error from the Standalone client. Please help me to find out the solution for this.
Console anonymous wrote : | | ulr :: http://T5-1FB-140531:8080/csda/csda/AcceptRequest?wsdl | Contacting webservice at http://T5-1FB-140531:8080/csda/csda/AcceptRequest?wsdl | New approach | log4j:WARN No appenders could be found for logger (org.jboss.webservice.EngineConfigurationFinder). | log4j:WARN Please initialize the log4j system properly. | AxisFault | faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client | faultSubcode: | faultString: Deserializing parameter 'getMetaData': could not find deserializer for type {http://com.test.csda.imaging/ws_acceptrequest/types}getMetaData | faultActor: | faultNode: | faultDetail: | | org.jboss.axis.AxisFault: Deserializing parameter 'getMetaData': could not find deserializer for type {http://com.test.csda.imaging/ws_acceptrequest/types}getMetaData | at org.jboss.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:303) | at org.jboss.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:142) | at org.jboss.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1249) | at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) | at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) | at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) | at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) | at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) | at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) | at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) | at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) | at javax.xml.parsers.SAXParser.parse(Unknown Source) | at org.jboss.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:257) | at org.jboss.axis.MessagePart.getAsSOAPEnvelope(MessagePart.java:684) | at org.jboss.axis.Message.getSOAPEnvelope(Message.java:428) | at org.jboss.axis.client.Call.invokeEngine(Call.java:3077) | at org.jboss.axis.client.Call.invoke(Call.java:3039) | at org.jboss.axis.client.Call.invoke(Call.java:2629) | at org.jboss.axis.client.Call.invoke(Call.java:2538) | at org.jboss.axis.client.Call.invokeInternal(Call.java:1976) | at org.jboss.axis.client.Call.invoke(Call.java:1914) | at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265) | at com.test.csda.imaging.client.CSDAAcceptRequestWsClient.doProcess(CSDAAcceptRequestWsClient.java:87) | at com.test.csda.imaging.client.CSDAAcceptRequestWsClient.main(CSDAAcceptRequestWsClient.java:39) | Exception in thread "main" | | Client anonymous wrote : | | | /* | * Created on Jul 21, 2005 | * | * TODO To change the template for this generated file go to | * Window - Preferences - Java - Code Style - Code Templates | */ | package com.test.csda.imaging.client; | | | import java.net.URL; | import java.net.URLClassLoader; | | import javax.xml.namespace.QName; | import javax.xml.rpc.Service; | import javax.xml.rpc.ServiceFactory; | import org.jboss.webservice.client.ServiceFactoryImpl; | import javax.naming.*; | import java.util.*; | import javax.xml.rpc.Service; | import javax.xml.rpc.ServiceException; | | | import com.test.csda.imaging.common.WebServiceDO; | import com.test.csda.imaging.ws_acceptrequest.AcceptRequest; | | import javax.xml.rpc.Call; | | | /** | * @author satya | * | * TODO To change the template for this generated type comment go to | * Window - Preferences - Java - Code Style - Code Templates | */ | public class CSDAAcceptRequestWsClient { | | public static void main(String[] args) throws Exception{ | | new CSDAAcceptRequestWsClient().doProcess(); | } | | public void doProcess() throws Exception { | | String urlstr = "http://T5-1FB-140531:8080/csda/csda/AcceptRequest?wsdl"; | | | | System.out.println("ulr :: " +urlstr); | String jobId = "A123"; | String jobtype = "JobType"; | String colorCode = "MONO"; | String grFormat = "jpeg"; | int height=123; | int width=123; | | System.out.println("Contacting webservice at " + urlstr); | URL wsdlURL = new URL(urlstr); | | String ns = "http://com.test.csda.imaging/ws_acceptrequest"; | QName qname = new QName(ns, "AcceptRequestService"); | QName port = new QName(ns, "AcceptRequestPort"); | QName operation = new QName(ns, "getMetaData"); | | //ServiceFactory factory = ServiceFactory.newInstance(); | //Service service = factory.createService(url, qname); | //Call call = (Call)service.createCall(port, "getMetaData"); | //WebServiceDO obj= (WebServiceDO)call.invoke(new Object[]{""}); | //AcceptRequest endpoint = (AcceptRequest)service.getPort(AcceptRequest.class); | //Call call = service.createCall(port, operation); | | //WebServiceDO obj= (WebServiceDO)endpoint.getMetaData("asd"); | /* | | ServiceFactoryImpl factory1 = (ServiceFactoryImpl )ServiceFactory.newInstance(); | Service service1 = factory1.createService(urlstr, qname, ns, "AcceptRequestPort"); | */ | | //URL wsdlURL = new URL("http://localhost:8080/marketData/MarketDataWebTier?wsdl"); | //URL wsdlURL = getClass().getClassLoader().getResource("META-INF/wsdl/MarketDataWebTier.wsdl"); | URL jaxrpcURL = new URL("file:///D:/jboss4.0.2/server/csda/deploy/csda.ear/csda.jar/META-INF/mapping.xml"); | URL ws4eeURL = new URL("file:///D:/jboss4.0.2/server/csda/deploy/csda.ear/csda.jar/META-INF/ws4ee-deployment.xml"); | | System.out.println("New approach"); | ServiceFactoryImpl serviceFactory = (ServiceFactoryImpl)ServiceFactory.newInstance(); | Service service = serviceFactory.createService(wsdlURL, jaxrpcURL, ws4eeURL, qname, "AcceptRequestPort"); | Call call = (Call) service.createCall(new QName(ns, "AcceptRequestPort"), "getMetaData"); | WebServiceDO retstr = (WebServiceDO) call.invoke(new Object[]{"Hello"}); | | | } | } | | WSDL File anonymous wrote : | <?xml version="1.0" encoding="UTF-8"?> | | <definitions name="AcceptRequestService" targetNamespace="http://com.test.csda.imaging/ws_acceptrequest" xmlns:tns="http://com.test.csda.imaging/ws_acceptrequest" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://com.test.csda.imaging/ws_acceptrequest/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> | | <schema targetNamespace="http://com.test.csda.imaging/ws_acceptrequest/types" xmlns:tns="http://com.test.csda.imaging/ws_acceptrequest/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema"> | | | | | | | | | | | | | | | | | | | | | | | | <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> | | <soap:operation soapAction=""/> | | <soap:body use="literal"/> | | <soap:body use="literal"/> | | | <soap:address location="REPLACE_WITH_ACTUAL_URL"/> | | Mappings.xml anonymous wrote : | | <?xml version="1.0" encoding="UTF-8"?> | <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"> | <package-mapping> | <package-type>com.test.csda.imaging.ws_acceptrequest</package-type> | http://com.test.csda.imaging/ws_acceptrequest/types | </package-mapping> | <package-mapping> | <package-type>com.test.csda.imaging.ws_acceptrequest</package-type> | http://com.test.csda.imaging/ws_acceptrequest | </package-mapping> | <java-xml-type-mapping> | <java-type>com.test.csda.imaging.common.WebServiceDO</java-type> | <root-type-qname xmlns:typeNS="http://com.test.csda.imaging/ws_acceptrequest/types">typeNS:WebServiceDO</root-type-qname> | <qname-scope>complexType</qname-scope> | <variable-mapping> | <java-variable-name>strBookType</java-variable-name> | <xml-element-name>strBookType</xml-element-name> | </variable-mapping> | <variable-mapping> | <java-variable-name>strGraphicColorCodes</java-variable-name> | <xml-element-name>strGraphicColorCodes</xml-element-name> | </variable-mapping> | <variable-mapping> | <java-variable-name>strGraphicFormats</java-variable-name> | <xml-element-name>strGraphicFormats</xml-element-name> | </variable-mapping> | <variable-mapping> | <java-variable-name>strGraphicSizes</java-variable-name> | <xml-element-name>strGraphicSizes</xml-element-name> | </variable-mapping> | </java-xml-type-mapping> | <java-xml-type-mapping> | <java-type>com.test.csda.imaging.ws_acceptrequest.AcceptRequest_getMetaData_RequestStruct</java-type> | <root-type-qname xmlns:typeNS="http://com.test.csda.imaging/ws_acceptrequest/types">typeNS:getMetaData</root-type-qname> | <qname-scope>complexType</qname-scope> | <variable-mapping> | <java-variable-name>String_1</java-variable-name> | <xml-element-name>String_1</xml-element-name> | </variable-mapping> | </java-xml-type-mapping> | <java-xml-type-mapping> | <java-type>com.test.csda.imaging.ws_acceptrequest.AcceptRequest_getMetaData_ResponseStruct</java-type> | <root-type-qname xmlns:typeNS="http://com.test.csda.imaging/ws_acceptrequest/types">typeNS:getMetaDataResponse</root-type-qname> | <qname-scope>complexType</qname-scope> | <variable-mapping> | <java-variable-name>result</java-variable-name> | <xml-element-name>result</xml-element-name> | </variable-mapping> | </java-xml-type-mapping> | <service-interface-mapping> | <service-interface>com.test.csda.imaging.ws_acceptrequest.AcceptRequestService</service-interface> | <wsdl-service-name xmlns:serviceNS="http://com.test.csda.imaging/ws_acceptrequest">serviceNS:AcceptRequestService</wsdl-service-name> | <port-mapping> | <port-name>AcceptRequestPort</port-name> | <java-port-name>AcceptRequestPort</java-port-name> | </port-mapping> | </service-interface-mapping> | <service-endpoint-interface-mapping> | <service-endpoint-interface>com.test.csda.imaging.ws_acceptrequest.AcceptRequest</service-endpoint-interface> | <wsdl-port-type xmlns:portTypeNS="http://com.test.csda.imaging/ws_acceptrequest">portTypeNS:AcceptRequest</wsdl-port-type> | <wsdl-binding xmlns:bindingNS="http://com.test.csda.imaging/ws_acceptrequest">bindingNS:AcceptRequestBinding</wsdl-binding> | <service-endpoint-method-mapping> | <java-method-name>getMetaData</java-method-name> | <wsdl-operation>getMetaData</wsdl-operation> | <wrapped-element/> | <method-param-parts-mapping> | <param-position>0</param-position> | <param-type>java.lang.String</param-type> | <wsdl-message-mapping> | <wsdl-message xmlns:wsdlMsgNS="http://com.test.csda.imaging/ws_acceptrequest">wsdlMsgNS:AcceptRequest_getMetaData</wsdl-message> | <wsdl-message-part-name>String_1</wsdl-message-part-name> | <parameter-mode>IN</parameter-mode> | </wsdl-message-mapping> | </method-param-parts-mapping> | <wsdl-return-value-mapping> | <method-return-value>com.test.csda.imaging.common.WebServiceDO</method-return-value> | <wsdl-message xmlns:wsdlMsgNS="http://com.test.csda.imaging/ws_acceptrequest">wsdlMsgNS:AcceptRequest_getMetaDataResponse</wsdl-message> | <wsdl-message-part-name>result</wsdl-message-part-name> | </wsdl-return-value-mapping> | </service-endpoint-method-mapping> | </service-endpoint-interface-mapping> | </java-wsdl-mapping> | Web Service interface anonymous wrote : | | | package com.test.csda.imaging.ws_acceptrequest; | | import java.rmi.Remote; | import java.rmi.RemoteException; | | import com.test.csda.imaging.common.WebServiceDO; | import com.test.csda.imaging.exception.CSDAImagingException; | | | public interface AcceptRequest extends Remote { | | | public WebServiceDO getMetaData(String strJobId) throws RemoteException; | | } | | | WebService Impl Session Bean anonymous wrote : | | | | package com.test.csda.imaging.ws_acceptrequest; | | import java.rmi.RemoteException; | | import javax.ejb.EJBException; | import javax.ejb.SessionBean; | import javax.ejb.SessionContext; | | import com.test.csda.imaging.common.WebServiceDO; | public class AcceptRequestBean implements SessionBean { | | | public WebServiceDO getMetaData(String strJobId){ | | WebServiceDO objWebServiceDO =null; | objWebServiceDO =new WebServiceDO(); | objWebServiceDO .setStrBookType("booktype"); | objWebServiceDO .setStrGraphicColorCodes("Color"); | objWebServiceDO .setStrGraphicFormats("GraphicFormats"); | objWebServiceDO .setStrGraphicSizes("GraphicSizes"); | return objWebServiceDO; | } | | | /** | * Callback method called by container before the bean is swapped into memory. | */ | | public void setSessionContext(SessionContext arg0) throws EJBException, RemoteException { | } | | /** | * Callback method called by container before the bean is swapped into memory. | */ | | public void ejbCreate(){ | } | | /** | * Callback method called by container before the data removed from the memory. | */ | | public void ejbRemove(){ | } | | /** | * Callback method called by container before the bean is swapped into memory. | */ | public void ejbActivate() { | } | | /** | * Callback method called by container before the bean is swapped into memory. | */ | | public void ejbPassivate(){ | | } | } | Data Object anonymous wrote : | | | package com.test.csda.imaging.common; | | | | public class WebServiceDO { | | String strGraphicFormats = ""; | String strGraphicSizes = ""; | String strGraphicColorCodes = ""; | String strBookType =""; | | | public String getStrBookType() { | return strBookType; | } | public void setStrBookType(String strBookType) { | this.strBookType = strBookType; | } | public String getStrGraphicColorCodes() { | return strGraphicColorCodes; | } | public void setStrGraphicColorCodes(String strGraphicColorCodes) { | this.strGraphicColorCodes = strGraphicColorCodes; | } | public String getStrGraphicFormats() { | return strGraphicFormats; | } | public void setStrGraphicFormats(String strGraphicFormats) { | this.strGraphicFormats = strGraphicFormats; | } | public String getStrGraphicSizes() { | return strGraphicSizes; | } | public void setStrGraphicSizes(String strGraphicSizes) { | this.strGraphicSizes = strGraphicSizes; | } | } | | | | Please tell me whether I'm going in correct way or not. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3891749#3891749 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891749 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
