Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1243 Resolve JBoss common jax-ws testsuite issues
  3. CXF-1258

soap:Fault response does not cause SOAPFaultException

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.3
    • 2.2.1
    • None
    • None

    Description

      [tdiesler@tddell trunk]$ ant -Dtest=jaxws/samples/webmethod test

      tests-run-internal:
      [junit] Running org.jboss.test.ws.jaxws.samples.webmethod.WebMethodTestCase
      [junit] Tests run: 4, Failures: 1, Errors: 0, Time elapsed: 5.601 sec
      [junit] Test org.jboss.test.ws.jaxws.samples.webmethod.WebMethodTestCase FAILED

      Testcase: testIllegalDispatchAccess took 0.117 sec
      FAILED
      SOAPFaultException expected
      junit.framework.AssertionFailedError: SOAPFaultException expected
      at org.jboss.test.ws.jaxws.samples.webmethod.WebMethodTestCase.testIllegalDispatchAccess(WebMethodTestCase.java:147)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)

      Service service = Service.create(wsdlURL, serviceName);
      Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD);
      try

      { dispatch.invoke(new StreamSource(new StringReader(reqPayload))); fail("SOAPFaultException expected"); }

      catch (SOAPFaultException ex)

      { // ignore }

      POST /jaxws-samples-webmethod HTTP/1.1
      Content-Type: text/xml; charset=utf-8
      Accept: *
      Accept: text/xml, text/html, image/gif, image/jpeg, ; q=.2, */; q=.2
      Cache-Control: no-cache
      Pragma: no-cache
      User-Agent: Java/1.5.0_12
      Host: 127.0.0.1:8080
      Connection: keep-alive
      Transfer-Encoding: chunked

      199
      <?xml version="1.0" encoding="utf-8" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header/><SOAP-ENV:Body><ns1:noWebMethod xmlns:ns1="http://webmethod.samples.jaxws.ws.test.jboss.org/"> <String_1>Hello</String_1></ns1:noWebMethod></SOAP-ENV:Body></SOAP-ENV:Envelope>
      0

      HTTP/1.1 500 Internal Server Error
      Server: Apache-Coyote/1.1
      X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.0/Tomcat-6.0
      Content-Type: text/xml;charset=UTF-8
      Content-Length: 290
      Date: Wed, 05 Dec 2007 13:33:34 GMT
      Connection: close

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Message part

      {http://webmethod.samples.jaxws.ws.test.jboss.org/}

      noWebMethod was not recognized.</faultstring></soap:Fault></soap:Body></soap:Envelope>

      Attachments

        Activity

          People

            asoldano Alessio Soldano
            tdiesler Thomas Diesler
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: