wood burning stoves 2.0*
The moose likes Web Services and the fly likes Error while calling maven based Apache cxf webservice deployed in jboss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error while calling maven based Apache cxf webservice deployed in jboss" Watch "Error while calling maven based Apache cxf webservice deployed in jboss" New topic
Author

Error while calling maven based Apache cxf webservice deployed in jboss

Jasi Ambalangadan
Greenhorn

Joined: Oct 15, 2008
Posts: 6
I am getting the following Error while calling the web service from client.

INFO: Inbound Message
----------------------------
ID: 1
Address: http://localhost:8080/prismWebService/services/MiRevWebServiceImplPort
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml; charset=UTF-8
Headers: {Accept=[*/*], cache-control=[no-cache], connection=[keep-alive], Content-Length=[229], content-type=[text/xml; charset=UTF-8], host=[localhost:8080], pragma=[no-cache], SOAPAction=[""], user-agent=[Apache CXF 2.5.4]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:accountProfile xmlns:ns2="http://webservices.mirev.zafinlabs.com/"><arg0>accountProfile</arg0></ns2:accountProfile></soap:Body></soap:Envelope>
--------------------------------------
10:13:00,361 ERROR [STDERR] 21 Nov, 2012 10:13:00 AM org.apache.cxf.services.MiRevWebServiceImplService.MiRevWebServiceImplPort.MiRevWebService
INFO: Outbound Message
---------------------------
ID: 1
Encoding: UTF-8
Content-Type: text/xml
Headers: {}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:accountProfileResponse xmlns:ns2="http://webservices.mirev.zafinlabs.com/"><return>DONE.</return></ns2:accountProfileResponse></soap:Body></soap:Envelope>
--------------------------------------



I USE THE FOLLOWING CODE AS CLIENT
===========================
package com.zafinlabs.mirev.webservices;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;

/**
* This class was generated by Apache CXF 2.5.4
* 2012-11-20T17:30:28.125+05:30
* Generated source version: 2.5.4
*
*/
public class MiRevWebServiceClient {

public static void main(String[] args) throws Exception {
QName serviceName = new QName("http://webservices.mirev.zafinlabs.com/", "MiRevWebServiceImplService");
QName portName = new QName("http://webservices.mirev.zafinlabs.com/", "MiRevWebServiceImplPort");

Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
"http://localhost:8080/prismWebService/services/MiRevWebServiceImplPort");
com.zafinlabs.mirev.webservices.MiRevWebService client = service.getPort(portName, com.zafinlabs.mirev.webservices.MiRevWebService.class);

client.accountProfile("accountProfile");
// Insert code to invoke methods on the client here
}

}


THE FOLLOWING IS THE WSDL FILE
=======================
<wsdl:definitions xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://webservices.mirev.zafinlabs.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MiRevWebServiceImplService" targetNamespace="http://webservices.mirev.zafinlabs.com/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://webservices.mirev.zafinlabs.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<import namespace="http://webservices.mirev.zafinlabs.com/" schemaLocation="http://localhost:8080/prismWebService/services/MiRevWebServiceImplPort?xsd=mirevwebserviceimpl_schema1.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="accountProfile">
<wsdl:part element="tns:accountProfile" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="accountProfileResponse">
<wsdl:part element="tns:accountProfileResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:portType name="MiRevWebService">
<wsdlperation name="accountProfile">
<wsdl:input message="tns:accountProfile" name="accountProfile"></wsdl:input>
<wsdlutput message="tns:accountProfileResponse" name="accountProfileResponse"></wsdlutput>
</wsdlperation>
</wsdl:portType>
<wsdl:binding name="MiRevWebServiceImplServiceSoapBinding" type="tns:MiRevWebService">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="accountProfile">
<soap12peration soapAction="" style="document"/>
<wsdl:input name="accountProfile">
<soap12:body use="literal"/>
</wsdl:input>
<wsdlutput name="accountProfileResponse">
<soap12:body use="literal"/>
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="MiRevWebServiceImplService">
<wsdl:port binding="tns:MiRevWebServiceImplServiceSoapBinding" name="MiRevWebServiceImplPort">
<soap12:address location="http://localhost:8080/prismWebService/services/MiRevWebServiceImplPort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while calling maven based Apache cxf webservice deployed in jboss