Thank you Robert and Junaid, 

Changing to RPCMessageReceiver did resolve the WSDL generation issue, however I 
am having a second problem when using a client I have written. I receive a 500 
error from the server and a look into the Tomcat logs reveals the following top 
level error (full trace below).

org.apache.axiom.om.OMException: SOAPEnvelope must contain a body element which 
is either first or second child element of the SOAPEnvelope.

The data I am sending to the server is:

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
  <soapenv:Header/>
  <soapenv:Body><echo><test>Hello Axis2</test></echo>
  </soapenv:Body>
</soapenv:Envelope>

I had also discovered another error, which was, my client code was in the 
"default package" which led to a null namespace error. I have corrected the 
problem by giving my service code a namespace and recompiling. The service 
looks to be deployed correctly from the Axis2 browser interface. I am starting 
to think that the problem is with my client. 
What really confuses me, is that all of this was working on Axis2 version 0.95. 
I have no idea where I am going wrong. 

Ideas?
Thank you,

Jeff Scudder

Full Tomcat error log trace from stdout...:

- Servlet.service() for servlet AxisServlet threw exception
org.apache.axiom.om.OMException: SOAPEnvelope must contain a body element which 
is either first or second child element of the SOAPEnvelope.
        at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody(SOAPEnvelopeImpl.java:142)
        at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.addChild(SOAPEnvelopeImpl.java:103)
        at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:82)
        at 
org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)
        at 
org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)
        at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)
- Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for 
this response
        at org.apache.catalina.connector.Response.getWriter(Response.java:599)
        at 
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:195)
        at 
org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:124)
        at 
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:117)
        at 
org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:191)
        at 
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:115)
        at 
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:75)
        at 
org.apache.jsp.axis2_002dweb.Error.error500_jsp._jspService(error500_jsp.java:97)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
        at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
        at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
        at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at 
org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)
        at 
org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284)
        at 
org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:228)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 11:12 AM
To: [email protected]
Subject: Re: Buggy .aar deployment

Jeff,

You are using the RawXMLINOutMessageReceiver. I believe in Axis2 1.0, automatic 
WSDL generation only happens when you use the RPCMessageReceiver.
If you need to use RawXMLINOutMessageReceiver, then you have generate the WSDL 
yourself and drop it in the META-INF folder.

- Junaid



                                                                          
             "robert lazarski"                                            
             <[EMAIL PROTECTED]                                            
             mail.com>                                                  To
                                       [email protected]            
             05/25/2006 01:15                                           cc
             PM                                                           
                                                                   Subject
                                       Re: Buggy .aar deployment          
             Please respond to                                            
             [EMAIL PROTECTED]                                            
                  he.org                                                  
                                                                          
                                                                          
                                                                          




Post the stack trace for the 500 error and maybe we can help. The rules changed 
for displaying a wsdl in the 1.0 release - search the forums with the message 
for more info.

HTH,
Robert
http://www.braziloutsource.com/

On 5/24/06, Scudder, Jeffrey W < [EMAIL PROTECTED]> wrote:
  Hi all,

  I had previously deployed a web service as a .aar file in Axis2 version
  0.95 and the service broke when I upgraded to 1.0

  I rewrote the code for version 1.0 (libraries changed from 0.95 to 1.0)
  changed services.xml to fit the new example on the Axis2 website, and
  redeployed the .aar. Unfortunately the service I created does not work.
  When I attempt to view the WSDL on localhost:8080/axis2 I get the
  following message:

  <error>
  <description>Unable to generate WSDL for this service</description>
  −
          <reason>
  Either user has not dropped the wsdl into META-INF or operations use
  message receivers other than RPC.
  </reason>
  </error>

  The same message appears when I attempt to view WSDLs for most of the
  example web services which come with the Axis2 download. When I attempt
  to use my service, I receive an HTTP 500 error code.

  I am using Tomcat 5.5.17 and the services.xml and code I am using are
  copied below. Is there something I am doing wrong, are there unresolved
  version compatibility issues? Any help is greatly appreciated

  Thank you,

  Jeff Scudder



  ----services.xml----
  <service >
      <description>
          This is Jeff's sample Web Service with two operations, echo and
  ping.
      </description>
      <parameter name="ServiceClass" locked="false">JeffService</parameter>
      <operation name="echo">
          <messageReceiver class="
  org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
          <actionMapping>urn:echo</actionMapping>
      </operation>
       <operation name="ping">
          <messageReceiver class="
  org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
          <actionMapping>urn:ping</actionMapping>
      </operation>
  </service>




  ----JeffService.java----
  import org.apache.axiom.om.*;

  public class JeffService {

          public void ping(OMElement element){
               return;
          }
          public OMElement echo(OMElement element){
               return element;
          }
  }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to