This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SOAP Fault Exception - does not contain operation meta data for  RSS feed

Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

This parrot is no more. It has ceased to be. Now it's a tiny ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!