[JBossWS] - Big problem with WebXMLRewriterImpl.java rename
by heiko.braun@jboss.com
In WindowsNT systems, your modification in these lines doesn't work:
| FileInputStream stream = new FileInputStream(webXML);
| String modifyProperty =
| (String)dep.getProperty("org.jboss.ws.webapp.modify");
|
| // JBWS 1762
| if ((modifyProperty == null) || (!modifyProperty.equals("false")))
| {
| String suffix =
| (String)dep.getProperty("org.jboss.ws.webapp.descriptor.suffix");
| if (suffix == null)
| suffix = ".org";
| File orgWebXML = new File(webXML.getCanonicalPath() + suffix);
|
| // Rename the web.xml
| if (webXML.renameTo(orgWebXML) == false)
| throw new WebServiceException("Cannot rename web.xml: "
| + orgWebXML);
|
| stream = new FileInputStream(orgWebXML);
| }
|
As you open a FileInputStream over webXML, it can't be renamed to
orgWebXML because the stream is open in this point, and Windows blocks
te rename operation.
It can be solved as below:
| // WindowsNT correction
| FileInputStream stream = null;
| String modifyProperty =
| (String)dep.getProperty("org.jboss.ws.webapp.modify");
|
| // JBWS 1762
| if ((modifyProperty == null) || (!modifyProperty.equals("false")))
| {
| String suffix =
| (String)dep.getProperty("org.jboss.ws.webapp.descriptor.suffix");
| if (suffix == null)
| suffix = ".org";
| File orgWebXML = new File(webXML.getCanonicalPath() + suffix);
|
| // Rename the web.xml
| if (webXML.renameTo(orgWebXML) == false)
| throw new WebServiceException("Cannot rename web.xml: "
| + orgWebXML);
|
| stream = new FileInputStream(orgWebXML);
| } else {
| stream = new FileInputStream(webXML);
| }
|
|
Cheers,
Leonardo Penczek
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109230#4109230
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109230
16 years, 5 months
[JBossWS] - MTOM interop issue with WSE 3.0
by jmaenen
Hello,
I'm trying to create an MTOM client ( .net 2.0 ) within C# and WSE 3.0 for the XOP webservices provided by the jbossws 2.0.2 samples.
It looks like the server respons wel to the request but the client has an issue with the result :
Client found response content type of 'multipart/related;
MTOM enable on the client
Off course this is an MS issue but i wonder if more people did encounter this issue and did found an workaround ?
regards
below the SOAP repsons
{"Client found response content type of 'multipart/related;
type=\"application/xop+xml\"; start=\"<rootpart(a)ws.jboss.org>\";
\tstart-info=\"text/xml\";
\tboundary=\"----=_Part_48_22086523.1196410132767\"', but expected 'text/xml'.\r\n
The request failed with the error message:\r\n--\r\n\r\n
------=_Part_48_22086523.1196410132767\r\n
Content-Type: application/xop+xml; type=\"text/xml\"\r\n
Content-Transfer-Encoding: 8bit\r\n
Content-ID: <rootpart(a)ws.jboss.org>\r\n\r\n
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header></env:Header>
<env:Body>
<ns1:returnDataHandlerResponse xmlns:ns1=\"http://org.jboss.ws/xop/doclit\">
<xop:Include xmlns:xop=\"http://www.w3.org/2004/08/xop/include\" href=\"cid:dataHandler-4b229661-864f-4a53-9f84-2ca8fa4ab06@ws.jboss.org\"/>
</ns1:returnDataHandlerResponse>
</env:Body>
</env:Envelope>\r\n
------=_Part_48_22086523.1196410132767\r\n
Content-Type: text/plain\r\n
Content-Transfer-Encoding: binary\r\n
Content-Id: <dataHandler-4b229661-864f-4a53-9f84-2ca8fa4ab06(a)ws.jboss.org>\r\n\r\n
Server data\r\n
------=_Part_48_22086523.1196410132767--\r\n\r\n--."}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109200#4109200
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109200
16 years, 5 months