Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Web Services and the fly likes SOAP Fault Exception - does not contain operation meta data for Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAP Fault Exception - does not contain operation meta data for" Watch "SOAP Fault Exception - does not contain operation meta data for" New topic

SOAP Fault Exception - does not contain operation meta data for

Alex Mbatra

Joined: Jun 16, 2008
Posts: 7

I am trying to write a simple web service. I am using JBoss 4.2.2 and have implemented a simple stateless session bean that acts as my web service. The method call is getAllMetaData (sorry if its confusing but my application involves meta data which should have nothing to do with the error I am seeing) and it returns a long String. I have seen others on this message board (under JBoss and Web Service topic) have this error, but no one answered the topic. Plus, most examples have servlet endpoints, but mine is an EJB endpoint, if that matters much.

Before my client tries to use the web service, I print out the SOAP message it is sending using the writeTo() method. Below is what it is printing, I assume that this is where the problem is, that my outgoing SOAP request message is missing something:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="">
<SOAP-ENV:Body><m:getAllMetaData xmlns:m=""/></SOAP-ENV:Body>

The client code snippet that generates this message is this:

SOAPConnectionFactory soapConnectionFactory =
SOAPConnection connection = soapConnectionFactory.createConnection();
SOAPFactory soapFactory = SOAPFactory.newInstance();

MessageFactory factory = MessageFactory.newInstance();
SOAPMessage message = factory.createMessage();

SOAPHeader header = message.getSOAPHeader();
SOAPBody body = message.getSOAPBody();

Name bodyName = soapFactory.createName( "getAllMetaData",
"" );
SOAPBodyElement bodyElement = body.addBodyElement( bodyName );

message.writeTo( System.out );

URL endpoint = new URL( "http://localhost:8080/AlexTry-alexws-ejb/WebServiceBean?wsdl" );
SOAPMessage response = message, endpoint );

catch ( Exception ex )

And here is my WSDL file, which I generated using the wscompile tool from J2EE:

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="AlexWebService" targetNamespace="" xmlns:tns="" xmlns="" xmlns:xsd="" xmlns:soap="">
<message name="WebServiceEndpoint_getAllMetaData"/>
<message name="WebServiceEndpoint_getAllMetaDataResponse">
<part name="result" type="xsd:string"/></message>
<portType name="WebServiceEndpoint">
<operation name="getAllMetaData">
<input message="tns:WebServiceEndpoint_getAllMetaData"/>
<output message="tns:WebServiceEndpoint_getAllMetaDataResponse"/></operation></portType>
<binding name="WebServiceEndpointBinding" type="tns:WebServiceEndpoint">
<soap:binding transport="" style="rpc"/>
<operation name="getAllMetaData">
<soap peration soapAction=""/>
<soap:body use="literal" namespace=""/></input>
<soap:body use="literal" namespace=""/></output></operation></binding>
<service name="AlexWebService">
<port name="WebServiceEndpointPort" binding="tns:WebServiceEndpointBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>

And here is the full exception I am getting:

11:05:48,203 ERROR [SOAPFaultHelperJAXRPC] SOAP request exception
javax.xml.rpc.soap.SOAPFaultException: Endpoint {}WebServiceEndpointPort does not contain operation meta data for: {}getAllMetaData
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(
at org.jboss.wsf.stack.jbws.EndpointServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(

Any help really appreciated!
[ June 16, 2008: Message edited by: Alex Mbatra ]
Alex Mbatra

Joined: Jun 16, 2008
Posts: 7
Okay, I figured this out on my own. Since I couldn't find any solutions online about this, I will put the fix here. I should say that the error output and stack trace from JBoss and/or J2EE for this error is pretty cryptic.

The problem I had was in my config.xml which I used as input to my wscompile tool that comes with J2EE. The wscompile tool generates my wsdl and mapping.xml files. The config.xml had a "targetNamespace" of And my web service client built the soap message like this:

Name bodyName = soapFactory.createName( "getAllMetaDataStr",
// don't know how 2nd arg is used yet
"" );

So the slash "/" at the end is what the problem was!!! So moral of the story is the "targetNamespace" for your wsdl and mapping.xml files must be exactly the same as the 3rd argument to the soap factory createName() method.

I agree. Here's the link:
subject: SOAP Fault Exception - does not contain operation meta data for
It's not a secret anymore!