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
catch (Exception e)
{ System.out.println(e.getMessage());} Message tempMessage = (Message) message;
System.out.println(tempMessage.getSOAPPartAsString());