Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: how to deploy Spring WS with JaxBMarshaller

  1. #11
    Join Date
    Jul 2006
    Posts
    138

    Default

    Personally, I use Netbeans, and it provides an interface for retrieving a wsdl and generating JAXB client classes for communicating with my web service, and marshalling/unmarshalling objects. So I'm not the best resource to answer your questions regarding OC4J or BPEL.

  2. #12
    Join Date
    Dec 2007
    Posts
    15

    Default

    but according to log in my previous reply, do u think the web service was deployed perfectly fine...


    still i need answer from u guys like ...how to call spring web service from WEB template......also if one wants to access it from url in browser to verify.....

    from web template i am getting HTTP 404 error
    and from browser url i am getting HTTP 405 method not found error...
    Last edited by virfal; Dec 13th, 2007 at 10:11 AM.

  3. #13
    Join Date
    Jul 2006
    Posts
    138

    Default

    If you're getting a 404 when accessing the web service one way, and a 405 when accessing it a different way, then something must be wrong with the URL you're using in the first client. You won't be getting both a 404 and a 405 from the same URL with two different clients. I would make sure your client is using exactly the same URL as what you're putting in the browser to get the 405.

    I use a capture tunnel to send my requests and responses through that then forwards the messages on to the proper destination, so that I can view the request and response to make sure it's what I expect. You could use something similar.

  4. #14
    Join Date
    Dec 2007
    Posts
    15

    Default

    i tried with annotating method as given in airline example and added following part in config file ....

    <bean class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootAnnotationMethodEndpointMapping">
    <property name="interceptors">
    <list>
    <bean class="org.springframework.ws.server.endpoint.inte rceptor.PayloadLoggingInterceptor"/>
    <bean class="org.springframework.ws.soap.server.endpoint .interceptor.PayloadValidatingInterceptor">
    <property name="schema" value="/WEB-INF/xsd/helloWorld.xsd"/>
    <property name="validateRequest" value="true"/>
    <property name="validateResponse" value="true"/>
    </bean>
    </list>
    </property>
    <property name="order" value="1"/>
    </bean>

    it has given same 404/405 error but
    it started giving me warning in logger to indicate there is some problem with endpoint mapping.....

    warning is as follow

    Dec 13, 2007 2:31:57 PM org.springframework.ws.server.MessageDispatcher dispatch
    WARNING: No endpoint mapping found for [SaajSoapMessage helloRequest]

  5. #15
    Join Date
    Jul 2006
    Posts
    138

    Default

    Sounds like the request your sending doesn't match an endpoint mapping. I'd make sure the endpoint name, parameters, and parameter types are what they should be as per your xsd (your xsd generates the wsdl which the client uses to send the request, but if your endpoint doesn't match, then it won't work).

  6. #16
    Join Date
    Dec 2007
    Posts
    15

    Default

    Now i am getting this error ....

    No adapter for endpoint [com.endpoint.HelloWorldMarshalledEndpoint@1e2291d]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?
    I am using custom serializable object registered in marshaller as param in endpoint method.

    Done following definition in spring config xml.

    <bean class="org.springframework.ws.server.endpoint.adap ter.GenericMarshallingMethodEndpointAdapter">
    <constructor-arg ref="marshaller"/>
    </bean>



    dont know how do u register adapter for endpoint..

    help me to solve this error....

  7. #17
    Join Date
    Jul 2006
    Posts
    138

    Default

    In your endpoing class "HelloWorldMarshalledEndpoint", try adding the "@Endpoint" annotation before the class and "@PayloadRoot" annotations before your endpoint methods:

    Code:
    import org.springframework.ws.server.endpoint.annotation.Endpoint;
    import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
    
    @Endpoint
    public class myEndPoint{
      ...
    
      @PayloadRoot(localPart = "getMyRequest", namespace = "http://localhost/ws/helloWorld/schema")
      public MyResponse getMyRequest(GetMyRequest request){
        ...
    Adjust the localPart, namespace, MyRequest, MyResponse, getMyRequest, etc for your implementation.

  8. #18
    Join Date
    Dec 2007
    Posts
    15

    Default

    I have already done that, according to request element of my schema i have changed local part and namespace....

    still it gives me that error.....

    and to my surprise with annotation mapping in class

    org.springframework.ws.server.endpoint.mapping.Pay loadRootAnnotationMethodEndpointMapping

    is not identifying endpoint


    instead of that

    org.springframework.ws.server.endpoint.mapping.Pay loadRootQNameEndpointMapping

    is successfully able to map to endpoint class
    .



    Also i have tried using both


    XPathParamAnnotationMethodEndpointAdapter and
    GenericMarshallingMethodEndpointAdapter


    still its not getting endpoint adapter...

  9. #19
    Join Date
    Aug 2008
    Posts
    1

    Default

    Hi all,

    sorry to reload this topic after 1 year .... but i have the same problem : using spring with Jaxb2marshaller and oracle oc4j ... and google didn't help me a lot ...

    does anyone solve this problem ?

    my stack trace :

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'webServiceTemplate' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'jaxb2Marshaller' while setting bean property 'marshaller'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'jaxb2Marshaller' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.xml.bind.JAXBContext.newInstance([Ljava/lang/ClassLjavax/xml/bind/JAXBContext;
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:275)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1210)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:978)


    Thx in advanced

  10. #20
    Join Date
    Nov 2007
    Posts
    21

    Default soap sonar

    i used "soap sonar" tool to test the webservice...just download the personal edition of the tool and open new project by giving the "wsdl" URL...thats very easy to test..

Posting Permissions

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