IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

webServices with webMethods 7.1

  • 1.  webServices with webMethods 7.1

    Posted Fri January 16, 2009 07:03 AM

    Hi,:o

    I am learning about webServices in 7.1 and came across a small glitch…well, i got a sample wsdl document from net and m trying to created a Provider and Consumer from dat.

    The WSDL i have used is basically one to get the day given any date (i.e, it returns Friday if the date i give is ‘2009-01-16’ ).

    But when I am trying to run the connector, it is giving a NullPointerException.

    I know I’ll figure it out somehow, but definitely will appreciate some inputs!!


    #soa
    #webMethods
    #API-Management


  • 2.  RE: webServices with webMethods 7.1

    Posted Fri January 16, 2009 04:50 PM

    Did you check the IS error logs to get more debug information??


    #webMethods
    #soa
    #API-Management


  • 3.  RE: webServices with webMethods 7.1

    Posted Mon January 19, 2009 04:48 AM

    Hi,

    I checked the error log and it is as follows!!

    2009-01-19 09:38:41 IST WMERROR db191f20e5de11dd9e869d2909d824f9NULL db191f20e5de11dd9e869d2909d824f91232338121359 D-1587vvvv:5555 com.wm.app.b2b.server.ServiceException: java.lang.NullPointerException com.wm.app.b2b.server.ServiceException: java.lang.NullPointerException
    at pub.clientimpl.soapClient(clientimpl.java:1759)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:403)
    at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:630)
    at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
    at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
    at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:241)
    at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
    at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:228)
    at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
    at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:621)
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:535)
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:381)
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:237)
    at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:189)
    at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324)
    at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:581)
    at com.wm.lang.flow.FlowState.step(FlowState.java:441)
    at com.wm.lang.flow.FlowState.invoke(FlowState.java:406)
    at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1040)
    at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:630)
    at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
    at com.wm.app.b2b.server.invoke.maya.WebServices.FromWSDL.WSDLConsumer_.connectors:DayOfWeekPortType_GetDayOfWeek
    I think that the error is due to the fact that the site given in the namespace is inaccessible…
    Any inputs?


    #webMethods
    #API-Management
    #soa


  • 4.  RE: webServices with webMethods 7.1

    Posted Mon January 19, 2009 10:11 AM

    Hi,

    Finally I got the solution for this one…Told u i will, dint I?:cool:
    Turns out that the problem was with the wsdl file I used…instead of giving <soap:binding style=“rpc”> I’d given it as <soap:binding style=“document”>

    Here s the correct sample wsdl document!!!

    <definitions name =“DayOfWeek” targetNamespace="[URL=“http://www.roguewave.com/soapworx/examples/DayOfWeek.wsdl”]http://www.roguewave.com/soapworx/examples/DayOfWeek.wsdl[/i][/URL][I]"
    xmlns:tns="[URL=“http://www.roguewave.com/soapworx/examples/DayOfWeek.wsdl”]http://www.roguewave.com/soapworx/examples/DayOfWeek.wsdl[/i][/URL][I]"
    xmlns:soap="[URL=“http://schemas.xmlsoap.org/wsdl/soap/”]http://schemas.xmlsoap.org/wsdl/soap/[/i][/URL][I]"
    xmlns:xsd="[URL=“XML Schema”]http://www.w3.org/2001/XMLSchema[/i][/URL][I]"
    xmlns="[URL=“http://schemas.xmlsoap.org/wsdl/”]http://schemas.xmlsoap.org/wsdl/[/i][/URL][I]">













    <soap:binding style=“rpc”
    transport="http://schemas.xmlsoap.org/soap/http"/>

    <soap: operation soapAction=“getdayofweek”/>

    <soap:body use=“encoded”
    namespace="[URL=“http://www.roguewave.com/soapworx/examples”]http://www.roguewave.com/soapworx/examples[/i][/URL][I]"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>


    <soap:body use=“encoded”
    namespace="[URL=“http://www.roguewave.com/soapworx/examples”]http://www.roguewave.com/soapworx/examples[/i][/URL][I]"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>





    Returns the day-of-week name for a given date


    <soap:address location="http://localhost:8090/dayofweek/DayOfWeek"/>


    This is just a sample wsdl document that I came across in the net.
    Don’t forget to provide the logic for the provider service in providerName_:services folder, else it won’t work!!

    Peace, ppl!


    #API-Management
    #soa
    #webMethods


  • 5.  RE: webServices with webMethods 7.1

    Posted Mon January 19, 2009 02:33 PM

    Well gud catch…BTW,you forgot to change this in the corrected wsdl above …
    <soap:binding style=“document”

    HTH,
    RMG


    #soa
    #webMethods
    #API-Management


  • 6.  RE: webServices with webMethods 7.1

    Posted Thu January 22, 2009 06:20 AM

    Thnx RMG, but I have posted the document that was working, so I dnt no where the clarification is.
    Please enlighten me.
    Cheers!


    #webMethods
    #soa
    #API-Management


  • 7.  RE: webServices with webMethods 7.1

    Posted Thu January 22, 2009 03:01 PM

    you said that after changing <soap:binding style=“rpc” to <soap:binding style=“document” it worked isn’t?..but the sample you pasted above still shows rpc…never mind its just a side note.

    HTH,
    RMG


    #API-Management
    #webMethods
    #soa


  • 8.  RE: webServices with webMethods 7.1

    Posted Fri January 23, 2009 03:40 AM

    No no RMG, u got me wrong!

    I sd after changing it to “rpc” it worked, before it ws “document”, now it is “rpc”.


    #webMethods
    #API-Management
    #soa


  • 9.  RE: webServices with webMethods 7.1

    Posted Fri January 23, 2009 02:58 PM

    OK never mind…I thought your words sounded other way…


    #webMethods
    #soa
    #API-Management