webMethods

 View Only
Expand all | Collapse all

Error when I Map my InputDocument to DocumentToJson

  • 1.  Error when I Map my InputDocument to DocumentToJson

    Posted Wed September 11, 2024 01:56 PM

    Hi
    I am trying to consume a Post API using pub:client http. I get and error

    " com.wm.app.b2b.server.ServiceException: [ISS.0086.9249] Missing Parameter: document at pub.json.documentToJSONString(json.java:312) at sun.reflect.GeneratedMethodAccessor671.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:411) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:744) at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56) at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:345) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:615) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:425) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:383) at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:253) at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:236) at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:267) at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:668) at com.wm.lang.flow.FlowState.step(FlowState.java:534) at com.wm.lang.flow.FlowState.invoke(FlowState.java:501) at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1150) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:744) at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56) at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:345) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:401) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:615) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:425) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:383) at com.wm.app.b2b.server.HTTPInvokeHandler._process(HTTPInvokeHandler.java:278) at com.wm.app.b2b.server.HTTPInvokeHandler._process(HTTPInvokeHandler.java:95) at com.wm.app.b2b.server.InvokeHandler.process(InvokeHandler.java:107) at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:223) at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:425) at com.wm.util.pool.PooledThread.run(PooledThread.java:134) at java.lang.Thread.run(Thread.java:748)"

    I have mapped my input which is a document Reference to documentToJsonstring so i can pass it to pub:client http but it does not seem to pick up the mapping


    #webMethods-io-B2B
    #webMethods-io-Integration
    #webMethods
    #B2B-Integration
    #webMethods-cloud


  • 2.  RE: Error when I Map my InputDocument to DocumentToJson

    Posted Wed September 11, 2024 02:29 PM

    Hi,

    where does your “inputs” document come from?
    It looks like a document reference to me, but the base referenced DocType is missing.
    Therefore, the pipeline is eventually trying to map the wrong document instance here.

    Please check that and share more details regarding this.

    Regards,
    Holger


    #B2B-Integration
    #webMethods
    #webMethods-io-B2B
    #webMethods-io-Integration
    #webMethods-cloud


  • 3.  RE: Error when I Map my InputDocument to DocumentToJson

    Posted Wed September 11, 2024 04:00 PM

    Hi @Holger_von_Thomsen Holger

    The referenced Doctype is the. I get this error only when run flow service in browser.

    I am not sure why!

    Regards
    Keletso


    #webMethods
    #B2B-Integration
    #webMethods-io-B2B
    #webMethods-io-Integration
    #webMethods-cloud


  • 4.  RE: Error when I Map my InputDocument to DocumentToJson

    Posted Wed September 11, 2024 04:02 PM

    Check if the document exist in the pipeline. The most likely scenario is it either has a different name (upper or lower case for instance) or it doesn’t exist at all. You can also initialize the document in the previous map.


    #webMethods-io-Integration
    #webMethods-cloud
    #B2B-Integration
    #webMethods
    #webMethods-io-B2B


  • 5.  RE: Error when I Map my InputDocument to DocumentToJson

    Posted Wed September 11, 2024 04:20 PM

    Hi @engin_arlak

    I checked and all seems ok. What i dont understand is that i only get this error when i run flow service as in browser


    #webMethods
    #webMethods-cloud
    #webMethods-io-B2B
    #webMethods-io-Integration
    #B2B-Integration


  • 6.  RE: Error when I Map my InputDocument to DocumentToJson

    Posted Wed September 11, 2024 04:29 PM

    It probably doesn’t have anything to do with where you run it. Only difference would be passing something through body when you run it from browser. That’s probably why

    said this as well. You can save the pipeline before you make the call and run it on browser, and then run it on debug mode by setting it to restore pipeline to verify if you are actually recieving the document correctly. Otherwise please share the rest of the flow service, so that we can assist you properly.


    #webMethods-io-B2B
    #webMethods
    #B2B-Integration
    #webMethods-io-Integration
    #webMethods-cloud


  • 7.  RE: Error when I Map my InputDocument to DocumentToJson

    Posted Thu September 12, 2024 02:02 AM


  • 8.  RE: Error when I Map my InputDocument to DocumentToJson

    Posted Thu September 12, 2024 02:54 AM

    Hi,
    This package is no use for us as it’s dependancy is missing. From your service, it looks like you are not passing any input to service when it is getting invoked from browser.

    When you invoke it from browser there is no input is passed so your service “inputs” document will be null and “pub.json:documentToJSONString” flow will not have anything to convert.

    Also what is the requirement to invoke it from browser? if you want to expose this service then you have to expose it as REST/WS and invoke it from any API testing tool like postman and SOAP UI.

    Thanks,
    Yogesh


    #webMethods
    #webMethods-cloud
    #B2B-Integration
    #webMethods-io-B2B
    #webMethods-io-Integration


  • 9.  RE: Error when I Map my InputDocument to DocumentToJson

    Posted Thu September 12, 2024 12:25 AM

    Hi,
    What is the input of your flow service? Are you trying to pass any data to your flow service while accessing it from browser or everything is hardcoded in your flow.

    Pls share complete flow service with Input & Output.

    Thanks,
    Yogesh


    #webMethods-io-B2B
    #B2B-Integration
    #webMethods
    #webMethods-io-Integration
    #webMethods-cloud


  • 10.  RE: Error when I Map my InputDocument to DocumentToJson

    Posted Wed October 23, 2024 10:17 AM

    Thank you so much for the solution, it helped me.

    Summary The issue is with the missing or incorrect mapping of your input document to the documentToJSONString service. Double-check that the document is properly populated and mapped in the pipeline. Ensure the document structure is correct and matches the input expected by the service, as this is likely causing the error. I’m in the middle of my thesis for a Master’s program in Literature, and honestly, I was feeling overwhelmed with the workload. After some research, I found Academized’s [academized.com/write-my-thesis](https://academized.com/write-my-thesis) thesis writing service. They helped me refine my ideas and organize my thoughts into a structured document. It was a huge relief. I’d recommend it to anyone who needs help managing their thesis writing process.

    #webMethods-io-B2B
    #webMethods-io-Integration
    #webMethods-cloud
    #B2B-Integration
    #webMethods