in reply to Accessing Attributes in Web Servie message - Server Side

I appreciate everyone's suggestions. Nothing is working. Most solutions rely on an xml file or a data object. The data that reaches my package is simply a hash ref not a data object. I trying walking through the hash/array/hash to pull attributes without success. So a few questions: - Is there a way to capture the untouched raw message that is coming in? - Is this a serialization issue? If so how can I deserialize the data? - Can I force the data coming in to be recognized as a data object (any attempts to reference the methods of the incoming data give me errors.) - Is there a way to pass the hash ref to xml:twig/simple or other mods without creating a file? Thanks to anyone who can help me.
  • Comment on Re: Accessing Attributes in Web Servie message - Server Side

Replies are listed 'Best First'.
Re^2: Accessing Attributes in Web Servie message - Server Side
by Anonymous Monk on Mar 01, 2016 at 00:49 UTC

    - Is there a way to capture the untouched raw message that is coming in?

    Yes, read from STDIN , be first

    - Is this a serialization issue? If so how can I deserialize the data?

    No, not serialization

    - Can I force the data coming in to be recognized as a data object (any attempts to reference the methods of the incoming data give me errors.)

    Its hard to see your code to know what you're talking about.

    So far you've gotten adequate responses to answer both your questions, you just have to put it all together, and present everything relevant when you get stuck.

    If you find yourself saying tried that but it didn't work substitute that with code that shows it doesn't work.

    - Is there a way to pass the hash ref to xml:twig/simple or other mods without creating a file?

    Yes, the docs explain how, they have code examples and word explanations

      Thank you Thank you Thank you. I'm using the STDIN to grab the raw data and parse it. I had no idea I could do that. My new problem is sending back a message to the client. If I just "print $xml" where $xml is the STDIN message, it works. If I want to send something else back it doesn't work. How do I send a customized message back to the client if I'm using STDIN to receive the message?