faultString: Endpoint ... Port does not contain operation me
gopivm Apr 4, 2009 2:35 PMHi,
I am facing a problem while invoking the web service method which is exposed from stateless session bean (EJB3) by DII client.
This is my development environment.
Eclipse Version: 3.4.0
Jboss-4.3.2.GA
JRE 1.5.0_15
EJB 3.0
I "googled" a lot, but couldn't find any correct solution which actually works. But, there are a lot of people have faced the same problem.
Can somebody help me?
This is the error that I am getting :
AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client faultSubcode: faultString: Endpoint {http://woss.appservice.nbric.nbpts.com/}WarehouseServiceBeanPort does not co ntain operation meta data for: {http://schemas.xmlsoap.org/wsdl/}searchPersonsForWarehouseBatch faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:Endpoint {http://woss.appservice.nbric.nbpts.com/}Warehouse ServiceBeanPort does not contain operation meta data for: {http://schemas.xmlsoap.org/wsdl/}searchPe rsonsForWarehouseBatch at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
My client code DII:
QName serviceName = new QName( "http://localhost:8080/nbric-business-appservices/WarehouseServiceBean?wsdl", "WarehouseServiceBeanService"); ServiceFactory factory = ServiceFactory.newInstance(); Service service = factory.createService(serviceName); Call call = service.createCall(); QName operationName = new QName(BODY_NAMESPACE_VALUE, "searchPersonsForWarehouseBatch"); call.setOperationName(operationName); call.setTargetEndpointAddress(endpoint); call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true)); // call.setProperty(Call.SOAPACTION_URI_PROPERTY, ""); call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING); QName QNAME_TYPE_STRING = new QName(NS_XSD, "string"); call.setReturnType(QNAME_TYPE_STRING); call.setOperationName(new QName(BODY_NAMESPACE_VALUE, "searchPersonsForWarehouseBatch")); call.addParameter("String_1", QNAME_TYPE_STRING, ParameterMode.IN); String[] params = { "DEFAULTS13330" }; // Invoke the WS operation using the JAX-RPC Call's invoke method String result = (String) call.invoke(params);
WSDL :
- <definitions name="WarehouseServiceBeanService" targetNamespace="http://woss.appservice.nbric.nbpts.com/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://woss.appservice.nbric.nbpts.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <types> - <xs:schema targetNamespace="http://woss.appservice.nbric.nbpts.com/" version="1.0" xmlns:tns="http://woss.appservice.nbric.nbpts.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="NBRICApplicationException" type="tns:NBRICApplicationException" /> <xs:element name="NBRICSystemException" type="tns:NBRICSystemException" /> <xs:element name="searchPersonsForWarehouseBatch" type="tns:searchPersonsForWarehouseBatch" /> <xs:element name="searchPersonsForWarehouseBatchResponse" type="tns:searchPersonsForWarehouseBatchResponse" /> - <xs:complexType name="searchPersonsForWarehouseBatch"> - <xs:sequence> <xs:element minOccurs="0" name="arg0" type="xs:string" /> </xs:sequence> </xs:complexType> - <xs:complexType name="searchPersonsForWarehouseBatchResponse"> - <xs:sequence> <xs:element minOccurs="0" name="return" type="xs:string" /> </xs:sequence> </xs:complexType> - <xs:complexType name="NBRICApplicationException"> - <xs:sequence> <xs:element minOccurs="0" name="errorCode" type="xs:string" /> <xs:element minOccurs="0" name="message" type="xs:string" /> </xs:sequence> </xs:complexType> - <xs:complexType name="NBRICSystemException"> - <xs:sequence> <xs:element minOccurs="0" name="errorCode" type="xs:string" /> <xs:element minOccurs="0" name="message" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:schema> </types> - <message name="NBRICSystemException"> <part element="tns:NBRICSystemException" name="NBRICSystemException" /> </message> - <message name="NBRICApplicationException"> <part element="tns:NBRICApplicationException" name="NBRICApplicationException" /> </message> - <message name="WarehouseServiceBean_searchPersonsForWarehouseBatchResponse"> <part element="tns:searchPersonsForWarehouseBatchResponse" name="searchPersonsForWarehouseBatchResponse" /> </message> - <message name="WarehouseServiceBean_searchPersonsForWarehouseBatch"> <part element="tns:searchPersonsForWarehouseBatch" name="searchPersonsForWarehouseBatch" /> </message> - <portType name="WarehouseServiceBean"> - <operation name="searchPersonsForWarehouseBatch" parameterOrder="searchPersonsForWarehouseBatch"> <input message="tns:WarehouseServiceBean_searchPersonsForWarehouseBatch" /> <output message="tns:WarehouseServiceBean_searchPersonsForWarehouseBatchResponse" /> <fault message="tns:NBRICSystemException" name="NBRICSystemException" /> <fault message="tns:NBRICApplicationException" name="NBRICApplicationException" /> </operation> </portType> - <binding name="WarehouseServiceBeanBinding" type="tns:WarehouseServiceBean"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <operation name="searchPersonsForWarehouseBatch"> <soap:operation soapAction="searchPersonsForWarehouseBatchAction" /> - <input> <soap:body use="literal" /> </input> - <output> <soap:body use="literal" /> </output> - <fault name="NBRICSystemException"> <soap:fault name="NBRICSystemException" use="literal" /> </fault> - <fault name="NBRICApplicationException"> <soap:fault name="NBRICApplicationException" use="literal" /> </fault> </operation> </binding> - <service name="WarehouseServiceBeanService"> - <port binding="tns:WarehouseServiceBeanBinding" name="WarehouseServiceBeanPort"> <soap:address location="http://127.0.0.1:8080/nbric-business-appservices/WarehouseServiceBean" /> </port> </service> </definitions>
The EJB 3 service:
@Stateless(name = "WarehouseServiceBean", mappedName = "WarehouseServiceBean") @TransactionManagement(TransactionManagementType.CONTAINER) @TransactionAttribute(TransactionAttributeType.REQUIRED) @WebService public class WarehouseServiceBean implements /*WarehouseServiceInterface,*/ Serializable { /** * */ private static final long serialVersionUID = 1L; public WarehouseServiceBean(){ } @WebMethod(action="searchPersonsForWarehouseBatchAction" ) public String searchPersonsForWarehouseBatch( String searchString ) throws NBRICApplicationException, NBRICSystemException { List<Person> personList = null; try { /* - Commented the DAO code for time being. final PersonDAO dao = DAOFactory.getDAOFactory( ApplicationConstants.HIBERNATE_DAO_FACTORY).getPersonDAO(); // Compass Search * Starts //personList = dao.searchPersonCompassPOC(searchString); // Compass Search * Ends // Hibernate search personList = dao.searchUserPOC(searchString); int arrayLength = personList.size(); Person[] personArray = new Person[arrayLength]; for (int i = 0; i < personArray.length; i++) { personArray = personList.get(i); }*/ return "hello"; /*} catch (NBRICApplicationException e) { throw e; } catch (NBRICSystemException e) { throw e;*/ } catch (Exception e) { throw new NBRICSystemException(e, ErrorCode.S_SERVER_DOWN); } } }
Any help is really appreciated.
Thanks in advance.
- Gopi