Announcement Announcement Module
Collapse
No announcement yet.
Unexpected end of file after null Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unexpected end of file after null

    Hi,

    this is my first time with ws and am facing a problem with it,

    here is my endpoint:
    Code:
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.ws.server.endpoint.annotation.Endpoint;
    import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
    import org.springframework.ws.server.endpoint.annotation.RequestPayload;
     
    import com.blueoss.cis.services.PartnersService;
    import com.visionoss.api.core.v8_1.transaction.TransactionStatusResponse;
     
    @Endpoint
    public class VOSSAsyncNotificationEndpoint {
     
        @Autowired
        private PartnersService partnersService;
        
        public VOSSAsyncNotificationEndpoint() {
    		// TODO Auto-generated constructor stub
    	}
     
        @PayloadRoot(namespace="http://127.0.0.1:8888/ws/webservices/8.1/asyncNotification/", localPart="transactionStatusNotification")
        public void transactionStatusNotification(@RequestPayload TransactionStatusResponse result) {
        	System.out.println("Phase: " + result.getPhase());
            System.err.println("ExternalTransactionUUID: " + result.getExternalTransactionUUID());
        }
     
    }

    here is web.xml

    Code:
    	
    <servlet>
            <servlet-name>spring-ws</servlet-name>
            <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
    		<init-param>
    			<param-name>contextConfigLocation</param-name>
    			<param-value>/WEB-INF/spring-ws-servlet.xml</param-value>
    		</init-param>
    		<init-param>
                <param-name>transformWsdlLocations</param-name>
                <param-value>true</param-value>
            </init-param>
        </servlet>
    
        <servlet-mapping>
            <servlet-name>spring-ws</servlet-name>
            <url-pattern>/ws/*</url-pattern>
        </servlet-mapping>
    here is spring config:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:context="http://www.springframework.org/schema/context"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sws="http://www.springframework.org/schema/web-services"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd 
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    	<context:component-scan base-package="com.blueoss.cis.ws" />
    	<sws:annotation-driven />
    	<!-- <sws:dynamic-wsdl id="asyncNotificationWS" portTypeName="asyncNotification" 
    		serviceName="transactionStatusNotification" locationUri="/ws_services/" targetNamespace="http://webservice.api.visionoss.com/v8_1/asyncNotification/" 
    		createSoap11Binding="true" requestSuffix="Response"> <sws:xsd location="/WEB-INF/asyncNotification.xsd" 
    		/> </sws:dynamic-wsdl> -->
    
    	<bean
    		class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
    		<property name="marshaller" ref="marshaller" />
    		<property name="unmarshaller" ref="marshaller" />
    	</bean>
    
    	<bean id="marshaller" class="org.springframework.oxm.xmlbeans.XmlBeansMarshaller">
    	</bean>
    
    	<bean id="asyncNotification-schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
    		<property name="xsd" value="/WEB-INF/wsdl/asyncNotification.xsd">
    		</property>
    	</bean>
    
    	<sws:static-wsdl id="asyncNotification" location="/WEB-INF/wsdl/asyncNotification.wsdl" />
    
    </beans>
    and wsdl:

    Code:
    <?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. 
    	RI's version is JAX-WS RI 2.2.1-hudson-28-. -->
    <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    	xmlns:tns="http://webservice.api.visionoss.com/v8_1/asyncNotification/"
    	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    	xmlns:txn="http://v8_1.core.api.visionoss.com/transaction/" name="notificationWebService"
    	targetNamespace="http://127.0.0.1:8888/ws/webservices/8.1/asyncNotification/">
    
    	<wsdl:types>
    		<xsd:schema
    			targetNamespace="http://127.0.0.1:8888/ws/webservices/8.1/asyncNotification/">
    			<xsd:import namespace="http://v8_1.core.api.visionoss.com/transaction/"
    				schemaLocation="syncNotification.xsd" />
    
    			<xsd:element name="transactionStatusResponse" type="txn:transactionStatusResponse" />
    		</xsd:schema>
    	</wsdl:types>
    
    	<wsdl:message name="transactionStatusResponse">
    		<wsdl:part element="tns:transactionStatusResponse" name="result" />
    	</wsdl:message>
    
    	<wsdl:portType name="asyncNotification">
    		<wsdl:operation name="transactionStatusNotification">
    			<wsdl:input message="tns:transactionStatusResponse" />
    		</wsdl:operation>
    	</wsdl:portType>
    
    	<wsdl:binding name="asyncNotificationSoap" type="tns:asyncNotification">
    		<soap:binding style="document"
    			transport="http://schemas.xmlsoap.org/soap/http" />
    		<wsdl:operation name="transactionStatusNotification">
    			<soap:operation soapAction="transactionStatusNotification" />
    			<wsdl:input>
    				<soap:body use="literal" />
    			</wsdl:input>
    		</wsdl:operation>
    	</wsdl:binding>
    
    	<wsdl:service name="asyncNotification">
    		<wsdl:port binding="tns:asyncNotificationSoap" name="asyncNotificationSoap">
    			<soap:address
    				location="http://127.0.0.1:8888/ws/webservices/8.1/asyncNotification" />
    		</wsdl:port>
    	</wsdl:service>
    
    </wsdl:definitions>
    I can open the wsdl file on http://127.0.0.1:8888/ws/webservices...ification.wsdl

    but I get the following error on soapui:

    Code:
    Error loading [http://127.0.0.1:8888/ws/webservices/8.1/syncNotification.xsd]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
    also if I try to open the xdd wit a post request I get:

    Code:
    500 Could not create message from InputStream: Invalid Content-Type:text/plain. Is this an error message instead of a SOAP response?; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/plain. Is this an error message instead of a SOAP response?
    can anyone help me please??

    Thanks in advance.
Working...
X