arvind narayan
2013-02-26 12:03:52 UTC
arvind narayan [https://community.jboss.org/people/arvindpratap] created the discussion
"org.jboss.ws.core.CommonSOAPFaultException: Endpoint {http://www.pruhealth.co.uk/heal/TestEJBService}PocServiceSOAP does not"
To view the discussion, visit: https://community.jboss.org/message/799595#799595
--------------------------------------------------------------
I have created a EJB project and exposed it as a webservice when I am hitting this webservice bt SOAP UI getting the below error
org.jboss.ws.core.CommonSOAPFaultException: Endpoint {http://www.pruhealth.co.uk/heal/TestEJBService}PocServiceSOAP does not
I have placed the wsdl at "/META-INF/wsdl/TestEJBService.wsdl"
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:ps=" http://www.pruhealth.co.uk/heal/TestEJBService http://www.pruhealth.co.uk/heal/TestEJBService"
xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd=" http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema"
xmlns:pos=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
targetNamespace=" http://www.pruhealth.co.uk/heal/TestEJBService http://www.pruhealth.co.uk/heal/TestEJBService"
name="TestEJBService">
<wsdl:import namespace=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
 location="PocService.xsd" />
<wsdl:message name="PocServiceInput">
 <wsdl:part name="body" element="pos:PocRequest"></wsdl:part>
</wsdl:message>
<wsdl:message name="PocServiceOutput">
 <wsdl:part name="body" element="pos:PocResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="PocServicePort">
 <wsdl:operation name="getPocDetails">
  <wsdl:input message="ps:PocServiceInput" />
  <wsdl:output message="ps:PocServiceOutput" />
 </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PocServiceSOAPBinding" type="ps:PocServicePort">
 <soap:binding style="document" transport=" http://schemas.xmlsoap.org/soap/http http://schemas.xmlsoap.org/soap/http" />
 <wsdl:operation name="getPocDetails">
  <soap:operation soapAction="" />
  <wsdl:input>
   <soap:body namespace=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
    use="literal" />
  </wsdl:input>
  <wsdl:output>
   <soap:body namespace=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
    use="literal" />
  </wsdl:output>
 </wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestEJBService">
 <wsdl:port binding="ps:PocServiceSOAPBinding" name="PocServiceSOAP">
  <soap:address location=" http://127.0.0.1:8080/TestEJBService/TestEJBService http://127.0.0.1:8080/TestEJBService/TestEJBService" />
 </wsdl:port>
</wsdl:service>
</wsdl:definitions>
===============================================================
I have imported PocService.xsd into wsdl
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:pos=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
xmlns:xs=" http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema">
<xs:element name="PocRequest">
 <xs:complexType>
  <xs:sequence>
   <xs:element name="PrincipalAmount" type="xs:integer"
    minOccurs="1" />
   <xs:element name="PrincipalRate" type="xs:float"
    minOccurs="1" />
   <xs:element name="Name" type="xs:string" minOccurs="0" />
  </xs:sequence>
 </xs:complexType>
</xs:element>
<xs:element name="PocResponse">
 <xs:complexType>
  <xs:sequence>
   <xs:element name="TotalAmount" type="xs:float" minOccurs="1" />
   <xs:element name="Name" type="xs:string" minOccurs="0" />
  </xs:sequence>
 </xs:complexType>
</xs:element>
</xs:schema>
EJB CLASS:
package uk.co.pruhealth.heal.service;
import java.math.BigInteger;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.jboss.wsf.spi.annotation.WebContext;
import uk.co.pruhealth.heal.pocservice.PocRequest;
import uk.co.pruhealth.heal.pocservice.PocResponse;
@Stateless
@WebContext(contextRoot="TestEJBService", urlPattern="/TestEJBService")
@WebService(serviceName = "TestEJBService", portName = "PocServiceSOAP",
 endpointInterface = "uk.co.pruhealth.heal.service.PocRemote",
 wsdlLocation="/META-INF/wsdl/TestEJBService.wsdl",
 targetNamespace = " http://www.pruhealth.co.uk/heal/TestEJBService http://www.pruhealth.co.uk/heal/TestEJBService")
public class PocBean implements PocRemote {
@WebMethod
public PocResponse getPocDetails(PocRequest request){
 PocResponse response = new PocResponse();
 BigInteger p= request.getPrincipalAmount();
 int a = p.intValue();
 Float r = request.getPrincipalRate();
 Float totalAmount = a * r * 10;
 request.getPrincipalAmount();
 request.getPrincipalRate();
 response.setTotalAmount(totalAmount);
 response.setName(request.getName());
 return response;
}
}
package uk.co.pruhealth.heal.service;
import javax.ejb.Remote;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import uk.co.pruhealth.heal.pocservice.PocRequest;
import uk.co.pruhealth.heal.pocservice.PocResponse;
@Remote
@WebService(name = "ConverterPortType",
targetNamespace = " http://jaxws.samples.geronimo.apache.org http://jaxws.samples.geronimo.apache.org")
public interface PocRemote {
public PocResponse getPocDetails(PocRequest request);
}
Please provide me the solution.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799595#799595]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
"org.jboss.ws.core.CommonSOAPFaultException: Endpoint {http://www.pruhealth.co.uk/heal/TestEJBService}PocServiceSOAP does not"
To view the discussion, visit: https://community.jboss.org/message/799595#799595
--------------------------------------------------------------
I have created a EJB project and exposed it as a webservice when I am hitting this webservice bt SOAP UI getting the below error
org.jboss.ws.core.CommonSOAPFaultException: Endpoint {http://www.pruhealth.co.uk/heal/TestEJBService}PocServiceSOAP does not
I have placed the wsdl at "/META-INF/wsdl/TestEJBService.wsdl"
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:ps=" http://www.pruhealth.co.uk/heal/TestEJBService http://www.pruhealth.co.uk/heal/TestEJBService"
xmlns:soap=" http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd=" http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema"
xmlns:pos=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
targetNamespace=" http://www.pruhealth.co.uk/heal/TestEJBService http://www.pruhealth.co.uk/heal/TestEJBService"
name="TestEJBService">
<wsdl:import namespace=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
 location="PocService.xsd" />
<wsdl:message name="PocServiceInput">
 <wsdl:part name="body" element="pos:PocRequest"></wsdl:part>
</wsdl:message>
<wsdl:message name="PocServiceOutput">
 <wsdl:part name="body" element="pos:PocResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="PocServicePort">
 <wsdl:operation name="getPocDetails">
  <wsdl:input message="ps:PocServiceInput" />
  <wsdl:output message="ps:PocServiceOutput" />
 </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PocServiceSOAPBinding" type="ps:PocServicePort">
 <soap:binding style="document" transport=" http://schemas.xmlsoap.org/soap/http http://schemas.xmlsoap.org/soap/http" />
 <wsdl:operation name="getPocDetails">
  <soap:operation soapAction="" />
  <wsdl:input>
   <soap:body namespace=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
    use="literal" />
  </wsdl:input>
  <wsdl:output>
   <soap:body namespace=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
    use="literal" />
  </wsdl:output>
 </wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestEJBService">
 <wsdl:port binding="ps:PocServiceSOAPBinding" name="PocServiceSOAP">
  <soap:address location=" http://127.0.0.1:8080/TestEJBService/TestEJBService http://127.0.0.1:8080/TestEJBService/TestEJBService" />
 </wsdl:port>
</wsdl:service>
</wsdl:definitions>
===============================================================
I have imported PocService.xsd into wsdl
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:pos=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace=" http://www.pruhealth.co.uk/heal/PocService http://www.pruhealth.co.uk/heal/PocService"
xmlns:xs=" http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema">
<xs:element name="PocRequest">
 <xs:complexType>
  <xs:sequence>
   <xs:element name="PrincipalAmount" type="xs:integer"
    minOccurs="1" />
   <xs:element name="PrincipalRate" type="xs:float"
    minOccurs="1" />
   <xs:element name="Name" type="xs:string" minOccurs="0" />
  </xs:sequence>
 </xs:complexType>
</xs:element>
<xs:element name="PocResponse">
 <xs:complexType>
  <xs:sequence>
   <xs:element name="TotalAmount" type="xs:float" minOccurs="1" />
   <xs:element name="Name" type="xs:string" minOccurs="0" />
  </xs:sequence>
 </xs:complexType>
</xs:element>
</xs:schema>
EJB CLASS:
package uk.co.pruhealth.heal.service;
import java.math.BigInteger;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.jboss.wsf.spi.annotation.WebContext;
import uk.co.pruhealth.heal.pocservice.PocRequest;
import uk.co.pruhealth.heal.pocservice.PocResponse;
@Stateless
@WebContext(contextRoot="TestEJBService", urlPattern="/TestEJBService")
@WebService(serviceName = "TestEJBService", portName = "PocServiceSOAP",
 endpointInterface = "uk.co.pruhealth.heal.service.PocRemote",
 wsdlLocation="/META-INF/wsdl/TestEJBService.wsdl",
 targetNamespace = " http://www.pruhealth.co.uk/heal/TestEJBService http://www.pruhealth.co.uk/heal/TestEJBService")
public class PocBean implements PocRemote {
@WebMethod
public PocResponse getPocDetails(PocRequest request){
 PocResponse response = new PocResponse();
 BigInteger p= request.getPrincipalAmount();
 int a = p.intValue();
 Float r = request.getPrincipalRate();
 Float totalAmount = a * r * 10;
 request.getPrincipalAmount();
 request.getPrincipalRate();
 response.setTotalAmount(totalAmount);
 response.setName(request.getName());
 return response;
}
}
package uk.co.pruhealth.heal.service;
import javax.ejb.Remote;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import uk.co.pruhealth.heal.pocservice.PocRequest;
import uk.co.pruhealth.heal.pocservice.PocResponse;
@Remote
@WebService(name = "ConverterPortType",
targetNamespace = " http://jaxws.samples.geronimo.apache.org http://jaxws.samples.geronimo.apache.org")
public interface PocRemote {
public PocResponse getPocDetails(PocRequest request);
}
Please provide me the solution.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799595#799595]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]