eclipse-ee4j / jaxb-fi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FI fails to construct a proper Datasource.

Tomas-Kraus opened this issue · comments

FI doesn't re-construct a proper DataSource, as the following exception is shown
when trying to create a MimeMultipart from a DataSouce returned though an FI
message exchange. Problem doesn't exist with FI=none, it happens only when
FI=pessimistic or FI=optimistic.

Recieved message turning FI=optimistic and Exception through.


[java] --[HTTP response 200]--
[java] Date: Wed, 30 Aug 2006 11:45:33 GMT
[java] X-powered-by: Servlet/2.5
[java] Content-length: 149
[java] Content-type: application/fastinfoset
[java] null: HTTP/1.1 200 OK
[java] Server: Sun Java System Application Server Enterprise Edition 9.1
[java]
à^A8�^Fsoapenv(http://schemas.xmlsoap.org/soap/envelope/ð?\201\201^GEnvelope?\201\201^CBody8�^Cans1
[java]
urn:test:typesð?\202\202^LHelloResponse<^Gargument\222fooð<^Dextra\222barÿÿð--------------------com.sun.xml.messaging.saaj.packaging.mime.MessagingException:
Missing start boundary
[java] at
com.sun.xml.messaging.saaj.packaging.mime.internet.MimeMultipart.parse(MimeMultipart.java:328)
[java] at
com.sun.xml.messaging.saaj.packaging.mime.internet.MimeMultipart.getBodyPart(MimeMultipart.java:202)
[java] at
xmlhttp_bind.xmlhttp_datasource.client.XMLHTTP_DataSourceClient.invokeHelloRequestResponseDataSource(XMLHTTP_DataSourceClient.java:210)
[java] at
xmlhttp_bind.xmlhttp_datasource.client.XMLHTTPDriver.invokeSourceClient(XMLHTTPDriver.java:54)
[java] at
xmlhttp_bind.xmlhttp_datasource.client.XMLHTTPDriver.doIt(XMLHTTPDriver.java:43)
[java] at
xmlhttp_bind.xmlhttp_datasource.client.XMLHTTPDriver.main(XMLHTTPDriver.java:19)


This is what I do in my client code....


.....
DataSource result = dispatch.invoke(ds);

if(result instanceof DataSource)

{ final MimeMultipart multipart = new MimeMultipart(result, null); MimeBodyPart bodyPart = (MimeBodyPart)multipart.getBodyPart(0); InputStream is = bodyPart.getInputStream(); String contentType = bodyPart.getContentType(); Source source = contentType.equals("application/fastinfoset") ? new org.jvnet.fastinfoset.FastInfosetSource(bodyPart.getInputStream()) : new StreamSource(bodyPart.getInputStream()); SOAPMessage msg = MessageFactory.newInstance().createMessage(); msg.getSOAPPart().setContent(source); Node node = msg.getSOAPBody().getFirstChild(); HelloResponse response = (HelloResponse)jaxbContext.createUnmarshaller().unmarshal(node); if("foo".equals(response.getArgument()) && ("bar".equals(response.getExtra()))) status = true; else status = false; }

.....

Environment

Operating System: All
Platform: All

Affected Versions

[current]

@glassfishrobot Commented
Reported by vrdeepak

@glassfishrobot Commented
oleksiys said:
bug is not occuring in tests any more.
problem seems to be fixed with different issue.

@glassfishrobot Commented
Was assigned to fi-issues

@glassfishrobot Commented
This issue was imported from java.net JIRA FI-8

@glassfishrobot Commented
Marked as fixed on Monday, January 22nd 2007, 5:20:00 pm