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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

SAP Adapter - stringToDocument Error

  • 1.  SAP Adapter - stringToDocument Error

    Posted 02/09/16 01:00 PM

    Afternoon Boys,

    I was wondering if someone could help.

    I just called the ‘getFile’ service which retrieves a XML order file. The file has the following structure…

    <?xml version="1.0" encoding="UTF-8"?> HEADER SWVSYS 10-033-2015 ......................... .............

    When trying to invoke the ‘stringToDocument’ service I get the following Error. (I’m not sure what the XQUERY segment above is from. Possible Oracle system) Could you possibly guide me on the error.

    java.lang.ClassCastException: class com.wm.util.Values:sun.misc.Launcher$AppClassLoader@1a16869 incompatible with class [B:null
    at pub.web.stringToDocument(web.java:482)
    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:303)
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:700)
    at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:147)
    at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:279)
    at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:556)
    at com.wm.lang.flow.FlowState.stepIncremental(FlowState.java:479)
    at com.wm.lang.flow.FlowState.invoke(FlowState.java:370)
    at wm.server.JSBC_flow.stepFlow(JSBC_flow.java:203)
    at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
    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:310)
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:700)
    at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:104)
    at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:151)
    at com.wm.app.b2b.server.HTTPDispatch.run(HTTPDispatch.java:441)
    at com.wm.util.TimeWrappingProvider$TimeMesuredTask.run(TimeWrappingProvider.java:40)
    at com.wm.util.pool.PooledThread.run(PooledThread.java:109)
    at java.lang.Thread.run(Thread.java:725)

    Thank you for you help guys.


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 2.  RE: SAP Adapter - stringToDocument Error

    Posted 02/09/16 01:07 PM

    To convert the xml string to IS document (IData) use the services in WmPublic/pub.xml folder

    Read 9-X_Integration_Server_Built-In_Services_Reference for more details and usage. Check the below link

    http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite9-9/Integration_Server/9-9_Integration_Server_Built_In_Services_Reference.pdf


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 3.  RE: SAP Adapter - stringToDocument Error

    Posted 02/09/16 01:10 PM

    DS,
    step1:getFile (loasAs → Bytes)
    step2:xmlStringToXMLNode
    step3:pub.xml.XMLnodeToDocument

    Try above one and let me know.

    Thanks,


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: SAP Adapter - stringToDocument Error

    Posted 02/09/16 01:16 PM

    Cheers Boys and as always MR as173d :smiley:

    I will give this a read and go. Would you possibly mind explaining what the error is saying to me?


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 5.  RE: SAP Adapter - stringToDocument Error

    Posted 02/09/16 02:36 PM

    Good Morning DS, Any luck with the suggested steps ?

    Thanks,


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 6.  RE: SAP Adapter - stringToDocument Error

    Posted 02/10/16 06:06 AM

    Morning MR as173d,

    Thank you for your response.

    I don’t appear to have xmlStringToXMLNode or pub.xml.XMLnodeToDocument

    Thank you bro.


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: SAP Adapter - stringToDocument Error

    Posted 02/10/16 06:08 AM

    …sorry I forgot to mention. I do have:-

    wmPublic.pub.record:XMLValuesToRecord

    wmPublic.pub.record:recordToXMLValues

    Thank you


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 8.  RE: SAP Adapter - stringToDocument Error

    Posted 02/10/16 09:11 AM

    Hi D S,

    which version of IS are you using?

    The WmPublic/pub.xml-Services have been introduced long time ago (before or with wM 7.1).
    The WmPublic/pub.web-Services are marked as deprecated since then.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 9.  RE: SAP Adapter - stringToDocument Error

    Posted 02/10/16 09:14 AM

    Hey Holger,

    Thank you for responding.

    I’m using SAP Business Connector :frowning: Do you think this will be an issue?


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 10.  RE: SAP Adapter - stringToDocument Error

    Posted 02/10/16 09:19 AM

    Hi,

    this explains why there are no pub.xml-Services.

    SAP Business Connector is based on wM 4.x and is maintained by SAP.

    Regards,
    Holger


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 11.  RE: SAP Adapter - stringToDocument Error

    Posted 02/10/16 09:41 AM

    Hey Holger,

    Is this going to be a problem in regards to my issue? Are there any alternatives to the pub.xml-services?

    Thanks again for the time.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 12.  RE: SAP Adapter - stringToDocument Error

    Posted 02/10/16 01:25 PM

    Hi,

    I am not sure.

    Maybe some other members can assist here.

    I have never used Business Connector as we have started our projects with wM 6.x-Versions.

    Regards,
    Holger


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 13.  RE: SAP Adapter - stringToDocument Error

    Posted 02/11/16 06:05 AM

    Cheers Holger. No problem. Hopefully someone will be able to help.

    Many thanks for your time.


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 14.  RE: SAP Adapter - stringToDocument Error

    Posted 02/11/16 09:28 AM

    Hey DS, you better use some latest version or reach SAG team as you are using older version of wM which is not used by many.

    Thanks,


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 15.  RE: SAP Adapter - stringToDocument Error

    Posted 02/11/16 10:05 AM

    Hey,

    Most of the IS services/methods are the same and meet our needs.

    In regards to the initial query I have managed to work it out - finally :smiley:

    Thank you for the time, chaps :smiley:


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 16.  RE: SAP Adapter - stringToDocument Error

    Posted 02/11/16 10:34 AM

    Glad to hear you were able to resolve the issue self :smiley:

    Cheers!
    RMG


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 17.  RE: SAP Adapter - stringToDocument Error

    Posted 02/14/16 02:34 AM

    Great DS, you are learning wM and resolving the issues by yourself. Great.

    Thanks,


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 18.  RE: SAP Adapter - stringToDocument Error

    Posted 02/16/16 12:47 PM

    That’s the goal this forum can change it to :smiley: :smiley:


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods