Results 1 to 1 of 1

Thread: Unusual characters in SOAP response

  1. #1
    Join Date
    Jun 2006
    Posts
    8

    Default Unusual characters in SOAP response

    Hi All,

    I'm stumped! Has anyone seen anything like this before in their SOAP response using Spring WS 2.0? It looks like TCP Packet headers? Anyone have any clue what I've done wrong?

    Code:
    ------=_Part_1_7461681.1302870004265 
    Content-Type: application/xop+xml; charset=utf-8; type="text/xml"  
    
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <ns2:think_event_acknowledgment xmlns:ns2="http://Think/XmlWebServices/" status="success"/>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope> 
    ------=_Part_1_7461681.1302870004265--
    In particular - this is the stuff that shouldn't be in my response - what is it and who put it there?

    Code:
    ------=_Part_1_7461681.1302870004265 
    Content-Type: application/xop+xml; charset=utf-8; type="text/xml" 
    
    ------=_Part_1_7461681.1302870004265-
    I think I've got it configured properly. Here's my ws-servlet.xml:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
    	xmlns:context="http://www.springframework.org/schema/context"
    	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/context 
            http://www.springframework.org/schema/context/spring-context-3.0.xsd
            http://www.springframework.org/schema/web-services
            http://www.springframework.org/schema/web-services/web-services-2.0.xsd">
    
    	<bean
    		class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping" />
    
    	<bean
    		class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
    		<constructor-arg index="0" ref="marshaller" />
    	</bean>
    
    	<bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"
    		p:contextPath="com.risi.think.endpoint" p:mtomEnabled="true">
    	</bean>
    
    	<bean id="thinkEndpoint" class="com.risi.think.endpoint.service.ThinkEndpoint">
    		<constructor-arg ref="thinkService" index="0" />
    	</bean>
    
    	<bean id="thinkService" class="com.risi.think.endpoint.service.ThinkServiceImpl" />
    
    	<bean id="ThinkEvent"
    		class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition"
    		p:wsdl="/WEB-INF/ThinkEvent.wsdl">
    	</bean>
    
    </beans>
    And here's my endpoint:

    Code:
    package com.risi.think.endpoint.service;
    
    import java.util.List;
    
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.springframework.util.Assert;
    import org.springframework.ws.server.endpoint.annotation.Endpoint;
    import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
    
    import com.risi.think.endpoint.ObjectFactory;
    import com.risi.think.endpoint.TdCustomer;
    import com.risi.think.endpoint.ThinkEventAcknowledgment;
    import com.risi.think.endpoint.ThinkEventNotification;
    import com.risi.think.endpoint.ZZThinkEventAcknowledgmentStatus;
    
    @Endpoint
    public class ThinkEndpoint {
    
    	protected final Log logger = LogFactory.getLog(getClass());
    	private static final String NAMESPACE_URI = "http://Think/XmlWebServices/";
    	private ThinkService thinkService;
    	private ObjectFactory objectFactory;
    
    	public ThinkEndpoint(ThinkService thinkService) {
    		Assert.notNull(thinkService, "'ThinkService' must not be null");
    		this.thinkService = thinkService;
    		this.objectFactory = new ObjectFactory();
    	}
    
    	@PayloadRoot(localPart = "think_event_notification", namespace = NAMESPACE_URI)
    	public ThinkEventAcknowledgment processCustomer(ThinkEventNotification notification)
    			throws Exception {
    		ThinkEventAcknowledgment response = objectFactory.createThinkEventAcknowledgment();
    		try {
    			List<TdCustomer> customers = notification.getTransactionData().getTdCustomer();
    			logger.debug("customer: " + customers.get(0));
    			thinkService.processCustomer(customers.get(0));
    			response.setStatus(ZZThinkEventAcknowledgmentStatus.SUCCESS);
    		} catch (Exception e) {
    			response.setStatus(ZZThinkEventAcknowledgmentStatus.FAILURE);
    			response.setFailureReason(e.getMessage());
    		}
    		return response;
    	}
    
    }
    Last edited by pidepiper; Apr 17th, 2011 at 10:23 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •