Alex Philippi

Greenhorn
+ Follow
since Oct 05, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alex Philippi

Hi,
i created a workbook out of a given Excel 2007 file (the file was created with Excel 2010; but this shouldnt matter).

The given file looks like this:


I have to add some informations to this excel file, but if I run this test case, the "Spalte 1 - X" are removed ( I know the asserts are ugly but its only to show my issue):


I got no issues when I run the test with an Excel 2003 file. Does anybody know why these columns were removed?

The written workbook looks like this:


I hope anyone could give me a hint why the written workbook doesnt look like the original excel 2007 document.

Thanks
Alex


I decided to use the POI mailing list for this question -> therefore resolved here
Hi,
our web app uses the NTLM Authentication for SSO. This NTLM filter called for every action the user made. For legacy support the user could use some old struts actions.

Everthing is ok but when the user click on an struts action we get this weird exception:


java.lang.ClassCastException: our.company.name.NtlmHttpServletRequest cannot be cast to javax.servlet.ServletRequestWrapper
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.dhc.dhcvision.server.servlet.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:75)
com.dhc.dhcvision.server.servlet.filter.CacheAndResponseFilter.doFilter(CacheAndResponseFilter.java:108)
com.dhc.dhcvision.server.servlet.filter.SSOFilter.handleSSOLogin(SSOFilter.java:223)
com.dhc.dhcvision.server.servlet.filter.SSOFilter.doFilter(SSOFilter.java:144)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)




The NtlmHttpServletRequest:


I dont get it... Normally there could not be a ClassCastException. Any ideas?

We use struts-version 1.2.8 and JBOSS 4.0.5

Best regards
Alex
13 years ago
Hi,
I am saving a inputstream to a temp File (for accessing the stream more than once). But I think thats a kind of "ugly" code. Is there a better way to implement this?

Here the code:


Best Regards
Alex
16 years ago
Hi, this is perhaps a weird question, but I have three nodes like these:

<position>1</position>
<quan>10</quan>
<position>2</position>
<quan>50</quan>
<position>1</position>
<quan>20</quan>


I am able to sum all fields with position 1, but I want only to display this position 1 one time in the transformed xml file. It should look like this:
<position>1</position>
<quan>30</quan>
<position>2</position>
<quan>50</quan>


But it look like this:
<position>1</position>
<quan>30</quan>
<position>2</position>
<quan>50</quan>
<position>1</position>
<quan>30</quan>

Is it possible to "say" in the xslt file to only print the position 1 only one time?

I hope you can help me

Best Regards
Hi,
I am developing a servlet A that receives a HTTP POST request from a client B with a XML Stream as payload. I transform the Stream via XSLT and send the result with httpcommons from apache to a client C. At the same time I am sending the "normal" response back to client B. It sound weird but it works so far.
But I think thats should be a better solution to send the result to the client C. Thats my code for that:



Can someone suggest a better solution?
16 years ago
Hi,
I have a XML File and I want to "wrap" it into a soap envelope with XSLT. Is it possible to read the xml-file from a certain node into the the soap body? I tried it with <xsl:value-select/> but I only get the plain text and not the xml tags.

<soap>
<xml-file>
...
content beginning from node X
...
</xml-file>
</soap>

Regards
Alex
Hi,
I only want to handle this in java if there is no way to realise it with xslt.
The <child number="2"/> is the transformed result of <position number="2"><parentNumber>1<...../>.

Could I first use (in XSLT) <xsl:apply-templates ... /> to write all <position/> without a parent number to the result xml file and then use again <xsl:apply-templates ... /> to hang all <position> tags with a parentNumber as new <child number="X"/> node under the according <position/> node?
Hi, I am now trying to create a new xml document with a xslt. The problem is that I have to create such a xml structure:



out of this xml Source:



Is it possible to build a "List" with xslt or should I access the XML Source with java and build a new DOM?
Hi,
I am trying to read a XML Stream within a doPost request. Thats works fine and I can display the String value with request.getReader() but how can I access the stream with the request.getInputStream (or Source xmlSource ...)?
Or how can I build easily the inputStream to a DOM?

Thats my code so far:


I hope anyone could me some hints
Edit: I had a look at the Java EE Tutorial by SUN. Do you think I could solve my "issue" (project) by using only the jax-ws for the service, StAX to transform/read the xml and finally SAAJ to send attachements?
16 years ago
Hi,
thanks for the links. I think I have to use Axis2.

I tried to use Metro with Eclipse and Tomcat 6, but to use Metro I will have to put some libs in the endorsement folder of the Tomcat. I don't have access to the Tomcat directly ( I can only deploy stuff). I think if I want to use Metro I should switch to Netbeans and Glassfish .

CXF looks good too. But I think Axis2 has the best tool support for Eclipse and therefore that will be my choice (I think ). I only have to figure out how I could use jax-ws 2.0 with Axis2 (in fact I want to be "close" the specification while I realizing the WS).

Regards
Alex
16 years ago
Hi,


1. Is this a public service that will need to be exposed to the world with a WSDL so that anybody can use it - or is it going to be restricted to a few known clients.



1. This service don't expose a wsdl. It only transform XML Streams (which are "enveloped" in soap) and sends it to System B. And yes, its restricted to a hand full of clients.



2. I'm assuming the connection is via the Internet - correct? Is the transfer method already settled? FTP vrs HTTP vrs email vrs ??.



2. The transfer method will be a https post to this service and later to the System B.




3. Does system A have to submit any other control information or just the XML input file?



3. The System A post the XML File and perhaps a few soap attachements.


Can I use the jax-ws for this? Or should I use a framework (axis, metro, xfire...).

Regards
Alex
16 years ago
Hi,
I have to realize a small project where I have to handle xml files via web service.

1. The WS receives a xml file from a system A.
2. The WS has to transform (with xsl) this xml file to an other xml file.
3. The WS has to check the new generated xml file with a xsd and send the this file to a system B.

Does anyone know if this A->WS->B problem could be solved with a special WS easily? Or doesn't it matter what kind of webservice I choose?

Regards
Alex
16 years ago