[jboss-user] [JBoss Web Services Users] - javax.xml.rpc.soap.SOAPFaultException: does not contain oper

gowri do-not-reply at jboss.com
Mon Nov 2 06:19:25 EST 2009


Hi,

I am using JBOSS 5.1.0 GA as JBOSS App. server. I have created a simple webservice for getting string say "Hello". I could able to deploy the project as a war file and the generation of wsdl file is also fine.
When I run the client, I am getting this exception in the server side. 

Pls. help me on this to find out where I am going wrong. 

"javax.xml.rpc.soap.SOAPFaultException: Endpoint {http://com.apr/helloworld}HelloWorldWSPort does not contain operation meta data for: {http://apr.com/}sayHello"

jboss-esb.xml

  | <?xml version = "1.0" encoding = "UTF-8"?>
  | <jbossesb
  | 	xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd">
  | 	<providers>
  | 	    <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
  | 			<jms-bus busid="myChannel">
  | 				<jms-message-filter dest-type="QUEUE"
  | 					dest-name="queue/ESBTestQueue" />
  | 			</jms-bus>
  | 			<jms-bus busid="MyEsbAwareChannel">
  | 				<jms-message-filter dest-type="QUEUE"
  | 					dest-name="queue/ESBTestQueue_ESBAware" />
  | 			</jms-bus>
  | 		</jms-provider>		
  | 		<jbr-provider name="JBR-Http" protocol="http" host="localhost">
  | 			<jbr-bus busid="Http-1" port="9001" />
  | 		</jbr-provider>
  | 		
  | 	</providers>
  | 	<services>
  | 							
  | 			<service category="MyCateg" name="wsservice" description="Webservice"> 
  | 			    <listeners>  
  | 			        <jms-listener name="helloWorld" busidref="MyEsbAwareChannel" />
  | 			        <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true" /> 
  | 			    </listeners> 
  | 			    <actions> 
  | 			          <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor"> 
  | 			             <property name="jbossws-endpoint" value="HelloWorldWS" /> 
  | 			          </action> 
  | 			   </actions>
  | 			</service>
  | 		
  | 
  | 	</services>
  | </jbossesb>
  | 

HelloInterface.java

  | 
  | package com.apr;
  | import javax.jws.WebParam;
  | import javax.jws.WebService;
  | @WebService
  | 	public interface HelloInterface {
  | 
  | 		public String sayHello(@WebParam(name="message")String name);
  | 	}
  | 

The implementation class


  | package com.apr;
  | 
  | import javax.jws.WebMethod;
  | import javax.jws.WebParam;
  | import javax.jws.WebService;
  | 
  | @WebService(name = "HelloWorldWS", targetNamespace="http://com.apr/helloworld")
  | public class HelloWorldWS implements HelloInterface {
  | 
  | 	    @WebMethod
  | 	    public String sayHello(@WebParam(name="message") String message) {
  | 	        System.out.println("Hello World. Message=" + message);
  | 	        return "Hello World - " + message;
  | 	        
  | 	    }
  | 
  | 	
  | }
  | 

wsdl file

  | <?xml version="1.0" encoding="UTF-8"?>
  | <definitions name="HelloWorldWSService" targetNamespace="http://com.apr/helloworld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://com.apr/helloworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  |   <types>
  |     <xs:schema targetNamespace="http://com.apr/helloworld" version="1.0" xmlns:tns="http://com.apr/helloworld" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  |    <xs:element name="sayHello" type="tns:sayHello"/>
  |    <xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
  |    <xs:complexType name="sayHello">
  |     <xs:sequence>
  |      <xs:element minOccurs="0" name="message" type="xs:string"/>
  |     </xs:sequence>
  |    </xs:complexType>
  |    <xs:complexType name="sayHelloResponse">
  |     <xs:sequence>
  |      <xs:element minOccurs="0" name="return" type="xs:string"/>
  |     </xs:sequence>
  |    </xs:complexType>
  |   </xs:schema>
  |   </types>
  |   <message name="HelloWorldWS_sayHello">
  |     <part name="sayHello" element="tns:sayHello">
  |     </part>
  |   </message>
  |   <message name="HelloWorldWS_sayHelloResponse">
  |     <part name="sayHelloResponse" element="tns:sayHelloResponse">
  |     </part>
  |   </message>
  |   <portType name="HelloWorldWS">
  |     <operation name="sayHello" parameterOrder="sayHello">
  |       <input message="tns:HelloWorldWS_sayHello">
  |     </input>
  |       <output message="tns:HelloWorldWS_sayHelloResponse">
  |     </output>
  |     </operation>
  |   </portType>
  |   <binding name="HelloWorldWSBinding" type="tns:HelloWorldWS">
  |     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  |     <operation name="sayHello">
  |       <soap:operation soapAction=""/>
  |       <input>
  |         <soap:body use="literal"/>
  |       </input>
  |       <output>
  |         <soap:body use="literal"/>
  |       </output>
  |     </operation>
  |   </binding>
  |   <service name="HelloWorldWSService">
  |     <port name="HelloWorldWSPort" binding="tns:HelloWorldWSBinding">
  |       <soap:address location="http://127.0.0.1:8080/MyWS/HelloWorldWS"/>
  |     </port>
  |   </service>
  | </definitions>
  | 
  | 
  | 

web.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  | 	<display-name>
  | 	MyWS</display-name>
  | 	<welcome-file-list>
  | 		<welcome-file>index.html</welcome-file>
  | 		<welcome-file>index.htm</welcome-file>
  | 		<welcome-file>index.jsp</welcome-file>
  | 		<welcome-file>default.html</welcome-file>
  | 		<welcome-file>default.htm</welcome-file>
  | 		<welcome-file>default.jsp</welcome-file>
  | 	</welcome-file-list>
  | 	<servlet>
  | 		<servlet-name>HelloWorldWS</servlet-name>
  | 		<servlet-class>com.apr.HelloWorldWS</servlet-class>
  | 	</servlet>
  | 
  | 	<servlet-mapping>
  | 		<servlet-name>HelloWorldWS</servlet-name>
  | 		<url-pattern>/HelloWorldWS</url-pattern>
  | 	</servlet-mapping>
  | 	
  | </web-app>
  | 

Client Code:



  | package com.apr;
  | 
  | import org.apache.cxf.interceptor.LoggingInInterceptor;
  | import org.apache.cxf.interceptor.LoggingOutInterceptor;
  | import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
  | 
  | 
  | 
  | public class Client {
  | 	public static void main(String[] args) {
  | 		JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
  | 		factory.getInInterceptors().add(new LoggingInInterceptor());
  | 		factory.getOutInterceptors().add(new LoggingOutInterceptor());
  | 		factory.setServiceClass(HelloInterface.class);
  | 		factory.setAddress("http://127.0.0.1:8080/MyWS/HelloWorldWS");
  | 		HelloInterface client = (HelloInterface) factory.create();
  | 
  | 		String reply = client.sayHello("Krishna");
  | 		System.out.println("Server said: " + reply);
  | 		
  | 		
  | 
  | 
  | 	}
  | }
  | 
  | 

Exception from server log:


  | 2009-11-02 11:10:49,052 INFO  [org.jboss.wsf.framework.management.DefaultEndpointRegistry] (HDScanner) register: jboss.ws:context=MyWS,endpoint=HelloWorldWS
  | 2009-11-02 11:10:49,161 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) deploy, ctxPath=/MyWS
  | 2009-11-02 11:10:49,427 INFO  [org.jboss.wsf.stack.jbws.WSDLFilePublisher] (HDScanner) WSDL published to: file:/D:/software/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/data/wsdl/MyWS.war/HelloWorldWSService8985776581610665970.wsdl
  | 2009-11-02 11:13:03,836 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] (http-127.0.0.1-8080-1) SOAP request exception
  | org.jboss.ws.core.CommonSOAPFaultException: Endpoint {http://com.apr/helloworld}HelloWorldWSPort does not contain operation meta data for: {http://apr.com/}sayHello
  | 	at org.jboss.ws.core.server.ServiceEndpointInvoker.getDispatchDestination(ServiceEndpointInvoker.java:476)
  | 	at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:178)
  | 	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
  | 	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
  | 	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
  | 	at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
  | 	at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
  | 	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
  | 	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  | 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
  | 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
  | 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  | 	at java.lang.Thread.run(Unknown Source)
  | 
  | 

Thanks

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263454#4263454

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263454



More information about the jboss-user mailing list