SAP Adapter - stringToDocument Error

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.

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

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

Try above one and let me know.

Thanks,

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?

Good Morning DS, Any luck with the suggested steps ?

Thanks,

Morning MR as173d,

Thank you for your response.

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

Thank you bro.

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

wmPublic.pub.record:XMLValuesToRecord

wmPublic.pub.record:recordToXMLValues

Thank you

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

Hey Holger,

Thank you for responding.

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

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

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.

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

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

Many thanks for your time.

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,

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:

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

Cheers!
RMG

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

Thanks,

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