Announcement Announcement Module
Collapse
No announcement yet.
Problem request webservice within JSP Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem request webservice within JSP

    I have implement a certain spring-ws service and when I sent a soap message I receive in spring webapplication 1 (running on tomcat 6.0.32):

    Request:
    Code:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:gen="http://www.foo.com/bar/webservice/generated">
       <soapenv:Header/>
       <soapenv:Body>
          <gen:GetAllPanelWSRequest/>
       </soapenv:Body>
    </soapenv:Envelope>
    Response
    Code:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Header/>
       <SOAP-ENV:Body>
          <ns2:GetAllPanelWSResponse xmlns:ns2="http://www.foo.com/bar/webservice/generated">
             <ns2:PanelWS ns2:Id="5">
                <ns2:name>all</ns2:name>
                <ns2:code>all</ns2:code>
             </ns2:PanelWS>
             <ns2:PanelWS ns2:Id="9">
                <ns2:name>test</ns2:name>
                <ns2:code>test1</ns2:code>
             </ns2:PanelWS>         
          </ns2:GetAllPanelWSResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    So far no problem. From a webappliction 2 (not using spring MVC etc.) I made a function and when I run this function it works:

    Main.java:
    Code:
    public class Main {
    	public static void main(String[] args) {
    		List<PanelWS> panelWSs = CallServices.getPanelWSs();
    		for (PanelWS p : panelWSs) {
    			System.out.println("\t" + makeString(p));
    		}
    	}
    ...
    CallServices.java
    Code:
    public static List<PanelWS> getPanelWSs() {
    		ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
    		PanelClient client = (PanelClient) ctx.getBean("client");
    		PanelWS panelWS = null;
    
    		// Get all panelWS
    		System.out.println("Get all panels...");
    		List<PanelWS> panelWSs = client.getAllPanelWS();
    		return panelWSs;
    	}
    Output:
    Code:
    Get all panels...
    	[id=5, name=all, code=all]
    	[id=9, name=test, code=test1]
    So this works great and as expected. But when I want to call the function

    Code:
    	<%
    		List<PanelWS> panelWSs = CallServices.getPanelWSs();
    	%>
    within a JSP (runnning on the same tomcat server) I get the following error:

    Server:
    Code:
    13-mei-2011 17:57:37 com.sun.xml.internal.messaging.saaj.soap.MessageImpl saveChanges
    SEVERE: SAAJ0539: Unable to get header stream in saveChanges
    13-mei-2011 17:57:37 com.sun.xml.internal.messaging.saaj.soap.MessageImpl saveChanges
    SEVERE: SAAJ0540: Error during saving a multipart message
    Client:
    Code:
    org.springframework.ws.soap.saaj.SaajSoapMessageException: Could not write message to OutputStream: Error during saving a multipart message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
    I'm using the following Java version pointing to myeclipse and tomcat:
    * JDK 1.6.0_13

    Jars:
    xercesImpl-2.9.1.jar
    xalan-2.7.1.jar
    serializer-2.7.1.jar
    spring-ws-1.5.9-all.jar
    spring.jar (2.5.6)
    xml-apis-1.3.04.jar
    xml-apis-ext-1.3.04.jar


    hopefully this is enough information to solve the problem. I found some messages and bugs the pointing to the fact that I need to delete some Jars (xalan and xercesImpl) from the projects. But I can't do this because it gives me a lot more errors (including the old ones)

    Thx in advance
Working...
X