• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Error while calling maven based Apache cxf webservice deployed in jboss

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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">
<wsdl:operation name="accountProfile">
<wsdl:input message="tns:accountProfile" name="accountProfile"></wsdl:input>
<wsdl:output message="tns:accountProfileResponse" name="accountProfileResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MiRevWebServiceImplServiceSoapBinding" type="tns:MiRevWebService">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>;
<wsdl:operation name="accountProfile">
<soap12:operation soapAction="" style="document"/>
<wsdl:input name="accountProfile">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="accountProfileResponse">
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</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>
 
Can you hear that? That's my theme music. I don't know where it comes from. Check under this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic