Announcement Announcement Module
Collapse
No announcement yet.
No adapter for endpoint-Does your endpoint implement a supported interface like Messa Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No adapter for endpoint-Does your endpoint implement a supported interface like Messa

    I am trying to use Annotations with my Endpoint but I do not want to use Marshalling. My input and output are both parsed in the method as JDOM objects. Why do I get the following exception

    Code:
    2009-03-30 17:38:58,062 DEBUG SoapMessageDispatcher:{MessageDispatcher.java:313} - Endpoint invocation resulted in exception - responding with Fault
    java.lang.IllegalStateException: No adapter for endpoint [protected javax.xml.bind.JAXBElement<org.jdom.Element> service.MarshallingRecipeRefreshEndpoint.invokeInternal(javax.xml.bind.JAXBElement<org.jdom.Element>) throws java.lang.Exception]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
    	at org.springframework.ws.server.MessageDispatcher.getEndpointAdapter(MessageDispatcher.java:279)
    	at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:220)
    	at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:168)
    	at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
    	at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
    	at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	at java.lang.Thread.run(Thread.java:595)

    Method
    Code:
    	
    	@PayloadRoot(localPart = "AnnRecipeRefreshRequest", namespace = "http://vicr.com/vmecs/schemas")
    	protected JAXBElement<Element> invokeInternal(JAXBElement<Element> request) throws Exception {
    		log.info("protected Element invokeInternal(Element request) throws Exception ");
    		Input input = new Input();
    		input.setPid(this.pidExpression.valueOf(request));
    		input.setRefreshReason(this.refreshReasonExpression.valueOf(request));
    		input.setUserId(Integer.parseInt(this.userIdExpression.valueOf(request)));
    		// ObjectFactory of = new ObjectFactory();
    		// RecipeRefreshRequest req = of.createRecipeRefreshRequest();
    		// req = request;
    		log.info("MarshallingRecipeRefreshEndpoint.invokeInternal.refreshRecipe.input : " + input.getPid());
    		// Input input = new Input();
    		// input.setPid(req.getPid());
    		// input.setUserId(Integer.parseInt(req.getUserId()));
    		// input.setRefreshReason(req.getRefreshReason());
    		Output output = this.taskList.refreshRecipe(input);
    		finalize();
    
    		Element responseElement = new Element("RecipeRefreshResponse", this.namespace);
    		responseElement.addContent(new Element("code", this.namespace).setText("" + output.getCode()));
    		responseElement.addContent(new Element("msg", this.namespace).setText("" + output.getMsg()));
    		// log.info(output.getMsg());
    		// RecipeRefreshResponse response = of.createRecipeRefreshResponse();
    		// response = new RecipeRefreshResponse();
    		// response.setMsg(output.getMsg());
    		// response.setCode(output.getCode() + "");
    		// return responseElement;
    		return (new JAXBElement<Element>(new QName(this.namespace.getURI(), "RecipeRefreshResponse", ""),
    				Element.class, responseElement));
    	}
    Request
    Code:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://vicr.com/vmecs/schemas">
       <soapenv:Header/>
       <soapenv:Body>
          <sch:AnnRecipeRefreshRequest>
             <!--You may enter the following 3 items in any order-->
             <!--type: string-->
             <sch:pid>RWK0693</sch:pid>
             <!--type: string-->
             <sch:userId>0</sch:userId>
             <!--type: string-->
             <sch:refreshReason>quae divum incedo</sch:refreshReason>
          </sch:AnnRecipeRefreshRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    Logs
    Code:
    2009-03-30 17:38:58,062 DEBUG SoapMessageDispatcher:{MessageDispatcher.java:313} - Endpoint invocation resulted in exception - responding with Fault
    java.lang.IllegalStateException: No adapter for endpoint [protected javax.xml.bind.JAXBElement<org.jdom.Element> service.MarshallingRecipeRefreshEndpoint.invokeInternal(javax.xml.bind.JAXBElement<org.jdom.Element>) throws java.lang.Exception]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
    	at org.springframework.ws.server.MessageDispatcher.getEndpointAdapter(MessageDispatcher.java:279)
    	at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:220)
    	at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:168)
    	at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
    	at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
    	at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	at java.lang.Thread.run(Thread.java:595)

  • #2
    Did you solve your problem?

    I'm having a similar problem.

    Comment


    • #3
      Hi,
      could you please post your configuration file?

      Comment


      • #4
        Does your endpoint implement a supported interface like MessageHandler or PayloadEdpt

        Hi,

        I am also facing same problem.

        Server Side configuration:
        1. web.xml

        Code:
          <servlet>
                <servlet-name>weather</servlet-name>
                <servlet-class>
                    org.springframework.ws.transport.http.MessageDispatcherServlet
                </servlet-class>
                <load-on-startup>1</load-on-startup>
            </servlet>
        
            <servlet-mapping>
                <servlet-name>weather</servlet-name>
                <url-pattern>/services/*</url-pattern>
            </servlet-mapping>
        2. weather-servlet.xml
        Code:
        <beans xmlns="http://www.springframework.org/schema/beans"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:security="http://www.springframework.org/schema/security"
            xsi:schemaLocation="http://www.springframework.org/schema/beans
                		http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                		http://www.springframework.org/schema/security
                       	http://www.springframework.org/schema/security/spring-security-3.0.xsd">
        
            <bean id="weatherService"
                class="com.apress.springrecipes.weather.WeatherServiceImpl" />
        
            <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping" />
        
            <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="temperatureEndpoint"
                class="com.apress.springrecipes.weather.TemperatureMarshallingEndpoint">
                <property name="weatherService" ref="weatherService" />
            </bean>    
        
            <bean id="temperature"
                class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
                        <property name="portTypeName" value="Weather" />
                        <property name="targetNamespace" value="http://springrecipes.apress.com/weather/schemas" />
                        <property name="schema" ref="schema"/>
                		<property name="locationUri" value="http://localhost:7001/SpringWS2Web/services"/>
             </bean>
              <bean id="schema" class="org.springframework.xml.xsd.SimpleXsdSchema">
                <property name="xsd" value="/WEB-INF/temperature.xsd"/>
            </bean>
            
            <!-- Spring Security - Spring WS -->
        
        	<bean id="secureMapping" class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
                <property name="mappings">
                    <props>
                        <prop key="{http://springrecipes.apress.com/weather/schemas}GetTemperaturesRequest">
                            temperatureEndpoint
                        </prop>
                    </props>
                </property>
                <property name="interceptors">
                    <list>
                        <bean class="org.springframework.ws.soap.server.endpoint.interceptor.SoapEnvelopeLoggingInterceptor"/>
                        <ref bean="wsSecurityInterceptor"/>
                    </list>
                </property>
                <property name="order" value="2"/>
            </bean>    
            <bean id="wsSecurityInterceptor" class="org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor">
                <property name="secureResponse" value="false"/>
                <property name="policyConfiguration"
                          value="classpath:securityPolicy.xml"/>
                <property name="callbackHandler">
                    <bean class="org.springframework.ws.soap.security.xwss.callback.SpringDigestPasswordValidationCallbackHandler">
                        <property name="userDetailsService" ref="securityService"/>
                    </bean>
                </property>
            </bean>   
             <bean id="securityService"
                  class="org.springframework.ws.samples.echo.service.impl.EchoSecurityService">        
            </bean>
            <security:global-method-security secured-annotations="enabled"/>
        
            <security:authentication-manager>
            	<security:authentication-provider user-service-ref="securityService"/>
            </security:authentication-manager>
        </beans>

        Comment


        • #5
          Does your endpoint implement a supported interface like MessageHandler or PayloadEdpt

          3. temperature.xsd
          Code:
          <?xml version="1.0" encoding="UTF-8"?>
          <xs:schema attributeFormDefault="unqualified"
              elementFormDefault="qualified"
              targetNamespace="http://springrecipes.apress.com/weather/schemas"
              xmlns:xs="http://www.w3.org/2001/XMLSchema">
          
              <xs:element name="GetTemperaturesRequest">
                  <xs:complexType>
                      <xs:sequence>
                          <xs:element type="xs:string" name="city" />
                          <xs:element type="xs:date" name="date"
                              maxOccurs="5" minOccurs="1" />
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
          
              <xs:element name="GetTemperaturesResponse">
                  <xs:complexType>
                      <xs:sequence>
                          <xs:element name="TemperatureInfo"
                              maxOccurs="5" minOccurs="1">
                              <xs:complexType>
                                  <xs:sequence>
                                      <xs:element type="xs:float" name="min" />
                                      <xs:element type="xs:float" name="max" />
                                      <xs:element type="xs:float" name="average" />
                                  </xs:sequence>
                                  <xs:attribute type="xs:string" name="city"
                                      use="optional" />
                                  <xs:attribute type="xs:date" name="date"
                                      use="optional" />
                              </xs:complexType>
                          </xs:element>
                      </xs:sequence>
                  </xs:complexType>
              </xs:element>
          </xs:schema>
          4. securityPolicy.xml
          Code:
          <xwss:SecurityConfiguration dumpMessages="false" xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
              <xwss:RequireUsernameToken passwordDigestRequired="true" nonceRequired="true"/>
          </xwss:SecurityConfiguration>
          5. TemperatureInfo.java
          Code:
          package com.apress.springrecipes.weather;
          
          import java.io.Serializable;
          import java.util.Date;
          
          public class TemperatureInfo implements Serializable {
          	
          	private static final long serialVersionUID = 1L;
          
          	private String city;
              private Date date;
              private double min;
              private double max;
              private double average;
          
              public TemperatureInfo() {}
          
              public TemperatureInfo(String city, Date date, double min, double max, double average) {
                  this.city = city;
                  this.date = date;
                  this.min = min;
                  this.max = max;
                  this.average = average;
              }
          
              public double getAverage() {
                  return average;
              }
          
              public String getCity() {
                  return city;
              }
          
              public Date getDate() {
                  return date;
              }
          
              public double getMax() {
                  return max;
              }
          
              public double getMin() {
                  return min;
              }
          
              public void setAverage(double average) {
                  this.average = average;
              }
          
              public void setCity(String city) {
                  this.city = city;
              }
          
              public void setDate(Date date) {
                  this.date = date;
              }
          
              public void setMax(double max) {
                  this.max = max;
              }
          
              public void setMin(double min) {
                  this.min = min;
              }
          }
          6. TemperatureMarshallingEndpoint.java
          Code:
          package com.apress.springrecipes.weather;
          
          import java.util.ArrayList;
          import java.util.Calendar;
          import java.util.Date;
          import java.util.List;
          
          import org.springframework.ws.server.endpoint.annotation.Endpoint;
          import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
          
          import com.apress.springrecipes.weather.schemas.GetTemperaturesRequestDocument;
          import com.apress.springrecipes.weather.schemas.GetTemperaturesResponseDocument;
          import com.apress.springrecipes.weather.schemas.GetTemperaturesRequestDocument.GetTemperaturesRequest;
          import com.apress.springrecipes.weather.schemas.GetTemperaturesResponseDocument.GetTemperaturesResponse;
          
          @Endpoint
          public class TemperatureMarshallingEndpoint { 
          
              private static final String namespaceUri =
                  "http://springrecipes.apress.com/weather/schemas";
          
              private WeatherService weatherService;
          
              public void setWeatherService(WeatherService weatherService) {
                  this.weatherService = weatherService;
              }
          
              @PayloadRoot(localPart = "GetTemperaturesRequest", namespace = namespaceUri)
              public GetTemperaturesResponseDocument getTemperature(GetTemperaturesRequestDocument request) {
          
                  GetTemperaturesRequestDocument requestDoc = (GetTemperaturesRequestDocument)request;
          
                  GetTemperaturesRequest in = requestDoc.getGetTemperaturesRequest();
          
                  GetTemperaturesResponseDocument responseDoc = (GetTemperaturesResponseDocument)
                      GetTemperaturesResponseDocument.Factory.newInstance();
          
                  List dates = new ArrayList();
          
                  for (Calendar calendar : in.getDateArray()) {
                      dates.add(calendar.getTime());
                  }
          
                  List<TemperatureInfo> infos = this.weatherService.getTemperatures(in.getCity(), dates);
          
                  GetTemperaturesResponse response = responseDoc.addNewGetTemperaturesResponse();
          
                  for (TemperatureInfo info: infos) {
                      GetTemperaturesResponse.TemperatureInfo out =
                          response.addNewTemperatureInfo();          
          
                      out.setCity(info.getCity());
                      out.setAverage((float)info.getAverage());
          
                      Calendar calendar = Calendar.getInstance();
                      calendar.setTime(info.getDate());
                      out.setDate(calendar);
                      out.setMax((float)info.getMax());
                      out.setMin((float)info.getMin());
                  }        
          
                  return responseDoc;
              }
          }

          Comment


          • #6
            Does your endpoint implement a supported interface like MessageHandler or PayloadEdpt

            7. WeatherService.java

            Code:
            package com.apress.springrecipes.weather;
            
            import java.util.Date;
            import java.util.List;
            
            public interface WeatherService {
            	
            	public List getTemperatures(String city, List<Date> date);
            
            }
            8. WeatherServiceImpl.java
            Code:
            package com.apress.springrecipes.weather;
            
            import java.util.ArrayList;
            import java.util.Date;
            import java.util.List;
            
            public class WeatherServiceImpl implements WeatherService {
            
            	@Override
            	public List getTemperatures(String city, List<Date> dates) {
            		List temperatures = new ArrayList();
                    for (Date date : dates) {
                        temperatures.add(new TemperatureInfo(city, date, 15.0, 110.0, 8.0));
                    }                
            
                    return temperatures;
            
            	}
            
            }
            Client Side Configuration/java class
            9. WeatherServiceClient.java
            Code:
            package com.apress.springrecipes.weather;
            
            import java.util.List;
            
            import org.springframework.ws.WebServiceMessageFactory;
            
            public class WeatherServiceClient {
            	private WeatherService weatherService;
            
              
                public void setWeatherService(WeatherService weatherService) {
                    this.weatherService = weatherService;
                }
            
                public List<TemperatureInfo> getTodayTemperature(String city, List dates) {
            
                    return weatherService.getTemperatures(city, dates);
                }
            
            }
            10. WeatherServiceProxy.java
            Code:
            package com.apress.springrecipes.weather;
            
            import java.util.ArrayList;
            import java.util.Calendar;
            import java.util.Date;
            import java.util.List;
            
            import org.springframework.ws.WebServiceMessageFactory;
            import org.springframework.ws.client.core.support.WebServiceGatewaySupport;
            
            import com.apress.springrecipes.weather.schemas.GetTemperaturesRequestDocument;
            import com.apress.springrecipes.weather.schemas.GetTemperaturesResponseDocument;
            import com.apress.springrecipes.weather.schemas.GetTemperaturesRequestDocument.GetTemperaturesRequest;
            import com.apress.springrecipes.weather.schemas.GetTemperaturesResponseDocument.GetTemperaturesResponse;
            
            public class WeatherServiceProxy extends WebServiceGatewaySupport
                implements WeatherService {
            
            	public WeatherServiceProxy(WebServiceMessageFactory messageFactory) {
            		super(messageFactory);
            	}
            	
            	
                @Override
                public List getTemperatures(String city, List<Date> dates) {
                    GetTemperaturesRequestDocument requestDoc =
                        GetTemperaturesRequestDocument.Factory.newInstance();
            
                    GetTemperaturesRequest request = requestDoc.addNewGetTemperaturesRequest();
            
                    for (Date date : dates) {
                        Calendar calendar = Calendar.getInstance();
                        calendar.setTime(date);
                        request.addDate(calendar);
                    }
            
                    request.setCity(city);        
            
                    GetTemperaturesResponseDocument responseDoc;
            
                    System.out.println(requestDoc.toString());
                    responseDoc = (GetTemperaturesResponseDocument)
                        this.getWebServiceTemplate().marshalSendAndReceive(requestDoc);
            
                    List infos = new ArrayList();
            
                    for (GetTemperaturesResponse.TemperatureInfo response :
                        responseDoc.getGetTemperaturesResponse().getTemperatureInfoArray()) {
            
                        TemperatureInfo info = new TemperatureInfo();                
            
                        info.setAverage(response.getAverage());
                        info.setCity(response.getCity());
                        info.setMax(response.getMax());
                        info.setMin(response.getMin());
                        info.setDate(response.getDate().getTime());
            
                        infos.add(info);
                    }
            
                    return infos;
                }
            
            }
            11. client.xml
            Code:
            <beans xmlns="http://www.springframework.org/schema/beans"
            	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            	xsi:schemaLocation="http://www.springframework.org/schema/beans
                    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
            
            		<bean id="messagFactory"
            	class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory" />
            
            	<bean id="abstractClient" abstract="true">
            		<constructor-arg ref="messagFactory" />
            		<property name="destinationProvider">
            			<bean
            				class="org.springframework.ws.client.support.destination.Wsdl11DestinationProvider">
            				<property name="wsdl"
            					value="http://localhost:7001/SpringWS2Web/services/temperature.wsdl" />
            			</bean>
            		</property>
            	</bean>
            	
            	<bean id="client" class="com.apress.springrecipes.weather.WeatherServiceClient">
            		<property name="weatherService" ref="weatherServiceProxy" />
            	</bean>
            
                <bean id="weatherServiceProxy" parent="abstractClient" 
            		class="com.apress.springrecipes.weather.WeatherServiceProxy">
            		<property name="interceptors" ref="securityInterceptor"/>
            	    <property name="defaultUri" value="http://localhost:7001/SpringWS2Web/services" />
            	    <property name="marshaller" ref="marshaller" />
            	    <property name="unmarshaller" ref="marshaller" />
            	</bean>
            
                <bean id="marshaller"
                    class="org.springframework.oxm.xmlbeans.XmlBeansMarshaller">
                </bean>
                
             	<bean id="securityInterceptor" class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
                    <property name="securementActions" value="UsernameToken"/>
                    <property name="securementUsername" value="john"/>
                    <property name="securementPassword" value="changeme"/>
                </bean>
                
            </beans>
            When I test without security it works fine but when i add security on top of it, it fails and through following error
            Test
            Code:
            ApplicationContext context =
                        new ClassPathXmlApplicationContext("client.xml");
            
                    WeatherServiceClient client =
                        (WeatherServiceClient) context.getBean("client");
            
                    List dates = new ArrayList();
                    dates.add(new Date());
                    dates.add(new Date());
            
                    List<TemperatureInfo> infos = client.getTodayTemperature("Sona", dates)
            Error:

            Code:
            I am in security
            john
            <Jul 7, 2010 10:33:57 PM IST> <Error> <HTTP> <BEA-101020> <[ServletContext@10371005[app:SpringWS2App module:SpringWS2Web path:/SpringWS2Web spec-version:2.5]] Servlet failed with Exception
            org.springframework.ws.soap.client.SoapFaultClientException: No adapter for endpoint [[email protected]025478]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
            	at org.springframework.ws.soap.client.core.SoapFaultMessageResolver.resolveFault(SoapFaultMessageResolver.java:37)
            	at org.springframework.ws.client.core.WebServiceTemplate.handleFault(WebServiceTemplate.java:735)
            	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:561)
            	at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:499)
            	at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:348)
            	Truncated. see log file for complete stacktrace
            It is passing secruity but not able to get endpoint. Please let me know where i am doing wrong.
            I am using spring framework 3.0.2, spring security 3.0.0 and spring ws 2.0.0 and wsdl4j-1.6.1.jar, wss4j-1.5.8.jar

            Comment


            • #7
              Does your endpoint implement a supported interface like MessageHandler

              This is XSD related Issue, This issue is resolved. For example if your input request element is 'InsertRequest' so need to define like

              <xs:element name="InsertRequest">
              <xs:annotation>
              <xs:documentation>Root element for Record Insert Request</xs:documentation>
              </xs:annotation>
              <xs:complexType>
              <xs:sequence>
              <xs:element name="GeneralDetails" type="tns:GenralDetailsType"></xs:element>
              <xs:element name="FullDetails" type="tns:FullDetailsType"></xs:element>
              </xs:sequence>
              </xs:complexType>
              </xs:element>

              ---------------
              Previously i was

              <element name="InsertRequest" type="tns:InsertRequestType"></element>


              <complexType name="InsertRequestType">
              <sequence>
              <element name="GeneralDetails" type="tns:GenralDetailsType"></element>
              <element name="FullDetails" type="tns:FullDetailsType"></element>
              </sequence>
              </complexType>

              Comment

              Working...
              X