Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2777

Error occurs only in Java 6 but it is fine in Java 1.4: SAAJ0007: Bad endPoint type (endPoint instance of URL)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 1.2.1
    • None
    • None
    • None
    • OS: Windows XP

    Description

      After we switch from Java 1.4 to Java 6, we got an error from a SOAP call:

      SEVERE: SAAJ0007: Bad endPoint type (endPoint instance of URL)

      Here is the code segment for the SOAP call:

      String body = "some body string"
      MessageFactoryImpl mf = new MessageFactoryImpl();
      MimeHeaders headers = new MimeHeaders();
      headers.addHeader("SOAPAction", "some action string");
      InputStream soapStream = new ByteArrayInputStream(body.getBytes());
      SOAPMessage msg = mf.createMessage(headers, soapStream);

      SOAPConnectionFactory connectionFactory = SOAPConnectionFactory.newInstance();
      SOAPConnection connection = connectionFactory.createConnection();
      URLEndpoint url = new URLEndpoint("some url string");
      javax.xml.soap.SOAPMessage message = null;
      try

      {message = connection.call(msg, url);}

      catch (Exception e)

      { System.out.println(e.getMessage());}

      Message tempMessage = (Message) message;
      System.out.println(tempMessage.getSOAPPartAsString());

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            wchau William Chau
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment